Commit aa8945af by 姜雷

修改登录以及注册的跳转方式

parent 2beebcbc
...@@ -14,6 +14,7 @@ type PageDispatchProps = { ...@@ -14,6 +14,7 @@ type PageDispatchProps = {
}; };
type PageState = { type PageState = {
fetching: boolean;
account: string; account: string;
pwd: string; pwd: string;
}; };
...@@ -39,6 +40,7 @@ class Login extends Component { ...@@ -39,6 +40,7 @@ class Login extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
fetching: false,
account: '', account: '',
pwd: '', pwd: '',
}; };
...@@ -77,7 +79,7 @@ class Login extends Component { ...@@ -77,7 +79,7 @@ class Login extends Component {
const data = res.data; const data = res.data;
console.log(data); console.log(data);
updateUserInfo(data); updateUserInfo(data);
Taro.redirectTo({ Taro.reLaunch({
url: '/pages/Home/Home', url: '/pages/Home/Home',
}); });
}) })
......
...@@ -174,7 +174,7 @@ class Register extends Component { ...@@ -174,7 +174,7 @@ class Register extends Component {
title: '注册成功', title: '注册成功',
}); });
setTimeout(() => { setTimeout(() => {
Taro.redirectTo({ Taro.reLaunch({
url: '/pages/Home/Home', url: '/pages/Home/Home',
}); });
}, 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