...
|
...
|
@@ -147,26 +147,34 @@ class EmailMobile extends Page { |
|
|
|
|
|
this.selector.verifyCodeBtn.data('oneClick', true);
|
|
|
|
|
|
let params = {
|
|
|
area: area.replace('+', ''),
|
|
|
mobile: pn
|
|
|
};
|
|
|
validate.getResults().then(result => {
|
|
|
let params = {
|
|
|
area: area.replace('+', ''),
|
|
|
mobile: pn
|
|
|
};
|
|
|
|
|
|
this.ajax({
|
|
|
url: '/passport/bind/forceSendMsg',
|
|
|
type: 'POST',
|
|
|
data: params
|
|
|
}).then(codeResult => {
|
|
|
this.selector.verifyCodeBtn.data('oneClick', false);
|
|
|
if (codeResult.code === 200) {
|
|
|
this.countDown();
|
|
|
return;
|
|
|
} else {
|
|
|
showErrTip(codeResult.message);
|
|
|
}
|
|
|
}).catch(() => {
|
|
|
this.selector.verifyCodeBtn.data('oneClick', false);
|
|
|
showErrTip('出错了,请重试');
|
|
|
$.extend(params, result);
|
|
|
|
|
|
this.ajax({
|
|
|
url: '/passport/bind/forceSendMsg',
|
|
|
type: 'POST',
|
|
|
data: params
|
|
|
}).then(codeResult => {
|
|
|
this.selector.verifyCodeBtn.data('oneClick', false);
|
|
|
validate.type === 2 && validate.refresh();
|
|
|
if (codeResult.code === 200) {
|
|
|
this.countDown();
|
|
|
return;
|
|
|
} else {
|
|
|
showErrTip(codeResult.message);
|
|
|
}
|
|
|
|
|
|
(codeResult.changeCaptcha && validate.type !== 2) && validate.refresh();
|
|
|
}).catch(() => {
|
|
|
this.selector.verifyCodeBtn.data('oneClick', false);
|
|
|
showErrTip('出错了,请重试');
|
|
|
validate.refresh();
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
|
...
|
...
|
@@ -187,39 +195,30 @@ class EmailMobile extends Page { |
|
|
|
|
|
this.selector.loginBtn.data('oneClick', true);
|
|
|
|
|
|
validate.getResults().then(result => {
|
|
|
let params = {
|
|
|
area: area.replace('+', ''),
|
|
|
mobile: pn,
|
|
|
code: verifyCode,
|
|
|
};
|
|
|
|
|
|
$.extend(params, result);
|
|
|
|
|
|
this.ajax({
|
|
|
url: '/passport/bind/forceMobileCheck',
|
|
|
type: 'POST',
|
|
|
data: params
|
|
|
}).then(codeResult => {
|
|
|
|
|
|
this.selector.loginBtn.data('oneClick', false);
|
|
|
validate.type === 2 && validate.refresh();
|
|
|
let params = {
|
|
|
area: area.replace('+', ''),
|
|
|
mobile: pn,
|
|
|
code: verifyCode,
|
|
|
};
|
|
|
|
|
|
if (codeResult.code === 200) {
|
|
|
this.continueBind(
|
|
|
$.extend({isBind: 'N', isRegister: 'N'}, codeResult.data),
|
|
|
params
|
|
|
);
|
|
|
} else {
|
|
|
showErrTip(codeResult.message);
|
|
|
}
|
|
|
this.ajax({
|
|
|
url: '/passport/bind/forceMobileCheck',
|
|
|
type: 'POST',
|
|
|
data: params
|
|
|
}).then(codeResult => {
|
|
|
this.selector.loginBtn.data('oneClick', false);
|
|
|
|
|
|
(codeResult.changeCaptcha && validate.type !== 2) && validate.refresh();
|
|
|
}).catch(() => {
|
|
|
this.selector.loginBtn.data('oneClick', false);
|
|
|
showErrTip('出错了,请重试');
|
|
|
validate.refresh();
|
|
|
});
|
|
|
if (codeResult.code === 200) {
|
|
|
this.continueBind(
|
|
|
$.extend({isBind: 'N', isRegister: 'N'}, codeResult.data),
|
|
|
params
|
|
|
);
|
|
|
} else {
|
|
|
showErrTip(codeResult.message);
|
|
|
}
|
|
|
}).catch(() => {
|
|
|
this.selector.loginBtn.data('oneClick', false);
|
|
|
showErrTip('出错了,请重试');
|
|
|
});
|
|
|
}
|
|
|
|
...
|
...
|
@@ -238,7 +237,7 @@ class EmailMobile extends Page { |
|
|
}
|
|
|
|
|
|
dialog.showDialog({
|
|
|
dialogText: bindDialogHbs({isBind: true}),
|
|
|
dialogText: bindDialogHbs(bindParams),
|
|
|
fast: true,
|
|
|
hasFooter: {
|
|
|
leftBtnText: '去登录',
|
...
|
...
|
|