|
|
@@ -199,17 +199,17 @@ class AccountBind extends Component {
|
|
|
fetchPost(API.BIND_OPENID, {
|
|
|
userPhone: phone,
|
|
|
code: code,
|
|
|
- openid: this.props.userInfo.parent ? this.props.userInfo.parent.openid : this.props.userInfo.teacher.openid,
|
|
|
+ openid: this.props.userInfo.userOpenid,
|
|
|
}).then(response => {
|
|
|
Toast.hide()
|
|
|
if (mType == 'parents') {
|
|
|
switchUser({
|
|
|
role: 1,
|
|
|
- })
|
|
|
+ })()
|
|
|
} else if (mType == 'teacher') {
|
|
|
switchUser({
|
|
|
role: 2,
|
|
|
- })
|
|
|
+ })()
|
|
|
}
|
|
|
|
|
|
if (response && response.data) {
|
|
|
@@ -233,11 +233,11 @@ class AccountBind extends Component {
|
|
|
teacherBirthday: getStrValue(teacherDOS, 'teacherBirthday'),
|
|
|
teacherSex: getStrValue(teacherDOS, 'teacherSex'),//1:男,2:女
|
|
|
}
|
|
|
- })
|
|
|
+ })()
|
|
|
} else {
|
|
|
switchUser({
|
|
|
teacher: ''
|
|
|
- })
|
|
|
+ })()
|
|
|
}
|
|
|
|
|
|
if (response.data.parentsDOS) {
|
|
|
@@ -258,11 +258,11 @@ class AccountBind extends Component {
|
|
|
parentsPhoto: getStrValue(parentsDOS, 'parentsPhoto'),
|
|
|
parentsAddress: getStrValue(parentsDOS, 'parentsAddress'),
|
|
|
}
|
|
|
- })
|
|
|
+ })()
|
|
|
} else {
|
|
|
switchUser({
|
|
|
parent: ''
|
|
|
- })
|
|
|
+ })()
|
|
|
}
|
|
|
}
|
|
|
this.props.history.push('/homePage')
|