Commit aa8945af by 姜雷

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

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