ipanel-rnapp-ajb-base 1.0.34 → 1.0.37
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 +126 -53
- 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 +4 -3
- package/app/components/common/CustomTabBar/index.js +10 -2
- package/app/components/common/Dialog/index.js +9 -8
- package/app/components/common/Dialog/prompt.js +114 -46
- package/app/components/common/Dialog/styles.js +21 -10
- 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/useMessageManager.js +50 -3
- package/app/hooks/useUser.js +10 -4
- package/app/screens/BaseScreen.js +222 -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 +650 -299
- package/app/screens/RegisteCountScreen/index.js +26 -17
- package/app/screens/SbkScreen.js +12 -0
- package/app/screens/SimpleBaseScreen.js +337 -0
- package/app/storage/index.js +16 -16
- package/app/utils/common.js +66 -23
- package/app/utils/config.js +20 -7
- package/app/utils/http.js +46 -30
- package/package.json +3 -3
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
|
-
const INVOICE_SERVICE =
|
|
8
|
+
const INVOICE_SERVICE = ["吉柿果"].includes(appName)
|
|
9
|
+
? "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
|
|
|
@@ -35,14 +38,7 @@ export const baiduAsr = (cuid, len, speechBase64) => {
|
|
|
35
38
|
};
|
|
36
39
|
|
|
37
40
|
export const getAreaOperatorModules = async (params) => {
|
|
38
|
-
let url
|
|
39
|
-
if (["禺乐慧家", "悦慧家"].includes(appName)) {
|
|
40
|
-
url = `${config.PANYU_MODULE_VERSION_URI}/jshomeapp/api/getAreaOperatorModules`
|
|
41
|
-
} else if ('吉柿果' === appName) {
|
|
42
|
-
url = `${config.JILIN_MODULE_VERSION_URI}/jshomeapp/api/getAreaOperatorModules`
|
|
43
|
-
} else {
|
|
44
|
-
url = `${config.IPANEL_CLOUD_BASE_URI}/jshomeapp/api/getAreaOperatorModules`
|
|
45
|
-
}
|
|
41
|
+
let url = `${config.MODULE_VERSION_URI}/jshomeapp/api/getAreaOperatorModules`;
|
|
46
42
|
|
|
47
43
|
// todo 本地调试测试临时处理,本地调试时模块列表暂时对接的是dev集群
|
|
48
44
|
if (!NativeModules?.RNToNativeEmitter?.serverCluster) {
|
|
@@ -65,19 +61,12 @@ export const getAreaOperatorModules = async (params) => {
|
|
|
65
61
|
: "",
|
|
66
62
|
...params,
|
|
67
63
|
},
|
|
68
|
-
timeout: 10 * 1000
|
|
64
|
+
timeout: 10 * 1000,
|
|
69
65
|
});
|
|
70
66
|
};
|
|
71
67
|
|
|
72
68
|
export const getModuleVersionInfo = async (params) => {
|
|
73
|
-
let url
|
|
74
|
-
if (["禺乐慧家", "悦慧家"].includes(appName)) {
|
|
75
|
-
url = `${config.PANYU_MODULE_VERSION_URI}/jshomeapp/api/moduleVersionInfo`
|
|
76
|
-
} else if ('吉柿果' === appName) {
|
|
77
|
-
url = `${config.JILIN_MODULE_VERSION_URI}/jshomeapp/api/moduleVersionInfo`
|
|
78
|
-
} else {
|
|
79
|
-
url = `${config.IPANEL_CLOUD_BASE_URI}/jshomeapp/api/moduleVersionInfo`
|
|
80
|
-
}
|
|
69
|
+
let url = `${config.MODULE_VERSION_URI}/jshomeapp/api/moduleVersionInfo`;
|
|
81
70
|
|
|
82
71
|
// todo 本地调试测试临时处理,本地调试时模块列表暂时对接的是dev集群
|
|
83
72
|
if (!NativeModules?.RNToNativeEmitter?.serverCluster) {
|
|
@@ -121,6 +110,8 @@ export const obtainSmscode = (data, type) => {
|
|
|
121
110
|
};
|
|
122
111
|
if (["吉柿果"].includes(appName)) {
|
|
123
112
|
params.operator_id = "061aa081306a455da811639160763190";
|
|
113
|
+
} else if (["智慧中原"].includes(appName)) {
|
|
114
|
+
params.operator_id = "1478a670efb7085b0b29e7367c5c4f87";
|
|
124
115
|
}
|
|
125
116
|
return request({
|
|
126
117
|
url: type === "adg" ? ADG_SERVICE : ACCOUNT_SERVICE,
|
|
@@ -137,6 +128,8 @@ export const smscodeLogin = (data, type) => {
|
|
|
137
128
|
};
|
|
138
129
|
if (["吉柿果"].includes(appName)) {
|
|
139
130
|
params.operator_id = "061aa081306a455da811639160763190";
|
|
131
|
+
} else if (["智慧中原"].includes(appName)) {
|
|
132
|
+
params.operator_id = "1478a670efb7085b0b29e7367c5c4f87";
|
|
140
133
|
}
|
|
141
134
|
return request({
|
|
142
135
|
url: type === "adg" ? ADG_SERVICE : ACCOUNT_SERVICE,
|
|
@@ -153,6 +146,8 @@ export const accountLogin = (data, type) => {
|
|
|
153
146
|
};
|
|
154
147
|
if (["吉柿果"].includes(appName)) {
|
|
155
148
|
params.operator_id = "061aa081306a455da811639160763190";
|
|
149
|
+
} else if (["智慧中原"].includes(appName)) {
|
|
150
|
+
params.operator_id = "1478a670efb7085b0b29e7367c5c4f87";
|
|
156
151
|
}
|
|
157
152
|
return request({
|
|
158
153
|
url: type === "adg" ? ADG_SERVICE : ACCOUNT_SERVICE,
|
|
@@ -262,9 +257,13 @@ export const delAddress = (data) => {
|
|
|
262
257
|
});
|
|
263
258
|
};
|
|
264
259
|
|
|
265
|
-
export const addRoom = (data) => {
|
|
260
|
+
export const addRoom = async (data) => {
|
|
261
|
+
const apartmentData = await storage.get("apartmentData");
|
|
266
262
|
return request({
|
|
267
|
-
url:
|
|
263
|
+
url:
|
|
264
|
+
apartmentData && apartmentData?.userType
|
|
265
|
+
? `${APARTMENT_SERVICE}/houseRoom/add`
|
|
266
|
+
: IOT_SERVICE,
|
|
268
267
|
method: "POST",
|
|
269
268
|
data: {
|
|
270
269
|
action: "add_room",
|
|
@@ -307,10 +306,14 @@ export const getAddressRooms = (data) => {
|
|
|
307
306
|
});
|
|
308
307
|
};
|
|
309
308
|
|
|
310
|
-
export const adjustRoom = (data) => {
|
|
309
|
+
export const adjustRoom = async (data) => {
|
|
310
|
+
const apartmentData = await storage.get("apartmentData");
|
|
311
311
|
return request({
|
|
312
|
-
url:
|
|
313
|
-
|
|
312
|
+
url:
|
|
313
|
+
apartmentData && apartmentData?.userType
|
|
314
|
+
? `${APARTMENT_SERVICE}/houseRoom/edit`
|
|
315
|
+
: IOT_SERVICE,
|
|
316
|
+
method: apartmentData && apartmentData?.userType ? "PUT" : "POST",
|
|
314
317
|
data: {
|
|
315
318
|
action: "adjust_room",
|
|
316
319
|
...data,
|
|
@@ -318,9 +321,13 @@ export const adjustRoom = (data) => {
|
|
|
318
321
|
});
|
|
319
322
|
};
|
|
320
323
|
|
|
321
|
-
export const delRoom = (data) => {
|
|
324
|
+
export const delRoom = async (data) => {
|
|
325
|
+
const apartmentData = await storage.get("apartmentData");
|
|
322
326
|
return request({
|
|
323
|
-
url:
|
|
327
|
+
url:
|
|
328
|
+
apartmentData && apartmentData?.userType
|
|
329
|
+
? `${APARTMENT_SERVICE}/houseRoom/del`
|
|
330
|
+
: IOT_SERVICE,
|
|
324
331
|
method: "POST",
|
|
325
332
|
data: {
|
|
326
333
|
action: "del_room",
|
|
@@ -403,38 +410,79 @@ export const getDeviceList = async (data) => {
|
|
|
403
410
|
};
|
|
404
411
|
|
|
405
412
|
export const adjustDevice = async (data) => {
|
|
406
|
-
const ROOMKEEPER_SERVICE = await getCurrentAddrRoomkeeperServiceBaseUri();
|
|
413
|
+
// const ROOMKEEPER_SERVICE = await getCurrentAddrRoomkeeperServiceBaseUri();
|
|
414
|
+
// return request({
|
|
415
|
+
// url: ROOMKEEPER_SERVICE,
|
|
416
|
+
// method: "POST",
|
|
417
|
+
// data: {
|
|
418
|
+
// path: "device/adjust_device",
|
|
419
|
+
// ...data,
|
|
420
|
+
// },
|
|
421
|
+
// });
|
|
422
|
+
const apartmentData = await storage.get("apartmentData");
|
|
423
|
+
let url = "";
|
|
424
|
+
let params = {
|
|
425
|
+
path: "device/adjust_device",
|
|
426
|
+
...data,
|
|
427
|
+
};
|
|
428
|
+
let method = "POST";
|
|
429
|
+
// 公寓的设备
|
|
430
|
+
if (apartmentData && apartmentData?.userType) {
|
|
431
|
+
url = `${APARTMENT_SERVICE}/houseFamilyDevice/edit`;
|
|
432
|
+
params.instanceName = await global.base.getHomeCloudServiceInstanceName();
|
|
433
|
+
method = "PUT";
|
|
434
|
+
} else {
|
|
435
|
+
url = await getCurrentAddrRoomkeeperServiceBaseUri();
|
|
436
|
+
}
|
|
407
437
|
return request({
|
|
408
|
-
url:
|
|
409
|
-
method
|
|
410
|
-
data:
|
|
411
|
-
path: "device/adjust_device",
|
|
412
|
-
...data,
|
|
413
|
-
},
|
|
438
|
+
url: url,
|
|
439
|
+
method,
|
|
440
|
+
data: params,
|
|
414
441
|
});
|
|
415
442
|
};
|
|
416
443
|
|
|
417
444
|
export const addDevice = async (data) => {
|
|
418
|
-
const
|
|
445
|
+
const apartmentData = await storage.get("apartmentData");
|
|
446
|
+
let url = "";
|
|
447
|
+
let params = {
|
|
448
|
+
path: "device/add_device",
|
|
449
|
+
...data,
|
|
450
|
+
};
|
|
451
|
+
// 公寓的设备添加调志豪的接口
|
|
452
|
+
if (apartmentData && apartmentData?.userType) {
|
|
453
|
+
url = `${APARTMENT_SERVICE}/houseFamilyDevice/added`;
|
|
454
|
+
params.instanceName = await global.base.getHomeCloudServiceInstanceName();
|
|
455
|
+
} else {
|
|
456
|
+
url = await getCurrentAddrRoomkeeperServiceBaseUri();
|
|
457
|
+
}
|
|
419
458
|
return request({
|
|
420
|
-
url:
|
|
459
|
+
url: url,
|
|
421
460
|
method: "POST",
|
|
422
|
-
data:
|
|
423
|
-
path: "device/add_device",
|
|
424
|
-
...data,
|
|
425
|
-
},
|
|
461
|
+
data: params,
|
|
426
462
|
});
|
|
427
463
|
};
|
|
428
464
|
|
|
429
465
|
export const moveDevice = async (data) => {
|
|
430
|
-
const
|
|
466
|
+
const apartmentData = await storage.get("apartmentData");
|
|
467
|
+
let url = "";
|
|
468
|
+
let params = {
|
|
469
|
+
path: "device/move_device",
|
|
470
|
+
...data,
|
|
471
|
+
};
|
|
472
|
+
let method = "POST";
|
|
473
|
+
// const ROOMKEEPER_SERVICE = await getCurrentAddrRoomkeeperServiceBaseUri();
|
|
474
|
+
// 公寓的设备添加调志豪的接口
|
|
475
|
+
if (apartmentData && apartmentData?.userType) {
|
|
476
|
+
url = `${APARTMENT_SERVICE}/houseFamilyDevice/move`;
|
|
477
|
+
params.instanceName = await global.base.getHomeCloudServiceInstanceName();
|
|
478
|
+
method = "PUT";
|
|
479
|
+
} else {
|
|
480
|
+
url = await getCurrentAddrRoomkeeperServiceBaseUri();
|
|
481
|
+
}
|
|
431
482
|
return request({
|
|
432
|
-
url:
|
|
433
|
-
method
|
|
434
|
-
data:
|
|
435
|
-
path: "device/move_device",
|
|
436
|
-
...data,
|
|
437
|
-
},
|
|
483
|
+
url: url,
|
|
484
|
+
method,
|
|
485
|
+
data: params,
|
|
438
486
|
});
|
|
439
487
|
};
|
|
440
488
|
|
|
@@ -447,14 +495,26 @@ export const getsn = (data) => {
|
|
|
447
495
|
};
|
|
448
496
|
|
|
449
497
|
export const delDevice = async (data) => {
|
|
450
|
-
const
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
498
|
+
const apartmentData = await storage.get("apartmentData");
|
|
499
|
+
let url = "";
|
|
500
|
+
let params = {};
|
|
501
|
+
// 公寓的设备添加调志豪的接口
|
|
502
|
+
if (apartmentData && apartmentData?.userType) {
|
|
503
|
+
url = `${APARTMENT_SERVICE}/houseFamilyDevice/adel`;
|
|
504
|
+
params.homedRoomId = data.room_id;
|
|
505
|
+
params.homedDeviceId = data.device_id;
|
|
506
|
+
params.instanceName = await global.base.getHomeCloudServiceInstanceName();
|
|
507
|
+
} else {
|
|
508
|
+
url = await getCurrentAddrRoomkeeperServiceBaseUri();
|
|
509
|
+
params = {
|
|
455
510
|
path: "device/delete_device",
|
|
456
511
|
...data,
|
|
457
|
-
}
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
return request({
|
|
515
|
+
url: url,
|
|
516
|
+
method: "POST",
|
|
517
|
+
data: params,
|
|
458
518
|
});
|
|
459
519
|
};
|
|
460
520
|
|
|
@@ -818,14 +878,14 @@ export const switchToken = async (params) => {
|
|
|
818
878
|
export const getHouseType = async () => {
|
|
819
879
|
return request({
|
|
820
880
|
url: `${APARTMENT_SERVICE}/house/account/getType`,
|
|
821
|
-
method:
|
|
881
|
+
method: "GET",
|
|
822
882
|
});
|
|
823
883
|
};
|
|
824
884
|
// 通过用户类型登录
|
|
825
885
|
export const loginByType = async (id, params) => {
|
|
826
886
|
return request({
|
|
827
887
|
url: `${APARTMENT_SERVICE}/house/account/loginByType?userType=${id}`,
|
|
828
|
-
method:
|
|
888
|
+
method: "POST",
|
|
829
889
|
data: params,
|
|
830
890
|
});
|
|
831
891
|
};
|
|
@@ -907,3 +967,16 @@ export const checkCaptcha = (data) => {
|
|
|
907
967
|
},
|
|
908
968
|
}).then((res) => res.json());
|
|
909
969
|
};
|
|
970
|
+
|
|
971
|
+
//查询绑定情况
|
|
972
|
+
export const getJinpengBindList = async (params) => {
|
|
973
|
+
return request({
|
|
974
|
+
url: `${JINPENG_URL}/get_bind_list`,
|
|
975
|
+
method: "POST",
|
|
976
|
+
data: {
|
|
977
|
+
page: 1,
|
|
978
|
+
page_size: 100,
|
|
979
|
+
...params,
|
|
980
|
+
},
|
|
981
|
+
});
|
|
982
|
+
};
|
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
|