ipanel-rnapp-ajb-base 1.0.21 → 1.0.24
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 +180 -166
- package/app/api/ipanelCloudApi.js +210 -208
- package/app/assets/img/launch_bg_panyu.png +0 -0
- package/app/assets/img/launch_logo_panyu.png +0 -0
- package/app/assets/img/launch_text_panyu.png +0 -0
- package/app/assets/img/login_bg_new.png +0 -0
- package/app/base.js +69 -62
- package/app/components/common/LoginType/protocol.js +66 -44
- package/app/screens/BaseScreen.js +111 -108
- package/app/screens/CommonScreens/DeviceFeedbackScreen/index.js +99 -83
- package/app/screens/LoginScreen/index.js +193 -170
- package/app/screens/LoginScreen/indexNew.js +414 -368
- package/app/screens/RegisteCountScreen/index.js +494 -468
- package/app/screens/SbkScreen.js +149 -7
- package/app/utils/applyPermissions.js +4 -2
- package/app/utils/common.js +94 -93
- package/app/utils/config.js +15 -15
- package/package.json +3 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, {useState, useEffect, useCallback, useRef} from
|
|
2
|
-
import {Icon, CheckBox, Button, Divider} from
|
|
1
|
+
import React, { useState, useEffect, useCallback, useRef } from "react";
|
|
2
|
+
import { Icon, CheckBox, Button, Divider } from "@rneui/themed";
|
|
3
3
|
import {
|
|
4
4
|
View,
|
|
5
5
|
Text,
|
|
@@ -17,75 +17,75 @@ import {
|
|
|
17
17
|
StatusBar,
|
|
18
18
|
Keyboard,
|
|
19
19
|
KeyboardAvoidingView,
|
|
20
|
-
} from
|
|
20
|
+
} from "react-native";
|
|
21
21
|
import {
|
|
22
22
|
LongPressGestureHandler,
|
|
23
23
|
GestureHandlerRootView,
|
|
24
|
-
} from
|
|
25
|
-
import px from
|
|
26
|
-
import storage from
|
|
24
|
+
} from "react-native-gesture-handler";
|
|
25
|
+
import px from "../../utils/scaleSize";
|
|
26
|
+
import storage from "../../storage";
|
|
27
27
|
import {
|
|
28
28
|
obtainSmscode,
|
|
29
29
|
smscodeLogin,
|
|
30
30
|
accountLogin,
|
|
31
31
|
switchToken,
|
|
32
32
|
reportBigData,
|
|
33
|
-
} from
|
|
34
|
-
import UUIDGenerator from
|
|
35
|
-
import CryptoJS from
|
|
36
|
-
import env from
|
|
37
|
-
import SmsCodeInput from
|
|
38
|
-
import {hideLoading, showLoading, showToast} from
|
|
39
|
-
import {replace, popToTop} from
|
|
40
|
-
import {confirmWithContent} from
|
|
33
|
+
} from "../../api";
|
|
34
|
+
import UUIDGenerator from "react-native-uuid-generator";
|
|
35
|
+
import CryptoJS from "crypto-js";
|
|
36
|
+
import env from "../../.local_dev/env";
|
|
37
|
+
import SmsCodeInput from "../../components/common/SmsCodeInput/indexNew";
|
|
38
|
+
import { hideLoading, showLoading, showToast } from "../../utils/notice";
|
|
39
|
+
import { replace, popToTop } from "../../utils/RootNavigation";
|
|
40
|
+
import { confirmWithContent } from "../../utils/registerDialog";
|
|
41
41
|
import {
|
|
42
42
|
updateHomedToken,
|
|
43
43
|
initOperatorHomedTouristAccount,
|
|
44
44
|
appReport,
|
|
45
|
-
} from
|
|
46
|
-
import {useSafeArea} from
|
|
47
|
-
import LoginType from
|
|
48
|
-
import ProtocolType from
|
|
49
|
-
import config from
|
|
50
|
-
import Cell from
|
|
51
|
-
import OpenLogSheet from
|
|
45
|
+
} from "../../utils/common";
|
|
46
|
+
import { useSafeArea } from "react-native-safe-area-context";
|
|
47
|
+
import LoginType from "../../components/common/LoginType";
|
|
48
|
+
import ProtocolType from "../../components/common/LoginType/protocol";
|
|
49
|
+
import config from "../../utils/config";
|
|
50
|
+
import Cell from "../../components/common/Cell";
|
|
51
|
+
import OpenLogSheet from "./OpenLogSheet";
|
|
52
52
|
|
|
53
53
|
let protocolAgreeResolve = null;
|
|
54
54
|
let selectEntranceResolve = null;
|
|
55
55
|
|
|
56
56
|
const errorCodeMap = {
|
|
57
|
-
20102:
|
|
58
|
-
20103:
|
|
59
|
-
20104:
|
|
60
|
-
20200:
|
|
61
|
-
20204:
|
|
62
|
-
10429:
|
|
57
|
+
20102: "验证码错误,请检查!",
|
|
58
|
+
20103: "验证码错误,请检查!",
|
|
59
|
+
20104: "验证码错误,请检查!",
|
|
60
|
+
20200: "账号错误,登录失败!",
|
|
61
|
+
20204: "密码错误,登录失败!",
|
|
62
|
+
10429: "操作过频繁,请1小时后再试!",
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
const appName =
|
|
66
66
|
NativeModules?.RNToNativeEmitter?.appName || config.LOCALTEST_APP_NAME;
|
|
67
67
|
|
|
68
|
-
const envVersion = NativeModules?.RNToNativeEmitter?.serverCluster ||
|
|
68
|
+
const envVersion = NativeModules?.RNToNativeEmitter?.serverCluster || "alpha";
|
|
69
69
|
|
|
70
70
|
const packageName = NativeModules?.RNToNativeEmitter?.packageName;
|
|
71
71
|
|
|
72
72
|
// const appName = '遥控键码库';
|
|
73
73
|
|
|
74
|
-
function LoginScreen({navigation, route}) {
|
|
74
|
+
function LoginScreen({ navigation, route }) {
|
|
75
75
|
const [loginWay, setLoginWay] = useState(0); // 0 手机号+短信验证码登录,1 账号密码登录
|
|
76
76
|
const [activeIndex, setActiveIndex] = useState(1);
|
|
77
|
-
const [activeType, setActiveType] = useState(
|
|
78
|
-
const [phone, setPhone] = useState(
|
|
79
|
-
const [smsId, setSmsId] = useState(
|
|
80
|
-
const [username, setUsername] = useState(
|
|
81
|
-
const [password, setPassword] = useState(
|
|
77
|
+
const [activeType, setActiveType] = useState("ajb");
|
|
78
|
+
const [phone, setPhone] = useState("");
|
|
79
|
+
const [smsId, setSmsId] = useState("");
|
|
80
|
+
const [username, setUsername] = useState("");
|
|
81
|
+
const [password, setPassword] = useState("");
|
|
82
82
|
|
|
83
|
-
const [userInputSmsCode, setUserInputSmsCode] = useState(
|
|
83
|
+
const [userInputSmsCode, setUserInputSmsCode] = useState("");
|
|
84
84
|
const [smsCodeRightBtnDisabled, setSmsCodeRightBtnDisabled] = useState(false);
|
|
85
|
-
const [smsCodeRightBtnText, setSmsCodeRightBtnText] = useState(
|
|
85
|
+
const [smsCodeRightBtnText, setSmsCodeRightBtnText] = useState("发送验证码");
|
|
86
86
|
const [smsCodeResendTime, setSmsCodeResendTime] = useState(0);
|
|
87
87
|
|
|
88
|
-
const [protocolAgree, setProtocolAgree] = useState(appName ===
|
|
88
|
+
const [protocolAgree, setProtocolAgree] = useState(appName === "遥控键码库");
|
|
89
89
|
const [protocolDialogVisible, setProtocolDialogVisible] = useState(false);
|
|
90
90
|
|
|
91
91
|
const [serviceAgree, setServiceAgree] = useState(false);
|
|
@@ -110,7 +110,6 @@ function LoginScreen({navigation, route}) {
|
|
|
110
110
|
setLoginWay(route.params.loginWay);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
|
|
114
113
|
// (async () => {
|
|
115
114
|
// const coords = await getUserLocation();
|
|
116
115
|
// const res = await getCurrentWeather({
|
|
@@ -122,10 +121,10 @@ function LoginScreen({navigation, route}) {
|
|
|
122
121
|
// 'getCurrentWeather',
|
|
123
122
|
// );
|
|
124
123
|
// })();
|
|
125
|
-
const keyboardDidShow = Keyboard.addListener(
|
|
124
|
+
const keyboardDidShow = Keyboard.addListener("keyboardDidShow", () => {
|
|
126
125
|
setKeybordShow(true);
|
|
127
126
|
});
|
|
128
|
-
const keyboardDidHide = Keyboard.addListener(
|
|
127
|
+
const keyboardDidHide = Keyboard.addListener("keyboardDidHide", () => {
|
|
129
128
|
setKeybordShow(false);
|
|
130
129
|
});
|
|
131
130
|
return () => {
|
|
@@ -145,45 +144,45 @@ function LoginScreen({navigation, route}) {
|
|
|
145
144
|
(loginWay === 1 && username && password)
|
|
146
145
|
);
|
|
147
146
|
const statusBarPlaceholderStyle = {
|
|
148
|
-
height: Platform.OS ===
|
|
147
|
+
height: Platform.OS === "ios" ? insets.top : 0,
|
|
149
148
|
};
|
|
150
149
|
|
|
151
150
|
useEffect(() => {
|
|
152
151
|
// 获取登录状态
|
|
153
152
|
(async () => {
|
|
154
|
-
const token = await storage.get(
|
|
153
|
+
const token = await storage.get("accessToken");
|
|
155
154
|
if (token) {
|
|
156
|
-
if (appName ===
|
|
157
|
-
global.loading.showLoading(
|
|
155
|
+
if (appName === "遥控键码库") {
|
|
156
|
+
global.loading.showLoading("正在加载");
|
|
158
157
|
await global.base.navigateModule({
|
|
159
|
-
operatorId:
|
|
160
|
-
moduleName:
|
|
158
|
+
operatorId: "ipanel",
|
|
159
|
+
moduleName: "adg",
|
|
161
160
|
screenName:
|
|
162
|
-
packageName ===
|
|
163
|
-
?
|
|
164
|
-
:
|
|
161
|
+
packageName === "com.ipanel.rnApp.abp2"
|
|
162
|
+
? "IstickUpdate3Screen"
|
|
163
|
+
: "EntranceSelectScreen",
|
|
165
164
|
isReplace: true,
|
|
166
165
|
});
|
|
167
166
|
global.loading.hideLoading();
|
|
168
167
|
return;
|
|
169
168
|
}
|
|
170
169
|
|
|
171
|
-
const entranceSelect = await storage.get(
|
|
172
|
-
if (entranceSelect ===
|
|
173
|
-
global.loading.showLoading(
|
|
170
|
+
const entranceSelect = await storage.get("entranceSelect");
|
|
171
|
+
if (entranceSelect === "tyygq" && envVersion !== "release") {
|
|
172
|
+
global.loading.showLoading("正在加载");
|
|
174
173
|
await global.base.navigateModule({
|
|
175
|
-
operatorId:
|
|
176
|
-
moduleName:
|
|
177
|
-
screenName:
|
|
174
|
+
operatorId: "ipanel",
|
|
175
|
+
moduleName: "adg",
|
|
176
|
+
screenName: "IstickUpdate3Screen",
|
|
178
177
|
isReplace: true,
|
|
179
178
|
});
|
|
180
179
|
global.loading.hideLoading();
|
|
181
180
|
} else {
|
|
182
|
-
replace(
|
|
181
|
+
replace("Home", {
|
|
183
182
|
redirect: true,
|
|
184
183
|
});
|
|
185
184
|
}
|
|
186
|
-
appReport(
|
|
185
|
+
appReport("APP_STARTUP");
|
|
187
186
|
}
|
|
188
187
|
setTimeout(() => {
|
|
189
188
|
setIsLoading(false);
|
|
@@ -207,22 +206,22 @@ function LoginScreen({navigation, route}) {
|
|
|
207
206
|
setLoginWay(0);
|
|
208
207
|
}
|
|
209
208
|
};
|
|
210
|
-
const handleChangeActive = type => {
|
|
209
|
+
const handleChangeActive = (type) => {
|
|
211
210
|
setActiveIndex(type);
|
|
212
|
-
setActiveType(type === 0 ?
|
|
211
|
+
setActiveType(type === 0 ? "adg" : "ajb");
|
|
213
212
|
resetData();
|
|
214
213
|
};
|
|
215
214
|
const resetData = () => {
|
|
216
215
|
if (loginWay === 0) {
|
|
217
|
-
setPhone(
|
|
218
|
-
setSmsId(
|
|
219
|
-
setUserInputSmsCode(
|
|
216
|
+
setPhone("");
|
|
217
|
+
setSmsId("");
|
|
218
|
+
setUserInputSmsCode("");
|
|
220
219
|
setSmsCodeRightBtnDisabled(false);
|
|
221
|
-
setSmsCodeRightBtnText(
|
|
220
|
+
setSmsCodeRightBtnText("发送验证码");
|
|
222
221
|
setSmsCodeResendTime(0);
|
|
223
222
|
} else {
|
|
224
|
-
setUsername(
|
|
225
|
-
setPassword(
|
|
223
|
+
setUsername("");
|
|
224
|
+
setPassword("");
|
|
226
225
|
}
|
|
227
226
|
setProtocolAgree(false);
|
|
228
227
|
setProtocolDialogVisible(false);
|
|
@@ -235,7 +234,7 @@ function LoginScreen({navigation, route}) {
|
|
|
235
234
|
useEffect(() => {
|
|
236
235
|
if (phone.length === 11 && smsCodeResendTime === 0) {
|
|
237
236
|
setSmsCodeRightBtnDisabled(false);
|
|
238
|
-
setSmsCodeRightBtnText(
|
|
237
|
+
setSmsCodeRightBtnText("获取验证码");
|
|
239
238
|
} else {
|
|
240
239
|
setSmsCodeRightBtnDisabled(true);
|
|
241
240
|
}
|
|
@@ -243,7 +242,7 @@ function LoginScreen({navigation, route}) {
|
|
|
243
242
|
useEffect(() => {
|
|
244
243
|
if (phone.length === 11 && smsCodeResendTime === 0) {
|
|
245
244
|
setSmsCodeRightBtnDisabled(false);
|
|
246
|
-
setSmsCodeRightBtnText(
|
|
245
|
+
setSmsCodeRightBtnText("获取验证码");
|
|
247
246
|
} else {
|
|
248
247
|
setSmsCodeRightBtnDisabled(true);
|
|
249
248
|
}
|
|
@@ -270,7 +269,7 @@ function LoginScreen({navigation, route}) {
|
|
|
270
269
|
}, [serviceAgree, privacyAgree]);
|
|
271
270
|
|
|
272
271
|
const onLongPress = () => {
|
|
273
|
-
console.log(
|
|
272
|
+
console.log("长按打开日志弹框");
|
|
274
273
|
setLogVisible(true);
|
|
275
274
|
};
|
|
276
275
|
|
|
@@ -282,41 +281,41 @@ function LoginScreen({navigation, route}) {
|
|
|
282
281
|
// }, [protocolAgree]);
|
|
283
282
|
|
|
284
283
|
const handleViewUserAgreement = () => {
|
|
285
|
-
navigation.navigate(
|
|
286
|
-
title:
|
|
287
|
-
url:
|
|
284
|
+
navigation.navigate("WebviewScreen", {
|
|
285
|
+
title: "用户协议",
|
|
286
|
+
url: "https://ipanelcloud2.ipanel.cn:50443/iapp/ajbstatic/service_agreement/user_agreement.html",
|
|
288
287
|
});
|
|
289
288
|
};
|
|
290
289
|
const handleViewPrivacyClause = () => {
|
|
291
|
-
navigation.navigate(
|
|
292
|
-
title:
|
|
293
|
-
url:
|
|
290
|
+
navigation.navigate("WebviewScreen", {
|
|
291
|
+
title: "隐私条款",
|
|
292
|
+
url: "https://ipanelcloud2.ipanel.cn:50443/iapp/ajbstatic/service_agreement/privacy_policy.html",
|
|
294
293
|
});
|
|
295
294
|
};
|
|
296
295
|
|
|
297
296
|
const handleLookFreely = () => {
|
|
298
|
-
navigation.navigate(
|
|
299
|
-
title:
|
|
300
|
-
url:
|
|
297
|
+
navigation.navigate("WebviewScreen", {
|
|
298
|
+
title: "",
|
|
299
|
+
url: "https://szjtyfw.panyu.gd.cn:50443/s/tidyinfo/ylhjh5/web/#/",
|
|
301
300
|
});
|
|
302
|
-
}
|
|
301
|
+
};
|
|
303
302
|
|
|
304
|
-
const handleViewUserAgreementByType = type => {
|
|
305
|
-
if (type ===
|
|
303
|
+
const handleViewUserAgreementByType = (type) => {
|
|
304
|
+
if (type === "service") {
|
|
306
305
|
setServiceDialogVisible(true);
|
|
307
|
-
} else if (type ===
|
|
306
|
+
} else if (type === "privacy") {
|
|
308
307
|
setPrivacyDialogVisible(true);
|
|
309
308
|
}
|
|
310
309
|
};
|
|
311
310
|
let smsCodeTimer;
|
|
312
311
|
function validPhone(phone) {
|
|
313
312
|
if (!phone) {
|
|
314
|
-
Alert.alert(
|
|
313
|
+
Alert.alert("请输入手机号");
|
|
315
314
|
return false;
|
|
316
315
|
}
|
|
317
316
|
if (!/^[1][3,4,5,7,8,9][0-9]{9}$/.test(phone)) {
|
|
318
317
|
// Alert.alert('请输入正确的手机号');
|
|
319
|
-
global.toast.showToast(
|
|
318
|
+
global.toast.showToast("手机号无效,请检查!");
|
|
320
319
|
return false;
|
|
321
320
|
}
|
|
322
321
|
return true;
|
|
@@ -329,35 +328,35 @@ function LoginScreen({navigation, route}) {
|
|
|
329
328
|
};
|
|
330
329
|
const handleUserAgree = () => {
|
|
331
330
|
setProtocolAgree(true);
|
|
332
|
-
console.log(typeof protocolAgreeResolve)
|
|
333
|
-
typeof protocolAgreeResolve ===
|
|
331
|
+
console.log(typeof protocolAgreeResolve);
|
|
332
|
+
typeof protocolAgreeResolve === "function" && protocolAgreeResolve();
|
|
334
333
|
protocolAgreeResolve = null;
|
|
335
334
|
};
|
|
336
335
|
|
|
337
|
-
const handleOneDisagree = async type => {
|
|
336
|
+
const handleOneDisagree = async (type) => {
|
|
338
337
|
setProtocolAgree(false);
|
|
339
|
-
if (type ===
|
|
338
|
+
if (type === "service") {
|
|
340
339
|
setServiceAgree(false);
|
|
341
340
|
setServiceDialogVisible(false);
|
|
342
|
-
} else if (type ===
|
|
341
|
+
} else if (type === "privacy") {
|
|
343
342
|
setPrivacyAgree(false);
|
|
344
343
|
setPrivacyDialogVisible(false);
|
|
345
344
|
}
|
|
346
345
|
};
|
|
347
|
-
const handleOneAgree = type => {
|
|
348
|
-
if (type ===
|
|
346
|
+
const handleOneAgree = (type) => {
|
|
347
|
+
if (type === "service") {
|
|
349
348
|
setServiceAgree(true);
|
|
350
349
|
setServiceDialogVisible(false);
|
|
351
|
-
} else if (type ===
|
|
350
|
+
} else if (type === "privacy") {
|
|
352
351
|
setPrivacyAgree(true);
|
|
353
352
|
setPrivacyDialogVisible(false);
|
|
354
353
|
}
|
|
355
354
|
|
|
356
|
-
typeof protocolAgreeResolve ===
|
|
355
|
+
typeof protocolAgreeResolve === "function" && protocolAgreeResolve();
|
|
357
356
|
protocolAgreeResolve = null;
|
|
358
357
|
};
|
|
359
358
|
|
|
360
|
-
const handleSetProtocolAgree = isAgree => {
|
|
359
|
+
const handleSetProtocolAgree = (isAgree) => {
|
|
361
360
|
setProtocolAgree(isAgree);
|
|
362
361
|
setServiceAgree(isAgree);
|
|
363
362
|
setPrivacyAgree(isAgree);
|
|
@@ -367,7 +366,7 @@ function LoginScreen({navigation, route}) {
|
|
|
367
366
|
if (loginDisabled) {
|
|
368
367
|
return;
|
|
369
368
|
}
|
|
370
|
-
if (protocolAgree || appName ===
|
|
369
|
+
if (protocolAgree || appName === "遥控键码库") {
|
|
371
370
|
handleLogin();
|
|
372
371
|
} else {
|
|
373
372
|
openProtocolDialog().then(() => {
|
|
@@ -377,7 +376,7 @@ function LoginScreen({navigation, route}) {
|
|
|
377
376
|
};
|
|
378
377
|
|
|
379
378
|
const openProtocolDialog = () => {
|
|
380
|
-
return new Promise(resolve => {
|
|
379
|
+
return new Promise((resolve) => {
|
|
381
380
|
setProtocolDialogVisible(true);
|
|
382
381
|
protocolAgreeResolve = resolve;
|
|
383
382
|
}).then(() => {
|
|
@@ -391,11 +390,11 @@ function LoginScreen({navigation, route}) {
|
|
|
391
390
|
const appName =
|
|
392
391
|
NativeModules?.RNToNativeEmitter?.appName || config.LOCALTEST_APP_NAME;
|
|
393
392
|
// const appName = '遥控键码库';
|
|
394
|
-
const {deviceModal} = NativeModules?.RNToNativeEmitter || {};
|
|
393
|
+
const { deviceModal } = NativeModules?.RNToNativeEmitter || {};
|
|
395
394
|
|
|
396
395
|
const appID = await global.base.getAppId();
|
|
397
396
|
|
|
398
|
-
console.log(
|
|
397
|
+
console.log("appID", appID);
|
|
399
398
|
|
|
400
399
|
let finallyAppID = appID;
|
|
401
400
|
if (!appID) {
|
|
@@ -409,15 +408,15 @@ function LoginScreen({navigation, route}) {
|
|
|
409
408
|
}
|
|
410
409
|
|
|
411
410
|
if (!smsId) {
|
|
412
|
-
Alert.alert(
|
|
411
|
+
Alert.alert("请先获取验证码");
|
|
413
412
|
return;
|
|
414
413
|
}
|
|
415
414
|
|
|
416
415
|
if (!userInputSmsCode) {
|
|
417
|
-
Alert.alert(
|
|
416
|
+
Alert.alert("请输入短信验证码");
|
|
418
417
|
return;
|
|
419
418
|
}
|
|
420
|
-
showLoading(
|
|
419
|
+
showLoading("登录中...");
|
|
421
420
|
setIsLogining(true);
|
|
422
421
|
let params = {
|
|
423
422
|
phone_number: phone,
|
|
@@ -426,10 +425,10 @@ function LoginScreen({navigation, route}) {
|
|
|
426
425
|
create_address: 1, // 注册时自动建默认家庭
|
|
427
426
|
extend: {
|
|
428
427
|
appid: finallyAppID,
|
|
429
|
-
model: deviceModal ||
|
|
430
|
-
application: appName ||
|
|
431
|
-
platform:
|
|
432
|
-
entry:
|
|
428
|
+
model: deviceModal || "开发测试",
|
|
429
|
+
application: appName || "爱家宝",
|
|
430
|
+
platform: "phone",
|
|
431
|
+
entry: "app",
|
|
433
432
|
},
|
|
434
433
|
};
|
|
435
434
|
if (activeIndex === 0) {
|
|
@@ -438,16 +437,16 @@ function LoginScreen({navigation, route}) {
|
|
|
438
437
|
res = await smscodeLogin(params, activeType);
|
|
439
438
|
} else {
|
|
440
439
|
if (!username) {
|
|
441
|
-
Alert.alert(
|
|
440
|
+
Alert.alert("请输入账号");
|
|
442
441
|
return;
|
|
443
442
|
}
|
|
444
443
|
|
|
445
444
|
if (!password) {
|
|
446
|
-
Alert.alert(
|
|
445
|
+
Alert.alert("请输入密码");
|
|
447
446
|
return;
|
|
448
447
|
}
|
|
449
|
-
console.log(global.loading,
|
|
450
|
-
showLoading(
|
|
448
|
+
console.log(global.loading, "global.loading");
|
|
449
|
+
showLoading("登录中...");
|
|
451
450
|
setIsLogining(true);
|
|
452
451
|
let params = {
|
|
453
452
|
account_name: username,
|
|
@@ -455,10 +454,10 @@ function LoginScreen({navigation, route}) {
|
|
|
455
454
|
create_address: 1, // 注册时自动建默认家庭
|
|
456
455
|
extend: {
|
|
457
456
|
appid: finallyAppID,
|
|
458
|
-
model: deviceModal ||
|
|
459
|
-
application: appName ||
|
|
460
|
-
platform:
|
|
461
|
-
entry:
|
|
457
|
+
model: deviceModal || "开发测试",
|
|
458
|
+
application: appName || "爱家宝",
|
|
459
|
+
platform: "phone",
|
|
460
|
+
entry: "app",
|
|
462
461
|
},
|
|
463
462
|
};
|
|
464
463
|
if (activeIndex === 0) {
|
|
@@ -466,42 +465,42 @@ function LoginScreen({navigation, route}) {
|
|
|
466
465
|
}
|
|
467
466
|
res = await accountLogin(params, activeType);
|
|
468
467
|
}
|
|
469
|
-
console.log(res,
|
|
468
|
+
console.log(res, "login");
|
|
470
469
|
if (res.code === 0) {
|
|
471
|
-
console.log(res.result,
|
|
472
|
-
await storage.set(
|
|
473
|
-
await storage.set(
|
|
474
|
-
await storage.set(
|
|
470
|
+
console.log(res.result, "ipanelClound用户信息");
|
|
471
|
+
await storage.set("accountType", activeType);
|
|
472
|
+
await storage.set("accessToken", res.result.access_token);
|
|
473
|
+
await storage.set("refreshToken", res.result.refresh_token);
|
|
475
474
|
|
|
476
475
|
if (activeIndex === 1) {
|
|
477
476
|
if (res.result.address && res.result.address[0]) {
|
|
478
|
-
const addressList = res.result.address.map(item => {
|
|
477
|
+
const addressList = res.result.address.map((item) => {
|
|
479
478
|
return {
|
|
480
479
|
...item,
|
|
481
480
|
room_list: null,
|
|
482
481
|
};
|
|
483
482
|
});
|
|
484
483
|
const defaultAddr = addressList[0];
|
|
485
|
-
console.log(defaultAddr.address_id,
|
|
486
|
-
await storage.set(
|
|
487
|
-
await storage.set(
|
|
484
|
+
console.log(defaultAddr.address_id, "defaultAddr.address_id");
|
|
485
|
+
await storage.set("activeAddr", defaultAddr);
|
|
486
|
+
await storage.set("addressList", addressList);
|
|
488
487
|
await updateHomedToken();
|
|
489
488
|
} else {
|
|
490
|
-
await storage.set(
|
|
491
|
-
await storage.set(
|
|
489
|
+
await storage.set("activeAddr", {});
|
|
490
|
+
await storage.set("addressList", []);
|
|
492
491
|
}
|
|
493
492
|
}
|
|
494
493
|
delete res.result.address;
|
|
495
|
-
await storage.set(
|
|
494
|
+
await storage.set("accountData", res.result);
|
|
496
495
|
|
|
497
496
|
// 存储boss账号信息
|
|
498
497
|
if (res.result?.user && res.result?.user?.bind_list) {
|
|
499
|
-
const bind_boss = res.result?.user?.bind_list.filter(item => {
|
|
500
|
-
return item.third_type ===
|
|
498
|
+
const bind_boss = res.result?.user?.bind_list.filter((item) => {
|
|
499
|
+
return item.third_type === "boss";
|
|
501
500
|
});
|
|
502
501
|
if (bind_boss.length) {
|
|
503
|
-
console.log(bind_boss[0],
|
|
504
|
-
await storage.set(
|
|
502
|
+
console.log(bind_boss[0], "bind_boss[0]");
|
|
503
|
+
await storage.set("bossData", bind_boss[0]);
|
|
505
504
|
}
|
|
506
505
|
}
|
|
507
506
|
|
|
@@ -513,108 +512,108 @@ function LoginScreen({navigation, route}) {
|
|
|
513
512
|
|
|
514
513
|
// 初始化默认运营商对应的homed游客账号
|
|
515
514
|
const envVersion =
|
|
516
|
-
NativeModules?.RNToNativeEmitter?.serverCluster ||
|
|
515
|
+
NativeModules?.RNToNativeEmitter?.serverCluster || "dev";
|
|
517
516
|
await initOperatorHomedTouristAccount({
|
|
518
517
|
touristUsername: finallyAppID,
|
|
519
|
-
domain: envVersion ===
|
|
520
|
-
touristGroupId: envVersion ===
|
|
518
|
+
domain: envVersion === "dev" ? "homed.me" : "homed.tv",
|
|
519
|
+
touristGroupId: envVersion === "dev" ? 115017 : 4664, // 4664: tv集群的手机APP游客用户组. 115017: 运营集群手机APP游客用户组
|
|
521
520
|
});
|
|
522
521
|
clearTimeout(smsCodeTimer);
|
|
523
522
|
// setIsLogined(true);
|
|
524
523
|
// 判断是否已经选了运营商
|
|
525
524
|
const currentOperator = await storage.get(
|
|
526
|
-
`${res.result?.account?.account_id ||
|
|
525
|
+
`${res.result?.account?.account_id || ""}currentOperator`
|
|
527
526
|
);
|
|
528
527
|
// 获取公寓token
|
|
529
|
-
if (currentOperator?.name ===
|
|
528
|
+
if (currentOperator?.name === "内蒙古广电网络") {
|
|
530
529
|
const apartmentRes = await switchToken();
|
|
531
530
|
if (apartmentRes?.code === 200 && apartmentRes?.token) {
|
|
532
|
-
storage.set(
|
|
531
|
+
storage.set("apartmentToken", apartmentRes.token);
|
|
533
532
|
// 公寓人员信息接口暂时还没,假设role:1为房东
|
|
534
|
-
storage.set(
|
|
533
|
+
storage.set("apartmentData", { role: 1 });
|
|
535
534
|
} else {
|
|
536
|
-
storage.set(
|
|
537
|
-
storage.set(
|
|
535
|
+
storage.set("apartmentData", {});
|
|
536
|
+
storage.set("apartmentToken", "");
|
|
538
537
|
}
|
|
539
538
|
} else {
|
|
540
|
-
storage.set(
|
|
541
|
-
storage.set(
|
|
539
|
+
storage.set("apartmentData", {});
|
|
540
|
+
storage.set("apartmentToken", "");
|
|
542
541
|
}
|
|
543
542
|
|
|
544
543
|
// 上报APP启动事件
|
|
545
|
-
appReport(
|
|
544
|
+
appReport("APP_STARTUP");
|
|
546
545
|
|
|
547
546
|
hideLoading();
|
|
548
547
|
setIsLogining(false);
|
|
549
548
|
|
|
550
|
-
if (appName ===
|
|
551
|
-
global.loading.showLoading(
|
|
549
|
+
if (appName === "遥控键码库") {
|
|
550
|
+
global.loading.showLoading("正在加载");
|
|
552
551
|
await global.base.navigateModule({
|
|
553
|
-
operatorId:
|
|
554
|
-
moduleName:
|
|
552
|
+
operatorId: "ipanel",
|
|
553
|
+
moduleName: "adg",
|
|
555
554
|
screenName:
|
|
556
|
-
packageName ===
|
|
557
|
-
?
|
|
558
|
-
:
|
|
555
|
+
packageName === "com.ipanel.rnApp.abp2"
|
|
556
|
+
? "IstickUpdate3Screen"
|
|
557
|
+
: "EntranceSelectScreen",
|
|
559
558
|
isReplace: true,
|
|
560
559
|
});
|
|
561
560
|
global.loading.hideLoading();
|
|
562
561
|
return;
|
|
563
562
|
}
|
|
564
563
|
|
|
565
|
-
console.log(activeType)
|
|
566
|
-
console.log(envVersion)
|
|
567
|
-
console.log(9999)
|
|
568
|
-
if (activeType ===
|
|
564
|
+
console.log(activeType);
|
|
565
|
+
console.log(envVersion);
|
|
566
|
+
console.log(9999);
|
|
567
|
+
if (activeType === "ajb" && envVersion !== "release") {
|
|
569
568
|
const entrance = await selectEntrance();
|
|
570
|
-
await storage.set(
|
|
571
|
-
if (entrance ===
|
|
572
|
-
global.loading.showLoading(
|
|
569
|
+
await storage.set("entranceSelect", entrance);
|
|
570
|
+
if (entrance === "tyygq") {
|
|
571
|
+
global.loading.showLoading("正在加载");
|
|
573
572
|
await global.base.navigateModule({
|
|
574
|
-
operatorId:
|
|
575
|
-
moduleName:
|
|
576
|
-
screenName:
|
|
573
|
+
operatorId: "ipanel",
|
|
574
|
+
moduleName: "adg",
|
|
575
|
+
screenName: "IstickUpdate3Screen",
|
|
577
576
|
isReplace: true,
|
|
578
577
|
});
|
|
579
578
|
global.loading.hideLoading();
|
|
580
579
|
return;
|
|
581
580
|
}
|
|
582
581
|
}
|
|
583
|
-
if (appName
|
|
582
|
+
if (["禺乐慧家", "悦慧家"].includes(appName)) {
|
|
584
583
|
let selectedOperator = {
|
|
585
|
-
id:
|
|
586
|
-
name:
|
|
584
|
+
id: "c492121bac734bb983814b67ceafcae9",
|
|
585
|
+
name: "番禺区广电网络",
|
|
587
586
|
};
|
|
588
|
-
const accountData = await storage.get(
|
|
587
|
+
const accountData = await storage.get("accountData");
|
|
589
588
|
await storage.set(
|
|
590
|
-
`${accountData?.account?.account_id ||
|
|
591
|
-
selectedOperator
|
|
589
|
+
`${accountData?.account?.account_id || ""}currentOperator`,
|
|
590
|
+
selectedOperator
|
|
592
591
|
);
|
|
593
|
-
replace(
|
|
592
|
+
replace("Home", {
|
|
594
593
|
redirect: false,
|
|
595
594
|
});
|
|
596
595
|
} else if (
|
|
597
596
|
currentOperator ||
|
|
598
|
-
appName.includes(
|
|
599
|
-
activeType ===
|
|
600
|
-
env ===
|
|
597
|
+
appName.includes("安电工") ||
|
|
598
|
+
activeType === "adg" ||
|
|
599
|
+
env === "__BASE_SINGLETON_MODE__"
|
|
601
600
|
) {
|
|
602
|
-
replace(
|
|
601
|
+
replace("Home", {
|
|
603
602
|
redirect: false,
|
|
604
603
|
});
|
|
605
604
|
} else {
|
|
606
605
|
confirmWithContent({
|
|
607
|
-
title:
|
|
608
|
-
component:
|
|
609
|
-
confirmButtonText:
|
|
606
|
+
title: "选择运营商",
|
|
607
|
+
component: "你是否要选择运营商",
|
|
608
|
+
confirmButtonText: "确定",
|
|
610
609
|
confirmCallback: () => {
|
|
611
|
-
replace(
|
|
612
|
-
purpose:
|
|
610
|
+
replace("OperatorSelectScreen", {
|
|
611
|
+
purpose: "init",
|
|
613
612
|
});
|
|
614
613
|
},
|
|
615
|
-
cancelButtonText:
|
|
614
|
+
cancelButtonText: "先不选",
|
|
616
615
|
cancelCallback: () => {
|
|
617
|
-
replace(
|
|
616
|
+
replace("Home", {
|
|
618
617
|
redirect: false,
|
|
619
618
|
});
|
|
620
619
|
},
|
|
@@ -623,14 +622,14 @@ function LoginScreen({navigation, route}) {
|
|
|
623
622
|
} else {
|
|
624
623
|
hideLoading();
|
|
625
624
|
setIsLogining(false);
|
|
626
|
-
const message = errorCodeMap[res.code] || res.message ||
|
|
625
|
+
const message = errorCodeMap[res.code] || res.message || "登录失败!";
|
|
627
626
|
global.toast.showToast(message);
|
|
628
627
|
}
|
|
629
628
|
};
|
|
630
629
|
|
|
631
630
|
// 选择入口
|
|
632
631
|
const selectEntrance = () => {
|
|
633
|
-
return new Promise(resolve => {
|
|
632
|
+
return new Promise((resolve) => {
|
|
634
633
|
setEntranceSelectVisible(true);
|
|
635
634
|
selectEntranceResolve = resolve;
|
|
636
635
|
});
|
|
@@ -651,10 +650,10 @@ function LoginScreen({navigation, route}) {
|
|
|
651
650
|
length: 4,
|
|
652
651
|
type: 1, // type=1 表示登录用途
|
|
653
652
|
},
|
|
654
|
-
activeType
|
|
655
|
-
).catch(err => {
|
|
653
|
+
activeType
|
|
654
|
+
).catch((err) => {
|
|
656
655
|
console.log(err);
|
|
657
|
-
setSmsCodeRightBtnText(
|
|
656
|
+
setSmsCodeRightBtnText("获取验证码");
|
|
658
657
|
setSmsCodeRightBtnDisabled(false);
|
|
659
658
|
});
|
|
660
659
|
|
|
@@ -662,11 +661,11 @@ function LoginScreen({navigation, route}) {
|
|
|
662
661
|
setSmsId(res.result.sms_id);
|
|
663
662
|
|
|
664
663
|
smsCodeTimer = setTimeout(() => {
|
|
665
|
-
setSmsCodeRightBtnText(
|
|
664
|
+
setSmsCodeRightBtnText("获取验证码");
|
|
666
665
|
setSmsCodeRightBtnDisabled(false);
|
|
667
666
|
}, 120000);
|
|
668
667
|
} else {
|
|
669
|
-
setSmsCodeRightBtnText(
|
|
668
|
+
setSmsCodeRightBtnText("获取验证码");
|
|
670
669
|
setSmsCodeRightBtnDisabled(false);
|
|
671
670
|
}
|
|
672
671
|
};
|
|
@@ -674,23 +673,25 @@ function LoginScreen({navigation, route}) {
|
|
|
674
673
|
loginDisabled;
|
|
675
674
|
const loginBtnBg = {
|
|
676
675
|
backgroundColor: loginDisabled
|
|
677
|
-
?
|
|
678
|
-
:
|
|
676
|
+
? "rgba(234, 96, 0, 0.3)"
|
|
677
|
+
: "rgba(234, 96, 0, 1)",
|
|
679
678
|
};
|
|
680
679
|
const render = () => {
|
|
681
680
|
return (
|
|
682
|
-
<View style={{flex: 1, backgroundColor:
|
|
681
|
+
<View style={{ flex: 1, backgroundColor: "#fff" }}>
|
|
683
682
|
<ImageBackground
|
|
684
|
-
source={require(
|
|
685
|
-
style={[styles.container, {paddingTop: 0}]}
|
|
683
|
+
source={require("../../assets/img/login_bg_new.png")}
|
|
684
|
+
style={[styles.container, { paddingTop: 0 }]}
|
|
685
|
+
>
|
|
686
686
|
{isLoading || isLogined ? (
|
|
687
687
|
<View style={styles.welcomeView}>{/* 白屏界面 */}</View>
|
|
688
688
|
) : (
|
|
689
689
|
<TouchableWithoutFeedback
|
|
690
690
|
onPress={() => {
|
|
691
691
|
Keyboard.dismiss();
|
|
692
|
-
}}
|
|
693
|
-
|
|
692
|
+
}}
|
|
693
|
+
>
|
|
694
|
+
<View style={{ position: "relative", flex: 1 }}>
|
|
694
695
|
<View style={statusBarPlaceholderStyle} />
|
|
695
696
|
<View style={styles.loginHead}>
|
|
696
697
|
<View>
|
|
@@ -699,7 +700,7 @@ function LoginScreen({navigation, route}) {
|
|
|
699
700
|
安装省心 智能管家
|
|
700
701
|
</Text>
|
|
701
702
|
</View>
|
|
702
|
-
<View style={{width: px(403), height: px(265)}}>
|
|
703
|
+
<View style={{ width: px(403), height: px(265) }}>
|
|
703
704
|
{/* <Image
|
|
704
705
|
source={
|
|
705
706
|
activeIndex === 0
|
|
@@ -711,7 +712,7 @@ function LoginScreen({navigation, route}) {
|
|
|
711
712
|
/> */}
|
|
712
713
|
{activeIndex === 0 ? (
|
|
713
714
|
<Image
|
|
714
|
-
source={require(
|
|
715
|
+
source={require("../../assets/img/worker.png")}
|
|
715
716
|
style={styles.topImg}
|
|
716
717
|
resizeMode="contain"
|
|
717
718
|
/>
|
|
@@ -719,9 +720,10 @@ function LoginScreen({navigation, route}) {
|
|
|
719
720
|
<GestureHandlerRootView>
|
|
720
721
|
<LongPressGestureHandler
|
|
721
722
|
minDurationMs={2000} // 设置长按的最短时间为5000毫秒,即5秒
|
|
722
|
-
onActivated={onLongPress}
|
|
723
|
+
onActivated={onLongPress}
|
|
724
|
+
>
|
|
723
725
|
<Image
|
|
724
|
-
source={require(
|
|
726
|
+
source={require("../../assets/img/computer.png")}
|
|
725
727
|
style={styles.topImg}
|
|
726
728
|
resizeMode="contain"
|
|
727
729
|
/>
|
|
@@ -730,7 +732,7 @@ function LoginScreen({navigation, route}) {
|
|
|
730
732
|
)}
|
|
731
733
|
</View>
|
|
732
734
|
</View>
|
|
733
|
-
{appName !==
|
|
735
|
+
{appName !== "遥控键码库" && (
|
|
734
736
|
<LoginType
|
|
735
737
|
activeIndex={activeIndex}
|
|
736
738
|
changeActive={handleChangeActive}
|
|
@@ -740,15 +742,17 @@ function LoginScreen({navigation, route}) {
|
|
|
740
742
|
<View
|
|
741
743
|
style={{
|
|
742
744
|
...styles.inputView,
|
|
743
|
-
paddingTop: appName ===
|
|
744
|
-
}}
|
|
745
|
+
paddingTop: appName === "遥控键码库" ? px(100) : 0,
|
|
746
|
+
}}
|
|
747
|
+
>
|
|
745
748
|
{loginWay === 0 && (
|
|
746
749
|
<>
|
|
747
750
|
<View
|
|
748
751
|
style={[
|
|
749
752
|
styles.inputBox,
|
|
750
|
-
{marginTop: px(40), marginBottom: px(75)},
|
|
751
|
-
]}
|
|
753
|
+
{ marginTop: px(40), marginBottom: px(75) },
|
|
754
|
+
]}
|
|
755
|
+
>
|
|
752
756
|
<Text style={styles.inputTitle}>+86</Text>
|
|
753
757
|
<View style={styles.inputDivider} />
|
|
754
758
|
<TextInput
|
|
@@ -757,7 +761,7 @@ function LoginScreen({navigation, route}) {
|
|
|
757
761
|
value={phone}
|
|
758
762
|
placeholder="请输入您的手机号"
|
|
759
763
|
placeholderTextColor="#A6A6A6"
|
|
760
|
-
onChangeText={text => setPhone(text)}
|
|
764
|
+
onChangeText={(text) => setPhone(text)}
|
|
761
765
|
returnKeyType="done"
|
|
762
766
|
maxLength={11}
|
|
763
767
|
/>
|
|
@@ -768,7 +772,7 @@ function LoginScreen({navigation, route}) {
|
|
|
768
772
|
placeholder="请输入验证码"
|
|
769
773
|
rightBtnDisabled={smsCodeRightBtnDisabled}
|
|
770
774
|
rightBtnText={smsCodeRightBtnText}
|
|
771
|
-
onChangeText={text => setUserInputSmsCode(text)}
|
|
775
|
+
onChangeText={(text) => setUserInputSmsCode(text)}
|
|
772
776
|
onRightBtnPress={handleGetSmsId}
|
|
773
777
|
/>
|
|
774
778
|
</View>
|
|
@@ -779,8 +783,9 @@ function LoginScreen({navigation, route}) {
|
|
|
779
783
|
<View
|
|
780
784
|
style={[
|
|
781
785
|
styles.inputBox,
|
|
782
|
-
{marginTop: px(40), marginBottom: px(75)},
|
|
783
|
-
]}
|
|
786
|
+
{ marginTop: px(40), marginBottom: px(75) },
|
|
787
|
+
]}
|
|
788
|
+
>
|
|
784
789
|
<Text style={styles.inputTitle}>账号</Text>
|
|
785
790
|
<View style={styles.inputDivider} />
|
|
786
791
|
<TextInput
|
|
@@ -788,7 +793,7 @@ function LoginScreen({navigation, route}) {
|
|
|
788
793
|
placeholder="请输入您的账号"
|
|
789
794
|
placeholderTextColor="#A6A6A6"
|
|
790
795
|
value={username}
|
|
791
|
-
onChangeText={text => setUsername(text)}
|
|
796
|
+
onChangeText={(text) => setUsername(text)}
|
|
792
797
|
returnKeyType="done"
|
|
793
798
|
/>
|
|
794
799
|
</View>
|
|
@@ -801,39 +806,43 @@ function LoginScreen({navigation, route}) {
|
|
|
801
806
|
placeholderTextColor="#A6A6A6"
|
|
802
807
|
value={password}
|
|
803
808
|
secureTextEntry
|
|
804
|
-
onChangeText={text => setPassword(text)}
|
|
809
|
+
onChangeText={(text) => setPassword(text)}
|
|
805
810
|
returnKeyType="done"
|
|
806
811
|
/>
|
|
807
812
|
</View>
|
|
808
813
|
<View style={styles.passBox}>
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
814
|
+
<TouchableOpacity
|
|
815
|
+
style={{ marginTop: px(27), marginLeft: px(115) }}
|
|
816
|
+
onPress={() => {
|
|
817
|
+
navigation.navigate("RegisteCountScreen");
|
|
818
|
+
}}
|
|
819
|
+
>
|
|
820
|
+
<Text
|
|
821
|
+
style={{
|
|
822
|
+
color: "#999999",
|
|
823
|
+
fontSize: px(35),
|
|
824
|
+
fontWeight: "bold",
|
|
825
|
+
}}
|
|
826
|
+
>
|
|
827
|
+
注册
|
|
828
|
+
</Text>
|
|
829
|
+
</TouchableOpacity>
|
|
830
|
+
<TouchableOpacity
|
|
831
|
+
style={styles.forgotPassword}
|
|
832
|
+
onPress={() => {
|
|
833
|
+
navigation.navigate("ResePasswordScreen");
|
|
834
|
+
}}
|
|
835
|
+
>
|
|
836
|
+
<Text
|
|
837
|
+
style={{
|
|
838
|
+
color: "#E86003",
|
|
839
|
+
fontSize: px(35),
|
|
840
|
+
fontWeight: "bold",
|
|
841
|
+
}}
|
|
842
|
+
>
|
|
843
|
+
忘记密码
|
|
844
|
+
</Text>
|
|
845
|
+
</TouchableOpacity>
|
|
837
846
|
</View>
|
|
838
847
|
</>
|
|
839
848
|
)}
|
|
@@ -841,23 +850,25 @@ function LoginScreen({navigation, route}) {
|
|
|
841
850
|
<TouchableOpacity
|
|
842
851
|
activeOpacity={0.7}
|
|
843
852
|
onPress={handleLoginPress}
|
|
844
|
-
disabled={loginDisabled}
|
|
853
|
+
disabled={loginDisabled}
|
|
854
|
+
>
|
|
845
855
|
<View
|
|
846
856
|
style={{
|
|
847
857
|
...styles.loginBtnBox,
|
|
848
858
|
marginTop: keybordShow ? px(75) : px(257),
|
|
849
859
|
opacity: loginDisabled ? 0.6 : 1,
|
|
850
|
-
}}
|
|
860
|
+
}}
|
|
861
|
+
>
|
|
851
862
|
<View style={[styles.loginBtn]}>
|
|
852
863
|
<Text style={[styles.loginBtnText]}>
|
|
853
|
-
{isLogining ?
|
|
864
|
+
{isLogining ? "正在登录中..." : "登录"}
|
|
854
865
|
</Text>
|
|
855
866
|
</View>
|
|
856
867
|
</View>
|
|
857
868
|
</TouchableOpacity>
|
|
858
869
|
|
|
859
|
-
{appName !==
|
|
860
|
-
<View style={{marginTop: px(40), width:
|
|
870
|
+
{appName !== "遥控键码库" && (
|
|
871
|
+
<View style={{ marginTop: px(40), width: "100%" }}>
|
|
861
872
|
<View style={styles.protocol}>
|
|
862
873
|
<CheckBox
|
|
863
874
|
center
|
|
@@ -865,7 +876,7 @@ function LoginScreen({navigation, route}) {
|
|
|
865
876
|
containerStyle={{
|
|
866
877
|
margin: 0,
|
|
867
878
|
padding: 0,
|
|
868
|
-
backgroundColor:
|
|
879
|
+
backgroundColor: "transparent",
|
|
869
880
|
}}
|
|
870
881
|
onPress={() => handleSetProtocolAgree(!protocolAgree)}
|
|
871
882
|
checkedIcon={
|
|
@@ -886,35 +897,40 @@ function LoginScreen({navigation, route}) {
|
|
|
886
897
|
}
|
|
887
898
|
/>
|
|
888
899
|
<TouchableWithoutFeedback
|
|
889
|
-
onPress={() => setProtocolAgree(!protocolAgree)}
|
|
900
|
+
onPress={() => setProtocolAgree(!protocolAgree)}
|
|
901
|
+
>
|
|
890
902
|
<Text style={styles.protocolText}>
|
|
891
903
|
已阅读并同意
|
|
892
904
|
<TouchableWithoutFeedback
|
|
893
|
-
style={{paddingVertical: px(150)}}
|
|
905
|
+
style={{ paddingVertical: px(150) }}
|
|
894
906
|
onPress={() =>
|
|
895
|
-
handleViewUserAgreementByType(
|
|
896
|
-
}
|
|
907
|
+
handleViewUserAgreementByType("service")
|
|
908
|
+
}
|
|
909
|
+
>
|
|
897
910
|
<Text
|
|
898
911
|
style={
|
|
899
912
|
protocolAgree || serviceAgree
|
|
900
913
|
? styles.protocolLinkAgree
|
|
901
914
|
: styles.protocolLink
|
|
902
|
-
}
|
|
915
|
+
}
|
|
916
|
+
>
|
|
903
917
|
《服务条款》
|
|
904
918
|
</Text>
|
|
905
919
|
</TouchableWithoutFeedback>
|
|
906
920
|
与
|
|
907
921
|
<TouchableWithoutFeedback
|
|
908
|
-
style={{paddingVertical: px(150)}}
|
|
922
|
+
style={{ paddingVertical: px(150) }}
|
|
909
923
|
onPress={() =>
|
|
910
|
-
handleViewUserAgreementByType(
|
|
911
|
-
}
|
|
924
|
+
handleViewUserAgreementByType("privacy")
|
|
925
|
+
}
|
|
926
|
+
>
|
|
912
927
|
<Text
|
|
913
928
|
style={
|
|
914
929
|
protocolAgree || privacyAgree
|
|
915
930
|
? styles.protocolLinkAgree
|
|
916
931
|
: styles.protocolLink
|
|
917
|
-
}
|
|
932
|
+
}
|
|
933
|
+
>
|
|
918
934
|
《隐私权政策》
|
|
919
935
|
</Text>
|
|
920
936
|
</TouchableWithoutFeedback>
|
|
@@ -927,33 +943,51 @@ function LoginScreen({navigation, route}) {
|
|
|
927
943
|
|
|
928
944
|
<View
|
|
929
945
|
style={{
|
|
930
|
-
position:
|
|
931
|
-
width:
|
|
932
|
-
top:
|
|
933
|
-
|
|
946
|
+
position: "absolute",
|
|
947
|
+
width: "100%",
|
|
948
|
+
top:
|
|
949
|
+
Dimensions.get("window").height -
|
|
950
|
+
(["禺乐慧家", "悦慧家"].includes(appName)
|
|
951
|
+
? px(365)
|
|
952
|
+
: px(225)),
|
|
953
|
+
}}
|
|
954
|
+
>
|
|
934
955
|
<View
|
|
935
956
|
style={{
|
|
936
957
|
// flexDirection: 'row',
|
|
937
|
-
justifyContent:
|
|
938
|
-
alignItems:
|
|
958
|
+
justifyContent: "center",
|
|
959
|
+
alignItems: "center",
|
|
939
960
|
// backgroundColor:'red'
|
|
940
|
-
}}
|
|
961
|
+
}}
|
|
962
|
+
>
|
|
941
963
|
<TouchableOpacity
|
|
942
964
|
activeOpacity={0.7}
|
|
943
|
-
onPress={handleSwitchLoginWay}
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
965
|
+
onPress={handleSwitchLoginWay}
|
|
966
|
+
>
|
|
967
|
+
<View
|
|
968
|
+
style={{
|
|
969
|
+
flexDirection: "row",
|
|
970
|
+
padding: px(20),
|
|
971
|
+
marginBottom: px(70),
|
|
972
|
+
}}
|
|
973
|
+
>
|
|
974
|
+
<Text style={{ color: "#E86003", fontSize: px(43) }}>
|
|
975
|
+
{loginWay === 0 ? "账号登录" : "手机号登录"}
|
|
947
976
|
</Text>
|
|
948
977
|
</View>
|
|
949
978
|
</TouchableOpacity>
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
979
|
+
{["禺乐慧家", "悦慧家"].includes(appName) && (
|
|
980
|
+
<TouchableOpacity
|
|
981
|
+
activeOpacity={0.7}
|
|
982
|
+
onPress={handleLookFreely}
|
|
983
|
+
>
|
|
984
|
+
<View style={{}}>
|
|
985
|
+
<Text style={{ color: "#999", fontSize: px(43) }}>
|
|
986
|
+
暂不登录,先逛逛
|
|
987
|
+
</Text>
|
|
988
|
+
</View>
|
|
989
|
+
</TouchableOpacity>
|
|
990
|
+
)}
|
|
957
991
|
</View>
|
|
958
992
|
</View>
|
|
959
993
|
|
|
@@ -963,72 +997,79 @@ function LoginScreen({navigation, route}) {
|
|
|
963
997
|
style={{
|
|
964
998
|
...styles.entranceSelect,
|
|
965
999
|
paddingTop:
|
|
966
|
-
(Platform.OS ===
|
|
1000
|
+
(Platform.OS === "ios" ? insets.top : 0) +
|
|
967
1001
|
StatusBar.currentHeight,
|
|
968
|
-
}}
|
|
1002
|
+
}}
|
|
1003
|
+
>
|
|
969
1004
|
<View
|
|
970
1005
|
style={{
|
|
971
1006
|
paddingTop: px(36),
|
|
972
1007
|
paddingBottom: px(33),
|
|
973
1008
|
marginBottom: px(38),
|
|
974
|
-
}}
|
|
1009
|
+
}}
|
|
1010
|
+
>
|
|
975
1011
|
<Text
|
|
976
1012
|
style={{
|
|
977
1013
|
fontSize: px(55),
|
|
978
|
-
color:
|
|
979
|
-
fontWeight:
|
|
980
|
-
textAlign:
|
|
981
|
-
}}
|
|
1014
|
+
color: "#333",
|
|
1015
|
+
fontWeight: "bold",
|
|
1016
|
+
textAlign: "center",
|
|
1017
|
+
}}
|
|
1018
|
+
>
|
|
982
1019
|
请选择功能
|
|
983
1020
|
</Text>
|
|
984
1021
|
</View>
|
|
985
1022
|
<TouchableOpacity
|
|
986
1023
|
style={{
|
|
987
1024
|
...styles.entranceSelectItem,
|
|
988
|
-
backgroundColor:
|
|
1025
|
+
backgroundColor: "#F4F9F8",
|
|
989
1026
|
}}
|
|
990
1027
|
onPress={() => {
|
|
991
|
-
selectEntranceResolve && selectEntranceResolve(
|
|
1028
|
+
selectEntranceResolve && selectEntranceResolve("szjt");
|
|
992
1029
|
selectEntranceResolve = null;
|
|
993
|
-
}}
|
|
1030
|
+
}}
|
|
1031
|
+
>
|
|
994
1032
|
<Image
|
|
995
1033
|
style={{
|
|
996
1034
|
width: px(104),
|
|
997
1035
|
height: px(104),
|
|
998
1036
|
}}
|
|
999
1037
|
resizeMode="contain"
|
|
1000
|
-
source={require(
|
|
1038
|
+
source={require("../../assets/img/szjt.png")}
|
|
1001
1039
|
/>
|
|
1002
1040
|
<Text
|
|
1003
1041
|
style={{
|
|
1004
1042
|
...styles.entranceSelectText,
|
|
1005
|
-
color:
|
|
1006
|
-
}}
|
|
1043
|
+
color: "#62C0B6",
|
|
1044
|
+
}}
|
|
1045
|
+
>
|
|
1007
1046
|
数字家庭
|
|
1008
1047
|
</Text>
|
|
1009
1048
|
</TouchableOpacity>
|
|
1010
1049
|
<TouchableOpacity
|
|
1011
1050
|
style={{
|
|
1012
1051
|
...styles.entranceSelectItem,
|
|
1013
|
-
backgroundColor:
|
|
1052
|
+
backgroundColor: "#F2FAFF",
|
|
1014
1053
|
}}
|
|
1015
1054
|
onPress={() => {
|
|
1016
|
-
selectEntranceResolve && selectEntranceResolve(
|
|
1055
|
+
selectEntranceResolve && selectEntranceResolve("tyygq");
|
|
1017
1056
|
selectEntranceResolve = null;
|
|
1018
|
-
}}
|
|
1057
|
+
}}
|
|
1058
|
+
>
|
|
1019
1059
|
<Image
|
|
1020
1060
|
style={{
|
|
1021
1061
|
width: px(104),
|
|
1022
1062
|
height: px(104),
|
|
1023
1063
|
}}
|
|
1024
1064
|
resizeMode="contain"
|
|
1025
|
-
source={require(
|
|
1065
|
+
source={require("../../assets/img/tykz.png")}
|
|
1026
1066
|
/>
|
|
1027
1067
|
<Text
|
|
1028
1068
|
style={{
|
|
1029
1069
|
...styles.entranceSelectText,
|
|
1030
|
-
color:
|
|
1031
|
-
}}
|
|
1070
|
+
color: "#599FF1",
|
|
1071
|
+
}}
|
|
1072
|
+
>
|
|
1032
1073
|
遥控键码下载
|
|
1033
1074
|
</Text>
|
|
1034
1075
|
</TouchableOpacity>
|
|
@@ -1058,7 +1099,7 @@ function LoginScreen({navigation, route}) {
|
|
|
1058
1099
|
/>
|
|
1059
1100
|
)}
|
|
1060
1101
|
|
|
1061
|
-
{protocolDialogVisible && !isLoading && appName !==
|
|
1102
|
+
{protocolDialogVisible && !isLoading && appName !== "遥控键码库" && (
|
|
1062
1103
|
<View style={styles.agreementMask}>
|
|
1063
1104
|
<View style={styles.agreementConfirmContent}>
|
|
1064
1105
|
<View style={styles.agreementConfirmHead}>
|
|
@@ -1066,21 +1107,23 @@ function LoginScreen({navigation, route}) {
|
|
|
1066
1107
|
欢迎使用爱家宝
|
|
1067
1108
|
</Text>
|
|
1068
1109
|
</View>
|
|
1069
|
-
<View style={{flex: 1}}>
|
|
1110
|
+
<View style={{ flex: 1 }}>
|
|
1070
1111
|
<ScrollView showsVerticalScrollIndicator={false}>
|
|
1071
1112
|
<View>
|
|
1072
1113
|
<Text style={styles.agreementConfirmText}>
|
|
1073
1114
|
为了更好的保障您的合法权益,请您阅读并同意
|
|
1074
1115
|
<TouchableWithoutFeedback
|
|
1075
1116
|
onPress={handleViewUserAgreement}
|
|
1076
|
-
style={{paddingVertical: px(100)}}
|
|
1117
|
+
style={{ paddingVertical: px(100) }}
|
|
1118
|
+
>
|
|
1077
1119
|
<Text style={styles.agreementConfirmImportantText}>
|
|
1078
1120
|
用户协议
|
|
1079
1121
|
</Text>
|
|
1080
1122
|
</TouchableWithoutFeedback>
|
|
1081
1123
|
和
|
|
1082
1124
|
<TouchableWithoutFeedback
|
|
1083
|
-
onPress={handleViewPrivacyClause}
|
|
1125
|
+
onPress={handleViewPrivacyClause}
|
|
1126
|
+
>
|
|
1084
1127
|
<Text style={styles.agreementConfirmImportantText}>
|
|
1085
1128
|
隐私条款
|
|
1086
1129
|
</Text>
|
|
@@ -1090,31 +1133,31 @@ function LoginScreen({navigation, route}) {
|
|
|
1090
1133
|
</View>
|
|
1091
1134
|
<View>
|
|
1092
1135
|
<Text style={styles.agreementConfirmText}>
|
|
1093
|
-
1.
|
|
1094
|
-
版本):用于用于用户反馈、客服等功能中读写设备上的照片及文件;
|
|
1136
|
+
1.
|
|
1137
|
+
读写设备存储权限(Android版本):用于用于用户反馈、客服等功能中读写设备上的照片及文件;
|
|
1095
1138
|
</Text>
|
|
1096
1139
|
</View>
|
|
1097
1140
|
<View>
|
|
1098
1141
|
<Text style={styles.agreementConfirmText}>
|
|
1099
|
-
2.
|
|
1100
|
-
版本):用于家庭位置管理、判断地区提供天气服务、发现附近智能设备;
|
|
1142
|
+
2.
|
|
1143
|
+
地理位置权限(Android、IOS版本):用于家庭位置管理、判断地区提供天气服务、发现附近智能设备;
|
|
1101
1144
|
</Text>
|
|
1102
1145
|
</View>
|
|
1103
1146
|
<View>
|
|
1104
1147
|
<Text style={styles.agreementConfirmText}>
|
|
1105
|
-
3.
|
|
1106
|
-
版本):用于扫码绑定电视账户、扫码进行设备添加等功能;
|
|
1148
|
+
3.
|
|
1149
|
+
相机权限(Android、IOS版本):用于扫码绑定电视账户、扫码进行设备添加等功能;
|
|
1107
1150
|
</Text>
|
|
1108
1151
|
</View>
|
|
1109
1152
|
<View>
|
|
1110
1153
|
<Text style={styles.agreementConfirmText}>
|
|
1111
|
-
4.
|
|
1112
|
-
版本):用于用户反馈等功能中读写设备上的照片及视频;
|
|
1154
|
+
4.
|
|
1155
|
+
相册权限(Android、IOS版本):用于用户反馈等功能中读写设备上的照片及视频;
|
|
1113
1156
|
</Text>
|
|
1114
1157
|
</View>
|
|
1115
1158
|
<View>
|
|
1116
1159
|
<Text style={styles.agreementConfirmText}>
|
|
1117
|
-
5. 麦克风权限(Android、
|
|
1160
|
+
5. 麦克风权限(Android、IOS版本):智能客服等功能;
|
|
1118
1161
|
</Text>
|
|
1119
1162
|
</View>
|
|
1120
1163
|
<View>
|
|
@@ -1124,20 +1167,21 @@ function LoginScreen({navigation, route}) {
|
|
|
1124
1167
|
</View>
|
|
1125
1168
|
<View>
|
|
1126
1169
|
<Text style={styles.agreementConfirmText}>
|
|
1127
|
-
7.
|
|
1128
|
-
版本):用于连接设备时连接设备发出的蓝牙信号,以进行设备通信,对于通过蓝牙连接的智能设备,也需要蓝牙权限用于通信;
|
|
1170
|
+
7.
|
|
1171
|
+
开启蓝牙权限(Android、IOS版本):用于连接设备时连接设备发出的蓝牙信号,以进行设备通信,对于通过蓝牙连接的智能设备,也需要蓝牙权限用于通信;
|
|
1129
1172
|
</Text>
|
|
1130
1173
|
</View>
|
|
1131
1174
|
<View>
|
|
1132
1175
|
<Text style={styles.agreementConfirmText}>
|
|
1133
|
-
8.
|
|
1134
|
-
版本)
|
|
1176
|
+
8.
|
|
1177
|
+
获取wifi与其bssid权限(Android、IOS版本):用于添加与给网关设备配网时,获取附近可以连接的wifi列表,及过滤5G
|
|
1178
|
+
wifi列表;
|
|
1135
1179
|
</Text>
|
|
1136
1180
|
</View>
|
|
1137
1181
|
<View>
|
|
1138
1182
|
<Text style={styles.agreementConfirmText}>
|
|
1139
|
-
|
|
1140
|
-
版本)
|
|
1183
|
+
9.
|
|
1184
|
+
获取mac权限(Android、IOS版本):用于获取mac添加智能设备;
|
|
1141
1185
|
</Text>
|
|
1142
1186
|
</View>
|
|
1143
1187
|
</ScrollView>
|
|
@@ -1147,14 +1191,16 @@ function LoginScreen({navigation, route}) {
|
|
|
1147
1191
|
<TouchableOpacity
|
|
1148
1192
|
style={styles.disagreeBtn}
|
|
1149
1193
|
activeOpacity={0.7}
|
|
1150
|
-
onPress={handleUserDisagree}
|
|
1194
|
+
onPress={handleUserDisagree}
|
|
1195
|
+
>
|
|
1151
1196
|
<Text style={styles.disagreeBtnText}>不同意</Text>
|
|
1152
1197
|
</TouchableOpacity>
|
|
1153
1198
|
<Divider color="#eee" width={1} orientation="vertical" />
|
|
1154
1199
|
<TouchableOpacity
|
|
1155
1200
|
style={styles.agreeBtn}
|
|
1156
1201
|
activeOpacity={0.7}
|
|
1157
|
-
onPress={handleUserAgree}
|
|
1202
|
+
onPress={handleUserAgree}
|
|
1203
|
+
>
|
|
1158
1204
|
<Text style={styles.agreeBtnText}>同意</Text>
|
|
1159
1205
|
</TouchableOpacity>
|
|
1160
1206
|
</View>
|
|
@@ -1176,20 +1222,20 @@ const styles = StyleSheet.create({
|
|
|
1176
1222
|
},
|
|
1177
1223
|
welcomeView: {
|
|
1178
1224
|
flex: 1,
|
|
1179
|
-
alignItems:
|
|
1180
|
-
justifyContent:
|
|
1225
|
+
alignItems: "center",
|
|
1226
|
+
justifyContent: "center",
|
|
1181
1227
|
},
|
|
1182
1228
|
loginHead: {
|
|
1183
|
-
flexDirection:
|
|
1184
|
-
alignItems:
|
|
1185
|
-
justifyContent:
|
|
1229
|
+
flexDirection: "row",
|
|
1230
|
+
alignItems: "center",
|
|
1231
|
+
justifyContent: "space-between",
|
|
1186
1232
|
marginTop: px(113),
|
|
1187
1233
|
paddingLeft: px(69),
|
|
1188
1234
|
paddingRight: px(37),
|
|
1189
1235
|
marginBottom: px(52),
|
|
1190
1236
|
},
|
|
1191
1237
|
inputView: {
|
|
1192
|
-
backgroundColor:
|
|
1238
|
+
backgroundColor: "#fff",
|
|
1193
1239
|
borderRadius: px(22),
|
|
1194
1240
|
flex: 1,
|
|
1195
1241
|
marginTop: px(-50),
|
|
@@ -1197,21 +1243,21 @@ const styles = StyleSheet.create({
|
|
|
1197
1243
|
inputDivider: {
|
|
1198
1244
|
width: px(3),
|
|
1199
1245
|
height: px(37),
|
|
1200
|
-
backgroundColor:
|
|
1246
|
+
backgroundColor: "#eee",
|
|
1201
1247
|
marginHorizontal: px(22),
|
|
1202
1248
|
},
|
|
1203
1249
|
inputTitle: {
|
|
1204
|
-
color:
|
|
1250
|
+
color: "#333",
|
|
1205
1251
|
fontSize: px(40),
|
|
1206
|
-
fontWeight:
|
|
1252
|
+
fontWeight: "400",
|
|
1207
1253
|
},
|
|
1208
|
-
passBox:{
|
|
1209
|
-
|
|
1210
|
-
|
|
1254
|
+
passBox: {
|
|
1255
|
+
flexDirection: "row",
|
|
1256
|
+
justifyContent: "space-between",
|
|
1211
1257
|
},
|
|
1212
1258
|
forgotPassword: {
|
|
1213
1259
|
marginTop: px(27),
|
|
1214
|
-
alignSelf:
|
|
1260
|
+
alignSelf: "flex-end",
|
|
1215
1261
|
marginRight: px(115),
|
|
1216
1262
|
},
|
|
1217
1263
|
loginView: {
|
|
@@ -1219,83 +1265,83 @@ const styles = StyleSheet.create({
|
|
|
1219
1265
|
},
|
|
1220
1266
|
welcomeTitleText: {
|
|
1221
1267
|
fontSize: px(92),
|
|
1222
|
-
color:
|
|
1223
|
-
fontWeight:
|
|
1268
|
+
color: "#fff",
|
|
1269
|
+
fontWeight: "600",
|
|
1224
1270
|
},
|
|
1225
1271
|
welcomeSubTitleText: {
|
|
1226
1272
|
paddingTop: px(17),
|
|
1227
|
-
color:
|
|
1273
|
+
color: "#FFF9F5",
|
|
1228
1274
|
fontSize: px(46),
|
|
1229
1275
|
},
|
|
1230
1276
|
topImg: {
|
|
1231
|
-
width:
|
|
1232
|
-
height:
|
|
1277
|
+
width: "100%",
|
|
1278
|
+
height: "100%",
|
|
1233
1279
|
},
|
|
1234
1280
|
inputBox: {
|
|
1235
1281
|
marginHorizontal: px(115),
|
|
1236
|
-
flexDirection:
|
|
1237
|
-
alignItems:
|
|
1282
|
+
flexDirection: "row",
|
|
1283
|
+
alignItems: "center",
|
|
1238
1284
|
borderBottomWidth: px(2),
|
|
1239
1285
|
// marginVertical: 10,
|
|
1240
|
-
borderBottomColor:
|
|
1286
|
+
borderBottomColor: "#E8E8E8",
|
|
1241
1287
|
height: px(100),
|
|
1242
1288
|
},
|
|
1243
1289
|
input: {
|
|
1244
1290
|
height: 50,
|
|
1245
1291
|
flex: 1,
|
|
1246
|
-
color:
|
|
1292
|
+
color: "#000",
|
|
1247
1293
|
},
|
|
1248
1294
|
loginBtnBox: {
|
|
1249
|
-
flexDirection:
|
|
1250
|
-
alignItems:
|
|
1295
|
+
flexDirection: "row",
|
|
1296
|
+
alignItems: "center",
|
|
1251
1297
|
},
|
|
1252
1298
|
loginBtn: {
|
|
1253
1299
|
marginHorizontal: px(115),
|
|
1254
1300
|
borderRadius: px(23),
|
|
1255
|
-
backgroundColor:
|
|
1301
|
+
backgroundColor: "#E86003",
|
|
1256
1302
|
flex: 1,
|
|
1257
1303
|
height: px(132),
|
|
1258
|
-
alignItems:
|
|
1259
|
-
justifyContent:
|
|
1304
|
+
alignItems: "center",
|
|
1305
|
+
justifyContent: "center",
|
|
1260
1306
|
},
|
|
1261
1307
|
loginBtnText: {
|
|
1262
|
-
color:
|
|
1308
|
+
color: "#fff",
|
|
1263
1309
|
fontSize: px(52),
|
|
1264
|
-
fontWeight:
|
|
1310
|
+
fontWeight: "600",
|
|
1265
1311
|
},
|
|
1266
1312
|
|
|
1267
1313
|
protocol: {
|
|
1268
|
-
flexDirection:
|
|
1269
|
-
justifyContent:
|
|
1270
|
-
alignItems:
|
|
1314
|
+
flexDirection: "row",
|
|
1315
|
+
justifyContent: "center",
|
|
1316
|
+
alignItems: "center",
|
|
1271
1317
|
},
|
|
1272
1318
|
protocolText: {
|
|
1273
|
-
color:
|
|
1319
|
+
color: "#A6A6A6",
|
|
1274
1320
|
fontSize: px(35),
|
|
1275
1321
|
},
|
|
1276
1322
|
protocolLink: {
|
|
1277
|
-
color:
|
|
1323
|
+
color: "rgba(234, 96, 0, 1)",
|
|
1278
1324
|
},
|
|
1279
1325
|
protocolLinkAgree: {
|
|
1280
|
-
color:
|
|
1326
|
+
color: "#0EC12C",
|
|
1281
1327
|
},
|
|
1282
1328
|
|
|
1283
1329
|
agreementMask: {
|
|
1284
|
-
position:
|
|
1330
|
+
position: "absolute",
|
|
1285
1331
|
left: 0,
|
|
1286
1332
|
top: 0,
|
|
1287
1333
|
bottom: 0,
|
|
1288
1334
|
right: 0,
|
|
1289
1335
|
zIndex: 2,
|
|
1290
|
-
backgroundColor:
|
|
1336
|
+
backgroundColor: "rgba(0,0,0,0.7)",
|
|
1291
1337
|
},
|
|
1292
1338
|
agreementConfirmContent: {
|
|
1293
|
-
position:
|
|
1339
|
+
position: "absolute",
|
|
1294
1340
|
height: 400,
|
|
1295
1341
|
left: px(75),
|
|
1296
1342
|
right: px(75),
|
|
1297
|
-
top: Dimensions.get(
|
|
1298
|
-
backgroundColor:
|
|
1343
|
+
top: Dimensions.get("window").height / 2 - 200,
|
|
1344
|
+
backgroundColor: "#fff",
|
|
1299
1345
|
paddingBottom: 0,
|
|
1300
1346
|
borderRadius: px(29),
|
|
1301
1347
|
},
|
|
@@ -1304,7 +1350,7 @@ const styles = StyleSheet.create({
|
|
|
1304
1350
|
marginBottom: px(29),
|
|
1305
1351
|
},
|
|
1306
1352
|
headerLeft: {
|
|
1307
|
-
position:
|
|
1353
|
+
position: "absolute",
|
|
1308
1354
|
top: 15,
|
|
1309
1355
|
left: 10,
|
|
1310
1356
|
zIndex: 2,
|
|
@@ -1315,7 +1361,7 @@ const styles = StyleSheet.create({
|
|
|
1315
1361
|
},
|
|
1316
1362
|
agreementConfirmTitleBox: {
|
|
1317
1363
|
// flex: 1,
|
|
1318
|
-
position:
|
|
1364
|
+
position: "absolute",
|
|
1319
1365
|
top: 10,
|
|
1320
1366
|
bottom: 0,
|
|
1321
1367
|
left: 0,
|
|
@@ -1325,24 +1371,24 @@ const styles = StyleSheet.create({
|
|
|
1325
1371
|
agreementConfirmTitle: {
|
|
1326
1372
|
fontSize: 20,
|
|
1327
1373
|
// lineHeight: 50,
|
|
1328
|
-
color:
|
|
1329
|
-
textAlign:
|
|
1374
|
+
color: "#000",
|
|
1375
|
+
textAlign: "center",
|
|
1330
1376
|
// paddingTop: 20,
|
|
1331
1377
|
},
|
|
1332
1378
|
agreementConfirmText: {
|
|
1333
1379
|
fontSize: px(40),
|
|
1334
1380
|
lineHeight: px(69),
|
|
1335
|
-
color:
|
|
1381
|
+
color: "#333",
|
|
1336
1382
|
marginHorizontal: px(40),
|
|
1337
1383
|
},
|
|
1338
1384
|
agreementConfirmImportantText: {
|
|
1339
|
-
color:
|
|
1385
|
+
color: "rgba(234, 96, 0, 1)",
|
|
1340
1386
|
},
|
|
1341
1387
|
agreementButtons: {
|
|
1342
1388
|
height: 50,
|
|
1343
1389
|
marginTop: px(12),
|
|
1344
|
-
flexDirection:
|
|
1345
|
-
justifyContent:
|
|
1390
|
+
flexDirection: "row",
|
|
1391
|
+
justifyContent: "space-around",
|
|
1346
1392
|
borderBottomLeftRadius: px(29),
|
|
1347
1393
|
},
|
|
1348
1394
|
disagreeBtn: {
|
|
@@ -1351,10 +1397,10 @@ const styles = StyleSheet.create({
|
|
|
1351
1397
|
paddingBottom: px(29),
|
|
1352
1398
|
},
|
|
1353
1399
|
disagreeBtnText: {
|
|
1354
|
-
color:
|
|
1400
|
+
color: "#666",
|
|
1355
1401
|
fontSize: px(52),
|
|
1356
|
-
textAlign:
|
|
1357
|
-
fontWeight:
|
|
1402
|
+
textAlign: "center",
|
|
1403
|
+
fontWeight: "500",
|
|
1358
1404
|
},
|
|
1359
1405
|
agreeBtn: {
|
|
1360
1406
|
flex: 1,
|
|
@@ -1362,25 +1408,25 @@ const styles = StyleSheet.create({
|
|
|
1362
1408
|
paddingBottom: px(29),
|
|
1363
1409
|
},
|
|
1364
1410
|
agreeBtnText: {
|
|
1365
|
-
color:
|
|
1411
|
+
color: "#E86003",
|
|
1366
1412
|
fontSize: px(52),
|
|
1367
|
-
textAlign:
|
|
1368
|
-
fontWeight:
|
|
1413
|
+
textAlign: "center",
|
|
1414
|
+
fontWeight: "500",
|
|
1369
1415
|
},
|
|
1370
1416
|
|
|
1371
1417
|
mask: {
|
|
1372
|
-
position:
|
|
1418
|
+
position: "absolute",
|
|
1373
1419
|
top: 0,
|
|
1374
1420
|
left: 0,
|
|
1375
1421
|
bottom: 0,
|
|
1376
1422
|
right: 0,
|
|
1377
|
-
justifyContent:
|
|
1378
|
-
alignItems:
|
|
1379
|
-
backgroundColor:
|
|
1423
|
+
justifyContent: "center",
|
|
1424
|
+
alignItems: "center",
|
|
1425
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
1380
1426
|
},
|
|
1381
1427
|
entranceSelect: {
|
|
1382
|
-
backgroundColor:
|
|
1383
|
-
position:
|
|
1428
|
+
backgroundColor: "#fff",
|
|
1429
|
+
position: "absolute",
|
|
1384
1430
|
top: 0,
|
|
1385
1431
|
bottom: 0,
|
|
1386
1432
|
left: 0,
|
|
@@ -1390,13 +1436,13 @@ const styles = StyleSheet.create({
|
|
|
1390
1436
|
height: px(231),
|
|
1391
1437
|
marginHorizontal: px(38),
|
|
1392
1438
|
paddingLeft: px(38),
|
|
1393
|
-
flexDirection:
|
|
1394
|
-
alignItems:
|
|
1439
|
+
flexDirection: "row",
|
|
1440
|
+
alignItems: "center",
|
|
1395
1441
|
borderRadius: px(16),
|
|
1396
1442
|
marginBottom: px(27),
|
|
1397
1443
|
},
|
|
1398
1444
|
entranceSelectText: {
|
|
1399
|
-
fontWeight:
|
|
1445
|
+
fontWeight: "500",
|
|
1400
1446
|
fontSize: px(55),
|
|
1401
1447
|
marginLeft: px(33),
|
|
1402
1448
|
},
|