ipanel-rnapp-ajb-base 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/app/eventBus/index.js
CHANGED
|
@@ -50,5 +50,6 @@ export const EVENTS = {
|
|
|
50
50
|
RECONNECT: 'shop.message.reconnect', // 触发websocket重连事件
|
|
51
51
|
ONLINE_LIST: 'shop.message.online', // 商城在线用户
|
|
52
52
|
CUSTOM_SERVICE_CONNECT_CHANGE: 'shop.message.customServiceConnectChange', // 智能客服转人工的进入和退出事件
|
|
53
|
+
HISTORY_MESSAGE_LIST: 'shop.message.history', // 获取历史消息
|
|
53
54
|
},
|
|
54
55
|
};
|
|
@@ -107,7 +107,7 @@ const ShopMessageManager = () => {
|
|
|
107
107
|
`user_id=${accountData?.user?.user_id}`,
|
|
108
108
|
'platform=web',
|
|
109
109
|
'api=ipanel_test',
|
|
110
|
-
`source=${
|
|
110
|
+
`source=${config.IPANEL_CLOUD_DOMAIN}`,
|
|
111
111
|
];
|
|
112
112
|
|
|
113
113
|
// 缓存全局商城客服websocket连接
|
|
@@ -153,9 +153,11 @@ const ShopMessageManager = () => {
|
|
|
153
153
|
msgData.route === 'message_list_new')
|
|
154
154
|
) {
|
|
155
155
|
if (msgData?.data) {
|
|
156
|
-
console.log(msgData, 'message_list_new');
|
|
157
156
|
const msgList = JSON.parse(msgData?.data);
|
|
158
|
-
global.base.shopMessageManager.messages =
|
|
157
|
+
global.base.shopMessageManager.messages =
|
|
158
|
+
msgList?.list || msgList || [];
|
|
159
|
+
let list = msgList?.list || msgList || [];
|
|
160
|
+
eventBus.emit(EVENTS.SHOPMESSAGE.HISTORY_MESSAGE_LIST, list);
|
|
159
161
|
}
|
|
160
162
|
}
|
|
161
163
|
};
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
Text,
|
|
7
7
|
NativeModules,
|
|
8
8
|
FlatList,
|
|
9
|
+
Platform,
|
|
9
10
|
} from 'react-native';
|
|
10
11
|
import {Divider} from '@rneui/themed';
|
|
11
12
|
const {px} = global.base;
|
|
@@ -29,7 +30,11 @@ export default ({setVisible}) => {
|
|
|
29
30
|
global.toast.showToast('设置成功');
|
|
30
31
|
setVisible(false);
|
|
31
32
|
} else {
|
|
32
|
-
|
|
33
|
+
// ios 值为1或者2为在线日志,安卓值为1为在线日志
|
|
34
|
+
if (
|
|
35
|
+
(Platform.OS === 'ios' && (res === 1 || res === 2)) ||
|
|
36
|
+
res === 1
|
|
37
|
+
) {
|
|
33
38
|
onOpen(1);
|
|
34
39
|
} else {
|
|
35
40
|
onOpen(2);
|
package/app/utils/common.js
CHANGED
|
@@ -256,7 +256,6 @@ async function shopGenMsg(
|
|
|
256
256
|
client_msg_id: client_msg_id,
|
|
257
257
|
server_msg_id: 0,
|
|
258
258
|
conversation_id, // 会话
|
|
259
|
-
sender_id: accountData?.user?.user_id, // 802eed8f01b14c1d90a9112787ddaf49
|
|
260
259
|
recver_id, // 接收消息的人
|
|
261
260
|
nick_name: accountData?.user?.nickname, // 发送方 zhanghaoyy
|
|
262
261
|
face_url: accountData?.user?.icon_url
|