Showing
28 changed files
with
156 additions
and
64 deletions
@@ -342,6 +342,8 @@ exports.modifyMobile = (req, res, next) => { | @@ -342,6 +342,8 @@ exports.modifyMobile = (req, res, next) => { | ||
342 | exports.newSendMsg = (req, res, next) => { | 342 | exports.newSendMsg = (req, res, next) => { |
343 | let mobile = req.body.mobile; | 343 | let mobile = req.body.mobile; |
344 | let area = req.body.area || '86'; | 344 | let area = req.body.area || '86'; |
345 | + let captcha = req.body.verifyCode; | ||
346 | + let sessionId = req.session.id; | ||
345 | 347 | ||
346 | if (!area || !mobile) { | 348 | if (!area || !mobile) { |
347 | return res.json({ | 349 | return res.json({ |
@@ -350,7 +352,7 @@ exports.newSendMsg = (req, res, next) => { | @@ -350,7 +352,7 @@ exports.newSendMsg = (req, res, next) => { | ||
350 | }); | 352 | }); |
351 | } | 353 | } |
352 | 354 | ||
353 | - req.ctx(accountModel).newSendMsg(area, mobile).then(result => { | 355 | + req.ctx(accountModel).newSendMsg(area, mobile, sessionId, captcha).then(result => { |
354 | return res.json(result); | 356 | return res.json(result); |
355 | }).catch(next); | 357 | }).catch(next); |
356 | }; | 358 | }; |
@@ -78,7 +78,14 @@ exports.verifyEmail = (req, res, next) => { | @@ -78,7 +78,14 @@ exports.verifyEmail = (req, res, next) => { | ||
78 | * 发验证码 | 78 | * 发验证码 |
79 | */ | 79 | */ |
80 | exports.smsBind = (req, res, next) => { | 80 | exports.smsBind = (req, res, next) => { |
81 | - req.ctx(meGiftService).smsBind(req.body).then(result => { | 81 | + let mobile = req.body.mobile; |
82 | + let area = req.body.area || '86'; | ||
83 | + let captcha = req.body.verifyCode; | ||
84 | + let sessionId = req.session.id; | ||
85 | + | ||
86 | + req.ctx(meGiftService).smsBind({ | ||
87 | + area, mobile, captcha, id: sessionId | ||
88 | + }).then(result => { | ||
82 | res.json(result); | 89 | res.json(result); |
83 | }).catch(next); | 90 | }).catch(next); |
84 | }; | 91 | }; |
@@ -230,12 +230,15 @@ module.exports = class extends global.yoho.BaseModel { | @@ -230,12 +230,15 @@ module.exports = class extends global.yoho.BaseModel { | ||
230 | 230 | ||
231 | } | 231 | } |
232 | 232 | ||
233 | - newSendMsg(area, mobile) { | 233 | + newSendMsg(area, mobile, id, captcha) { |
234 | return this.get({ | 234 | return this.get({ |
235 | data: { | 235 | data: { |
236 | - method: 'app.bind.sendChangeBindMobileCodeOnly', | 236 | + method: 'app.bind.sendChangeBindMobileCodeOnlyImg', |
237 | mobile: mobile, | 237 | mobile: mobile, |
238 | area: area, | 238 | area: area, |
239 | + udid: id, | ||
240 | + fromPage: PAGE, | ||
241 | + degrees: captcha | ||
239 | } | 242 | } |
240 | }); | 243 | }); |
241 | } | 244 | } |
@@ -1089,8 +1089,8 @@ module.exports = class extends global.yoho.BaseModel { | @@ -1089,8 +1089,8 @@ module.exports = class extends global.yoho.BaseModel { | ||
1089 | } | 1089 | } |
1090 | 1090 | ||
1091 | 1091 | ||
1092 | - async newSendMsg(area, mobile) { | ||
1093 | - return new AccountApi(this.ctx).newSendMsg(area, mobile); | 1092 | + async newSendMsg(area, mobile, sessionId, captcha) { |
1093 | + return new AccountApi(this.ctx).newSendMsg(area, mobile, sessionId, captcha); | ||
1094 | } | 1094 | } |
1095 | 1095 | ||
1096 | async newBindCheck(area, mobile, code) { | 1096 | async newBindCheck(area, mobile, code) { |
@@ -24,7 +24,6 @@ module.exports = class extends global.yoho.BaseModel { | @@ -24,7 +24,6 @@ module.exports = class extends global.yoho.BaseModel { | ||
24 | catchs: ['/home/orders', '/home/index', '/home/orders/detail']}, | 24 | catchs: ['/home/orders', '/home/index', '/home/orders/detail']}, |
25 | {name: '我的收藏', href: '/home/favorite', catchs: ['/home/favorite/reduction']}, | 25 | {name: '我的收藏', href: '/home/favorite', catchs: ['/home/favorite/reduction']}, |
26 | {name: '我的有货币', href: '/home/currency'}, | 26 | {name: '我的有货币', href: '/home/currency'}, |
27 | - {name: '我的红包', href: '/home/redenvelopes'}, | ||
28 | {name: '我的优惠券', href: '/home/coupons'}, | 27 | {name: '我的优惠券', href: '/home/coupons'}, |
29 | {name: '我的邀请好友', href: '/home/spread'}, | 28 | {name: '我的邀请好友', href: '/home/spread'}, |
30 | {name: '我的礼品卡', href: '/home/megift'}, | 29 | {name: '我的礼品卡', href: '/home/megift'}, |
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | +const PAGE = 'pc'; | ||
4 | + | ||
3 | module.exports = class extends global.yoho.BaseModel { | 5 | module.exports = class extends global.yoho.BaseModel { |
4 | constructor(ctx) { | 6 | constructor(ctx) { |
5 | super(ctx); | 7 | super(ctx); |
@@ -119,11 +121,14 @@ module.exports = class extends global.yoho.BaseModel { | @@ -119,11 +121,14 @@ module.exports = class extends global.yoho.BaseModel { | ||
119 | * @param {[type]} mobile [手机号] | 121 | * @param {[type]} mobile [手机号] |
120 | * @return {[type]} [{}] | 122 | * @return {[type]} [{}] |
121 | */ | 123 | */ |
122 | - smsbind(area, mobile) { | 124 | + smsbind(area, mobile, id, captcha) { |
123 | let options = { | 125 | let options = { |
124 | method: 'app.passport.smsbind', | 126 | method: 'app.passport.smsbind', |
125 | area: area, | 127 | area: area, |
126 | - mobile: mobile | 128 | + mobile: mobile, |
129 | + udid: id, | ||
130 | + fromPage: PAGE, | ||
131 | + degrees: captcha | ||
127 | }; | 132 | }; |
128 | 133 | ||
129 | return this.get({data: options}); | 134 | return this.get({data: options}); |
@@ -144,7 +144,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -144,7 +144,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
144 | message: '<p>绑定失败,该手机号已被绑定</p><p>请更换手机号</p>' | 144 | message: '<p>绑定失败,该手机号已被绑定</p><p>请更换手机号</p>' |
145 | }; | 145 | }; |
146 | } | 146 | } |
147 | - return this.meGiftAPi.smsbind(params.area, params.mobile); | 147 | + return this.meGiftAPi.smsbind(params.area, params.mobile, params.id, params.captcha); |
148 | }); | 148 | }); |
149 | } | 149 | } |
150 | 150 |
@@ -251,7 +251,7 @@ router.post('/account/sendmobilemsg', captcha.requiredAPI, AccountController.sen | @@ -251,7 +251,7 @@ router.post('/account/sendmobilemsg', captcha.requiredAPI, AccountController.sen | ||
251 | 251 | ||
252 | // 手机号验证第二步 | 252 | // 手机号验证第二步 |
253 | router.post('/account/modifymobile', AccountController.modifyMobile); | 253 | router.post('/account/modifymobile', AccountController.modifyMobile); |
254 | -router.post('/account/mobilesendmsg', AccountController.newSendMsg); | 254 | +router.post('/account/mobilesendmsg', captcha.requiredAPI, AccountController.newSendMsg); |
255 | router.post('/account/mobilecheck', AccountController.newBindCheck); | 255 | router.post('/account/mobilecheck', AccountController.newBindCheck); |
256 | 256 | ||
257 | // 地址管理 | 257 | // 地址管理 |
@@ -283,11 +283,11 @@ router.post('/invoice/supply', invoiceController.supply); | @@ -283,11 +283,11 @@ router.post('/invoice/supply', invoiceController.supply); | ||
283 | router.get('/newuser', newUserController.check); | 283 | router.get('/newuser', newUserController.check); |
284 | 284 | ||
285 | // 我的礼品卡 | 285 | // 我的礼品卡 |
286 | -router.get('/megift', tabsMiddleware.getCommonHeader, meGiftController.index); | 286 | +router.get('/megift', captcha.required, tabsMiddleware.getCommonHeader, meGiftController.index); |
287 | router.post('/megift/sendEmailCode', meGiftController.sendEmailCode);// 发送邮箱验证码 | 287 | router.post('/megift/sendEmailCode', meGiftController.sendEmailCode);// 发送邮箱验证码 |
288 | router.post('/megift/verifyEmail', meGiftController.verifyEmail);// 验证邮箱验证码 | 288 | router.post('/megift/verifyEmail', meGiftController.verifyEmail);// 验证邮箱验证码 |
289 | // 检查是否绑定手机号、发验证码 | 289 | // 检查是否绑定手机号、发验证码 |
290 | -router.post('/megift/smsBind', meGiftController.smsBind); | 290 | +router.post('/megift/smsBind', captcha.requiredAPI, meGiftController.smsBind); |
291 | router.post('/megift/changeMobile', meGiftController.changeMobile);// 修改绑定手机 | 291 | router.post('/megift/changeMobile', meGiftController.changeMobile);// 修改绑定手机 |
292 | router.post('/megift/activateGift', meGiftController.activateGift);// 激活礼品卡 | 292 | router.post('/megift/activateGift', meGiftController.activateGift);// 激活礼品卡 |
293 | router.get('/megift/detail', meGiftController.detail);// 消费明细 | 293 | router.get('/megift/detail', meGiftController.detail);// 消费明细 |
@@ -41,6 +41,7 @@ | @@ -41,6 +41,7 @@ | ||
41 | </div> | 41 | </div> |
42 | </div> | 42 | </div> |
43 | </div> | 43 | </div> |
44 | +{{> gee-captcha}} | ||
44 | 45 | ||
45 | {{!-- 验证邮箱模板 --}} | 46 | {{!-- 验证邮箱模板 --}} |
46 | <script id="verify-email-tpl" type="text/html"> | 47 | <script id="verify-email-tpl" type="text/html"> |
@@ -78,6 +79,9 @@ | @@ -78,6 +79,9 @@ | ||
78 | </span> | 79 | </span> |
79 | <input type="text" placeholder="请输入手机号" class="right mobile" /> | 80 | <input type="text" placeholder="请输入手机号" class="right mobile" /> |
80 | </div> | 81 | </div> |
82 | + <div class="gift-group"> | ||
83 | + <div class="captcha-wrap"></div> | ||
84 | + </div> | ||
81 | <div class="gift-group bind-mobile-input"> | 85 | <div class="gift-group bind-mobile-input"> |
82 | <input type="text" placeholder="短信验证码" class="left mobile-code" /> | 86 | <input type="text" placeholder="短信验证码" class="left mobile-code" /> |
83 | <span class="right mobile-btn">获取短信验证码</span> | 87 | <span class="right mobile-btn">获取短信验证码</span> |
@@ -43,6 +43,10 @@ | @@ -43,6 +43,10 @@ | ||
43 | {{#if mobileCode}} | 43 | {{#if mobileCode}} |
44 | {{#if_cond step '===' 2}} | 44 | {{#if_cond step '===' 2}} |
45 | <!-- 这部分是手机验证第二部,需要不同的验证码 --> | 45 | <!-- 这部分是手机验证第二部,需要不同的验证码 --> |
46 | + <li class="user-form-li captcha-li {{#unless @root.captcha.value}}hide{{/unless}}"> | ||
47 | + <div class="safe-form-l">图形验证码:</div> | ||
48 | + <div class="captcha-safe-form-r"></div> | ||
49 | + </li> | ||
46 | <li class="user-form-li"> | 50 | <li class="user-form-li"> |
47 | <div class="safe-form-l">手机验证码:</div> | 51 | <div class="safe-form-l">手机验证码:</div> |
48 | <div class="safe-form-r"> | 52 | <div class="safe-form-r"> |
@@ -68,8 +68,10 @@ const bind = { | @@ -68,8 +68,10 @@ const bind = { | ||
68 | sendBindMsg: (req, res, next) => { | 68 | sendBindMsg: (req, res, next) => { |
69 | let mobile = req.body.mobile; | 69 | let mobile = req.body.mobile; |
70 | let area = req.body.area; | 70 | let area = req.body.area; |
71 | + let sessionId = req.session.id; | ||
72 | + let captcha = req.body.verifyCode; | ||
71 | 73 | ||
72 | - req.ctx(BindService).sendBindMsg(area, mobile).then(result => { | 74 | + req.ctx(BindService).sendBindMsg(area, mobile, sessionId, captcha).then(result => { |
73 | if (result && result.code) { | 75 | if (result && result.code) { |
74 | return res.json(result); | 76 | return res.json(result); |
75 | } else { | 77 | } else { |
@@ -84,8 +84,10 @@ const cert = { | @@ -84,8 +84,10 @@ const cert = { | ||
84 | sendCertMsg: (req, res, next) => { | 84 | sendCertMsg: (req, res, next) => { |
85 | let mobile = req.body.mobile; | 85 | let mobile = req.body.mobile; |
86 | let area = req.body.area; | 86 | let area = req.body.area; |
87 | + let sessionId = req.session.id; | ||
88 | + let captcha = req.body.verifyCode; | ||
87 | 89 | ||
88 | - req.ctx(CertService).sendCertMsg(mobile, area).then(result => { | 90 | + req.ctx(CertService).sendCertMsg(mobile, area, sessionId, captcha).then(result => { |
89 | if (result && result.code) { | 91 | if (result && result.code) { |
90 | return res.json(result); | 92 | return res.json(result); |
91 | } else { | 93 | } else { |
@@ -5,16 +5,21 @@ | @@ -5,16 +5,21 @@ | ||
5 | * @date 2016/06/21 | 5 | * @date 2016/06/21 |
6 | */ | 6 | */ |
7 | 7 | ||
8 | +const PAGE = 'pc'; | ||
9 | + | ||
8 | module.exports = class extends global.yoho.BaseModel { | 10 | module.exports = class extends global.yoho.BaseModel { |
9 | constructor(ctx) { | 11 | constructor(ctx) { |
10 | super(ctx); | 12 | super(ctx); |
11 | } | 13 | } |
12 | 14 | ||
13 | - sendBindMsg(area, mobile) { | 15 | + sendBindMsg(area, mobile, id, captcha) { |
14 | let params = { | 16 | let params = { |
15 | - method: 'app.bind.sendThirdBindMobileCodeOnly', | 17 | + method: 'app.bind.sendThirdBindMobileCodeOnlyImg', |
16 | mobile: mobile, | 18 | mobile: mobile, |
17 | area: area, | 19 | area: area, |
20 | + udid: id, | ||
21 | + fromPage: PAGE, | ||
22 | + degrees: captcha | ||
18 | }; | 23 | }; |
19 | 24 | ||
20 | return this.get({data: params}); | 25 | return this.get({data: params}); |
@@ -4,6 +4,8 @@ | @@ -4,6 +4,8 @@ | ||
4 | 4 | ||
5 | 'use strict'; | 5 | 'use strict'; |
6 | 6 | ||
7 | +const PAGE = 'pc'; | ||
8 | + | ||
7 | module.exports = class extends global.yoho.BaseModel { | 9 | module.exports = class extends global.yoho.BaseModel { |
8 | constructor(ctx) { | 10 | constructor(ctx) { |
9 | super(ctx); | 11 | super(ctx); |
@@ -27,11 +29,14 @@ module.exports = class extends global.yoho.BaseModel { | @@ -27,11 +29,14 @@ module.exports = class extends global.yoho.BaseModel { | ||
27 | return this.get({data: params}); | 29 | return this.get({data: params}); |
28 | } | 30 | } |
29 | 31 | ||
30 | - sendCertMsg(mobile, area) { | 32 | + sendCertMsg(mobile, area, id, captcha) { |
31 | let params = { | 33 | let params = { |
32 | - method: 'app.bind.sendChangeBindMobileCodeOnly', | 34 | + method: 'app.bind.sendChangeBindMobileCodeOnlyImg', |
33 | mobile: mobile, | 35 | mobile: mobile, |
34 | area: area, | 36 | area: area, |
37 | + udid: id, | ||
38 | + fromPage: PAGE, | ||
39 | + degrees: captcha | ||
35 | }; | 40 | }; |
36 | 41 | ||
37 | return this.get({data: params}); | 42 | return this.get({data: params}); |
@@ -62,16 +62,16 @@ router.get('/passport/autosign/renren', login.common.beforeLogin, login.renren.l | @@ -62,16 +62,16 @@ router.get('/passport/autosign/renren', login.common.beforeLogin, login.renren.l | ||
62 | router.get('/passport/login/renren/callback', login.renren.callback); | 62 | router.get('/passport/login/renren/callback', login.renren.callback); |
63 | 63 | ||
64 | // 第三方登录后绑定手机号 | 64 | // 第三方登录后绑定手机号 |
65 | -router.get('/passport/thirdlogin/index', bind.indexPage); | 65 | +router.get('/passport/thirdlogin/index', captcha.required, bind.indexPage); |
66 | router.get('/passport/thirdlogin/bindsuccess', bind.bindSuccess); | 66 | router.get('/passport/thirdlogin/bindsuccess', bind.bindSuccess); |
67 | -router.post('/passport/autouserinfo/sendBindMsg', bind.sendBindMsg); | 67 | +router.post('/passport/autouserinfo/sendBindMsg', captcha.requiredAPI, bind.sendBindMsg); |
68 | router.post('/passport/autouserinfo/bindMobile', bind.bindMobile); | 68 | router.post('/passport/autouserinfo/bindMobile', bind.bindMobile); |
69 | 69 | ||
70 | // 未实名认证的老邮箱用户登录绑定手机号 | 70 | // 未实名认证的老邮箱用户登录绑定手机号 |
71 | -router.get('/passport/cert/index', cert.index); /** 输入手机号码页面 **/ | 71 | +router.get('/passport/cert/index', captcha.required, cert.index); /** 输入手机号码页面 **/ |
72 | router.get('/passport/cert/success', cert.success); /** 成功提示页面 **/ | 72 | router.get('/passport/cert/success', cert.success); /** 成功提示页面 **/ |
73 | router.post('/passport/cert/check', cert.check); | 73 | router.post('/passport/cert/check', cert.check); |
74 | -router.post('/passport/cert/sendCertMsg', cert.sendCertMsg); | 74 | +router.post('/passport/cert/sendCertMsg', captcha.requiredAPI, cert.sendCertMsg); |
75 | router.post('/passport/cert/certMobile', cert.certMobile); | 75 | router.post('/passport/cert/certMobile', cert.certMobile); |
76 | 76 | ||
77 | /** | 77 | /** |
@@ -42,6 +42,11 @@ | @@ -42,6 +42,11 @@ | ||
42 | </div> | 42 | </div> |
43 | </div> | 43 | </div> |
44 | </div> | 44 | </div> |
45 | + <div class="yohobindrow captcha"> | ||
46 | + <div class="name phonetag"></div> | ||
47 | + <div class="content captcha-wrap"> | ||
48 | + </div> | ||
49 | + </div> | ||
45 | <div class="yohobindrow"> | 50 | <div class="yohobindrow"> |
46 | <div class="name phonetag">验证码</div> | 51 | <div class="name phonetag">验证码</div> |
47 | <div class="content"> | 52 | <div class="content"> |
@@ -78,3 +83,5 @@ | @@ -78,3 +83,5 @@ | ||
78 | <a href="javascript:void(0)" class="yohobindbtn" id="bindfirststep">下一步</a> | 83 | <a href="javascript:void(0)" class="yohobindbtn" id="bindfirststep">下一步</a> |
79 | </div> | 84 | </div> |
80 | </div> | 85 | </div> |
86 | + | ||
87 | +{{> gee-captcha}} |
@@ -40,6 +40,11 @@ | @@ -40,6 +40,11 @@ | ||
40 | </div> | 40 | </div> |
41 | </div> | 41 | </div> |
42 | </div> | 42 | </div> |
43 | + <div class="yohobindrow captcha"> | ||
44 | + <div class="name phonetag"></div> | ||
45 | + <div class="content captcha-wrap"> | ||
46 | + </div> | ||
47 | + </div> | ||
43 | <div class="yohobindrow"> | 48 | <div class="yohobindrow"> |
44 | <div class="name phonetag">验证码</div> | 49 | <div class="name phonetag">验证码</div> |
45 | <div class="content"> | 50 | <div class="content"> |
@@ -76,3 +81,5 @@ | @@ -76,3 +81,5 @@ | ||
76 | <a href="javascript:void(0)" class="yohobindbtn left" id="bindfirststep">下一步</a> | 81 | <a href="javascript:void(0)" class="yohobindbtn left" id="bindfirststep">下一步</a> |
77 | </div> | 82 | </div> |
78 | </div> | 83 | </div> |
84 | + | ||
85 | +{{> gee-captcha}} |
@@ -5,6 +5,7 @@ | @@ -5,6 +5,7 @@ | ||
5 | 'use strict'; | 5 | 'use strict'; |
6 | 6 | ||
7 | const Promise = require('bluebird'); | 7 | const Promise = require('bluebird'); |
8 | +const _ = require('lodash'); | ||
8 | const co = Promise.coroutine; | 9 | const co = Promise.coroutine; |
9 | 10 | ||
10 | const Api = require('./detail-consult-api'); | 11 | const Api = require('./detail-consult-api'); |
@@ -26,8 +27,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -26,8 +27,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
26 | if (!consultList.code || consultList.code !== 200) { | 27 | if (!consultList.code || consultList.code !== 200) { |
27 | return []; | 28 | return []; |
28 | } | 29 | } |
29 | - | ||
30 | - return consultList.data.list.map(value => { | 30 | + return _.get(consultList, 'data.list', []).map(value => { |
31 | return { | 31 | return { |
32 | avatar: detailHelper.DEFAULT_AVATAR_ICO, | 32 | avatar: detailHelper.DEFAULT_AVATAR_ICO, |
33 | question: value.ask, | 33 | question: value.ask, |
@@ -38,7 +38,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -38,7 +38,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
38 | like: parseInt(value.like, 10), | 38 | like: parseInt(value.like, 10), |
39 | isUseful: value.is_useful === 'Y', | 39 | isUseful: value.is_useful === 'Y', |
40 | useful: parseInt(value.useful, 10), | 40 | useful: parseInt(value.useful, 10), |
41 | - totakl: value.total | 41 | + total: value.total |
42 | }; | 42 | }; |
43 | }); | 43 | }); |
44 | 44 |
@@ -102,7 +102,7 @@ router.post('/detail/notify/cancel', auth, notify.cancel); // 删 | @@ -102,7 +102,7 @@ router.post('/detail/notify/cancel', auth, notify.cancel); // 删 | ||
102 | 102 | ||
103 | // 全球购routers | 103 | // 全球购routers |
104 | router.get('/list/global', '/list/global', globalCtrl.list); // 全球购列表页 | 104 | router.get('/list/global', '/list/global', globalCtrl.list); // 全球购列表页 |
105 | -router.get('/list/global/:pathQs','/list/global/:pathQs', paramParse, globalCtrl.list); // 全球购列表页 | 105 | +router.get('/list/global/:pathQs', '/list/global/:pathQs', paramParse, globalCtrl.list); // 全球购列表页 |
106 | router.get('/global/list', globalCtrl.list); // 全球购列表页 【老路由,待删】 | 106 | router.get('/global/list', globalCtrl.list); // 全球购列表页 【老路由,待删】 |
107 | router.get('/global/detail', globalCtrl.detail); | 107 | router.get('/global/detail', globalCtrl.detail); |
108 | router.get(/\/global\/([\d]+)(.*)/, globalCtrl.detail); | 108 | router.get(/\/global\/([\d]+)(.*)/, globalCtrl.detail); |
@@ -27,55 +27,48 @@ const channelMap = { | @@ -27,55 +27,48 @@ const channelMap = { | ||
27 | 27 | ||
28 | const sortMap = { | 28 | const sortMap = { |
29 | boys: [ | 29 | boys: [ |
30 | - {misort: 18, viewNum: 5}, | ||
31 | - {misort: 20, viewNum: 5}, | ||
32 | {misort: 16, viewNum: 5}, | 30 | {misort: 16, viewNum: 5}, |
33 | {misort: 21, viewNum: 5}, | 31 | {misort: 21, viewNum: 5}, |
34 | {misort: 44, viewNum: 5}, | 32 | {misort: 44, viewNum: 5}, |
35 | {misort: 26, viewNum: 5}, | 33 | {misort: 26, viewNum: 5}, |
36 | {misort: 27, viewNum: 5}, | 34 | {misort: 27, viewNum: 5}, |
37 | - {misort: 1900, viewNum: 5}, | 35 | + {misort: 12, viewNum: 5}, |
38 | {misort: 45, viewNum: 5}, | 36 | {misort: 45, viewNum: 5}, |
39 | {misort: 1892, viewNum: 5}, | 37 | {misort: 1892, viewNum: 5}, |
38 | + {misort: 1896, viewNum: 5}, | ||
40 | {misort: 49, viewNum: 5}, | 39 | {misort: 49, viewNum: 5}, |
41 | {misort: 60, viewNum: 5}, | 40 | {misort: 60, viewNum: 5}, |
42 | - {misort: 1896, viewNum: 5}, | ||
43 | - {misort: 39, viewNum: 5}, | ||
44 | - {misort: 59, viewNum: 5} | 41 | + {misort: 61, viewNum: 5}, |
42 | + {misort: 59, viewNum: 5}, | ||
43 | + {misort: 65, viewNum: 5}, | ||
45 | ], | 44 | ], |
46 | girls: [ | 45 | girls: [ |
47 | - {misort: 18, viewNum: 4}, | ||
48 | - {misort: 20, viewNum: 4}, | ||
49 | - {misort: 21, viewNum: 4}, | ||
50 | {misort: 16, viewNum: 4}, | 46 | {misort: 16, viewNum: 4}, |
51 | - {misort: 1900, viewNum: 4}, | ||
52 | - {misort: 1892, viewNum: 4}, | 47 | + {misort: 21, viewNum: 4}, |
48 | + {misort: 32, viewNum: 4}, | ||
49 | + {misort: 12, viewNum: 4}, | ||
50 | + {misort: 26, viewNum: 4}, | ||
51 | + {misort: 27, viewNum: 4}, | ||
52 | + {misort: 31, viewNum: 4}, | ||
53 | {misort: 1896, viewNum: 4}, | 53 | {misort: 1896, viewNum: 4}, |
54 | {misort: 44, viewNum: 4}, | 54 | {misort: 44, viewNum: 4}, |
55 | - {misort: 27, viewNum: 4}, | ||
56 | - {misort: 26, viewNum: 4}, | ||
57 | {misort: 45, viewNum: 4}, | 55 | {misort: 45, viewNum: 4}, |
56 | + {misort: 48, viewNum: 4}, | ||
58 | {misort: 49, viewNum: 4}, | 57 | {misort: 49, viewNum: 4}, |
59 | - {misort: 66, viewNum: 4}, | ||
60 | - {misort: 39, viewNum: 4}, | ||
61 | - {misort: 60, viewNum: 4} | 58 | + {misort: 65, viewNum: 4}, |
59 | + {misort: 50, viewNum: 4}, | ||
60 | + {misort: 61, viewNum: 4} | ||
62 | ], | 61 | ], |
63 | kids: [ | 62 | kids: [ |
64 | - {misort: 400, viewNum: 4}, | ||
65 | - {misort: 430, viewNum: 4}, | ||
66 | - {misort: 423, viewNum: 4}, | ||
67 | {misort: 396, viewNum: 4}, | 63 | {misort: 396, viewNum: 4}, |
68 | {misort: 404, viewNum: 4}, | 64 | {misort: 404, viewNum: 4}, |
69 | - {misort: 406, viewNum: 4}, | 65 | + {misort: 366, viewNum: 4}, |
66 | + {misort: 370, viewNum: 4}, | ||
67 | + {misort: 371, viewNum: 4}, | ||
70 | {misort: 368, viewNum: 4}, | 68 | {misort: 368, viewNum: 4}, |
71 | - {misort: 384, viewNum: 4}, | 69 | + {misort: 406, viewNum: 4}, |
72 | {misort: 369, viewNum: 4}, | 70 | {misort: 369, viewNum: 4}, |
73 | - {misort: 388, viewNum: 4}, | ||
74 | - {misort: 392, viewNum: 4}, | ||
75 | - {misort: 429, viewNum: 4}, | ||
76 | - {misort: 448, viewNum: 4}, | ||
77 | - {misort: 408, viewNum: 4}, | ||
78 | - {misort: 414, viewNum: 4} | 71 | + {misort: 414, viewNum: 4}, |
79 | ], | 72 | ], |
80 | lifestyle: [ | 73 | lifestyle: [ |
81 | {msort: 1170, viewNum: 5}, | 74 | {msort: 1170, viewNum: 5}, |
@@ -115,6 +115,7 @@ | @@ -115,6 +115,7 @@ | ||
115 | "yoho-jquery-pjax": "0.0.1", | 115 | "yoho-jquery-pjax": "0.0.1", |
116 | "yoho-jquery-placeholder": "^2.3.1", | 116 | "yoho-jquery-placeholder": "^2.3.1", |
117 | "yoho-jquery-qrcode": "^0.14.0", | 117 | "yoho-jquery-qrcode": "^0.14.0", |
118 | + "yoho-qs": "^1.0.1", | ||
118 | "yoho-slider": "0.0.2", | 119 | "yoho-slider": "0.0.2", |
119 | "yoho-swiper": "^3.3.1" | 120 | "yoho-swiper": "^3.3.1" |
120 | } | 121 | } |
1 | var $ = require('yoho-jquery'), | 1 | var $ = require('yoho-jquery'), |
2 | - Captcha = require('../plugins/captcha'); | 2 | + Captcha = require('../plugins/captcha'), |
3 | + qs = require('yoho-qs'); | ||
3 | 4 | ||
4 | // 一直是极验证码 | 5 | // 一直是极验证码 |
5 | var captcha = new Captcha('.captcha-wrap', { | 6 | var captcha = new Captcha('.captcha-wrap', { |
@@ -13,7 +14,7 @@ require('../common/promise'); | @@ -13,7 +14,7 @@ require('../common/promise'); | ||
13 | 14 | ||
14 | $('.confirm').on('click', function() { | 15 | $('.confirm').on('click', function() { |
15 | captcha.check().then(function() { | 16 | captcha.check().then(function() { |
16 | - window.jumpUrl(window.queryString().refer || '//www.yohobuy.com'); | 17 | + window.jumpUrl(qs.refer ? decodeURIComponent(qs.refer) : '//www.yohobuy.com'); |
17 | }); | 18 | }); |
18 | }); | 19 | }); |
19 | 20 |
1 | var $ = require('yoho-jquery'), | 1 | var $ = require('yoho-jquery'), |
2 | + Captcha = require('../plugins/captcha'), | ||
2 | Hbs = require('yoho-handlebars'), | 3 | Hbs = require('yoho-handlebars'), |
3 | dialog = require('../common/dialog'); | 4 | dialog = require('../common/dialog'); |
4 | var meGift; | 5 | var meGift; |
6 | +var captcha; | ||
5 | 7 | ||
6 | require('yoho-jquery-placeholder'); | 8 | require('yoho-jquery-placeholder'); |
7 | require('../common'); | 9 | require('../common'); |
@@ -240,6 +242,11 @@ meGift = { | @@ -240,6 +242,11 @@ meGift = { | ||
240 | }] | 242 | }] |
241 | }).show(); | 243 | }).show(); |
242 | 244 | ||
245 | + captcha = new Captcha('.captcha-wrap', {checkURI: ''}).init(); | ||
246 | + captcha.onSuccess(function() { | ||
247 | + $('.me-gift-confirm').find('.mobile-btn').trigger('click'); | ||
248 | + }); | ||
249 | + | ||
243 | setTimeout(function() { | 250 | setTimeout(function() { |
244 | $('[placeholder]', dg.$el).placeholder(); // ie8 兼容 placeholder | 251 | $('[placeholder]', dg.$el).placeholder(); // ie8 兼容 placeholder |
245 | }, 10); | 252 | }, 10); |
@@ -264,7 +271,8 @@ meGift = { | @@ -264,7 +271,8 @@ meGift = { | ||
264 | 271 | ||
265 | this.postAjax('/home/megift/smsBind', { | 272 | this.postAjax('/home/megift/smsBind', { |
266 | area: area, | 273 | area: area, |
267 | - mobile: mobile | 274 | + mobile: mobile, |
275 | + verifyCode: captcha.getResults() | ||
268 | }, verifyData).then(function(res) { | 276 | }, verifyData).then(function(res) { |
269 | if (res.code === 200) { | 277 | if (res.code === 200) { |
270 | that.intTimer($('.mobile-btn')); | 278 | that.intTimer($('.mobile-btn')); |
@@ -25,11 +25,8 @@ var sInt, | @@ -25,11 +25,8 @@ var sInt, | ||
25 | 25 | ||
26 | var baseQs; | 26 | var baseQs; |
27 | 27 | ||
28 | -var captcha = new Captcha('.captcha-safe-form-r', {checkURI: ''}).init(); | 28 | +var captcha; |
29 | 29 | ||
30 | -captcha.onSuccess(function() { | ||
31 | - $('#send-mobile-code').trigger('click'); | ||
32 | -}); | ||
33 | 30 | ||
34 | require('../common'); | 31 | require('../common'); |
35 | 32 | ||
@@ -347,7 +344,8 @@ function sendMobileMsg2(mobileV) { | @@ -347,7 +344,8 @@ function sendMobileMsg2(mobileV) { | ||
347 | var $code = $('#inputcode2'), | 344 | var $code = $('#inputcode2'), |
348 | $ccheckInfo = $code.parent().find('.check-info'); | 345 | $ccheckInfo = $code.parent().find('.check-info'); |
349 | var reqData = { | 346 | var reqData = { |
350 | - mobile: mobileV | 347 | + mobile: mobileV, |
348 | + verifyCode: captcha.getResults() | ||
351 | }; | 349 | }; |
352 | 350 | ||
353 | $.post('/home/account/mobilesendmsg', reqData, function(result) { | 351 | $.post('/home/account/mobilesendmsg', reqData, function(result) { |
@@ -549,9 +547,24 @@ function submitForm() { | @@ -549,9 +547,24 @@ function submitForm() { | ||
549 | } | 547 | } |
550 | } | 548 | } |
551 | } | 549 | } |
550 | +function loadCaptcha() { | ||
551 | + var step = $('.progress-bar .cur').index(); | ||
552 | 552 | ||
553 | -$(function() { | 553 | + if (step === 0) { |
554 | + captcha = new Captcha('.captcha-safe-form-r', {checkURI: ''}).init(); | ||
555 | + captcha.onSuccess(function() { | ||
556 | + $('#send-mobile-code').trigger('click'); | ||
557 | + }); | ||
558 | + } else if (step === 1) { | ||
559 | + captcha = new Captcha('.captcha-safe-form-r', {checkURI: ''}).init(); | ||
560 | + captcha.onSuccess(function() { | ||
561 | + $('#send-mobile-code2').trigger('click'); | ||
562 | + }); | ||
563 | + } | ||
564 | +} | ||
554 | 565 | ||
566 | +$(function() { | ||
567 | + loadCaptcha(); | ||
555 | if ($('.res-info').length > 0) { | 568 | if ($('.res-info').length > 0) { |
556 | setTimeout(function() { | 569 | setTimeout(function() { |
557 | toHome(); | 570 | toHome(); |
@@ -4,6 +4,7 @@ | @@ -4,6 +4,7 @@ | ||
4 | * @date: 2016/1/21 | 4 | * @date: 2016/1/21 |
5 | */ | 5 | */ |
6 | var $ = require('yoho-jquery'); | 6 | var $ = require('yoho-jquery'); |
7 | +var Captcha = require('../../plugins/captcha'); | ||
7 | var phoneRegx = require('../common/mail-phone-regx').phoneRegx; | 8 | var phoneRegx = require('../common/mail-phone-regx').phoneRegx; |
8 | 9 | ||
9 | var nopermissionoption = $('#nopermissionmessage').html(); // 倒计时dom | 10 | var nopermissionoption = $('#nopermissionmessage').html(); // 倒计时dom |
@@ -20,6 +21,12 @@ var thirdOpenId = $('#openId').val(), | @@ -20,6 +21,12 @@ var thirdOpenId = $('#openId').val(), | ||
20 | 21 | ||
21 | var Alert = require('../../common/dialog').Alert; | 22 | var Alert = require('../../common/dialog').Alert; |
22 | var dialog = require('../cert/dialog'); | 23 | var dialog = require('../cert/dialog'); |
24 | +var passwordCaptchaImg = new Captcha('.captcha-wrap', {checkURI: ''}).init(); | ||
25 | + | ||
26 | +passwordCaptchaImg.onSuccess(function() { | ||
27 | + $('#sendmessage').trigger('click'); | ||
28 | +}); | ||
29 | + | ||
23 | 30 | ||
24 | require('../../simple-header'); | 31 | require('../../simple-header'); |
25 | 32 | ||
@@ -160,7 +167,8 @@ function sendMessageValidate() { | @@ -160,7 +167,8 @@ function sendMessageValidate() { | ||
160 | url: '/passport/autouserinfo/sendBindMsg', | 167 | url: '/passport/autouserinfo/sendBindMsg', |
161 | data: { | 168 | data: { |
162 | mobile: $('#mobile').val(), | 169 | mobile: $('#mobile').val(), |
163 | - area: $('#areacode').val() | 170 | + area: $('#areacode').val(), |
171 | + verifyCode: passwordCaptchaImg.getResults(), | ||
164 | } | 172 | } |
165 | }).then(function(data) { | 173 | }).then(function(data) { |
166 | 174 |
@@ -4,6 +4,7 @@ | @@ -4,6 +4,7 @@ | ||
4 | * @date: 2018/1/18 | 4 | * @date: 2018/1/18 |
5 | */ | 5 | */ |
6 | var $ = require('yoho-jquery'); | 6 | var $ = require('yoho-jquery'); |
7 | +var Captcha = require('../../plugins/captcha'); | ||
7 | var phoneRegx = require('../common/mail-phone-regx').phoneRegx; | 8 | var phoneRegx = require('../common/mail-phone-regx').phoneRegx; |
8 | var choosedpic = 'https://cdn.yoho.cn/yohobuy/assets/img/passport/choosed.png';// 已选择图片 | 9 | var choosedpic = 'https://cdn.yoho.cn/yohobuy/assets/img/passport/choosed.png';// 已选择图片 |
9 | 10 | ||
@@ -17,7 +18,11 @@ var dialog = require('./dialog'); | @@ -17,7 +18,11 @@ var dialog = require('./dialog'); | ||
17 | var nopermissionoption = $('#nopermissionmessage').html(); | 18 | var nopermissionoption = $('#nopermissionmessage').html(); |
18 | var sendmessagehtml = $('.validatewrapper').html(); | 19 | var sendmessagehtml = $('.validatewrapper').html(); |
19 | var second = +$('.second').text(); | 20 | var second = +$('.second').text(); |
21 | +var passwordCaptchaImg = new Captcha('.captcha-wrap', {checkURI: ''}).init(); | ||
20 | 22 | ||
23 | +passwordCaptchaImg.onSuccess(function() { | ||
24 | + $('#sendmessage').trigger('click'); | ||
25 | +}); | ||
21 | require('../../simple-header'); | 26 | require('../../simple-header'); |
22 | 27 | ||
23 | function changeSecond() { | 28 | function changeSecond() { |
@@ -80,6 +85,7 @@ function sendMessageValidate() { | @@ -80,6 +85,7 @@ function sendMessageValidate() { | ||
80 | data: { | 85 | data: { |
81 | mobile: mobile, | 86 | mobile: mobile, |
82 | area: area, | 87 | area: area, |
88 | + verifyCode: passwordCaptchaImg.getResults(), | ||
83 | } | 89 | } |
84 | }).then(function(data) { | 90 | }).then(function(data) { |
85 | if (data.code === 200) { | 91 | if (data.code === 200) { |
@@ -38,6 +38,7 @@ | @@ -38,6 +38,7 @@ | ||
38 | margin: 0 auto; | 38 | margin: 0 auto; |
39 | padding-top: 122px; | 39 | padding-top: 122px; |
40 | min-height: 550px; | 40 | min-height: 550px; |
41 | + padding-bottom: 50px; | ||
41 | width: 980px; | 42 | width: 980px; |
42 | 43 | ||
43 | .img-check-tip { | 44 | .img-check-tip { |
@@ -72,6 +73,11 @@ | @@ -72,6 +73,11 @@ | ||
72 | width: 485px; | 73 | width: 485px; |
73 | height: 40px; | 74 | height: 40px; |
74 | 75 | ||
76 | + &.captcha { | ||
77 | + height: auto; | ||
78 | + margin-bottom: 0; | ||
79 | + } | ||
80 | + | ||
75 | .name { | 81 | .name { |
76 | float: left; | 82 | float: left; |
77 | margin-right: 14px; | 83 | margin-right: 14px; |
-
Please register or login to post a comment