Authored by 王水玲

绑定

... ... @@ -212,6 +212,28 @@ const bind = {
}
},
passwordPage: (req, res) => {
let openId = req.query.openId;
let sourceType = req.query.sourceType;
let areaCode = req.query.areaCode || '86';
let phoneNum = req.query.phoneNum;
let code = req.query.code;
res.render('bind/password', {
module: 'passport',
page: 'bind-password',
bindPwd: true, // js标识
backUrl: helpers.urlFormat('/passport/login'), // 返回的URL链接
showHeaderImg: true, // 控制显示头部图片
isPassportPage: true, // 模板中模块标识
sourceType: sourceType, // 第三方登录来源
openId: openId, // openId
areaCode: areaCode, // 国别码
phoneNum: phoneNum, // 国别码
code: code // 验证码
});
},
successPage: (req, res) => {
let refer = req.cookies.refer;
... ...
... ... @@ -49,6 +49,7 @@ router.post('/bind/sendBindMsg', bind.sendBindMsg);
router.post('/bind/bindMobile', bind.bindMobile);
router.post('/bind/relateMobile', bind.relateMobile);
router.get('/bind/password', bind.passwordPage);
router.get('/bind/success', bind.successPage);
router.post('/bind/changeCheck', bind.changeCheck);
... ...
require('./bind/password');
... ...
... ... @@ -3,7 +3,7 @@
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/8
*/
var $ = require('jquery');
var $ = require('yoho-jquery');
var $pwd = $('#pwd'),
$btnSure = $('#btn-sure');
... ... @@ -14,8 +14,7 @@ var tip = require('../../plugin/tip');
var trim = $.trim;
var showErrTip = tip.show;
var nickname = $('#nickname').val(),
sourceType = $('#sourceType').val(),
var sourceType = $('#sourceType').val(),
openId = $('#openId').val(),
phoneNum = $('#phone-num').val(),
areaCode = $('#area-code').val().replace('+', ''),
... ... @@ -30,7 +29,6 @@ function startBind(password) {
phoneNum: phoneNum,
openId: openId,
sourceType: sourceType,
nickname: nickname,
password: password,
code: code
},
... ...