ipanel-rnapp-ajb-base 1.0.16 → 1.0.17
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/App.js +2 -2
- package/app/api/ipanelCloudApi.js +4 -4
- package/app/components/common/PickerV2/index.js +21 -20
- package/app/components/common/SheetManage/index.js +79 -69
- package/app/components/index.js +2 -2
- package/app/hooks/shopMessageManager.js +22 -85
- package/app/screens/BaseScreen.js +2 -0
- package/app/screens/CommonScreens/TvAlbumScreen/index.js +4 -2
- package/package.json +2 -2
package/app/App.js
CHANGED
|
@@ -35,7 +35,7 @@ import Loading from './components/common/Loading';
|
|
|
35
35
|
import Toast from './components/common/Toast';
|
|
36
36
|
import Dialog from './components/common/Dialog';
|
|
37
37
|
import Notify from './components/common/Notify';
|
|
38
|
-
import SheetManage from './components/common/SheetManage';
|
|
38
|
+
// import SheetManage from './components/common/SheetManage';
|
|
39
39
|
import storage from './storage';
|
|
40
40
|
|
|
41
41
|
import {navigationRef} from './utils/RootNavigation';
|
|
@@ -440,7 +440,7 @@ const App = () => {
|
|
|
440
440
|
<Toast onRef={ref => (global.toast = ref)} />
|
|
441
441
|
<Notify onRef={ref => (global.notify = ref)} />
|
|
442
442
|
<Dialog onRef={ref => (global.dialog = ref)} />
|
|
443
|
-
<SheetManage onRef={ref => (global.sheetManager = ref)} />
|
|
443
|
+
{/* <SheetManage onRef={ref => (global.sheetManager = ref)} /> */}
|
|
444
444
|
{versionUpdateConfirmVisible && (
|
|
445
445
|
<VersionUpdateConfirm
|
|
446
446
|
onVisibleChange={setVersionUpdateConfirmVisible}
|
|
@@ -666,7 +666,7 @@ export const getAddressUser = data => {
|
|
|
666
666
|
|
|
667
667
|
export const getCloudInfo = async data => {
|
|
668
668
|
return homedHttp({
|
|
669
|
-
url: `http://izone.${await global.base.getHomedDomain()}/account/cloud/get_info`,
|
|
669
|
+
url: `http://izone.${appName === '禺乐慧家' ? await global.base.getHomedDomain() : 'homed.tv'}/account/cloud/get_info`,
|
|
670
670
|
method: 'GET',
|
|
671
671
|
data,
|
|
672
672
|
});
|
|
@@ -674,7 +674,7 @@ export const getCloudInfo = async data => {
|
|
|
674
674
|
|
|
675
675
|
export const getCloudFileList = async data => {
|
|
676
676
|
return homedHttp({
|
|
677
|
-
url: `http://izone.${await global.base.getHomedDomain()}/account/cloud/file/get_list`,
|
|
677
|
+
url: `http://izone.${appName === '禺乐慧家' ? await global.base.getHomedDomain() : 'homed.tv'}/account/cloud/file/get_list`,
|
|
678
678
|
method: 'GET',
|
|
679
679
|
data,
|
|
680
680
|
});
|
|
@@ -682,7 +682,7 @@ export const getCloudFileList = async data => {
|
|
|
682
682
|
|
|
683
683
|
export const openCloudService = async data => {
|
|
684
684
|
return homedHttp({
|
|
685
|
-
url: `http://izone.${await global.base.getHomedDomain()}/account/cloud/open`,
|
|
685
|
+
url: `http://izone.${appName === '禺乐慧家' ? await global.base.getHomedDomain() : 'homed.tv'}/account/cloud/open`,
|
|
686
686
|
method: 'POST',
|
|
687
687
|
data,
|
|
688
688
|
});
|
|
@@ -690,7 +690,7 @@ export const openCloudService = async data => {
|
|
|
690
690
|
|
|
691
691
|
export const deleteCloudFile = async data => {
|
|
692
692
|
return homedHttp({
|
|
693
|
-
url: `http://izone.${await global.base.getHomedDomain()}/account/cloud/file/delete`,
|
|
693
|
+
url: `http://izone.${appName === '禺乐慧家' ? await global.base.getHomedDomain() : 'homed.tv'}/account/cloud/file/delete`,
|
|
694
694
|
method: 'POST',
|
|
695
695
|
data,
|
|
696
696
|
});
|
|
@@ -2,10 +2,10 @@ import React,{useEffect, useState} from 'react';
|
|
|
2
2
|
import {View, Text, StyleSheet} from 'react-native';
|
|
3
3
|
import Picker from '../PickerV2Base/picker';
|
|
4
4
|
import px from '../../../utils/scaleSize';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from 'react-native-reanimated';
|
|
5
|
+
// import {
|
|
6
|
+
// useAnimatedStyle,
|
|
7
|
+
// withSpring,
|
|
8
|
+
// } from 'react-native-reanimated';
|
|
9
9
|
const pickerStyles = {
|
|
10
10
|
okView:{borderLeftColor:'#F0F0F0',borderLeftWidth:1},
|
|
11
11
|
okText: {color: '#E86003',width:px(500)},
|
|
@@ -24,11 +24,11 @@ maskMiddle:{borderColor:'transparent'},
|
|
|
24
24
|
width:'100%',
|
|
25
25
|
height:px(205),
|
|
26
26
|
backgroundColor:'#fff',
|
|
27
|
-
top:px(15)
|
|
27
|
+
top:px(15),
|
|
28
|
+
borderTopRightRadius:px(20),borderTopLeftRadius:px(20)
|
|
28
29
|
},
|
|
29
30
|
titleContent:{
|
|
30
|
-
width:'100%',height:px(190),borderBottomColor:'#f0f0f0',borderBottomWidth:1
|
|
31
|
-
borderTopRightRadius:px(20),borderTopLeftRadius:px(20)
|
|
31
|
+
width:'100%',height:px(190),borderBottomColor:'#f0f0f0',borderBottomWidth:1
|
|
32
32
|
},
|
|
33
33
|
titleText:{
|
|
34
34
|
fontSize:px(48),color:'#333',textAlign:'center',lineHeight:px(190)
|
|
@@ -55,21 +55,22 @@ const PickerV2 = ({
|
|
|
55
55
|
animationEffects = {},
|
|
56
56
|
title
|
|
57
57
|
}) => {
|
|
58
|
+
|
|
58
59
|
|
|
59
60
|
// console.log(title)
|
|
60
|
-
const customSpringStyles = useAnimatedStyle(() => {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
});
|
|
61
|
+
// const customSpringStyles = useAnimatedStyle(() => {
|
|
62
|
+
// return {
|
|
63
|
+
// transform: [
|
|
64
|
+
// {
|
|
65
|
+
// translateY: withSpring(animatedStartValue, {...{
|
|
66
|
+
// damping: 20,
|
|
67
|
+
// stiffness: 100,
|
|
68
|
+
// mass:0.5
|
|
69
|
+
// },...animationEffects}),
|
|
70
|
+
// },
|
|
71
|
+
// ],
|
|
72
|
+
// };
|
|
73
|
+
// });
|
|
73
74
|
|
|
74
75
|
// console.log(defaultValue)
|
|
75
76
|
const handlePickerChange=(item)=>{
|
|
@@ -1,72 +1,82 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {View, Text, StyleSheet} from 'react-native';
|
|
3
|
-
import PickerV2 from '../PickerV2';
|
|
4
|
-
import {useSharedValue} from 'react-native-reanimated';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, Text, StyleSheet } from 'react-native';
|
|
5
3
|
|
|
6
|
-
const Home = (
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const [visible, setPickerVisible] = useState(false);
|
|
10
|
-
const [pickerData, setPickerData] = useState([]);
|
|
11
|
-
const [pickerTitle,setPickerTitle] = useState()
|
|
12
|
-
const [defaultIndex,setDefaultIndex] = useState(0)
|
|
13
|
-
const [pickedIndex, setPickedIndex] = useState(() => {
|
|
14
|
-
return defaultIndex;
|
|
15
|
-
});
|
|
16
|
-
useImperativeHandle(onRef, () => {
|
|
17
|
-
return {
|
|
18
|
-
show: (str,data) => {
|
|
19
|
-
if(data?.payload?.columns.length){
|
|
20
|
-
setPickerTitle(data?.payload?.title)
|
|
21
|
-
setPickerData(data?.payload?.columns.map(item=>{
|
|
22
|
-
item.label = item[data?.payload?.nameProp]
|
|
23
|
-
item.value = item?.label;
|
|
24
|
-
return item})||[]);
|
|
25
|
-
// console.log(data)
|
|
26
|
-
setPickerVisible(true);
|
|
27
|
-
animatedStartValue.value = 0;
|
|
28
|
-
return new Promise((resolve,reject)=>{
|
|
29
|
-
backResult.current = (res)=>{
|
|
30
|
-
resolve(res)
|
|
31
|
-
}
|
|
32
|
-
})
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
});
|
|
37
|
-
const changePickedIndex = index => {
|
|
38
|
-
setPickedIndex(index);
|
|
39
|
-
};
|
|
40
|
-
const dealPickerCommit = (value) =>{
|
|
41
|
-
animatedStartValue.value = 700;
|
|
42
|
-
setPickerTitle()
|
|
43
|
-
setPickerVisible(false);
|
|
44
|
-
setPickedIndex(0);
|
|
45
|
-
// console.log(value);
|
|
46
|
-
const data = pickerData.find(item => {
|
|
47
|
-
return value[0] === item.value;
|
|
48
|
-
});
|
|
49
|
-
const index = pickerData.findIndex(item => {
|
|
50
|
-
return value[0] === item.value;
|
|
51
|
-
})
|
|
52
|
-
backResult.current({data,index})
|
|
53
|
-
}
|
|
54
|
-
return <PickerV2
|
|
55
|
-
pickerData={pickerData}
|
|
56
|
-
visible={visible}
|
|
57
|
-
// defaultValue={[pickerData[defaultIndex]?.value]}
|
|
58
|
-
title={pickerTitle}
|
|
59
|
-
pickedIndex={pickedIndex}
|
|
60
|
-
changePickedIndex={index => changePickedIndex(index)}
|
|
61
|
-
dealPickerCommit={item => dealPickerCommit(item)}
|
|
62
|
-
dealPickerCancel={() => {
|
|
63
|
-
animatedStartValue.value = 700;
|
|
64
|
-
setPickerTitle()
|
|
65
|
-
setPickerVisible(false);
|
|
66
|
-
setPickedIndex(0);
|
|
67
|
-
}}
|
|
68
|
-
animatedStartValue={animatedStartValue.value}
|
|
69
|
-
/>
|
|
70
|
-
};
|
|
4
|
+
const Home = () => {
|
|
5
|
+
return <View><Text>Home</Text></View>
|
|
6
|
+
}
|
|
71
7
|
const styles = StyleSheet.create({});
|
|
72
8
|
export default Home;
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
// import React,{useState,useImperativeHandle,useRef} from 'react';
|
|
12
|
+
// import {View, Text, StyleSheet} from 'react-native';
|
|
13
|
+
// import PickerV2 from '../PickerV2';
|
|
14
|
+
// import {useSharedValue} from 'react-native-reanimated';
|
|
15
|
+
|
|
16
|
+
// const Home = ({steps, active, onRef}) => {
|
|
17
|
+
// let backResult = useRef()
|
|
18
|
+
// const animatedStartValue = useSharedValue(700);
|
|
19
|
+
// const [visible, setPickerVisible] = useState(false);
|
|
20
|
+
// const [pickerData, setPickerData] = useState([]);
|
|
21
|
+
// const [pickerTitle,setPickerTitle] = useState()
|
|
22
|
+
// const [defaultIndex,setDefaultIndex] = useState(0)
|
|
23
|
+
// const [pickedIndex, setPickedIndex] = useState(() => {
|
|
24
|
+
// return defaultIndex;
|
|
25
|
+
// });
|
|
26
|
+
// useImperativeHandle(onRef, () => {
|
|
27
|
+
// return {
|
|
28
|
+
// show: (str,data) => {
|
|
29
|
+
// if(data?.payload?.columns.length){
|
|
30
|
+
// setPickerTitle(data?.payload?.title)
|
|
31
|
+
// setPickerData(data?.payload?.columns.map(item=>{
|
|
32
|
+
// item.label = item[data?.payload?.nameProp]
|
|
33
|
+
// item.value = item?.label;
|
|
34
|
+
// return item})||[]);
|
|
35
|
+
// // console.log(data)
|
|
36
|
+
// setPickerVisible(true);
|
|
37
|
+
// animatedStartValue.value = 0;
|
|
38
|
+
// return new Promise((resolve,reject)=>{
|
|
39
|
+
// backResult.current = (res)=>{
|
|
40
|
+
// resolve(res)
|
|
41
|
+
// }
|
|
42
|
+
// })
|
|
43
|
+
// }
|
|
44
|
+
// },
|
|
45
|
+
// };
|
|
46
|
+
// });
|
|
47
|
+
// const changePickedIndex = index => {
|
|
48
|
+
// setPickedIndex(index);
|
|
49
|
+
// };
|
|
50
|
+
// const dealPickerCommit = (value) =>{
|
|
51
|
+
// animatedStartValue.value = 700;
|
|
52
|
+
// setPickerTitle()
|
|
53
|
+
// setPickerVisible(false);
|
|
54
|
+
// setPickedIndex(0);
|
|
55
|
+
// // console.log(value);
|
|
56
|
+
// const data = pickerData.find(item => {
|
|
57
|
+
// return value[0] === item.value;
|
|
58
|
+
// });
|
|
59
|
+
// const index = pickerData.findIndex(item => {
|
|
60
|
+
// return value[0] === item.value;
|
|
61
|
+
// })
|
|
62
|
+
// backResult.current({data,index})
|
|
63
|
+
// }
|
|
64
|
+
// return <PickerV2
|
|
65
|
+
// pickerData={pickerData}
|
|
66
|
+
// visible={visible}
|
|
67
|
+
// // defaultValue={[pickerData[defaultIndex]?.value]}
|
|
68
|
+
// title={pickerTitle}
|
|
69
|
+
// pickedIndex={pickedIndex}
|
|
70
|
+
// changePickedIndex={index => changePickedIndex(index)}
|
|
71
|
+
// dealPickerCommit={item => dealPickerCommit(item)}
|
|
72
|
+
// dealPickerCancel={() => {
|
|
73
|
+
// animatedStartValue.value = 700;
|
|
74
|
+
// setPickerTitle()
|
|
75
|
+
// setPickerVisible(false);
|
|
76
|
+
// setPickedIndex(0);
|
|
77
|
+
// }}
|
|
78
|
+
// animatedStartValue={animatedStartValue.value}
|
|
79
|
+
// />
|
|
80
|
+
// };
|
|
81
|
+
// const styles = StyleSheet.create({});
|
|
82
|
+
// export default Home;
|
package/app/components/index.js
CHANGED
|
@@ -6,5 +6,5 @@ export ActionPicker from './common/ActionPicker';
|
|
|
6
6
|
export ScreenBackHeader from './common/ScreenBackHeader';
|
|
7
7
|
export CustomDialog from './common/CustomDialog';
|
|
8
8
|
export OnceTouchable from './common/OnceTouchable';
|
|
9
|
-
export PickerV2 from './common/PickerV2';
|
|
10
|
-
export PickerV1 from "./common/PickerV1";
|
|
9
|
+
// export PickerV2 from './common/PickerV2';
|
|
10
|
+
// export PickerV1 from "./common/PickerV1";
|
|
@@ -34,13 +34,6 @@ let seq_id = 0;
|
|
|
34
34
|
// global.base.shopMessageManager.messages = msgList || [];
|
|
35
35
|
// });
|
|
36
36
|
|
|
37
|
-
// 当前是否处于智能客服转人工
|
|
38
|
-
// let isManualCustomServiceActive = false;
|
|
39
|
-
// // 当前人工客服
|
|
40
|
-
// let currentCustomStaff = {};
|
|
41
|
-
// // 用户长时间没有发送消息后自动退出转人工的定时器
|
|
42
|
-
// let manualCustomServiceTimer;
|
|
43
|
-
|
|
44
37
|
// TODO 定期轮询检查消息过期
|
|
45
38
|
|
|
46
39
|
const ShopMessageManager = () => {
|
|
@@ -111,17 +104,18 @@ const ShopMessageManager = () => {
|
|
|
111
104
|
];
|
|
112
105
|
|
|
113
106
|
// 缓存全局商城客服websocket连接
|
|
114
|
-
global.shopMessageWebsocketRef = ws;
|
|
115
107
|
global.base.shopMessageManager.wsRef = ws;
|
|
108
|
+
global.base.shopMessageManager.connectMsgServer = connectMsgServer;
|
|
109
|
+
global.base.shopMessageManager.closeMsgConnection = closeMsgConnection;
|
|
116
110
|
ws.current = new WebSocket(
|
|
117
111
|
encodeURI(`${wsUrl}?${connectParams.join('&')}`),
|
|
118
112
|
);
|
|
119
113
|
ws.current.onopen = () => {
|
|
120
114
|
console.log('商城客服已连接ws shop open');
|
|
121
|
-
connectCallback && connectCallback(null); // success
|
|
122
115
|
connectStatus = 0;
|
|
123
116
|
eventBus.emit(EVENTS.SHOPMESSAGE.CONNECT_STATUS_CHANGE, connectStatus);
|
|
124
117
|
getUserUid();
|
|
118
|
+
connectCallback && connectCallback(null); // success
|
|
125
119
|
};
|
|
126
120
|
ws.current.onmessage = ({data}) => {
|
|
127
121
|
const msgData = JSON.parse(data);
|
|
@@ -162,14 +156,29 @@ const ShopMessageManager = () => {
|
|
|
162
156
|
}
|
|
163
157
|
};
|
|
164
158
|
ws.current.onerror = err => {
|
|
165
|
-
console.log('onerror', err);
|
|
159
|
+
console.log('shopMessageManager ws onerror', err);
|
|
160
|
+
connectStatus = 1;
|
|
161
|
+
eventBus.emit(EVENTS.SHOPMESSAGE.CONNECT_STATUS_CHANGE, connectStatus);
|
|
166
162
|
};
|
|
167
163
|
ws.current.onclose = event => {
|
|
168
|
-
console.log('onclose', event);
|
|
164
|
+
console.log('shopMessageManager ws onclose', event);
|
|
165
|
+
global.base.shopMessageManager.wsRef.current = null;
|
|
166
|
+
connectStatus = 1;
|
|
167
|
+
eventBus.emit(EVENTS.SHOPMESSAGE.CONNECT_STATUS_CHANGE, connectStatus);
|
|
169
168
|
reConnect(connectCallback);
|
|
170
169
|
};
|
|
171
170
|
};
|
|
172
171
|
|
|
172
|
+
const closeMsgConnection = () => {
|
|
173
|
+
console.log('shopMessageManager closeMsgConnection');
|
|
174
|
+
|
|
175
|
+
// 正常主动关闭连接,重置重连次数
|
|
176
|
+
tryConnectTimes = 5;
|
|
177
|
+
|
|
178
|
+
global.base.shopMessageManager.wsRef.current &&
|
|
179
|
+
global.base.shopMessageManager.wsRef.current.close();
|
|
180
|
+
};
|
|
181
|
+
|
|
173
182
|
const reConnect = async callback => {
|
|
174
183
|
if (tryConnectTimes < 5) {
|
|
175
184
|
// 重连ws
|
|
@@ -184,75 +193,6 @@ const ShopMessageManager = () => {
|
|
|
184
193
|
}
|
|
185
194
|
};
|
|
186
195
|
|
|
187
|
-
// const [onlineUser, setOnlineUser] = useState([]); // 在线用户列表
|
|
188
|
-
// const nameRef = useRef('');
|
|
189
|
-
// // 请求到客服列表的回调
|
|
190
|
-
// const handleGetOnlineUserList = async data => {
|
|
191
|
-
// if (isManualCustomServiceActive) {
|
|
192
|
-
// return;
|
|
193
|
-
// }
|
|
194
|
-
// const accountData = await storage.get('accountData');
|
|
195
|
-
// console.log('handleGetOnlineUserList', data);
|
|
196
|
-
// let dataList = data?.list.filter(val => {
|
|
197
|
-
// return val.nick_name !== nameRef.current;
|
|
198
|
-
// });
|
|
199
|
-
// // // console.log(dataList, nameRef.current);
|
|
200
|
-
// setOnlineUser(dataList);
|
|
201
|
-
|
|
202
|
-
// if (dataList.length === 0) {
|
|
203
|
-
// global.toast.showToast('当前没有人工客服在线,请稍候再试!');
|
|
204
|
-
// return;
|
|
205
|
-
// }
|
|
206
|
-
|
|
207
|
-
// console.log('当前商城客服列表:', dataList);
|
|
208
|
-
// // 分配一个人工客服
|
|
209
|
-
// currentCustomStaff =
|
|
210
|
-
// dataList.find(user => user.nick_name === '壮壮') || dataList[0];
|
|
211
|
-
// console.log('已分配商城智能客服人工客服:', currentCustomStaff.nick_name);
|
|
212
|
-
|
|
213
|
-
// // 设置当前处于人工客服的标志
|
|
214
|
-
// isManualCustomServiceActive = true;
|
|
215
|
-
// eventBus.emit(EVENTS.SHOPMESSAGE.CUSTOM_SERVICE_CONNECT_CHANGE, true);
|
|
216
|
-
|
|
217
|
-
// // 显示消息
|
|
218
|
-
// handleShopTextSubmit(
|
|
219
|
-
// `您好,客服“${currentCustomStaff.nick_name}”为您服务!`,
|
|
220
|
-
// currentCustomStaff?.user_id,
|
|
221
|
-
// `${accountData.user?.user_id}-${currentCustomStaff.user_id}-shop`,
|
|
222
|
-
// );
|
|
223
|
-
|
|
224
|
-
// resetManualCustomServiceExitTimer();
|
|
225
|
-
// };
|
|
226
|
-
// const resetManualCustomServiceExitTimer = () => {
|
|
227
|
-
// // 10分钟没发消息后自动退出人工
|
|
228
|
-
// clearTimeout(manualCustomServiceTimer);
|
|
229
|
-
// manualCustomServiceTimer = setTimeout(() => {
|
|
230
|
-
// exitShopManualCustomService(true);
|
|
231
|
-
// }, 600000);
|
|
232
|
-
// };
|
|
233
|
-
// // 请求转人工
|
|
234
|
-
// const requestShopManualCustomService = async () => {
|
|
235
|
-
// const user = await storage.get('accountData');
|
|
236
|
-
// nameRef.current = user.user?.nickname;
|
|
237
|
-
// // 发送获取客服列表消息,在EVENTS.SHOPMESSAGE.ONLINE_LIST事件回调中处理获取到的客服列表数据
|
|
238
|
-
// getOnlineUser();
|
|
239
|
-
// };
|
|
240
|
-
// const exitShopManualCustomService = async timeout => {
|
|
241
|
-
// isManualCustomServiceActive = false;
|
|
242
|
-
// eventBus.emit(EVENTS.SHOPMESSAGE.CUSTOM_SERVICE_CONNECT_CHANGE, false);
|
|
243
|
-
// console.log('退出商城智能客服人工客服');
|
|
244
|
-
|
|
245
|
-
// // 显示消息
|
|
246
|
-
// const accountData = await storage.get('accountData');
|
|
247
|
-
// handleShopTextSubmit(
|
|
248
|
-
// timeout
|
|
249
|
-
// ? '您已经很长时间没说话了,已自动退出人工客服,如有需要请再次联系'
|
|
250
|
-
// : '您已退出人工客服。',
|
|
251
|
-
// currentCustomStaff?.user_id,
|
|
252
|
-
// `${accountData.user?.user_id}-${currentCustomStaff.user_id}-shop`,
|
|
253
|
-
// );
|
|
254
|
-
// };
|
|
255
|
-
|
|
256
196
|
useEffect(() => {
|
|
257
197
|
const onMessageAdd = msg => {
|
|
258
198
|
msg.MsgId =
|
|
@@ -335,18 +275,15 @@ const ShopMessageManager = () => {
|
|
|
335
275
|
[],
|
|
336
276
|
);
|
|
337
277
|
|
|
338
|
-
|
|
339
|
-
// isManualCustomServiceActive;
|
|
278
|
+
const getConnectStatus = () => connectStatus;
|
|
340
279
|
|
|
341
280
|
return {
|
|
342
281
|
sendMessage,
|
|
343
282
|
sendShopImMessage,
|
|
344
283
|
getOnlineUser,
|
|
345
|
-
// requestShopManualCustomService,
|
|
346
|
-
// exitShopManualCustomService,
|
|
347
|
-
// getShopManualCustomServiceActiveFlag,
|
|
348
284
|
handleShopTextSubmit,
|
|
349
285
|
handleShopMediaSelect,
|
|
286
|
+
getConnectStatus,
|
|
350
287
|
};
|
|
351
288
|
};
|
|
352
289
|
|
|
@@ -300,11 +300,13 @@ function HomeTabScreen({navigation, route}) {
|
|
|
300
300
|
handleShopMediaSelect,
|
|
301
301
|
getOnlineUser,
|
|
302
302
|
sendShopImMessage,
|
|
303
|
+
getConnectStatus,
|
|
303
304
|
} = ShopMessageManager();
|
|
304
305
|
global.base.shopMessageManager.handleShopTextSubmit = handleShopTextSubmit;
|
|
305
306
|
global.base.shopMessageManager.handleShopMediaSelect = handleShopMediaSelect;
|
|
306
307
|
global.base.shopMessageManager.getOnlineUser = getOnlineUser;
|
|
307
308
|
global.base.shopMessageManager.sendShopImMessage = sendShopImMessage;
|
|
309
|
+
global.base.shopMessageManager.getConnectStatus = getConnectStatus;
|
|
308
310
|
const renderCustomTabBar = props => {
|
|
309
311
|
return <CustomTabBar {...props} />;
|
|
310
312
|
};
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
Modal,
|
|
8
8
|
FlatList,
|
|
9
9
|
TouchableOpacity,
|
|
10
|
-
Platform,
|
|
10
|
+
Platform, NativeModules,
|
|
11
11
|
} from 'react-native';
|
|
12
12
|
import {CheckBox, Icon, Text} from '@rneui/themed';
|
|
13
13
|
import {
|
|
@@ -24,6 +24,8 @@ import {showLoading, hideLoading} from '../../../utils/notice';
|
|
|
24
24
|
|
|
25
25
|
const {storage} = global.base;
|
|
26
26
|
|
|
27
|
+
const appName = NativeModules?.RNToNativeEmitter?.appName;
|
|
28
|
+
|
|
27
29
|
function TvAlbumScreen() {
|
|
28
30
|
const [cloudInfo, setCloudInfo] = useState({});
|
|
29
31
|
const [cloudServiceOpened, setCloudServiceOpened] = useState(true);
|
|
@@ -46,7 +48,7 @@ function TvAlbumScreen() {
|
|
|
46
48
|
|
|
47
49
|
useEffect(() => {
|
|
48
50
|
(async () => {
|
|
49
|
-
domain.current = await global.base.getHomedDomain();
|
|
51
|
+
domain.current = appName === '禺乐慧家' ? await global.base.getHomedDomain() : 'homed.tv';
|
|
50
52
|
await getToken();
|
|
51
53
|
checkCloudService();
|
|
52
54
|
})();
|