Commit 8ac2056b by 姜雷

修改密码后登出或后退

parent 88042cb9
......@@ -44,7 +44,7 @@ const createFetch = (basePath: string) => {
return data;
}
if (data.code === LogoutCode) {
Taro.redirectTo({
Taro.reLaunch({
url: '/pages/Login/Login',
});
throw data;
......
......@@ -98,7 +98,7 @@ class Vcode extends Component {
ctx.draw();
}
clickHandle() {
clickHandle = () => {
const { vcode, inputCode } = this.state;
if (vcode && vcode.toString() == inputCode) {
const { cellphone, positionNum } = this.props;
......@@ -126,7 +126,7 @@ class Vcode extends Component {
icon: 'none',
});
}
}
};
countStart() {
this.setState({
......
......@@ -30,7 +30,7 @@ const ChangeHardwareAccount = () => {
const changeAccountHandle = () => {
if (!oldPwd || oldPwd.length < 6) {
return Taro.showToast({
title: '请输入6-20位APP登录密码',
title: '请输入6-20位登录密码',
icon: 'none',
});
}
......@@ -58,6 +58,9 @@ const ChangeHardwareAccount = () => {
Taro.showToast({
title: '修改成功',
});
setTimeout(() => {
Taro.navigateBack();
}, 2000);
})
.catch(err => {
Taro.hideLoading();
......@@ -71,7 +74,7 @@ const ChangeHardwareAccount = () => {
return (
<View className='ChangeHardwareAccount Password'>
<View className='Password-form'>
<View className='Password-title'>APP登录密码</View>
<View className='Password-title'>小程序登录密码</View>
<View className='registerBox-item'>
<Input
className='loginBox-input'
......
......@@ -59,6 +59,11 @@ const ChangePwd = () => {
Taro.showToast({
title: '修改成功',
});
setTimeout(() => {
Taro.reLaunch({
url: '/pages/Login/Login',
});
}, 2000);
})
.catch(err => {
Taro.hideLoading();
......
......@@ -56,6 +56,11 @@ const ChangeTelAccount = () => {
Taro.showToast({
title: '修改成功',
});
setTimeout(() => {
Taro.reLaunch({
url: '/pages/Login/Login',
});
}, 2000);
})
.catch(err => {
Taro.hideLoading();
......
......@@ -114,7 +114,7 @@ class ResetPwd extends Component {
this.refs.ToastBox.showToast('修改成功');
console.log('回到登陆');
setTimeout(() => {
Taro.redirectTo({
Taro.reLaunch({
url: '/pages/Login/Login',
});
}, 2000);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment