Authored by htoooth

fix

... ... @@ -139,10 +139,11 @@ const cert = {
if (_.get(result, 'data.isCanBind') === 'Y') {
nextUrl = helpers.urlFormat('/passport/cert/cert');
return {code: 200, message: result.message, data: {next: nextUrl}};
} else {
nextUrl = helpers.urlFormat('/passport/cert/relate');
// 不可以关联
return {code: 403, message: '绑定失败,该手机号已注册,请更换或使用该手机号直接登录'};
}
return {code: 200, message: result.message, data: {next: nextUrl}};
} else {
return {code: result.code, message: result.message, data: result.data ? result.data : ''};
}
... ...
... ... @@ -21,6 +21,8 @@ var $wrapper = $('.bindwrapper'),
var captcha = new Captcha('#captcha').init();
var captcha2;
var Alert = require('../../plugins/dialog').Alert;
require('../../simple-header');
/**
... ... @@ -196,12 +198,6 @@ function yohoBindBtn() {
$('#alreayregist').hide();
$('.backdrop').hide();
});
$(document).on('click', '#yohobindbtn3', function() {
$('.phonenum').val('');
$('#norelate').hide();
$('.backdrop').hide();
});
}
/**
... ... @@ -387,21 +383,7 @@ function nextStep() {
circleTime($('#mobile').val());
} else if (data.code === 203) {
// 已注册 可关联
$('#registphone-relate').text(mobile);
$('#username-relate').text(username);
if (headImg === '') {
$('#userphoto-relate').attr('src', 'http://img10.static.yhbimg.com/headimg/2013/11/28/09/' +
'01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100');
} else {
$('#userphoto-relate').attr('src', headImg);
}
$('#norelate .mask').css({
'padding-top': winHeight > 440 ? winHeight / 2 : 217
});
$('#norelate').show();
new Alert('绑定失败,该手机号已注册,请更换或使用该手机号直接登录').show();
} else if (data.code === 205) {
// 未注册 不可关联
username = data.data.user.username;
... ...
... ... @@ -11,6 +11,8 @@ var $wrapper = $('.bindwrapper'),
$phoneTip = $wrapper.find('.phone-err-tip'),
$nextBtn = $wrapper.find('.yohobindbtn');
var Alert = require('../../plugins/dialog').Alert;
require('../../simple-header');
/**
... ... @@ -151,7 +153,7 @@ function nextStep() {
$phoneTip.removeClass('hide');
} else {
if (data && data.message) {
alert(data.message); // eslint-disable-line
new Alert(data.message).show();
}
}
}
... ...