|
@@ -69,6 +69,10 @@ class _ChangePasswordPageState extends State<ChangePasswordPage> {
|
69
|
69
|
|
70
|
70
|
Future<void> _changePassword(
|
71
|
71
|
{required String newPassword, required String phoneNo}) async {
|
|
72
|
+ if ((!(phoneNo == tmpPhone) || !(mController.text == tmpCode))) {
|
|
73
|
+ Component.toast("手机号与验证码不匹配!", 0);
|
|
74
|
+ return null;
|
|
75
|
+ }
|
72
|
76
|
var params = {
|
73
|
77
|
'phoneNumber': phoneNo,
|
74
|
78
|
'password': newPassword,
|
|
@@ -267,7 +271,10 @@ class _ChangePasswordPageState extends State<ChangePasswordPage> {
|
267
|
271
|
);
|
268
|
272
|
}
|
269
|
273
|
|
|
274
|
+ String tmpPhone = "";
|
|
275
|
+ String tmpCode = "";
|
270
|
276
|
Future<String?> sendCaptchaCode() async {
|
|
277
|
+ tmpPhone = Global.loginPhoneNo;
|
271
|
278
|
var params = {
|
272
|
279
|
'phoneNumber': Global.loginPhoneNo,
|
273
|
280
|
};
|
|
@@ -282,6 +289,7 @@ class _ChangePasswordPageState extends State<ChangePasswordPage> {
|
282
|
289
|
new NormalResponse.fromJson(jsonResponse);
|
283
|
290
|
if (mNormalResponse.code == Global.responseSuccessCode) {
|
284
|
291
|
Component.toast("短信发送成功,请查收!", 2);
|
|
292
|
+ tmpCode = mNormalResponse.data.toString();
|
285
|
293
|
} else {
|
286
|
294
|
Component.toast(mNormalResponse.msg.toString(), 0);
|
287
|
295
|
}
|