ipanel-rnapp-ajb-base 1.0.34 → 1.0.36
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/.local_dev/env.js +2 -2
- package/app/.local_dev/polyfill.js +2 -0
- package/app/App.js +78 -69
- package/app/api/homedApi.js +30 -3
- package/app/api/ipanelCloudApi.js +116 -36
- package/app/assets/img/add.png +0 -0
- package/app/assets/img/add_img.png +0 -0
- package/app/assets/img/album.png +0 -0
- package/app/assets/img/album2.png +0 -0
- package/app/assets/img/album3.png +0 -0
- package/app/assets/img/album@2x.png +0 -0
- package/app/assets/img/album@3x.png +0 -0
- package/app/assets/img/audioRecordBar.png +0 -0
- package/app/assets/img/bootom_bar_bg.png +0 -0
- package/app/assets/img/close.png +0 -0
- package/app/assets/img/computer.png +0 -0
- package/app/assets/img/confirm.png +0 -0
- package/app/assets/img/delete_pic.png +0 -0
- package/app/assets/img/disabled.png +0 -0
- package/app/assets/img/empty-image-search.png +0 -0
- package/app/assets/img/goBack.png +0 -0
- package/app/assets/img/goBack2.png +0 -0
- package/app/assets/img/home_bg.png +0 -0
- package/app/assets/img/ischeck.png +0 -0
- package/app/assets/img/launch_bg.png +0 -0
- package/app/assets/img/launch_bg_henan.jpg +0 -0
- package/app/assets/img/launch_bg_panyu.png +0 -0
- package/app/assets/img/launch_logo.png +0 -0
- package/app/assets/img/launch_logo_jilin.png +0 -0
- package/app/assets/img/launch_logo_jilin_bottom1.png +0 -0
- package/app/assets/img/launch_logo_jilin_bottom2.png +0 -0
- package/app/assets/img/launch_logo_panyu.png +0 -0
- package/app/assets/img/launch_logo_py.png +0 -0
- package/app/assets/img/launch_text.png +0 -0
- package/app/assets/img/launch_text_panyu.png +0 -0
- package/app/assets/img/link.png +0 -0
- package/app/assets/img/login_bg.png +0 -0
- package/app/assets/img/login_bg_edu.png +0 -0
- package/app/assets/img/login_bg_edu2.png +0 -0
- package/app/assets/img/login_bg_new.png +0 -0
- package/app/assets/img/login_bg_py.png +0 -0
- package/app/assets/img/login_icon_edu.png +0 -0
- package/app/assets/img/login_left.png +0 -0
- package/app/assets/img/login_right.png +0 -0
- package/app/assets/img/logo2_py.png +0 -0
- package/app/assets/img/logo_bottom_py.png +0 -0
- package/app/assets/img/logo_py.png +0 -0
- package/app/assets/img/nocheck.png +0 -0
- package/app/assets/img/personal.png +0 -0
- package/app/assets/img/photo.png +0 -0
- package/app/assets/img/photo@2x.png +0 -0
- package/app/assets/img/photo@3x.png +0 -0
- package/app/assets/img/protocol_checked.png +0 -0
- package/app/assets/img/qiehuan.png +0 -0
- package/app/assets/img/refresh.png +0 -0
- package/app/assets/img/scan_border_bottom_left.png +0 -0
- package/app/assets/img/scan_border_bottom_right.png +0 -0
- package/app/assets/img/scan_border_top_left.png +0 -0
- package/app/assets/img/scan_border_top_right.png +0 -0
- package/app/assets/img/scan_move.png +0 -0
- package/app/assets/img/szjt.png +0 -0
- package/app/assets/img/tab.png +0 -0
- package/app/assets/img/tykz.png +0 -0
- package/app/assets/img/update_bg.png +0 -0
- package/app/assets/img/video.png +0 -0
- package/app/assets/img/video@2x.png +0 -0
- package/app/assets/img/video@3x.png +0 -0
- package/app/assets/img/worker.png +0 -0
- package/app/assets/img/wx.png +0 -0
- package/app/assets/img/ykq.png +0 -0
- package/app/assets/img/zfb.png +0 -0
- package/app/base.js +2 -0
- package/app/components/common/Cell/index.js +2 -1
- package/app/components/common/CustomTabBar/index.js +10 -2
- package/app/components/common/Dialog/prompt.js +114 -46
- package/app/components/common/Dialog/styles.js +15 -5
- package/app/components/common/Loading/index.js +30 -6
- package/app/components/common/LoginType/protocol.js +58 -19
- package/app/components/common/SmsCodeInput/indexNew.js +32 -16
- package/app/hooks/checkLogin.js +3 -1
- package/app/hooks/shopMessageManager.js +126 -100
- package/app/hooks/useAddress.js +2 -1
- package/app/hooks/useAddress2.js +5 -2
- package/app/hooks/useUser.js +10 -4
- package/app/screens/BaseScreen.js +202 -53
- package/app/screens/CommonScreens/EditInvoiceTitleScreen/index.js +149 -18
- package/app/screens/CommonScreens/HomedLoginScreen/index.js +20 -14
- package/app/screens/CommonScreens/InvoiceTitleListScreen/index.js +74 -26
- package/app/screens/CommonScreens/OperatorSelectScreen/index.js +18 -10
- package/app/screens/LoginScreen/GraphSmscode.js +17 -8
- package/app/screens/LoginScreen/PyLoginType.js +242 -0
- package/app/screens/LoginScreen/indexEdu.js +1084 -0
- package/app/screens/LoginScreen/indexNew.js +646 -297
- package/app/screens/RegisteCountScreen/index.js +26 -17
- package/app/screens/SimpleBaseScreen.js +335 -0
- package/app/storage/index.js +16 -16
- package/app/utils/common.js +56 -14
- package/app/utils/config.js +5 -3
- package/app/utils/http.js +46 -35
- package/package.json +2 -2
package/app/.local_dev/env.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default
|
|
2
|
-
// export default
|
|
1
|
+
export default "production";
|
|
2
|
+
// export default "__BASE_SINGLETON_MODE__"; // 单业务包开发模式时,启用该注释,注意,提交时不要提交该改动!!!
|
|
@@ -28,6 +28,8 @@ async function getRemoteComponentByName(componentName) {
|
|
|
28
28
|
return (await import('../../app_orderFood/App.js')).default;
|
|
29
29
|
case 'apartment':
|
|
30
30
|
return (await import('../../app_apartment/App.js')).default;
|
|
31
|
+
case 'jinpeng':
|
|
32
|
+
return (await import('../../app_jinpeng/App.js')).default;
|
|
31
33
|
// __BASE_SINGLETON_MODE_APP__
|
|
32
34
|
default:
|
|
33
35
|
return () => {
|
package/app/App.js
CHANGED
|
@@ -45,8 +45,10 @@ import { appReport } from "./utils/common";
|
|
|
45
45
|
|
|
46
46
|
// 基础导航页、登录页
|
|
47
47
|
import BaseScreen from "./screens/BaseScreen";
|
|
48
|
+
import SimpleBaseScreen from "./screens/SimpleBaseScreen.js";//简单导航:非爱家宝
|
|
48
49
|
import LoginScreen from "./screens/LoginScreen";
|
|
49
50
|
import NewLoginScreen from "./screens/LoginScreen/indexNew";
|
|
51
|
+
import LoginEduScreen from "./screens/LoginScreen/indexEdu";//教鞭登录页
|
|
50
52
|
import ResePasswordScreen from "./screens/ResePassword";
|
|
51
53
|
import SbkScreen from "./screens/SbkScreen";
|
|
52
54
|
|
|
@@ -106,6 +108,8 @@ const Stack = createStackNavigator();
|
|
|
106
108
|
const envVersion = NativeModules?.RNToNativeEmitter?.serverCluster || "alpha";
|
|
107
109
|
// const envVersion = 'release';
|
|
108
110
|
|
|
111
|
+
const appName = NativeModules?.RNToNativeEmitter?.appName;
|
|
112
|
+
|
|
109
113
|
let eventEmitter;
|
|
110
114
|
if (Platform.OS === "android") {
|
|
111
115
|
// ----yusm:安卓使用DeviceEventEmitter
|
|
@@ -117,7 +121,7 @@ if (Platform.OS === "android") {
|
|
|
117
121
|
// 公共 栈路由页面
|
|
118
122
|
const CommonScreens = {
|
|
119
123
|
Home: {
|
|
120
|
-
component: BaseScreen,
|
|
124
|
+
component: appName==='教鞭'?SimpleBaseScreen:BaseScreen,
|
|
121
125
|
screenOptions: {
|
|
122
126
|
title: "首页",
|
|
123
127
|
headerShown: false,
|
|
@@ -125,11 +129,11 @@ const CommonScreens = {
|
|
|
125
129
|
},
|
|
126
130
|
},
|
|
127
131
|
Login: {
|
|
128
|
-
component:
|
|
129
|
-
DeviceInfo.getBrand() === "Allwinner" ? LoginScreen : NewLoginScreen,
|
|
132
|
+
component: appName==='教鞭'?LoginEduScreen:(DeviceInfo.getBrand() === "Allwinner" ? LoginScreen : NewLoginScreen),
|
|
130
133
|
screenOptions: {
|
|
131
134
|
title: "登录",
|
|
132
135
|
headerShown: false,
|
|
136
|
+
includeBottom: true,
|
|
133
137
|
},
|
|
134
138
|
},
|
|
135
139
|
ResePasswordScreen: {
|
|
@@ -284,7 +288,7 @@ global.base.initialNavigationPackages = initialNavigationPackages;
|
|
|
284
288
|
const App = () => {
|
|
285
289
|
const { DynamicStackScreens } = useDynamicPackages();
|
|
286
290
|
// 当前页面是否需要包括底部安全区
|
|
287
|
-
const [includeBottom, setIncludeBottom] = useState(
|
|
291
|
+
const [includeBottom, setIncludeBottom] = useState(true);
|
|
288
292
|
const [versionUpdateConfirmVisible, setVersionUpdateConfirmVisible] =
|
|
289
293
|
useState(false);
|
|
290
294
|
const [latestBaseVersion, setLatestBaseVersion] = useState(null);
|
|
@@ -317,8 +321,10 @@ const App = () => {
|
|
|
317
321
|
moduleName: "base",
|
|
318
322
|
}); // 不用传参数
|
|
319
323
|
|
|
320
|
-
|
|
321
|
-
|
|
324
|
+
if (appName !== "遥控键码库") {
|
|
325
|
+
// 首次进入app登录鉴权
|
|
326
|
+
checkLogin();
|
|
327
|
+
}
|
|
322
328
|
|
|
323
329
|
// 获取最新版本并通知原生平台,由平台判断后弹出升级确认提示
|
|
324
330
|
checkBaseVersion();
|
|
@@ -454,7 +460,8 @@ const App = () => {
|
|
|
454
460
|
/* 加载之后每次navigate都鉴权一把登录状态(重置密码不需要检测) */
|
|
455
461
|
if (
|
|
456
462
|
routeName !== "ResePasswordScreen" &&
|
|
457
|
-
routeName !== "RegisteCountScreen"
|
|
463
|
+
routeName !== "RegisteCountScreen" &&
|
|
464
|
+
appName !== "遥控键码库"
|
|
458
465
|
) {
|
|
459
466
|
checkLogin();
|
|
460
467
|
}
|
|
@@ -466,81 +473,83 @@ const App = () => {
|
|
|
466
473
|
const renderContent = () => {
|
|
467
474
|
return (
|
|
468
475
|
<>
|
|
469
|
-
<
|
|
470
|
-
<
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
476
|
+
<SheetProvider>
|
|
477
|
+
<NavigationContainer
|
|
478
|
+
ref={navigationRef}
|
|
479
|
+
onStateChange={handleStateChange}
|
|
480
|
+
>
|
|
481
|
+
<Stack.Navigator
|
|
482
|
+
initialRouteName={"Login"}
|
|
483
|
+
screenOptions={{
|
|
484
|
+
headerStyle: {},
|
|
485
|
+
}}
|
|
474
486
|
>
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
<
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
<VersionUpdateConfirm
|
|
516
|
-
onVisibleChange={setVersionUpdateConfirmVisible}
|
|
517
|
-
latestVersion={latestBaseVersion}
|
|
518
|
-
onUpdate={onUpdate}
|
|
519
|
-
/>
|
|
520
|
-
)}
|
|
521
|
-
</Provider>
|
|
487
|
+
{/* 首页 */}
|
|
488
|
+
{/*<Stack.Screen*/}
|
|
489
|
+
{/* name="Home"*/}
|
|
490
|
+
{/* component={BaseScreen}*/}
|
|
491
|
+
{/* options={{*/}
|
|
492
|
+
{/* title: '首页',*/}
|
|
493
|
+
{/* headerShown: false,*/}
|
|
494
|
+
{/* }}*/}
|
|
495
|
+
{/*/>*/}
|
|
496
|
+
{/* 登录页 */}
|
|
497
|
+
{/*<Stack.Screen*/}
|
|
498
|
+
{/* name="Login"*/}
|
|
499
|
+
{/* component={LoginScreen}*/}
|
|
500
|
+
{/* options={{*/}
|
|
501
|
+
{/* title: '登录',*/}
|
|
502
|
+
{/* headerShown: false,*/}
|
|
503
|
+
{/* }}*/}
|
|
504
|
+
{/*/>*/}
|
|
505
|
+
|
|
506
|
+
{/* 公共页面 */}
|
|
507
|
+
{StackScreenGroup(CommonScreens)}
|
|
508
|
+
|
|
509
|
+
{/* 动态注册的页面 */}
|
|
510
|
+
{StackScreenGroup(DynamicStackScreens)}
|
|
511
|
+
</Stack.Navigator>
|
|
512
|
+
</NavigationContainer>
|
|
513
|
+
</SheetProvider>
|
|
514
|
+
|
|
515
|
+
<Loading onRef={(ref) => (global.loading = ref)} />
|
|
516
|
+
<Toast onRef={(ref) => (global.toast = ref)} />
|
|
517
|
+
<Notify onRef={(ref) => (global.notify = ref)} />
|
|
518
|
+
<Dialog onRef={(ref) => (global.dialog = ref)} />
|
|
519
|
+
<SheetManage onRef={(ref) => (global.sheetManager = ref)} />
|
|
520
|
+
{versionUpdateConfirmVisible && (
|
|
521
|
+
<VersionUpdateConfirm
|
|
522
|
+
onVisibleChange={setVersionUpdateConfirmVisible}
|
|
523
|
+
latestVersion={latestBaseVersion}
|
|
524
|
+
onUpdate={onUpdate}
|
|
525
|
+
/>
|
|
526
|
+
)}
|
|
522
527
|
</>
|
|
523
528
|
);
|
|
524
529
|
};
|
|
525
530
|
|
|
526
531
|
return Platform.OS === "ios" ? (
|
|
527
|
-
<
|
|
528
|
-
<
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
532
|
+
<Provider>
|
|
533
|
+
<SafeAreaProvider>
|
|
534
|
+
<SafeAreaView
|
|
535
|
+
style={{ flex: 1 }}
|
|
536
|
+
edges={
|
|
537
|
+
includeBottom ? ["right", "left"] : ["right", "bottom", "left"]
|
|
538
|
+
}
|
|
539
|
+
>
|
|
540
|
+
{renderContent()}
|
|
541
|
+
</SafeAreaView>
|
|
542
|
+
</SafeAreaProvider>
|
|
543
|
+
</Provider>
|
|
535
544
|
) : (
|
|
536
|
-
|
|
545
|
+
<Provider>
|
|
537
546
|
<StatusBar
|
|
538
547
|
backgroundColor="transparent"
|
|
539
548
|
translucent
|
|
540
549
|
barStyle="dark-content"
|
|
541
550
|
/>
|
|
542
551
|
<SafeAreaProvider>{renderContent()}</SafeAreaProvider>
|
|
543
|
-
|
|
552
|
+
</Provider>
|
|
544
553
|
);
|
|
545
554
|
};
|
|
546
555
|
|
package/app/api/homedApi.js
CHANGED
|
@@ -20,7 +20,8 @@ export const getHomedUserInfo = async (data) => {
|
|
|
20
20
|
// /account/device/get_list
|
|
21
21
|
export const getUserList = async (data) => {
|
|
22
22
|
const domain = await global.base.getHomedDomain();
|
|
23
|
-
const host =
|
|
23
|
+
const host =
|
|
24
|
+
domain === "pyitv.com" ? 12690 : domain === "homed.hnzhzy.com" ? 30180 : 80;
|
|
24
25
|
return homedHttp({
|
|
25
26
|
url: `http://access.${domain}:${host}/account/user/get_list`,
|
|
26
27
|
method: "GET",
|
|
@@ -36,20 +37,46 @@ export const getRegionList = async (data) => {
|
|
|
36
37
|
};
|
|
37
38
|
|
|
38
39
|
export const getAccessToken = async (data, domain) => {
|
|
39
|
-
const host =
|
|
40
|
+
const host =
|
|
41
|
+
domain === "pyitv.com" ? 12690 : domain === "homed.hnzhzy.com" ? 30180 : 80;
|
|
40
42
|
return homedHttp({
|
|
41
43
|
url: `http://access.${domain}:${host}/account/get_accesstoken`,
|
|
42
44
|
method: "POST",
|
|
43
45
|
data,
|
|
46
|
+
timeout: 3000,
|
|
44
47
|
});
|
|
45
48
|
};
|
|
46
49
|
|
|
47
50
|
export const mobileRelationLogin = async (data, domain) => {
|
|
48
51
|
domain = domain || (await global.base.getHomedDomain());
|
|
49
|
-
const host =
|
|
52
|
+
const host =
|
|
53
|
+
domain === "pyitv.com" ? 12690 : domain === "homed.hnzhzy.com" ? 30180 : 80;
|
|
50
54
|
return homedHttp({
|
|
51
55
|
url: `http://access.${domain}:${host}/account/mobile_relation_login`,
|
|
52
56
|
method: "GET",
|
|
53
57
|
data,
|
|
58
|
+
timeout: 3000,
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/* �̱�APP idocshare �ĵ�����ƽ̨*/
|
|
63
|
+
// ��ȡ������֤��
|
|
64
|
+
export const getIdocSmscode = async (data, domain) => {
|
|
65
|
+
domain = domain || (await global.base.getHomedDomain());
|
|
66
|
+
const host = domain === "pyitv.com" ? 12690 : 80;
|
|
67
|
+
return homedHttp({
|
|
68
|
+
url: `http://idocshare.${domain}:${host}/wx/get_smscode`,
|
|
69
|
+
method: "GET",
|
|
70
|
+
data,
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
// �û���¼
|
|
74
|
+
export const idocLogin = async (data, domain) => {
|
|
75
|
+
domain = domain || (await global.base.getHomedDomain());
|
|
76
|
+
const host = domain === "pyitv.com" ? 12690 : 80;
|
|
77
|
+
return homedHttp({
|
|
78
|
+
url: `http://idocshare.${domain}:${host}/member/login`,
|
|
79
|
+
method: "POST",
|
|
80
|
+
data,
|
|
54
81
|
});
|
|
55
82
|
};
|
|
@@ -5,9 +5,12 @@ import { homedHttp } from "../utils/http";
|
|
|
5
5
|
|
|
6
6
|
const appName = NativeModules?.RNToNativeEmitter?.appName;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
const INVOICE_SERVICE = ["吉柿果"].includes(appName)?'https://icloud.homed.jishimedia.com:50443/s/invoice':
|
|
10
|
+
`${config.IPANEL_CLOUD_BASE_URI}/s/invoice`;
|
|
9
11
|
const IOT_SERVICE = `${config.IPANEL_CLOUD_BASE_URI}/s/iot`;
|
|
10
12
|
const IR_433_DISCOVER_SERVICE = `${config.IPANEL_CLOUD_BASE_URI}/s/ir433discover`;
|
|
13
|
+
const JINPENG_URL = `${config.IPANEL_CLOUD_BASE_URI}/s/smart_home/jinpeng`;
|
|
11
14
|
|
|
12
15
|
export const ACCOUNT_SERVICE = `${config.IPANEL_CLOUD_BASE_URI}/s/account`;
|
|
13
16
|
|
|
@@ -15,6 +18,7 @@ export const ADG_SERVICE = `${config.IPANEL_CLOUD_BASE_ADG_URI}/s/install_ea`;
|
|
|
15
18
|
|
|
16
19
|
export const APARTMENT_SERVICE = `${config.IPANEL_CLOUD_BASE_URI}/s/smart_home_manage/admin-api`;
|
|
17
20
|
|
|
21
|
+
|
|
18
22
|
// todo 云端获取token服务:https://ai.baidu.com/ai-doc/SPEECH/Mk38lxpgn
|
|
19
23
|
export const baiduAsr = (cuid, len, speechBase64) => {
|
|
20
24
|
return request({
|
|
@@ -262,9 +266,13 @@ export const delAddress = (data) => {
|
|
|
262
266
|
});
|
|
263
267
|
};
|
|
264
268
|
|
|
265
|
-
export const addRoom = (data) => {
|
|
269
|
+
export const addRoom = async (data) => {
|
|
270
|
+
const apartmentData = await storage.get('apartmentData');
|
|
266
271
|
return request({
|
|
267
|
-
url:
|
|
272
|
+
url:
|
|
273
|
+
apartmentData && apartmentData?.userType
|
|
274
|
+
? `${APARTMENT_SERVICE}/houseRoom/add`
|
|
275
|
+
: IOT_SERVICE,
|
|
268
276
|
method: "POST",
|
|
269
277
|
data: {
|
|
270
278
|
action: "add_room",
|
|
@@ -307,10 +315,13 @@ export const getAddressRooms = (data) => {
|
|
|
307
315
|
});
|
|
308
316
|
};
|
|
309
317
|
|
|
310
|
-
export const adjustRoom = (data) => {
|
|
318
|
+
export const adjustRoom = async (data) => {
|
|
319
|
+
const apartmentData = await storage.get('apartmentData');
|
|
311
320
|
return request({
|
|
312
|
-
url:
|
|
313
|
-
|
|
321
|
+
url: apartmentData && apartmentData?.userType
|
|
322
|
+
? `${APARTMENT_SERVICE}/houseRoom/edit`
|
|
323
|
+
: IOT_SERVICE,
|
|
324
|
+
method: apartmentData && apartmentData?.userType ? 'PUT' : 'POST',
|
|
314
325
|
data: {
|
|
315
326
|
action: "adjust_room",
|
|
316
327
|
...data,
|
|
@@ -318,9 +329,12 @@ export const adjustRoom = (data) => {
|
|
|
318
329
|
});
|
|
319
330
|
};
|
|
320
331
|
|
|
321
|
-
export const delRoom = (data) => {
|
|
332
|
+
export const delRoom = async (data) => {
|
|
333
|
+
const apartmentData = await storage.get('apartmentData');
|
|
322
334
|
return request({
|
|
323
|
-
url:
|
|
335
|
+
url: apartmentData && apartmentData?.userType
|
|
336
|
+
? `${APARTMENT_SERVICE}/houseRoom/del`
|
|
337
|
+
: IOT_SERVICE,
|
|
324
338
|
method: "POST",
|
|
325
339
|
data: {
|
|
326
340
|
action: "del_room",
|
|
@@ -403,38 +417,79 @@ export const getDeviceList = async (data) => {
|
|
|
403
417
|
};
|
|
404
418
|
|
|
405
419
|
export const adjustDevice = async (data) => {
|
|
406
|
-
const ROOMKEEPER_SERVICE = await getCurrentAddrRoomkeeperServiceBaseUri();
|
|
420
|
+
// const ROOMKEEPER_SERVICE = await getCurrentAddrRoomkeeperServiceBaseUri();
|
|
421
|
+
// return request({
|
|
422
|
+
// url: ROOMKEEPER_SERVICE,
|
|
423
|
+
// method: "POST",
|
|
424
|
+
// data: {
|
|
425
|
+
// path: "device/adjust_device",
|
|
426
|
+
// ...data,
|
|
427
|
+
// },
|
|
428
|
+
// });
|
|
429
|
+
const apartmentData = await storage.get('apartmentData');
|
|
430
|
+
let url = '';
|
|
431
|
+
let params = {
|
|
432
|
+
path: 'device/adjust_device',
|
|
433
|
+
...data,
|
|
434
|
+
};
|
|
435
|
+
let method = 'POST';
|
|
436
|
+
// 公寓的设备
|
|
437
|
+
if (apartmentData && apartmentData?.userType) {
|
|
438
|
+
url = `${APARTMENT_SERVICE}/houseFamilyDevice/edit`;
|
|
439
|
+
params.instanceName = await global.base.getHomeCloudServiceInstanceName();
|
|
440
|
+
method = 'PUT';
|
|
441
|
+
} else {
|
|
442
|
+
url = await getCurrentAddrRoomkeeperServiceBaseUri();
|
|
443
|
+
}
|
|
407
444
|
return request({
|
|
408
|
-
url:
|
|
409
|
-
method
|
|
410
|
-
data:
|
|
411
|
-
path: "device/adjust_device",
|
|
412
|
-
...data,
|
|
413
|
-
},
|
|
445
|
+
url: url,
|
|
446
|
+
method,
|
|
447
|
+
data: params,
|
|
414
448
|
});
|
|
415
449
|
};
|
|
416
450
|
|
|
417
451
|
export const addDevice = async (data) => {
|
|
418
|
-
const
|
|
452
|
+
const apartmentData = await storage.get('apartmentData');
|
|
453
|
+
let url = '';
|
|
454
|
+
let params = {
|
|
455
|
+
path: 'device/add_device',
|
|
456
|
+
...data,
|
|
457
|
+
};
|
|
458
|
+
// 公寓的设备添加调志豪的接口
|
|
459
|
+
if (apartmentData && apartmentData?.userType) {
|
|
460
|
+
url = `${APARTMENT_SERVICE}/houseFamilyDevice/added`;
|
|
461
|
+
params.instanceName = await global.base.getHomeCloudServiceInstanceName();
|
|
462
|
+
} else {
|
|
463
|
+
url = await getCurrentAddrRoomkeeperServiceBaseUri();
|
|
464
|
+
}
|
|
419
465
|
return request({
|
|
420
|
-
url:
|
|
421
|
-
method:
|
|
422
|
-
data:
|
|
423
|
-
path: "device/add_device",
|
|
424
|
-
...data,
|
|
425
|
-
},
|
|
466
|
+
url: url,
|
|
467
|
+
method: 'POST',
|
|
468
|
+
data: params,
|
|
426
469
|
});
|
|
427
470
|
};
|
|
428
471
|
|
|
429
472
|
export const moveDevice = async (data) => {
|
|
430
|
-
const
|
|
473
|
+
const apartmentData = await storage.get('apartmentData');
|
|
474
|
+
let url = '';
|
|
475
|
+
let params = {
|
|
476
|
+
path: 'device/move_device',
|
|
477
|
+
...data,
|
|
478
|
+
};
|
|
479
|
+
let method = 'POST';
|
|
480
|
+
// const ROOMKEEPER_SERVICE = await getCurrentAddrRoomkeeperServiceBaseUri();
|
|
481
|
+
// 公寓的设备添加调志豪的接口
|
|
482
|
+
if (apartmentData && apartmentData?.userType) {
|
|
483
|
+
url = `${APARTMENT_SERVICE}/houseFamilyDevice/move`;
|
|
484
|
+
params.instanceName = await global.base.getHomeCloudServiceInstanceName();
|
|
485
|
+
method = 'PUT';
|
|
486
|
+
} else {
|
|
487
|
+
url = await getCurrentAddrRoomkeeperServiceBaseUri();
|
|
488
|
+
}
|
|
431
489
|
return request({
|
|
432
|
-
url:
|
|
433
|
-
method
|
|
434
|
-
data:
|
|
435
|
-
path: "device/move_device",
|
|
436
|
-
...data,
|
|
437
|
-
},
|
|
490
|
+
url: url,
|
|
491
|
+
method,
|
|
492
|
+
data: params,
|
|
438
493
|
});
|
|
439
494
|
};
|
|
440
495
|
|
|
@@ -447,14 +502,26 @@ export const getsn = (data) => {
|
|
|
447
502
|
};
|
|
448
503
|
|
|
449
504
|
export const delDevice = async (data) => {
|
|
450
|
-
const
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
505
|
+
const apartmentData = await storage.get('apartmentData');
|
|
506
|
+
let url = '';
|
|
507
|
+
let params = {};
|
|
508
|
+
// 公寓的设备添加调志豪的接口
|
|
509
|
+
if (apartmentData && apartmentData?.userType) {
|
|
510
|
+
url = `${APARTMENT_SERVICE}/houseFamilyDevice/adel`;
|
|
511
|
+
params.homedRoomId = data.room_id;
|
|
512
|
+
params.homedDeviceId = data.device_id;
|
|
513
|
+
params.instanceName = await global.base.getHomeCloudServiceInstanceName();
|
|
514
|
+
} else {
|
|
515
|
+
url = await getCurrentAddrRoomkeeperServiceBaseUri();
|
|
516
|
+
params = {
|
|
517
|
+
path: 'device/delete_device',
|
|
456
518
|
...data,
|
|
457
|
-
}
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
return request({
|
|
522
|
+
url: url,
|
|
523
|
+
method: 'POST',
|
|
524
|
+
data: params,
|
|
458
525
|
});
|
|
459
526
|
};
|
|
460
527
|
|
|
@@ -907,3 +974,16 @@ export const checkCaptcha = (data) => {
|
|
|
907
974
|
},
|
|
908
975
|
}).then((res) => res.json());
|
|
909
976
|
};
|
|
977
|
+
|
|
978
|
+
//查询绑定情况
|
|
979
|
+
export const getJinpengBindList = async (params)=>{
|
|
980
|
+
return request({
|
|
981
|
+
url: `${JINPENG_URL}/get_bind_list`,
|
|
982
|
+
method: 'POST',
|
|
983
|
+
data: {
|
|
984
|
+
page:1,
|
|
985
|
+
page_size:100,
|
|
986
|
+
...params
|
|
987
|
+
},
|
|
988
|
+
});
|
|
989
|
+
}
|
package/app/assets/img/add.png
CHANGED
|
Binary file
|
|
Binary file
|
package/app/assets/img/album.png
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/app/assets/img/close.png
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/app/assets/img/link.png
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/app/assets/img/photo.png
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|