feat:修改鑫泓佳修改昵称/修改手机号/邮箱/重置密码/安全问题/设置/关于

This commit is contained in:
anfe 2024-04-30 10:55:48 +08:00
parent 7db613f5d7
commit aa4e741674
7 changed files with 240 additions and 102 deletions

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccount/mineUnbindPhoneOrEmail_logic.dart'; import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccount/mineUnbindPhoneOrEmail_logic.dart';
import 'package:star_lock/tools/tf_input_haveBorder.dart'; import 'package:star_lock/tools/tf_input_haveBorder.dart';
@ -26,10 +27,20 @@ class _MineUnbindPhoneOrEmailState extends State<MineUnbindPhoneOrEmailPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar( appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr, barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr,
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor), backgroundColor: AppColors.mainColor,
),
xhjCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
),
),
body: Column( body: Column(
children: [ children: [
Container( Container(

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccountNext/minePersonInfoEditAccountNext_logic.dart'; import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccountNext/minePersonInfoEditAccountNext_logic.dart';
import '../../../../app_settings/app_colors.dart'; import '../../../../app_settings/app_colors.dart';
import '../../../../tools/submitBtn.dart'; import '../../../../tools/submitBtn.dart';
@ -25,10 +26,20 @@ class _MinePersonInfoEditAccountNextPageState
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar( appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr, barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr,
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor), backgroundColor: AppColors.mainColor,
),
xhjCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
),
),
body: Column( body: Column(
children: [ children: [
Container( Container(

View File

@ -2,6 +2,7 @@ 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';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditName/MinePersonInfoEditName_logic.dart'; import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditName/MinePersonInfoEditName_logic.dart';
import '../../../app_settings/app_colors.dart'; import '../../../app_settings/app_colors.dart';
@ -25,8 +26,9 @@ class _MinePersonInfoEditNamePageState
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: Colors.white, backgroundColor: AppColors.greyBackgroundColor,
appBar: TitleAppBar( appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.changeNickName!.tr, barTitle: TranslationLoader.lanKeys!.changeNickName!.tr,
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor, backgroundColor: AppColors.mainColor,
@ -46,9 +48,39 @@ class _MinePersonInfoEditNamePageState
), ),
], ],
), ),
xhjCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.changeNickName!.tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
actionsList: [
TextButton(
child: Text(
TranslationLoader.lanKeys!.save!.tr,
style:
TextStyle(color: AppColors.blackColor, fontSize: 24.sp),
),
onPressed: () {
if (state.nickNameIsOK == false) {
logic.showToast("请输入昵称");
} else {
logic.updateUserInfoRequest();
}
},
),
],
),
),
body: Container( body: Container(
padding: EdgeInsets.all(15.w), padding: EdgeInsets.all(15.w),
child: Column( child: listView(),
));
}
Widget listView() {
Widget view = Column(
mainAxisSize: MainAxisSize.min,
children: [ children: [
LoginInput( LoginInput(
controller: state.nickNameController, controller: state.nickNameController,
@ -63,7 +95,20 @@ class _MinePersonInfoEditNamePageState
LengthLimitingTextInputFormatter(20), LengthLimitingTextInputFormatter(20),
]), ]),
], ],
);
view = F.sw(
defaultCall: () => view,
xhjCall: () => Container(
margin: EdgeInsets.only(top: 20.h, left: 16.w, right: 16.w),
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 16.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(20.r))),
child: ClipRRect(
borderRadius: BorderRadius.circular(20.r),
child: view,
), ),
)); ));
return view;
} }
} }

View File

