Authored by 王水玲

绑定

@@ -212,6 +212,28 @@ const bind = { @@ -212,6 +212,28 @@ const bind = {
212 } 212 }
213 }, 213 },
214 214
  215 + passwordPage: (req, res) => {
  216 + let openId = req.query.openId;
  217 + let sourceType = req.query.sourceType;
  218 + let areaCode = req.query.areaCode || '86';
  219 + let phoneNum = req.query.phoneNum;
  220 + let code = req.query.code;
  221 +
  222 + res.render('bind/password', {
  223 + module: 'passport',
  224 + page: 'bind-password',
  225 + bindPwd: true, // js标识
  226 + backUrl: helpers.urlFormat('/passport/login'), // 返回的URL链接
  227 + showHeaderImg: true, // 控制显示头部图片
  228 + isPassportPage: true, // 模板中模块标识
  229 + sourceType: sourceType, // 第三方登录来源
  230 + openId: openId, // openId
  231 + areaCode: areaCode, // 国别码
  232 + phoneNum: phoneNum, // 国别码
  233 + code: code // 验证码
  234 + });
  235 + },
  236 +
215 successPage: (req, res) => { 237 successPage: (req, res) => {
216 let refer = req.cookies.refer; 238 let refer = req.cookies.refer;
217 239
@@ -49,6 +49,7 @@ router.post('/bind/sendBindMsg', bind.sendBindMsg); @@ -49,6 +49,7 @@ router.post('/bind/sendBindMsg', bind.sendBindMsg);
49 router.post('/bind/bindMobile', bind.bindMobile); 49 router.post('/bind/bindMobile', bind.bindMobile);
50 50
51 router.post('/bind/relateMobile', bind.relateMobile); 51 router.post('/bind/relateMobile', bind.relateMobile);
  52 +router.get('/bind/password', bind.passwordPage);
52 router.get('/bind/success', bind.successPage); 53 router.get('/bind/success', bind.successPage);
53 54
54 router.post('/bind/changeCheck', bind.changeCheck); 55 router.post('/bind/changeCheck', bind.changeCheck);
  1 +require('./bind/password');
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 * @author: xuqi<qi.xu@yoho.cn> 3 * @author: xuqi<qi.xu@yoho.cn>
4 * @date: 2015/10/8 4 * @date: 2015/10/8
5 */ 5 */
6 -var $ = require('jquery'); 6 +var $ = require('yoho-jquery');
7 7
8 var $pwd = $('#pwd'), 8 var $pwd = $('#pwd'),
9 $btnSure = $('#btn-sure'); 9 $btnSure = $('#btn-sure');
@@ -14,8 +14,7 @@ var tip = require('../../plugin/tip'); @@ -14,8 +14,7 @@ var tip = require('../../plugin/tip');
14 var trim = $.trim; 14 var trim = $.trim;
15 var showErrTip = tip.show; 15 var showErrTip = tip.show;
16 16
17 -var nickname = $('#nickname').val(),  
18 - sourceType = $('#sourceType').val(), 17 +var sourceType = $('#sourceType').val(),
19 openId = $('#openId').val(), 18 openId = $('#openId').val(),
20 phoneNum = $('#phone-num').val(), 19 phoneNum = $('#phone-num').val(),
21 areaCode = $('#area-code').val().replace('+', ''), 20 areaCode = $('#area-code').val().replace('+', ''),
@@ -30,7 +29,6 @@ function startBind(password) { @@ -30,7 +29,6 @@ function startBind(password) {
30 phoneNum: phoneNum, 29 phoneNum: phoneNum,
31 openId: openId, 30 openId: openId,
32 sourceType: sourceType, 31 sourceType: sourceType,
33 - nickname: nickname,  
34 password: password, 32 password: password,
35 code: code 33 code: code
36 }, 34 },