Commit 8ac2056b by 姜雷

修改密码后登出或后退

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