|
|
@@ -123,14 +123,12 @@ class LoginSecondState extends State<LoginSecond> {
|
|
|
highlightColor: Color(0xFF763434),
|
|
|
child: Text('注册/登录'),
|
|
|
onPressed: () async {
|
|
|
- if (_sessionID == null) {
|
|
|
- Toast.show(context, '请发送验证码', 1500, 'info');
|
|
|
- } else if (inputCode.length != 6) {
|
|
|
+ if (inputCode.length != 6) {
|
|
|
Toast.show(context, '请输入验证码', 1500, 'info');
|
|
|
} else {
|
|
|
Toast.show(context, '加载中', -1, 'loading');
|
|
|
- final Result res = await HttpManager.post('auth/loginSms',
|
|
|
- data: {'phone': widget.phone, 'code': inputCode, 'sessionId': _sessionID, 'requireToken': true});
|
|
|
+ final Result res =
|
|
|
+ await HttpManager.post('auth/loginSms', data: {'phone': widget.phone, 'code': inputCode, 'requireToken': true});
|
|
|
Toast.hide();
|
|
|
if (res.success) {
|
|
|
if (timer != null) {
|
|
|
@@ -170,7 +168,7 @@ class LoginSecondState extends State<LoginSecond> {
|
|
|
|
|
|
Future<void> sendMsg() async {
|
|
|
Toast.show(context, '加载中', -1, 'loading');
|
|
|
- final Result res = await HttpManager.get('rong/sendCode', data: {'phone': widget.phone});
|
|
|
+ final Result res = await HttpManager.post('userInfo/sendSms', data: {'mobile': widget.phone});
|
|
|
Toast.hide();
|
|
|
if (res.success) {
|
|
|
Toast.show(context, '发送成功', 1500, 'success');
|