Commit 3f6cb326 by 姜雷

Merge branch 'develop' into test

parents 337cc188 c97ea5b3
...@@ -119,14 +119,14 @@ class Register extends Component { ...@@ -119,14 +119,14 @@ class Register extends Component {
}); });
return false; return false;
} }
if (!pwd) { if (!pwd || pwd.length < 6) {
Taro.showToast({ Taro.showToast({
title: '请输入密码', title: '请输入密码',
icon: 'none', icon: 'none',
}); });
return false; return false;
} }
if (!checkPwd) { if (!checkPwd || checkPwd.length < 6) {
Taro.showToast({ Taro.showToast({
title: '请输入确认密码', title: '请输入确认密码',
icon: 'none', icon: 'none',
...@@ -135,7 +135,7 @@ class Register extends Component { ...@@ -135,7 +135,7 @@ class Register extends Component {
} }
if (pwd != checkPwd) { if (pwd != checkPwd) {
Taro.showToast({ Taro.showToast({
title: '请输入确认密码', title: '两次密码不一致',
icon: 'none', icon: 'none',
}); });
return false; return false;
...@@ -175,12 +175,9 @@ class Register extends Component { ...@@ -175,12 +175,9 @@ class Register extends Component {
verificationCode: vcode, verificationCode: vcode,
}) })
.then(res => { .then(res => {
const { register, wxToken, ...userInfo } = res.data; const data = res.data;
console.log(userInfo); console.log(data);
updateUserInfo({ updateUserInfo(data);
...userInfo,
token: wxToken,
});
Taro.showToast({ Taro.showToast({
title: '注册成功', title: '注册成功',
}); });
...@@ -230,7 +227,7 @@ class Register extends Component { ...@@ -230,7 +227,7 @@ class Register extends Component {
Taro.navigateTo({ Taro.navigateTo({
url: url:
'/pages/WebPage/WebPage?url=' + '/pages/WebPage/WebPage?url=' +
encodeURIComponent(ANN_LINK_URL+'/agreement.html'), encodeURIComponent(ANN_LINK_URL + '/agreement.html'),
}); });
} }
......
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