|
@@ -75,17 +75,16 @@
|
|
|
const that = this;
|
|
|
that.$refs[ref].validate().then(async params => {
|
|
|
if (params.password == params.is_password) {
|
|
|
- const arr = that.$api(`/user/resetPwd/${that.form.id}`, 'POST', params);
|
|
|
- console.log(arr);
|
|
|
+ const arr = await that.$api(`/user/resetPwd/${that.form.id}`, 'POST', params);
|
|
|
if (arr.errcode == '0') {
|
|
|
uni.showToast({
|
|
|
title: `密码修改成功`,
|
|
|
icon: 'success',
|
|
|
});
|
|
|
- // uni.clearStorage();
|
|
|
- // uni.redirectTo({
|
|
|
- // url: '/pages/login/index'
|
|
|
- // })
|
|
|
+ uni.clearStorage();
|
|
|
+ uni.redirectTo({
|
|
|
+ url: '/pages/login/index'
|
|
|
+ })
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: arr.errmsg,
|
|
@@ -96,14 +95,6 @@
|
|
|
title: `密码不一致`,
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
- // let arr;
|
|
|
- // if (data._id) {
|
|
|
- // arr = await that.$api(``, 'POST', data)
|
|
|
- // } else {
|
|
|
- // arr = await that.$api(``, 'POST', data)
|
|
|
- // }
|
|
|
-
|
|
|
})
|
|
|
},
|
|
|
}
|