@ -2,6 +2,7 @@ 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';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEmail/mineBindPhoneOrEmail_logic.dart'; import 'package:star_lock/mine/minePersonInfo/minePersonInfoEmail/mineBindPhoneOrEmail_logic.dart';
import '../../../appRouters.dart'; import '../../../appRouters.dart';
@ -28,12 +29,24 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar( appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: state.channel.value == "1" barTitle: state.channel.value == "1"
? TranslationLoader.lanKeys!.mobileNumber!.tr ? TranslationLoader.lanKeys!.mobileNumber!.tr
: TranslationLoader.lanKeys!.email!.tr, : TranslationLoader.lanKeys!.email!.tr,
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor), backgroundColor: AppColors.mainColor,
),
xhjCall: () => TitleAppBar(
barTitle: state.channel.value == "1"
? TranslationLoader.lanKeys!.mobileNumber!.tr
: TranslationLoader.lanKeys!.email!.tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
),
),
body: Container( body: Container(
color: Colors.white, color: Colors.white,
padding: EdgeInsets.only(top: 10.h, left: 30.w, right: 30.w), padding: EdgeInsets.only(top: 10.h, left: 30.w, right: 30.w),
@ -58,11 +71,12 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
rightWidget: Text( rightWidget: Text(
'${state.countryName.value} +${state.countryCode.value}', '${state.countryName.value} +${state.countryCode.value}',
textAlign: TextAlign.end, textAlign: TextAlign.end,
style: style: TextStyle(
TextStyle(fontSize: 22.sp, color: AppColors.darkGrayTextColor), fontSize: 22.sp, color: AppColors.darkGrayTextColor),
), ),
action: () async { action: () async {
var result = await Get.toNamed(Routers.selectCountryRegionPage); var result =
await Get.toNamed(Routers.selectCountryRegionPage);
if (result != null) { if (result != null) {
result as Map<String, dynamic>; result as Map<String, dynamic>;
state.countryCode.value = result['code']; state.countryCode.value = result['code'];
@ -105,7 +119,8 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
), ),
Obx(() => GestureDetector( Obx(() => GestureDetector(
onTap: () { onTap: () {
if (state.accountIsOK.value && state.canResend.value) { if (state.accountIsOK.value &&
state.canResend.value) {
logic.sendValidationCode(); logic.sendValidationCode();
} }
}, },

View File

@ -1,8 +1,8 @@
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';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoResetPassword/minePersonInfoResetPassword_logic.dart'; import 'package:star_lock/mine/minePersonInfo/minePersonInfoResetPassword/minePersonInfoResetPassword_logic.dart';
import '../../../appRouters.dart'; import '../../../appRouters.dart';
@ -29,13 +29,64 @@ class _MinePersonInfoResetPasswordPageState
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar( appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.resetPasswords!.tr, barTitle: TranslationLoader.lanKeys!.resetPasswords!.tr,
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor), backgroundColor: AppColors.mainColor,
),
xhjCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.resetPasswords!.tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
),
),
body: Container( body: Container(
margin: EdgeInsets.only(left: 30.w, right: 30.w), margin: EdgeInsets.only(left: 30.w, right: 30.w),
child: Column( child: Column(
children: [
loginView(),
SizedBox(height: 50.w),
Obx(() => SubmitBtn(
btnName: TranslationLoader.lanKeys!.save!.tr,
fontSize: 30.sp,
borderRadius: 20.w,
isDisabled: state.canSub.value,
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () {
logic.changePasswordRequest();
})),
SizedBox(height: 40.w),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
GestureDetector(
child: SizedBox(
// width: 150.w,
height: 60.h,
// color: Colors.red,
child: Center(
child: Text(
'${TranslationLoader.lanKeys!.forgetPassword!.tr}',
style: TextStyle(
color: AppColors.mainColor, fontSize: 18.sp)),
),
),
onTap: () {
Get.toNamed(Routers.starLockForgetPasswordPage);
},
)
],
),
],
),
));
}
Widget loginView() {
Widget view = Column(
children: [ children: [
LoginInput( LoginInput(
controller: state.oldPwdController, controller: state.oldPwdController,
@ -83,44 +134,26 @@ class _MinePersonInfoResetPasswordPageState
Container( Container(
width: 1.sw, width: 1.sw,
padding: EdgeInsets.only(top: 15.h, bottom: 10.h), padding: EdgeInsets.only(top: 15.h, bottom: 10.h),
child: Text( child: Text(TranslationLoader.lanKeys!.registerPasswordTip!.tr,
TranslationLoader.lanKeys!.registerPasswordTip!.tr,
style: TextStyle( style: TextStyle(
fontSize: 18.w, color: AppColors.darkGrayTextColor))), fontSize: 18.w, color: AppColors.darkGrayTextColor))),
SizedBox(height: 50.w),
Obx(() => SubmitBtn(
btnName: TranslationLoader.lanKeys!.save!.tr,
fontSize: 30.sp,
borderRadius: 20.w,
isDisabled: state.canSub.value,
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
onClick: () {
logic.changePasswordRequest();
})),
SizedBox(height: 40.w),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
GestureDetector(
child: SizedBox(
// width: 150.w,
height: 60.h,
// color: Colors.red,
child: Center(
child: Text(
'${TranslationLoader.lanKeys!.forgetPassword!.tr}',
style: TextStyle(
color: AppColors.mainColor, fontSize: 18.sp)),
),
),
onTap: () {
Get.toNamed(Routers.starLockForgetPasswordPage);
},
)
], ],
);
view = F.sw(
defaultCall: () => view,
xhjCall: () => Container(
margin: EdgeInsets.only(
top: 20.h,
), ),
], padding: EdgeInsets.all(16.r),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(20.r))),
child: ClipRRect(
borderRadius: BorderRadius.circular(20.r),
child: view,
), ),
)); ));
return view;
} }
} }

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_entity.dart'; import 'package:star_lock/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_entity.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_logic.dart'; import 'package:star_lock/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_logic.dart';
import 'package:star_lock/tools/custom_bottom_sheet.dart'; import 'package:star_lock/tools/custom_bottom_sheet.dart';
@ -35,10 +36,20 @@ class _MinePersonInfoSetSafetyProblemPageState
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar( appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.safetyProblem!.tr, barTitle: TranslationLoader.lanKeys!.safetyProblem!.tr,
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor), backgroundColor: AppColors.mainColor,
),
xhjCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.safetyProblem!.tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
),
),
body: ListView( body: ListView(
children: [ children: [
Container( Container(
@ -93,7 +104,7 @@ class _MinePersonInfoSetSafetyProblemPageState
Widget _safityProblemItem(String problemTitle, String answerTitle, Widget _safityProblemItem(String problemTitle, String answerTitle,
TextEditingController controller, Function() action) { TextEditingController controller, Function() action) {
return Column( Widget view = Column(
children: [ children: [
CommonItem( CommonItem(
leftTitel: problemTitle, leftTitel: problemTitle,
@ -125,6 +136,19 @@ class _MinePersonInfoSetSafetyProblemPageState
) )
], ],
); );
view = F.sw(
defaultCall: () => view,
xhjCall: () => Container(
margin: EdgeInsets.only(top: 20.h, left: 20.w, right: 20.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(20.r))),
child: ClipRRect(
borderRadius: BorderRadius.circular(20.r),
child: view,
),
));
return view;
} }
Future _selectProblemBottomSheet(List dataList, int problemIndex) async { Future _selectProblemBottomSheet(List dataList, int problemIndex) async {

View File

@ -52,7 +52,6 @@ class SubmitBtn extends StatelessWidget {
return Container( return Container(
width: ScreenUtil().screenWidth - 40.w, width: ScreenUtil().screenWidth - 40.w,
height: 60.h, height: 60.h,
padding: padding,
child: ElevatedButton( child: ElevatedButton(
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
backgroundColor: isDisabled == false backgroundColor: isDisabled == false