Authored by 毕凯

增加关联手机功能

... ... @@ -105,6 +105,16 @@ $btnNext.on('touchstart', function() {
if (res.code === 200) {
if (res.data.isReg === 1) {
dialog.showDialog({
dialogText: '该手机号已注册过有货\n' + pn + ',确定绑定吗?',
hasFooter: {
leftBtnText: '更换号码',
rightBtnText: '继续绑定'
}
}, function() {
nextStep(res.data.next, pn, areaCode);
});
} else if (res.data.isReg === 3) {
dialog.showDialog({
dialogText: '该手机号已注册过有货\n' + pn + ',是否进行关联?',
hasFooter: {
leftBtnText: '更换号码',
... ...
/**
* 关联手机号-验证码
*/
require('../code')(true, false);
... ...
... ... @@ -26,7 +26,7 @@ module.exports = function(useInRegister, useForBind) {
function startBind() {
$.ajax({
url: '/passport/bind/bindMobile',
url: useForBind ? '/passport/bind/bindMobile' : '/passport/bind/relateMobile',
type: 'post',
data: {
areaCode: areaCode.replace('+', ''),
... ... @@ -34,7 +34,8 @@ module.exports = function(useInRegister, useForBind) {
openId: openId,
sourceType: sourceType,
nickname: nickname,
password: ''
password: '',
code: trim($captcha.val())
},
success: function(res) {
if (res.code === 200) {
... ...
... ... @@ -24,3 +24,6 @@ require('./back/new-password');
require('./bind/bind');
require('./bind/code');
require('./bind/password');
// 关联手机
require('./bind/relate');
... ...
... ... @@ -63,6 +63,11 @@
seajs.use('js/passport/bind/code');
</script>
{{/if}}
{{#if relateCode}}
<script>
seajs.use('js/passport/bind/relate');
</script>
{{/if}}
{{#if bindPwd}}
<script>
seajs.use('js/passport/bind/password');
... ... @@ -340,4 +345,3 @@
seajs.use('js/me/currency-new');
</script>
{{/if}}
... ...
... ... @@ -59,6 +59,7 @@ class BindController extends AbstractAction
$data = array(
'bindCode' => true, //js标识
'relateCode' => true, // 是否是关联手机
'backUrl' => Helpers::url('/signin.html'), // 返回的URL链接
'showHeaderImg' => true, // 控制显示头部图片
'isPassportPage' => true, // 模板中模块标识
... ...