注册流程修改

pull/1/head
张萌 3 years ago
parent 9fa54a5a94
commit b884ee4e16

@ -1,12 +1,12 @@
import 'package:flutter/material.dart'; import 'package:aku_new_community/pages/home/home_page.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community/pages/sign/sign_func.dart'; import 'package:aku_new_community/pages/sign/sign_func.dart';
import 'package:aku_new_community/pages/sign/widget/login_button_widget.dart'; import 'package:aku_new_community/pages/sign/widget/login_button_widget.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
class SetNickNamePage extends StatefulWidget { class SetNickNamePage extends StatefulWidget {
const SetNickNamePage({Key? key}) : super(key: key); const SetNickNamePage({Key? key}) : super(key: key);
@ -30,8 +30,7 @@ class _SetNickNamePageState extends State<SetNickNamePage> {
return BeeScaffold( return BeeScaffold(
title: '', title: '',
bodyColor: Colors.white, bodyColor: Colors.white,
body: Column( body: ListView(
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
24.w.heightBox, 24.w.heightBox,
Row( Row(
@ -62,6 +61,7 @@ class _SetNickNamePageState extends State<SetNickNamePage> {
Container( Container(
width: 686.w, width: 686.w,
height: 94.w, height: 94.w,
margin: EdgeInsets.symmetric(horizontal: 32.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(60.w), borderRadius: BorderRadius.circular(60.w),
color: Colors.black.withOpacity(0.06), color: Colors.black.withOpacity(0.06),
@ -91,6 +91,7 @@ class _SetNickNamePageState extends State<SetNickNamePage> {
if (result) { if (result) {
UserTool.userProvider.updateUserInfo(); UserTool.userProvider.updateUserInfo();
} }
Get.offAll(HomePage());
}, },
text: '确定'), text: '确定'),
], ],
@ -124,19 +125,26 @@ class _SetNickNamePageState extends State<SetNickNamePage> {
); );
} }
Container otherNick(String extra) { Widget otherNick(String extra) {
return Container( return GestureDetector(
height: 70.w, onTap: () {
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 16.w), _nickController.text = '${_nickController.text}$extra';
alignment: Alignment.centerLeft, },
decoration: BoxDecoration( child: Material(
color: Colors.black.withOpacity(0.03), child: Container(
borderRadius: BorderRadius.circular(42.sp)), height: 70.w,
child: '${_nickController.text}$extra' padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 16.w),
.text alignment: Alignment.centerLeft,
.size(28.sp) decoration: BoxDecoration(
.color(Color(0xFF5096F1)) color: Colors.black.withOpacity(0.03),
.make(), borderRadius: BorderRadius.circular(42.sp)),
child: '${_nickController.text}$extra'
.text
.size(28.sp)
.color(Color(0xFF5096F1))
.make(),
),
),
); );
} }
} }

@ -177,7 +177,7 @@ class SignFunc {
'nickName': nick, 'nickName': nick,
}, },
showMessage: true); showMessage: true);
return baseModel.success; return baseModel.msg == '昵称可用';
} }
/// ///
@ -187,6 +187,6 @@ class SignFunc {
'nickName': nick, 'nickName': nick,
}, },
showMessage: true); showMessage: true);
return baseModel.success; return baseModel.msg == '设置成功';
} }
} }

@ -72,7 +72,7 @@ class UserProvider extends ChangeNotifier {
} }
if (_userInfoModel != null && !kIsWeb && !Platform.isMacOS) {} if (_userInfoModel != null && !kIsWeb && !Platform.isMacOS) {}
SignFunc.checkNameAndAccount(); await SignFunc.checkNameAndAccount();
notifyListeners(); notifyListeners();
return true; return true;

Loading…
Cancel
Save