1,登录页面新增演示模式入口
This commit is contained in:
parent
06e599b990
commit
2f207db3ec
@ -49,18 +49,26 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
|||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.all(10.w),
|
padding: EdgeInsets.all(10.w),
|
||||||
child: Center(child: Image.asset('images/icon_main_1024.png', width: 110.w, height: 110.w))),
|
child: Center(
|
||||||
|
child: Image.asset('images/icon_main_1024.png',
|
||||||
|
width: 110.w, height: 110.w))),
|
||||||
SizedBox(height: 50.w),
|
SizedBox(height: 50.w),
|
||||||
LoginInput(
|
LoginInput(
|
||||||
controller: state.emailOrPhoneController,
|
controller: state.emailOrPhoneController,
|
||||||
onchangeAction: (v){
|
onchangeAction: (v) {
|
||||||
logic.checkNext(state.emailOrPhoneController);
|
logic.checkNext(state.emailOrPhoneController);
|
||||||
},
|
},
|
||||||
leftWidget: Padding(
|
leftWidget: Padding(
|
||||||
padding: EdgeInsets.only(top: 30.w, bottom: 20.w, right: 20.w, left: 5.w),
|
padding: EdgeInsets.only(
|
||||||
child: Image.asset('images/icon_login_account.png', width: 36.w, height: 36.w,),
|
top: 30.w, bottom: 20.w, right: 20.w, left: 5.w),
|
||||||
|
child: Image.asset(
|
||||||
|
'images/icon_login_account.png',
|
||||||
|
width: 36.w,
|
||||||
|
height: 36.w,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr,
|
hintText:
|
||||||
|
TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr,
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
inputFormatters: [
|
inputFormatters: [
|
||||||
// FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
// FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
||||||
@ -69,15 +77,21 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
|||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
LoginInput(
|
LoginInput(
|
||||||
controller: state.pwdController,
|
controller: state.pwdController,
|
||||||
onchangeAction: (v){
|
onchangeAction: (v) {
|
||||||
logic.checkNext(state.pwdController);
|
logic.checkNext(state.pwdController);
|
||||||
},
|
},
|
||||||
isPwd: true,
|
isPwd: true,
|
||||||
leftWidget: Padding(
|
leftWidget: Padding(
|
||||||
padding: EdgeInsets.only(top: 30.w, bottom: 20.w, right: 20.w, left: 5.w),
|
padding: EdgeInsets.only(
|
||||||
child: Image.asset('images/icon_login_password.png', width: 36.w, height: 36.w,),
|
top: 30.w, bottom: 20.w, right: 20.w, left: 5.w),
|
||||||
|
child: Image.asset(
|
||||||
|
'images/icon_login_password.png',
|
||||||
|
width: 36.w,
|
||||||
|
height: 36.w,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.password!.tr}",
|
hintText:
|
||||||
|
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.password!.tr}",
|
||||||
inputFormatters: [
|
inputFormatters: [
|
||||||
LengthLimitingTextInputFormatter(20),
|
LengthLimitingTextInputFormatter(20),
|
||||||
]),
|
]),
|
||||||
@ -86,41 +100,55 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Obx(() => GestureDetector(
|
Obx(() => GestureDetector(
|
||||||
onTap: (){
|
onTap: () {
|
||||||
state.agree.value = !state.agree.value;
|
state.agree.value = !state.agree.value;
|
||||||
logic.changeAgreeState();
|
logic.changeAgreeState();
|
||||||
},
|
},
|
||||||
child: Image.asset(state.agree.value ? 'images/icon_round_select.png' : 'images/icon_round_unSelect.png', width: 30.w, height: 30.w,)
|
child: Image.asset(
|
||||||
)),
|
state.agree.value
|
||||||
SizedBox(width: 15.w,),
|
? 'images/icon_round_select.png'
|
||||||
|
: 'images/icon_round_unSelect.png',
|
||||||
|
width: 30.w,
|
||||||
|
height: 30.w,
|
||||||
|
))),
|
||||||
|
SizedBox(
|
||||||
|
width: 15.w,
|
||||||
|
),
|
||||||
Flexible(
|
Flexible(
|
||||||
child: RichText(
|
child: RichText(
|
||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
text: TranslationLoader.lanKeys!.readAndAgree!.tr,
|
text: TranslationLoader.lanKeys!.readAndAgree!.tr,
|
||||||
style: TextStyle(color: const Color(0xff333333), fontSize: 20.sp),
|
style: TextStyle(
|
||||||
|
color: const Color(0xff333333), fontSize: 20.sp),
|
||||||
children: [
|
children: [
|
||||||
WidgetSpan(
|
WidgetSpan(
|
||||||
alignment: PlaceholderAlignment.middle,
|
alignment: PlaceholderAlignment.middle,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
child: Text('《${TranslationLoader.lanKeys!.userAgreement!.tr}》', style: TextStyle(color: AppColors.mainColor, fontSize: 20.sp)),
|
child: Text(
|
||||||
|
'《${TranslationLoader.lanKeys!.userAgreement!.tr}》',
|
||||||
|
style: TextStyle(
|
||||||
|
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(
|
||||||
alignment: PlaceholderAlignment.middle,
|
alignment: PlaceholderAlignment.middle,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
child: Text('《${TranslationLoader.lanKeys!.privacyPolicy!.tr}》', style: TextStyle( color: AppColors.mainColor, fontSize: 20.sp)),
|
child: Text(
|
||||||
|
'《${TranslationLoader.lanKeys!.privacyPolicy!.tr}》',
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.mainColor,
|
||||||
|
fontSize: 20.sp)),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(Routers.webviewShowPage,
|
Get.toNamed(Routers.webviewShowPage, arguments: {
|
||||||
arguments: {
|
"url": XSConstantMacro.privacyPolicyURL,
|
||||||
"url": XSConstantMacro.privacyPolicyURL,
|
"title": '隐私政策'
|
||||||
"title": '隐私政策'
|
});
|
||||||
});
|
|
||||||
},
|
},
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
@ -135,10 +163,11 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
|||||||
borderRadius: 20.w,
|
borderRadius: 20.w,
|
||||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||||
isDisabled: state.canNext.value,
|
isDisabled: state.canNext.value,
|
||||||
onClick: state.canNext.value ? (){
|
onClick: state.canNext.value
|
||||||
logic.login();
|
? () {
|
||||||
}: null)
|
logic.login();
|
||||||
),
|
}
|
||||||
|
: null)),
|
||||||
SizedBox(height: 50.w),
|
SizedBox(height: 50.w),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
@ -149,11 +178,34 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
|||||||
height: 50.h,
|
height: 50.h,
|
||||||
// color: Colors.red,
|
// color: Colors.red,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text('${TranslationLoader.lanKeys!.forgetPassword!.tr}?', style: TextStyle(fontSize: 22.sp, color: AppColors.mainColor)),
|
child: Text(
|
||||||
|
'${TranslationLoader.lanKeys!.forgetPassword!.tr}?',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 22.sp, color: AppColors.mainColor)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.pushNamed(context, Routers.starLockForgetPasswordPage);
|
Navigator.pushNamed(
|
||||||
|
context, Routers.starLockForgetPasswordPage);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: SizedBox(
|
||||||
|
width: 10.sp,
|
||||||
|
)),
|
||||||
|
GestureDetector(
|
||||||
|
child: SizedBox(
|
||||||
|
// width: 150.w,
|
||||||
|
height: 50.h,
|
||||||
|
// color: Colors.red,
|
||||||
|
child: Center(
|
||||||
|
child: Text('演示模式',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 22.sp, color: AppColors.mainColor)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
Get.toNamed(Routers.demoModeLockDetailPage);
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|||||||
@ -22,7 +22,6 @@ class _DemoModeLockDetailPageState extends State<DemoModeLockDetailPage> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
// TODO: implement initState
|
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,17 +34,21 @@ class _DemoModeLockDetailPageState extends State<DemoModeLockDetailPage> {
|
|||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor,
|
backgroundColor: AppColors.mainColor,
|
||||||
),
|
),
|
||||||
body: Container(
|
body: ListView(
|
||||||
width: 1.sw,
|
children: [
|
||||||
height: 1.sh - ScreenUtil().statusBarHeight * 2,
|
Container(
|
||||||
color: Colors.white,
|
width: 1.sw,
|
||||||
child: Column(
|
height: 1.sh - ScreenUtil().statusBarHeight,
|
||||||
children: [
|
color: Colors.white,
|
||||||
topTip(),
|
child: Column(
|
||||||
topWidget(),
|
children: [
|
||||||
Expanded(child: bottomWidget())
|
topTip(),
|
||||||
],
|
topWidget(),
|
||||||
),
|
Expanded(child: bottomWidget())
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,6 +75,7 @@ class _DemoModeLockDetailPageState extends State<DemoModeLockDetailPage> {
|
|||||||
Widget topWidget() {
|
Widget topWidget() {
|
||||||
// KeyInfos keyInfo = widget.lockMainEntity.data!.keyInfos![0];
|
// KeyInfos keyInfo = widget.lockMainEntity.data!.keyInfos![0];
|
||||||
return Column(
|
return Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(height: 30.h),
|
SizedBox(height: 30.h),
|
||||||
Stack(
|
Stack(
|
||||||
@ -231,7 +235,8 @@ class _DemoModeLockDetailPageState extends State<DemoModeLockDetailPage> {
|
|||||||
showWidgetArr.add(bottomItem('images/main/icon_main_clockingIn.png',
|
showWidgetArr.add(bottomItem('images/main/icon_main_clockingIn.png',
|
||||||
TranslationLoader.lanKeys!.checkingIn!.tr, () {
|
TranslationLoader.lanKeys!.checkingIn!.tr, () {
|
||||||
// gotoLogin();
|
// gotoLogin();
|
||||||
Get.toNamed(Routers.checkingInListPage, arguments: LockListInfoItemEntity());
|
Get.toNamed(Routers.checkingInListPage,
|
||||||
|
arguments: LockListInfoItemEntity());
|
||||||
}));
|
}));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@ -241,9 +246,8 @@ class _DemoModeLockDetailPageState extends State<DemoModeLockDetailPage> {
|
|||||||
TranslationLoader.lanKeys!.electronicKey!.tr, () {
|
TranslationLoader.lanKeys!.electronicKey!.tr, () {
|
||||||
// gotoLogin();
|
// gotoLogin();
|
||||||
|
|
||||||
Get.toNamed(Routers.electronicKeyListPage, arguments: {
|
Get.toNamed(Routers.electronicKeyListPage,
|
||||||
"keyInfo": LockListInfoItemEntity()
|
arguments: {"keyInfo": LockListInfoItemEntity()});
|
||||||
});
|
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// 密码
|
// 密码
|
||||||
@ -251,9 +255,8 @@ class _DemoModeLockDetailPageState extends State<DemoModeLockDetailPage> {
|
|||||||
TranslationLoader.lanKeys!.password!.tr, () {
|
TranslationLoader.lanKeys!.password!.tr, () {
|
||||||
// gotoLogin();
|
// gotoLogin();
|
||||||
|
|
||||||
Get.toNamed(Routers.passwordKeyListPage, arguments: {
|
Get.toNamed(Routers.passwordKeyListPage,
|
||||||
"keyInfo": LockListInfoItemEntity()
|
arguments: {"keyInfo": LockListInfoItemEntity()});
|
||||||
});
|
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// ic卡
|
// ic卡
|
||||||
@ -261,8 +264,7 @@ class _DemoModeLockDetailPageState extends State<DemoModeLockDetailPage> {
|
|||||||
TranslationLoader.lanKeys!.card!.tr, () {
|
TranslationLoader.lanKeys!.card!.tr, () {
|
||||||
// gotoLogin();
|
// gotoLogin();
|
||||||
|
|
||||||
Get.toNamed(Routers.cardListPage,
|
Get.toNamed(Routers.cardListPage, arguments: {"lockId": 0});
|
||||||
arguments: {"lockId": 0});
|
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// 指纹
|
// 指纹
|
||||||
@ -315,9 +317,8 @@ class _DemoModeLockDetailPageState extends State<DemoModeLockDetailPage> {
|
|||||||
TranslationLoader.lanKeys!.authorizedAdmin!.tr, () {
|
TranslationLoader.lanKeys!.authorizedAdmin!.tr, () {
|
||||||
// gotoLogin();
|
// gotoLogin();
|
||||||
|
|
||||||
Get.toNamed(Routers.authorizedAdminListPage, arguments: {
|
Get.toNamed(Routers.authorizedAdminListPage,
|
||||||
"keyInfo": LockListInfoItemEntity()
|
arguments: {"keyInfo": LockListInfoItemEntity()});
|
||||||
});
|
|
||||||
}),
|
}),
|
||||||
// 操作记录
|
// 操作记录
|
||||||
bottomItem('images/main/icon_main_operatingRecord.png',
|
bottomItem('images/main/icon_main_operatingRecord.png',
|
||||||
@ -332,7 +333,8 @@ class _DemoModeLockDetailPageState extends State<DemoModeLockDetailPage> {
|
|||||||
Get.toNamed(Routers.videoLogPage);
|
Get.toNamed(Routers.videoLogPage);
|
||||||
}),
|
}),
|
||||||
// 消息提醒
|
// 消息提醒
|
||||||
bottomItem('images/main/icon_lockDetail_messageReminding.png', "消息提醒", () {
|
bottomItem('images/main/icon_lockDetail_messageReminding.png', "消息提醒",
|
||||||
|
() {
|
||||||
Get.toNamed(Routers.msgNotificationPage);
|
Get.toNamed(Routers.msgNotificationPage);
|
||||||
}),
|
}),
|
||||||
// 设置
|
// 设置
|
||||||
@ -378,5 +380,4 @@ class _DemoModeLockDetailPageState extends State<DemoModeLockDetailPage> {
|
|||||||
// Get.toNamed(Routers.selectLockTypePage);
|
// Get.toNamed(Routers.selectLockTypePage);
|
||||||
logic.showToast("演示模式");
|
logic.showToast("演示模式");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user