...
|
...
|
@@ -80,7 +80,7 @@ export default class Login extends Component { |
|
|
addPrefix(prefix, eventName) {
|
|
|
return `${prefix}-${eventName}`;
|
|
|
}
|
|
|
|
|
|
|
|
|
eventOnAll() {
|
|
|
const prefix = 'phonenumber';
|
|
|
event.on(this.addPrefix(prefix, USER_GET_PHONENUMBER_ERROR), (errMsg) => {
|
...
|
...
|
@@ -131,7 +131,7 @@ export default class Login extends Component { |
|
|
}
|
|
|
})
|
|
|
}
|
|
|
|
|
|
|
|
|
chooseCountry() {
|
|
|
router.go('selectCountry');
|
|
|
}
|
...
|
...
|
@@ -235,7 +235,7 @@ export default class Login extends Component { |
|
|
elem.dataVal = dataVal;
|
|
|
this.setState({graphicsCodeElement});
|
|
|
}
|
|
|
|
|
|
|
|
|
async bindBtnAction() {
|
|
|
let {phoneNum, verifyCode} = this.state;
|
|
|
|
...
|
...
|
@@ -258,7 +258,7 @@ export default class Login extends Component { |
|
|
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
|
|
|
let result = await this.props.bindAction(this.state.phoneNum, this.state.verifyCode, this.state.countryArea, this.state.inviteCode);
|
|
|
|
|
|
if (result && result.message) {
|
...
|
...
|
@@ -339,7 +339,6 @@ export default class Login extends Component { |
|
|
render () {
|
|
|
let { tipText, verifyBtnText, countryArea, graphicsCodeElement, graphicsCodeSwitch, graphicsCodeUrl, hasUnionID, is_bind } = this.state;
|
|
|
let showBind = wx.getStorageSync('show_bind');
|
|
|
console.log(hasUnionID);
|
|
|
|
|
|
return (
|
|
|
<View className="login-page">
|
...
|
...
|
@@ -349,7 +348,7 @@ export default class Login extends Component { |
|
|
<View className="phonenum-container">
|
|
|
<View onClick={this.chooseCountry} className="country-area">
|
|
|
<Text className="phone-title" >{`+${countryArea}`}</Text>
|
|
|
<Image className="arrow-down-icon" src={arrowDown}></Image>
|
|
|
<Image className="arrow-down-icon" src={arrowDown}></Image>
|
|
|
</View>
|
|
|
<Input
|
|
|
className="phoneNumberContent"
|
...
|
...
|
@@ -390,12 +389,12 @@ export default class Login extends Component { |
|
|
</View>
|
|
|
</View>
|
|
|
}
|
|
|
|
|
|
|
|
|
<Button onClick={this.bindBtnAction} className={disabledClass ? 'bind-btn disabled' : 'bind-btn'} >完成</Button>
|
|
|
<Button
|
|
|
className="verify-btn"
|
|
|
openType={hasUnionID ? ( showBind ? 'getPhoneNumber' : '') :'getUserInfo'}
|
|
|
onGetPhoneNumber={this.getPhoneNumber}
|
|
|
<Button
|
|
|
className="verify-btn"
|
|
|
openType={hasUnionID ? ( showBind ? 'getPhoneNumber' : '') :'getUserInfo'}
|
|
|
onGetPhoneNumber={this.getPhoneNumber}
|
|
|
onGetUserInfo={this.getUserInfo}
|
|
|
onClick={this.checkUnionIdIsBind}
|
|
|
data-from="phonenumber">自动验证</Button>
|
...
|
...
|
|