1,上架审核类注释
2,注册页面隐私协议勾选框及逻辑修改
This commit is contained in:
parent
61803e2c42
commit
ad8cdc279b
@ -198,7 +198,7 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
|||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 10.sp,
|
width: 10.sp,
|
||||||
)),
|
)),
|
||||||
//提交Google暂时屏蔽
|
//上架审核注释 提交Google暂时屏蔽
|
||||||
// GestureDetector(
|
// GestureDetector(
|
||||||
// child: SizedBox(
|
// child: SizedBox(
|
||||||
// // width: 150.w,
|
// // width: 150.w,
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
import '../../tools/store_service.dart';
|
|
||||||
|
|
||||||
class StarLockLoginState {
|
class StarLockLoginState {
|
||||||
var passwordShow = true.obs;
|
var passwordShow = true.obs;
|
||||||
var agree = false.obs;
|
var agree = false.obs;
|
||||||
|
|||||||
@ -30,11 +30,11 @@ class StarLockRegisterLogic extends BaseGetXController {
|
|||||||
|
|
||||||
void register() async {
|
void register() async {
|
||||||
var entity = await ApiRepository.to.register(
|
var entity = await ApiRepository.to.register(
|
||||||
receiverType:state.isIphoneType.value == true ? 1 : 2,
|
receiverType: state.isIphoneType.value == true ? 1 : 2,
|
||||||
countryCode:state.countryCode.value,
|
countryCode: state.countryCode.value,
|
||||||
account:state.phoneOrEmailStr.value,
|
account: state.phoneOrEmailStr.value,
|
||||||
password:state.pwd.value,
|
password: state.pwd.value,
|
||||||
verificationCode:state.verificationCode.value);
|
verificationCode: state.verificationCode.value);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
// await loginSuccess(loginEntity: entity);
|
// await loginSuccess(loginEntity: entity);
|
||||||
// Toast.show(msg: "注册成功");
|
// Toast.show(msg: "注册成功");
|
||||||
@ -46,16 +46,18 @@ class StarLockRegisterLogic extends BaseGetXController {
|
|||||||
void sendValidationCode() async {
|
void sendValidationCode() async {
|
||||||
var entity = await ApiRepository.to.sendValidationCode(
|
var entity = await ApiRepository.to.sendValidationCode(
|
||||||
// state.countryCode.value,
|
// state.countryCode.value,
|
||||||
countryCode:state.countryCode.value.toString(),
|
countryCode: state.countryCode.value.toString(),
|
||||||
account:state.phoneOrEmailStr.value,
|
account: state.phoneOrEmailStr.value,
|
||||||
channel:state.isIphoneType.value ? "1" : "2",
|
channel: state.isIphoneType.value ? "1" : "2",
|
||||||
codeType:'1',
|
codeType: '1',
|
||||||
xWidth:state.xWidth.value.toString());
|
xWidth: state.xWidth.value.toString());
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
_startTimer();
|
_startTimer();
|
||||||
} else {
|
} else {}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
void changeAgreeState() {
|
||||||
|
_resetCanSub();
|
||||||
}
|
}
|
||||||
|
|
||||||
void checkNext(TextEditingController controller) {
|
void checkNext(TextEditingController controller) {
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
@ -51,7 +50,12 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
|
|||||||
isDisabled: state.canSub.value,
|
isDisabled: state.canSub.value,
|
||||||
onClick: state.canSub.value
|
onClick: state.canSub.value
|
||||||
? () {
|
? () {
|
||||||
logic.register();
|
if (state.agree.value == false) {
|
||||||
|
logic.showToast('请先同意用户协议及隐私政策');
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
logic.register();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
: null);
|
: null);
|
||||||
}),
|
}),
|
||||||
@ -294,7 +298,8 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
|
|||||||
"countryCode": state.countryCode,
|
"countryCode": state.countryCode,
|
||||||
"account": state.phoneOrEmailStr.value
|
"account": state.phoneOrEmailStr.value
|
||||||
});
|
});
|
||||||
state.xWidth.value = (result as Map<String, dynamic>)['xWidth'];
|
state.xWidth.value =
|
||||||
|
(result as Map<String, dynamic>)['xWidth'];
|
||||||
logic.sendValidationCode();
|
logic.sendValidationCode();
|
||||||
}
|
}
|
||||||
: null,
|
: null,
|
||||||
@ -303,7 +308,9 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
|
|||||||
height: 60.h,
|
height: 60.h,
|
||||||
padding: EdgeInsets.all(5.h),
|
padding: EdgeInsets.all(5.h),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: state.phoneOrEmailStrIsOK.value ? AppColors.mainColor : Colors.grey,
|
color: state.phoneOrEmailStrIsOK.value
|
||||||
|
? AppColors.mainColor
|
||||||
|
: Colors.grey,
|
||||||
borderRadius: BorderRadius.circular(5)),
|
borderRadius: BorderRadius.circular(5)),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(state.btnText.value,
|
child: Text(state.btnText.value,
|
||||||
@ -326,15 +333,18 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
|
|||||||
return Row(
|
return Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Image.asset(
|
Obx(() => GestureDetector(
|
||||||
'images/icon_select_circle.png',
|
onTap: () {
|
||||||
width: 28.w,
|
state.agree.value = !state.agree.value;
|
||||||
height: 28.w,
|
logic.changeAgreeState();
|
||||||
),
|
},
|
||||||
// SizedBox(
|
child: Image.asset(
|
||||||
// height: 20.h,
|
state.agree.value
|
||||||
// width: 26.w,
|
? 'images/icon_round_select.png'
|
||||||
// child: Checkbox(value: false, onChanged: (value) {})),
|
: 'images/icon_round_unSelect.png',
|
||||||
|
width: 30.w,
|
||||||
|
height: 30.w,
|
||||||
|
))),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 15.w,
|
width: 15.w,
|
||||||
),
|
),
|
||||||
@ -352,11 +362,10 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
|
|||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: AppColors.mainColor, fontSize: 20.sp)),
|
color: AppColors.mainColor, fontSize: 20.sp)),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(Routers.webviewShowPage,
|
Get.toNamed(Routers.webviewShowPage, arguments: {
|
||||||
arguments: {
|
"url": XSConstantMacro.userAgreementURL,
|
||||||
"url": XSConstantMacro.userAgreementURL,
|
"title": '用户协议'
|
||||||
"title": '用户协议'
|
});
|
||||||
});
|
|
||||||
},
|
},
|
||||||
)),
|
)),
|
||||||
WidgetSpan(
|
WidgetSpan(
|
||||||
@ -368,9 +377,9 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
|
|||||||
color: AppColors.mainColor, fontSize: 20.sp)),
|
color: AppColors.mainColor, fontSize: 20.sp)),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(Routers.webviewShowPage, arguments: {
|
Get.toNamed(Routers.webviewShowPage, arguments: {
|
||||||
"url": XSConstantMacro.privacyPolicyURL,
|
"url": XSConstantMacro.privacyPolicyURL,
|
||||||
"title": '隐私政策'
|
"title": '隐私政策'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
|
|||||||
@ -21,6 +21,7 @@ class StarLockRegisterState {
|
|||||||
var xWidth = ''.obs; // 滑动验证码滑动位置
|
var xWidth = ''.obs; // 滑动验证码滑动位置
|
||||||
var isIphoneType = true.obs;
|
var isIphoneType = true.obs;
|
||||||
var canSub = false.obs;
|
var canSub = false.obs;
|
||||||
|
var agree = false.obs;
|
||||||
|
|
||||||
bool get isEmail => RegexUtil.isEmail(phoneOrEmailStr.value);
|
bool get isEmail => RegexUtil.isEmail(phoneOrEmailStr.value);
|
||||||
bool get isIphone => RegexUtil.isMobileSimple(phoneOrEmailStr.value);
|
bool get isIphone => RegexUtil.isMobileSimple(phoneOrEmailStr.value);
|
||||||
|
|||||||
@ -36,6 +36,7 @@ Future _initTranslation() async => TranslationLoader.loadTranslation(
|
|||||||
Future _setCommonServices() async {
|
Future _setCommonServices() async {
|
||||||
await Get.putAsync(() => StoreService().init());
|
await Get.putAsync(() => StoreService().init());
|
||||||
await Get.putAsync(() => PlatformInfoService().init());
|
await Get.putAsync(() => PlatformInfoService().init());
|
||||||
|
//上架审核注释
|
||||||
// await Get.putAsync(() => DeviceInfoService().init());
|
// await Get.putAsync(() => DeviceInfoService().init());
|
||||||
// Get.log(PlatformInfoService.to.info.version);
|
// Get.log(PlatformInfoService.to.info.version);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -198,7 +198,7 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: 160.h,
|
height: 160.h,
|
||||||
),
|
),
|
||||||
//提交Google暂时屏蔽
|
//上架审核注释 提交Google暂时屏蔽
|
||||||
// SubmitBtn(
|
// SubmitBtn(
|
||||||
// btnName: '演示模式',
|
// btnName: '演示模式',
|
||||||
// onClick: () {
|
// onClick: () {
|
||||||
|
|||||||
@ -184,30 +184,31 @@ class _MineSetPageState extends State<MineSetPage> {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: 10.h,
|
height: 10.h,
|
||||||
),
|
),
|
||||||
CommonItem(
|
//上架审核注释
|
||||||
leftTitel: "Amazon Alexa",
|
// CommonItem(
|
||||||
rightTitle: "",
|
// leftTitel: "Amazon Alexa",
|
||||||
isHaveLine: true,
|
// rightTitle: "",
|
||||||
isHaveDirection: true,
|
// isHaveLine: true,
|
||||||
action: () {
|
// isHaveDirection: true,
|
||||||
logic.showToast("功能暂未开放");
|
// action: () {
|
||||||
}),
|
// logic.showToast("功能暂未开放");
|
||||||
CommonItem(
|
// }),
|
||||||
leftTitel: "Google Home",
|
// CommonItem(
|
||||||
rightTitle: "",
|
// leftTitel: "Google Home",
|
||||||
isHaveLine: true,
|
// rightTitle: "",
|
||||||
isHaveDirection: true,
|
// isHaveLine: true,
|
||||||
action: () {
|
// isHaveDirection: true,
|
||||||
logic.showToast("功能暂未开放");
|
// action: () {
|
||||||
}),
|
// logic.showToast("功能暂未开放");
|
||||||
CommonItem(
|
// }),
|
||||||
leftTitel: TranslationLoader.lanKeys!.xiaomiIOTPlatform!.tr,
|
// CommonItem(
|
||||||
rightTitle: "",
|
// leftTitel: TranslationLoader.lanKeys!.xiaomiIOTPlatform!.tr,
|
||||||
isHaveLine: false,
|
// rightTitle: "",
|
||||||
isHaveDirection: true,
|
// isHaveLine: false,
|
||||||
action: () {
|
// isHaveDirection: true,
|
||||||
logic.showToast("功能暂未开放");
|
// action: () {
|
||||||
}),
|
// logic.showToast("功能暂未开放");
|
||||||
|
// }),
|
||||||
// CommonItem(leftTitel:TranslationLoader.lanKeys!.valueAddedServices!.tr, rightTitle:"", isHaveDirection: true, action: (){
|
// CommonItem(leftTitel:TranslationLoader.lanKeys!.valueAddedServices!.tr, rightTitle:"", isHaveDirection: true, action: (){
|
||||||
//
|
//
|
||||||
// }),
|
// }),
|
||||||
|
|||||||
@ -4,16 +4,13 @@ import 'package:get/get.dart';
|
|||||||
import 'package:get/get_connect/http/src/request/request.dart';
|
import 'package:get/get_connect/http/src/request/request.dart';
|
||||||
import 'package:star_lock/login/login/entity/LoginData.dart';
|
import 'package:star_lock/login/login/entity/LoginData.dart';
|
||||||
|
|
||||||
import '../login/login/entity/LoginData.dart';
|
|
||||||
import '../login/login/entity/LoginEntity.dart';
|
|
||||||
import '../tools/platform_info_services.dart';
|
import '../tools/platform_info_services.dart';
|
||||||
import '../tools/storage.dart';
|
import '../tools/storage.dart';
|
||||||
import '../tools/store_service.dart';
|
|
||||||
|
|
||||||
FutureOr<Request> requestInterceptor(Request request) async {
|
FutureOr<Request> requestInterceptor(Request request) async {
|
||||||
request.headers['User-Agent'] =
|
request.headers['User-Agent'] =
|
||||||
'StarLock/${PlatformInfoService.to.info.version}/${PlatformInfoService.to.info.buildNumber}/${GetPlatform.isAndroid ? 'Android' : 'iOS'}';
|
'StarLock/${PlatformInfoService.to.info.version}/${PlatformInfoService.to.info.buildNumber}/${GetPlatform.isAndroid ? 'Android' : 'iOS'}';
|
||||||
request.headers['Accept-Language'] = 'zh_CN';
|
request.headers['Accept-Language'] = 'zh-CN';
|
||||||
// request.headers['Content-Type'] = 'application/json';
|
// request.headers['Content-Type'] = 'application/json';
|
||||||
// request.headers['token'] = StoreService.to.userToken!;
|
// request.headers['token'] = StoreService.to.userToken!;
|
||||||
// print("11111${StoreService.to.userToken}");
|
// print("11111${StoreService.to.userToken}");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user