Merge branch 'release/0110' into 'master'
Release/0110 See merge request !1666
Showing
50 changed files
with
723 additions
and
135 deletions
@@ -2,6 +2,15 @@ const _ = require('lodash'); | @@ -2,6 +2,15 @@ const _ = require('lodash'); | ||
2 | 2 | ||
3 | const {YOLUCK_LIST_TYPE, YoLuckService} = require('../models/yoluck-service'); | 3 | const {YOLUCK_LIST_TYPE, YoLuckService} = require('../models/yoluck-service'); |
4 | 4 | ||
5 | +function _handelErrorMessage(e) { | ||
6 | + if (e && e.statusCode === 503) { | ||
7 | + e.title = '人数过多。。。'; | ||
8 | + e.message = '目前参与人数过多请点击刷新'; | ||
9 | + } | ||
10 | + | ||
11 | + return e; | ||
12 | +} | ||
13 | + | ||
5 | function index(req, res, next) { | 14 | function index(req, res, next) { |
6 | let type = +req.query.type || YOLUCK_LIST_TYPE.running; | 15 | let type = +req.query.type || YOLUCK_LIST_TYPE.running; |
7 | let uid = req.user.uid; | 16 | let uid = req.user.uid; |
@@ -17,7 +26,7 @@ function index(req, res, next) { | @@ -17,7 +26,7 @@ function index(req, res, next) { | ||
17 | `/signin.html?refer=//m.yohobuy.com/activity/yoluck/index.html?type=${YOLUCK_LIST_TYPE.joined}` | 26 | `/signin.html?refer=//m.yohobuy.com/activity/yoluck/index.html?type=${YOLUCK_LIST_TYPE.joined}` |
18 | ); | 27 | ); |
19 | } else { | 28 | } else { |
20 | - return next(result.error); | 29 | + return Promise.reject(result.error); |
21 | } | 30 | } |
22 | } | 31 | } |
23 | 32 | ||
@@ -30,8 +39,7 @@ function index(req, res, next) { | @@ -30,8 +39,7 @@ function index(req, res, next) { | ||
30 | width750: true, | 39 | width750: true, |
31 | wechatShare: true | 40 | wechatShare: true |
32 | }); | 41 | }); |
33 | - | ||
34 | - }).catch(next); | 42 | + }).catch(e => next(_handelErrorMessage(e))); |
35 | } | 43 | } |
36 | 44 | ||
37 | function nextPage(req, res, next) { | 45 | function nextPage(req, res, next) { |
@@ -82,7 +90,7 @@ function detail(req, res, next) { | @@ -82,7 +90,7 @@ function detail(req, res, next) { | ||
82 | wechatShare: true | 90 | wechatShare: true |
83 | }); | 91 | }); |
84 | 92 | ||
85 | - }).catch(next); | 93 | + }).catch(e => next(_handelErrorMessage(e))); |
86 | } | 94 | } |
87 | 95 | ||
88 | 96 | ||
@@ -92,9 +100,9 @@ function getCode(req, res, next) { | @@ -92,9 +100,9 @@ function getCode(req, res, next) { | ||
92 | const uid = req.user.uid; | 100 | const uid = req.user.uid; |
93 | 101 | ||
94 | if (!actPrizeId) { | 102 | if (!actPrizeId) { |
95 | - return { | 103 | + return res.json({ |
96 | error: '活动参数错误' | 104 | error: '活动参数错误' |
97 | - }; | 105 | + }); |
98 | } | 106 | } |
99 | 107 | ||
100 | req.ctx(YoLuckService).getCode({shareUid, uid, actPrizeId}).then(result => { | 108 | req.ctx(YoLuckService).getCode({shareUid, uid, actPrizeId}).then(result => { |
@@ -106,11 +114,30 @@ function getCode(req, res, next) { | @@ -106,11 +114,30 @@ function getCode(req, res, next) { | ||
106 | }).catch(next); | 114 | }).catch(next); |
107 | } | 115 | } |
108 | 116 | ||
117 | +function getActivityCodeList(req, res, next) { | ||
118 | + const actPrizeId = req.body.id; | ||
119 | + const uid = req.user.uid; | ||
120 | + | ||
121 | + if (!actPrizeId || !uid) { | ||
122 | + return res.json({code: 200, data: []}); | ||
123 | + } | ||
124 | + | ||
125 | + req.ctx(YoLuckService).getActivityCodeList(req.user.uid, actPrizeId).then(result => { | ||
126 | + if (result.error) { | ||
127 | + return res.json({code: 404, message: result.error}); | ||
128 | + } | ||
129 | + | ||
130 | + res.json({code: 200, data: result}); | ||
131 | + }).catch(next); | ||
132 | +} | ||
133 | + | ||
109 | module.exports = { | 134 | module.exports = { |
110 | index, | 135 | index, |
111 | nextPage, | 136 | nextPage, |
112 | 137 | ||
113 | detail, | 138 | detail, |
114 | 139 | ||
115 | - getCode | 140 | + getCode, |
141 | + | ||
142 | + getActivityCodeList | ||
116 | }; | 143 | }; |
@@ -69,7 +69,9 @@ class YoLuckApi extends global.yoho.BaseModel { | @@ -69,7 +69,9 @@ class YoLuckApi extends global.yoho.BaseModel { | ||
69 | */ | 69 | */ |
70 | getList({page, type}) { | 70 | getList({page, type}) { |
71 | return yoLuckApi.get(MODULE + '/list', { | 71 | return yoLuckApi.get(MODULE + '/list', { |
72 | - page, type | 72 | + page, |
73 | + type, | ||
74 | + channel: 0 | ||
73 | }).then(result => { | 75 | }).then(result => { |
74 | if (result.code === 200) { | 76 | if (result.code === 200) { |
75 | const products = result.data; | 77 | const products = result.data; |
@@ -111,7 +113,10 @@ class YoLuckApi extends global.yoho.BaseModel { | @@ -111,7 +113,10 @@ class YoLuckApi extends global.yoho.BaseModel { | ||
111 | * @returns {Promise} | 113 | * @returns {Promise} |
112 | */ | 114 | */ |
113 | getRecommend({actPrizeId}) { | 115 | getRecommend({actPrizeId}) { |
114 | - return yoLuckApi.get(MODULE + '/list/recommend', {actPrizeId}).then(result => { | 116 | + return yoLuckApi.get(MODULE + '/list/recommend', { |
117 | + actPrizeId, | ||
118 | + channel: 0 | ||
119 | + }).then(result => { | ||
115 | if (result.code === 200) { | 120 | if (result.code === 200) { |
116 | const products = result.data; | 121 | const products = result.data; |
117 | const newProducts = products.map((p) => { | 122 | const newProducts = products.map((p) => { |
@@ -145,7 +150,17 @@ class YoLuckApi extends global.yoho.BaseModel { | @@ -145,7 +150,17 @@ class YoLuckApi extends global.yoho.BaseModel { | ||
145 | * @returns {Promise} | 150 | * @returns {Promise} |
146 | */ | 151 | */ |
147 | getMyList({page, type, limit, uid}) { | 152 | getMyList({page, type, limit, uid}) { |
148 | - return yoLuckApi.get(MODULE + '/list/mine', {type, page, uid, limit}); | 153 | + return yoLuckApi.get(MODULE + '/list/mine', {type, page, uid, limit, channel: 0}); |
154 | + } | ||
155 | + | ||
156 | + /** | ||
157 | + * 我的抽奖码列表(单个活动) | ||
158 | + * @param uid | ||
159 | + * @param actPrizeId | ||
160 | + * @returns {Promise} | ||
161 | + */ | ||
162 | + getMyListWithActid(uid, actPrizeId) { | ||
163 | + return yoLuckApi.get(MODULE + '/code/mine', {uid, actPrizeId}); | ||
149 | } | 164 | } |
150 | 165 | ||
151 | /** | 166 | /** |
@@ -184,6 +199,12 @@ class YoLuckApi extends global.yoho.BaseModel { | @@ -184,6 +199,12 @@ class YoLuckApi extends global.yoho.BaseModel { | ||
184 | } | 199 | } |
185 | 200 | ||
186 | _getUsreInfo(uid) { | 201 | _getUsreInfo(uid) { |
202 | + if (!uid) { | ||
203 | + return Promise.resolve({ | ||
204 | + code: 400 | ||
205 | + }); | ||
206 | + } | ||
207 | + | ||
187 | return this.get({ | 208 | return this.get({ |
188 | data: { | 209 | data: { |
189 | method: 'app.passport.profile', | 210 | method: 'app.passport.profile', |
@@ -212,14 +212,18 @@ class YoLuckService extends global.yoho.BaseModel { | @@ -212,14 +212,18 @@ class YoLuckService extends global.yoho.BaseModel { | ||
212 | } | 212 | } |
213 | 213 | ||
214 | async getDetail(actPrizeId, uid) { | 214 | async getDetail(actPrizeId, uid) { |
215 | - const [r1, r2, r3] = await Promise.all([ | 215 | + let userName = uid && _.get(this.ctx.req, 'user.NAME'); |
216 | + | ||
217 | + const [r1, r2, r3, r4] = await Promise.all([ | ||
216 | this._getDetail(actPrizeId, uid), | 218 | this._getDetail(actPrizeId, uid), |
217 | this._getRecentAvatars(actPrizeId), | 219 | this._getRecentAvatars(actPrizeId), |
218 | - this.getDetailBanner() | 220 | + this.getDetailBanner(), |
221 | + userName ? Promise.resolve({}) : this.api._getUsreInfo(uid) | ||
219 | ]); | 222 | ]); |
220 | 223 | ||
221 | const result = {}; | 224 | const result = {}; |
222 | 225 | ||
226 | + result.userName = userName || _.get(r4, 'data.nickname', '') || ''; | ||
223 | result.actPrizeId = actPrizeId; | 227 | result.actPrizeId = actPrizeId; |
224 | result.product = !r1.error ? r1 : {}; | 228 | result.product = !r1.error ? r1 : {}; |
225 | result.avatars = !r2.error ? r2.map(i => { | 229 | result.avatars = !r2.error ? r2.map(i => { |
@@ -237,7 +241,19 @@ class YoLuckService extends global.yoho.BaseModel { | @@ -237,7 +241,19 @@ class YoLuckService extends global.yoho.BaseModel { | ||
237 | participantCount = r1.limit; | 241 | participantCount = r1.limit; |
238 | } | 242 | } |
239 | 243 | ||
240 | - result.product.participantCount = this.formatN('000000', participantCount).split(''); | 244 | + let notice; |
245 | + | ||
246 | + try { | ||
247 | + notice = JSON.parse(result.product.notice); | ||
248 | + } catch (e) {} // eslint-disable-line | ||
249 | + | ||
250 | + notice = _.assign({}, notice); | ||
251 | + notice.content = notice.content || '关注公众号“潮流有货”,发送“开奖”查看中奖结果'; | ||
252 | + notice.h5BtnName = notice.h5BtnName || '关注'; | ||
253 | + | ||
254 | + result.product.notice = notice; | ||
255 | + | ||
256 | + result.product.participantCount = participantCount; | ||
241 | result.actionStatus = this.setActionStatus(result.product); | 257 | result.actionStatus = this.setActionStatus(result.product); |
242 | result.resource = r3; | 258 | result.resource = r3; |
243 | 259 | ||
@@ -441,7 +457,11 @@ class YoLuckService extends global.yoho.BaseModel { | @@ -441,7 +457,11 @@ class YoLuckService extends global.yoho.BaseModel { | ||
441 | }; | 457 | }; |
442 | } | 458 | } |
443 | 459 | ||
444 | - return result.data; | 460 | + if (userThumb.indexOf('?') > 0) { |
461 | + userThumb = _.split(userThumb, '?')[0] + '?imageView2/2/w/70/h/70/q/60'; | ||
462 | + } | ||
463 | + | ||
464 | + return _.assign({userThumb}, result.data); | ||
445 | } catch (e) { | 465 | } catch (e) { |
446 | logger.error(e); | 466 | logger.error(e); |
447 | 467 | ||
@@ -450,6 +470,33 @@ class YoLuckService extends global.yoho.BaseModel { | @@ -450,6 +470,33 @@ class YoLuckService extends global.yoho.BaseModel { | ||
450 | }; | 470 | }; |
451 | } | 471 | } |
452 | } | 472 | } |
473 | + | ||
474 | + async getActivityCodeList(uid, actPrizeId) { | ||
475 | + let result = await this.api.getMyListWithActid(uid, actPrizeId); | ||
476 | + | ||
477 | + let codeList = []; | ||
478 | + let nearAvatar = '//img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100'; // eslint-disable-line | ||
479 | + | ||
480 | + _.forEach(_.get(result, 'data', []), value => { | ||
481 | + if (value.prize_code) { | ||
482 | + if (value.user_thumb.indexOf('headimg') > 0) { | ||
483 | + value.user_thumb = nearAvatar; | ||
484 | + } else { | ||
485 | + if (value.user_thumb.indexOf('?') > 0) { | ||
486 | + value.user_thumb = _.split(value.user_thumb, '?')[0] + '?imageView2/2/w/70/h/70/q/60'; | ||
487 | + } | ||
488 | + nearAvatar = value.user_thumb; | ||
489 | + } | ||
490 | + | ||
491 | + codeList.push({ | ||
492 | + prizeCode: value.prize_code, | ||
493 | + userThumb: value.user_thumb | ||
494 | + }); | ||
495 | + } | ||
496 | + }); | ||
497 | + | ||
498 | + return codeList; | ||
499 | + } | ||
453 | } | 500 | } |
454 | 501 | ||
455 | module.exports = { | 502 | module.exports = { |
@@ -361,5 +361,6 @@ router.get('/yoluck/next', yoluck.nextPage); | @@ -361,5 +361,6 @@ router.get('/yoluck/next', yoluck.nextPage); | ||
361 | 361 | ||
362 | router.get('/yoluck/:id.html', yoluck.detail); | 362 | router.get('/yoluck/:id.html', yoluck.detail); |
363 | router.post('/yoluck/:id.html', auth, yoluck.getCode); | 363 | router.post('/yoluck/:id.html', auth, yoluck.getCode); |
364 | +router.post('/yoluck/detail/mylist.html', yoluck.getActivityCodeList); | ||
364 | 365 | ||
365 | module.exports = router; | 366 | module.exports = router; |
@@ -16,12 +16,12 @@ | @@ -16,12 +16,12 @@ | ||
16 | {{! 侧悬浮}} | 16 | {{! 侧悬浮}} |
17 | {{#isEqualOr param.linkTarget '1' '3'}} | 17 | {{#isEqualOr param.linkTarget '1' '3'}} |
18 | <a href="{{param.sidebarPageId}}" class="sidebar-link" target="_blank"> | 18 | <a href="{{param.sidebarPageId}}" class="sidebar-link" target="_blank"> |
19 | - <img src="{{param.icon}}"> | 19 | + <img src="{{imageslim param.icon}}"> |
20 | </a> | 20 | </a> |
21 | {{/isEqualOr}} | 21 | {{/isEqualOr}} |
22 | {{#isEqualOr param.linkTarget '2'}} | 22 | {{#isEqualOr param.linkTarget '2'}} |
23 | <div id="sidebar" pageid="{{param.sidebarPageId}}"> | 23 | <div id="sidebar" pageid="{{param.sidebarPageId}}"> |
24 | - <img src="{{param.icon}}"> | 24 | + <img src="{{imageslim param.icon}}"> |
25 | </div> | 25 | </div> |
26 | {{/isEqualOr}} | 26 | {{/isEqualOr}} |
27 | {{/isEqualOr}} | 27 | {{/isEqualOr}} |
1 | {{#result}} | 1 | {{#result}} |
2 | + <div id="hide-info" data-username="{{userName}}"></div> | ||
3 | + | ||
4 | + {{#if product.status}} | ||
5 | + {{#unless @root.isApp}} | ||
6 | + <div class="fellow-bar-wrap"> | ||
7 | + {{> yoluck/fellow-bar}} | ||
8 | + </div> | ||
9 | + {{/unless}} | ||
10 | + {{/if}} | ||
11 | + | ||
2 | <div class="header"> | 12 | <div class="header"> |
3 | {{> yoluck/product-detail-header product=product avatars=avatars}} | 13 | {{> yoluck/product-detail-header product=product avatars=avatars}} |
4 | </div> | 14 | </div> |
5 | 15 | ||
16 | + {{> yoluck/lottery-machine}} | ||
17 | + | ||
6 | <div class="help"> | 18 | <div class="help"> |
7 | {{> yoluck/help}} | 19 | {{> yoluck/help}} |
8 | </div> | 20 | </div> |
@@ -11,14 +23,8 @@ | @@ -11,14 +23,8 @@ | ||
11 | 23 | ||
12 | <div class="line"></div> | 24 | <div class="line"></div> |
13 | 25 | ||
14 | - {{#if product.status}} | ||
15 | - <div class="fellow-bar"> | ||
16 | - {{> yoluck/fellow-bar}} | ||
17 | - </div> | ||
18 | - {{/if}} | ||
19 | - | ||
20 | <div class="action-bar-wrap"> | 26 | <div class="action-bar-wrap"> |
21 | - {{> yoluck/action-bar status=actionStatus num=myPrizeCount actPrizeId=actPrizeId}} | 27 | + {{> yoluck/action-bar status=actionStatus num=myPrizeCount actPrizeId=actPrizeId lotteryInfo=product.lottery_info}} |
22 | </div> | 28 | </div> |
23 | 29 | ||
24 | <div class="foot"></div> | 30 | <div class="foot"></div> |
@@ -21,7 +21,7 @@ | @@ -21,7 +21,7 @@ | ||
21 | {{#ifcond list.length '!==' 0}} | 21 | {{#ifcond list.length '!==' 0}} |
22 | <div class="js-panel-header"> | 22 | <div class="js-panel-header"> |
23 | <img | 23 | <img |
24 | - src="http://img11.static.yhbimg.com/yhb-img01/2018/12/07/15/0188307712613ce043d4b68a94761ee1ff.gif" | 24 | + src="//img11.static.yhbimg.com/yhb-img01/2018/12/07/15/0188307712613ce043d4b68a94761ee1ff.gif" |
25 | alt=""> | 25 | alt=""> |
26 | </div> | 26 | </div> |
27 | {{/ifcond}} | 27 | {{/ifcond}} |
@@ -24,8 +24,8 @@ | @@ -24,8 +24,8 @@ | ||
24 | </a> | 24 | </a> |
25 | <div class="sales-imgs-new"> | 25 | <div class="sales-imgs-new"> |
26 | {{#isEqualOr isAdvance '1'}} | 26 | {{#isEqualOr isAdvance '1'}} |
27 | - <div class="advance" style="background-image: url({{advanceBgImg}});"> | ||
28 | - <img src="{{advanceBgImg}}" class="img-seat"> | 27 | + <div class="advance" style="background-image: url({{imageslim advanceBgImg}});"> |
28 | + <img src="{{imageslim advanceBgImg}}" class="img-seat"> | ||
29 | <span class="advance-price"></span> | 29 | <span class="advance-price"></span> |
30 | </div> | 30 | </div> |
31 | {{/isEqualOr}} | 31 | {{/isEqualOr}} |
@@ -21,8 +21,8 @@ | @@ -21,8 +21,8 @@ | ||
21 | <img class="product-detail-img lazy" src=""> | 21 | <img class="product-detail-img lazy" src=""> |
22 | <div class="sales-imgs-old sales-product-pool"> | 22 | <div class="sales-imgs-old sales-product-pool"> |
23 | {{#isEqualOr isAdvance '1'}} | 23 | {{#isEqualOr isAdvance '1'}} |
24 | - <div class="advance" style="background-image: url({{advanceBgImg}});"> | ||
25 | - <img src="{{advanceBgImg}}" class="img-seat"> | 24 | + <div class="advance" style="background-image: url({{imageslim advanceBgImg}});"> |
25 | + <img src="{{imageslim advanceBgImg}}" class="img-seat"> | ||
26 | <span class="advance-price"></span> | 26 | <span class="advance-price"></span> |
27 | </div> | 27 | </div> |
28 | {{/isEqualOr}} | 28 | {{/isEqualOr}} |
1 | <div class="fellow-bar-comp"> | 1 | <div class="fellow-bar-comp"> |
2 | - <div class="fellow-bar"> | ||
3 | - <div class="title">关注有货公众号“潮流有货”,开奖后查看中奖结果</div> | ||
4 | - <div class="btn js-fellow">去关注</div> | 2 | + <div id="fellow-bar" class="fellow-bar" data-type='{{product.notice.h5BtnType}}' data-tip='{{product.notice.h5Tip}}' data-copy='{{product.notice.h5Copy}}' data-link='{{product.notice.h5Link}}'> |
3 | + <div class="title">{{product.notice.content}}</div> | ||
4 | + <div class="btn js-fellow">{{product.notice.h5BtnName}}</div> | ||
5 | </div> | 5 | </div> |
6 | </div> | 6 | </div> |
1 | +<div class="lottery-machine"> | ||
2 | + <div class="machine"> | ||
3 | + <img src="//img12.static.yhbimg.com/sns/2018/12/21/14/0231fa07f32886117eccea846e03f453a3.png"> | ||
4 | + <div class="lottery-block"> | ||
5 | + <div id="lottery-list" class="lottery-list"> | ||
6 | + <div class="lottery lottery-tpl"> | ||
7 | + <div class="l-thumb"></div> | ||
8 | + <p class="l-title">我的<br>抽奖码</p> | ||
9 | + <p class="l-code"></p> | ||
10 | + </div> | ||
11 | + <p class="more-lottery"> | ||
12 | + <a href="/activity/yoluck/index.html?type=3"> | ||
13 | + <span class="iconfont"></span> | ||
14 | + </a> | ||
15 | + </p> | ||
16 | + </div> | ||
17 | + </div> | ||
18 | + </div> | ||
19 | +</div> |
@@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
17 | {{/ifcond}} | 17 | {{/ifcond}} |
18 | 18 | ||
19 | {{#ifcond status '===' 4}} | 19 | {{#ifcond status '===' 4}} |
20 | - <div class="btn more js-fellow">查看中奖信息</div> | 20 | + <div class="btn more js-fellow" data-id="{{act_prize_id}}" data-lottery="{{lottery_info}}">查看中奖信息</div> |
21 | {{/ifcond}} | 21 | {{/ifcond}} |
22 | 22 | ||
23 | {{#ifcond status '===' 5}} | 23 | {{#ifcond status '===' 5}} |
@@ -182,6 +182,19 @@ const common = { | @@ -182,6 +182,19 @@ const common = { | ||
182 | } | 182 | } |
183 | next(); | 183 | next(); |
184 | }, | 184 | }, |
185 | + wechatQuickLoginCheck: (req, res, next) => { | ||
186 | + let refer = req.query.refer; | ||
187 | + | ||
188 | + // 仅yoluck业务展示快捷登陆引导页 | ||
189 | + if (req.yoho.isWechat && refer && refer.indexOf('activity/yoluck') > 0) { | ||
190 | + _.assign(res.locals, { | ||
191 | + wechatQuickLoginRefer: encodeURIComponent(refer), | ||
192 | + useWechatQuickLogin: true | ||
193 | + }); | ||
194 | + } | ||
195 | + | ||
196 | + next(); | ||
197 | + }, | ||
185 | clearCookie: (req, res, next) => { | 198 | clearCookie: (req, res, next) => { |
186 | res.clearCookie('_SESSION_KEY', { | 199 | res.clearCookie('_SESSION_KEY', { |
187 | domain: 'yohobuy.com' | 200 | domain: 'yohobuy.com' |
@@ -147,6 +147,7 @@ const loginNew = new LoginNew(); | @@ -147,6 +147,7 @@ const loginNew = new LoginNew(); | ||
147 | 147 | ||
148 | router.get('/passport/login', | 148 | router.get('/passport/login', |
149 | login.common.clearCookie, | 149 | login.common.clearCookie, |
150 | + login.common.wechatQuickLoginCheck, | ||
150 | validateCode.load, | 151 | validateCode.load, |
151 | login.common.beforeLogin, | 152 | login.common.beforeLogin, |
152 | loginNew.loginPage); // 普通登录 | 153 | loginNew.loginPage); // 普通登录 |
@@ -164,6 +165,7 @@ router.post('/passport/register-new', | @@ -164,6 +165,7 @@ router.post('/passport/register-new', | ||
164 | reg.register); // 注册请求 | 165 | reg.register); // 注册请求 |
165 | router.get('/passport/sms_login', | 166 | router.get('/passport/sms_login', |
166 | login.common.clearCookie, | 167 | login.common.clearCookie, |
168 | + login.common.wechatQuickLoginCheck, | ||
167 | validateCode.load, | 169 | validateCode.load, |
168 | smsLogin.smsLoginPage); // 短信验证码登录 | 170 | smsLogin.smsLoginPage); // 短信验证码登录 |
169 | router.post('/passport/sms_login/step1_check', validateCode.check, smsLogin.indexCheck); | 171 | router.post('/passport/sms_login/step1_check', validateCode.check, smsLogin.indexCheck); |
@@ -174,6 +176,7 @@ router.get('/signin.html', | @@ -174,6 +176,7 @@ router.get('/signin.html', | ||
174 | login.common.thirdLogin, | 176 | login.common.thirdLogin, |
175 | 177 | ||
176 | // login.common.weixinCheck, | 178 | // login.common.weixinCheck, |
179 | + login.common.wechatQuickLoginCheck, | ||
177 | validateCode.load, | 180 | validateCode.load, |
178 | login.common.beforeLogin, | 181 | login.common.beforeLogin, |
179 | smsLogin.smsLoginPage); // 短信验证码登录 | 182 | smsLogin.smsLoginPage); // 短信验证码登录 |
@@ -181,6 +184,7 @@ router.get('/signin.html', | @@ -181,6 +184,7 @@ router.get('/signin.html', | ||
181 | router.get('/signin.htm', | 184 | router.get('/signin.htm', |
182 | login.common.clearCookie, | 185 | login.common.clearCookie, |
183 | login.common.thirdLogin, | 186 | login.common.thirdLogin, |
187 | + login.common.wechatQuickLoginCheck, | ||
184 | validateCode.load, | 188 | validateCode.load, |
185 | login.common.beforeLogin, | 189 | login.common.beforeLogin, |
186 | smsLogin.smsLoginPage); // 短信验证码登录 | 190 | smsLogin.smsLoginPage); // 短信验证码登录 |
@@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
26 | <a id="getPswrdBtn" href="javascript:void(0);">忘记密码?</a> | 26 | <a id="getPswrdBtn" href="javascript:void(0);">忘记密码?</a> |
27 | </div> | 27 | </div> |
28 | </form> | 28 | </form> |
29 | - {{!-- <div class="third-party-login"> | 29 | +{{!-- <div class="third-party-login"> |
30 | <div class="tip-box"> | 30 | <div class="tip-box"> |
31 | <span class="left-line"></span> | 31 | <span class="left-line"></span> |
32 | <span class="tip">使用第三方登录</span> | 32 | <span class="tip">使用第三方登录</span> |
@@ -48,4 +48,5 @@ | @@ -48,4 +48,5 @@ | ||
48 | <a class="by-mobile" onclick="location.href='{{phoneRetriveUrl}}'">手机找回</a> | 48 | <a class="by-mobile" onclick="location.href='{{phoneRetriveUrl}}'">手机找回</a> |
49 | </div> | 49 | </div> |
50 | </div> | 50 | </div> |
51 | + {{> passport/wechat-quick-login}} | ||
51 | </div> | 52 | </div> |
@@ -35,7 +35,7 @@ | @@ -35,7 +35,7 @@ | ||
35 | <a id="getPswrdBtn" href="javascript:void(0);">忘记密码?</a> | 35 | <a id="getPswrdBtn" href="javascript:void(0);">忘记密码?</a> |
36 | </div> | 36 | </div> |
37 | </form> | 37 | </form> |
38 | - {{!-- <div class="third-party-login"> | 38 | +{{!-- <div class="third-party-login"> |
39 | <div class="tip-box"> | 39 | <div class="tip-box"> |
40 | <span class="left-line"></span> | 40 | <span class="left-line"></span> |
41 | <span class="tip">使用第三方登录</span> | 41 | <span class="tip">使用第三方登录</span> |
@@ -56,4 +56,5 @@ | @@ -56,4 +56,5 @@ | ||
56 | <a class="by-mobile" onclick="location.href='{{phoneRetriveUrl}}'">手机找回</a> | 56 | <a class="by-mobile" onclick="location.href='{{phoneRetriveUrl}}'">手机找回</a> |
57 | </div> | 57 | </div> |
58 | </div> | 58 | </div> |
59 | + {{> passport/wechat-quick-login}} | ||
59 | </div> | 60 | </div> |
1 | +{{#if @root.useWechatQuickLogin}} | ||
2 | + <div class="wechat-quick-wrap"> | ||
3 | + <div class="quick-login-main"> | ||
4 | + <div class="quick-login-logo"></div> | ||
5 | + <div class="local-login-btn quick-btn">使用有货账号登录</div> | ||
6 | + <div class="quick-login-btn quick-btn"> | ||
7 | + <a href="/passport/login/wechat?refer={{@root.wechatQuickLoginRefer}}">微信快捷登录</a> | ||
8 | + </div> | ||
9 | + </div> | ||
10 | + </div> | ||
11 | +{{/if}} |
@@ -25,6 +25,33 @@ const forceNoCache = (res) => { | @@ -25,6 +25,33 @@ const forceNoCache = (res) => { | ||
25 | } | 25 | } |
26 | }; | 26 | }; |
27 | 27 | ||
28 | +const _err503 = (req, res, code, err) => { | ||
29 | + res.status(code); | ||
30 | + | ||
31 | + if (req.xhr) { | ||
32 | + return res.json({ | ||
33 | + code: err.code, | ||
34 | + message: err.message || '服务器繁忙请稍后重试!' | ||
35 | + }); | ||
36 | + } | ||
37 | + | ||
38 | + return res.render('error/510', { | ||
39 | + err: err, | ||
40 | + module: 'common', | ||
41 | + page: 'error', | ||
42 | + title: err.title || '服务器繁忙 | Yoho!Buy有货 | 潮流购物逛不停', | ||
43 | + pageHeader: headerModel.setNav({ | ||
44 | + navTitle: err.title || err.message || '服务器繁忙请稍后重试!' | ||
45 | + }), | ||
46 | + showRefresh: { | ||
47 | + message: err.message, | ||
48 | + btnName: '刷新重试' | ||
49 | + }, | ||
50 | + pageFooter: true, | ||
51 | + isErr: true | ||
52 | + }); | ||
53 | +}; | ||
54 | + | ||
28 | const _err510 = (req, res, code, err) => { | 55 | const _err510 = (req, res, code, err) => { |
29 | res.status(code); | 56 | res.status(code); |
30 | 57 | ||
@@ -196,6 +223,8 @@ exports.serverError = () => { | @@ -196,6 +223,8 @@ exports.serverError = () => { | ||
196 | 223 | ||
197 | } else if (err.code === 9999991 || err.code === 9999992) { | 224 | } else if (err.code === 9999991 || err.code === 9999992) { |
198 | return _err510(req, res, 510, err); | 225 | return _err510(req, res, 510, err); |
226 | + } else if (+err.statusCode === 503) { | ||
227 | + return _err503(req, res, 510, err); | ||
199 | } | 228 | } |
200 | 229 | ||
201 | if (!res.headersSent) { | 230 | if (!res.headersSent) { |
1 | <div class="err-page yoho-page"> | 1 | <div class="err-page yoho-page"> |
2 | - <div class="err-bg"></div> | 2 | + <div class="err-bg {{#if showRefresh}}err-refresh{{/if}}"> |
3 | + {{#showRefresh}} | ||
4 | + <div class="refresh-wrap"> | ||
5 | + <p class="refresh-msg">{{message}}</p> | ||
6 | + <a class="refresh-btn" href="javascript:void(0)" onclick="location.reload()" >{{btnName}}</a> | ||
7 | + </div> | ||
8 | + {{/showRefresh}} | ||
9 | + </div> | ||
3 | </div> | 10 | </div> |
1 | { | 1 | { |
2 | "name": "yohobuywap-node", | 2 | "name": "yohobuywap-node", |
3 | - "version": "6.8.67", | 3 | + "version": "6.8.71", |
4 | "private": true, | 4 | "private": true, |
5 | "description": "A New Yohobuy Project With Express", | 5 | "description": "A New Yohobuy Project With Express", |
6 | "repository": { | 6 | "repository": { |
@@ -88,7 +88,7 @@ | @@ -88,7 +88,7 @@ | ||
88 | "xml2js": "^0.4.19", | 88 | "xml2js": "^0.4.19", |
89 | "yoho-express-session": "^2.0.0", | 89 | "yoho-express-session": "^2.0.0", |
90 | "yoho-md5": "^2.0.0", | 90 | "yoho-md5": "^2.0.0", |
91 | - "yoho-node-lib": "=0.6.41", | 91 | + "yoho-node-lib": "=0.6.43", |
92 | "yoho-zookeeper": "^1.0.10" | 92 | "yoho-zookeeper": "^1.0.10" |
93 | }, | 93 | }, |
94 | "devDependencies": { | 94 | "devDependencies": { |
@@ -134,7 +134,7 @@ | @@ -134,7 +134,7 @@ | ||
134 | "workbox-sw": "^2.1.2", | 134 | "workbox-sw": "^2.1.2", |
135 | "workbox-webpack-plugin": "^3.4.1", | 135 | "workbox-webpack-plugin": "^3.4.1", |
136 | "yo-cli": "=2.1.9", | 136 | "yo-cli": "=2.1.9", |
137 | - "yoho-activity-sdk": "1.1.2", | 137 | + "yoho-activity-sdk": "1.1.3", |
138 | "yoho-cookie": "^1.2.0", | 138 | "yoho-cookie": "^1.2.0", |
139 | "yoho-fastclick": "^1.0.6", | 139 | "yoho-fastclick": "^1.0.6", |
140 | "yoho-hammer": "^2.0.8", | 140 | "yoho-hammer": "^2.0.8", |
No preview for this file type
@@ -20,13 +20,6 @@ Created by iconfont | @@ -20,13 +20,6 @@ Created by iconfont | ||
20 | /> | 20 | /> |
21 | <missing-glyph /> | 21 | <missing-glyph /> |
22 | 22 | ||
23 | - <glyph glyph-name="x" unicode="x" horiz-adv-x="1001" | ||
24 | -d="M281 543q-27 -1 -53 -1h-83q-18 0 -36.5 -6t-32.5 -18.5t-23 -32t-9 -45.5v-76h912v41q0 16 -0.5 30t-0.5 18q0 13 -5 29t-17 29.5t-31.5 22.5t-49.5 9h-133v-97h-438v97zM955 310v-52q0 -23 0.5 -52t0.5 -58t-10.5 -47.5t-26 -30t-33 -16t-31.5 -4.5q-14 -1 -29.5 -0.5 | ||
25 | -t-29.5 0.5h-32l-45 128h-439l-44 -128h-29h-34q-20 0 -45 1q-25 0 -41 9.5t-25.5 23t-13.5 29.5t-4 30v167h911zM163 247q-12 0 -21 -8.5t-9 -21.5t9 -21.5t21 -8.5q13 0 22 8.5t9 21.5t-9 21.5t-22 8.5zM316 123q-8 -26 -14 -48q-5 -19 -10.5 -37t-7.5 -25t-3 -15t1 -14.5 | ||
26 | -t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-5 19 -11 39h-368zM336 498v228q0 11 2.5 23t10 21.5t20.5 15.5t34 6h188q31 0 51.5 -14.5t20.5 -52.5v-227h-327z" /> | ||
27 | - | ||
28 | - | ||
29 | - | ||
30 | <glyph glyph-name="more" unicode="" d="M109.3993 511.067c49.7953 0 90.1676-40.3716 90.1676-90.1649s-40.3723-90.1659-90.1676-90.1659c-49.7973 0-90.1696 40.3726-90.1696 90.1659S59.603 511.067 109.3993 511.067zM515.1578 511.067c49.7953 0 90.1686-40.3716 90.1686-90.1649s-40.3723-90.1659-90.1686-90.1659c-49.7963 0-90.1696 40.3726-90.1696 90.1659S465.3616 511.067 515.1578 511.067zM920.9144 511.067c49.7963 0 90.1696-40.3716 90.1696-90.1649s-40.3723-90.1659-90.1696-90.1659c-49.7943 0-90.1686 40.3726-90.1686 90.1659S871.1201 511.067 920.9144 511.067z" horiz-adv-x="1000" /> | 23 | <glyph glyph-name="more" unicode="" d="M109.3993 511.067c49.7953 0 90.1676-40.3716 90.1676-90.1649s-40.3723-90.1659-90.1676-90.1659c-49.7973 0-90.1696 40.3726-90.1696 90.1659S59.603 511.067 109.3993 511.067zM515.1578 511.067c49.7953 0 90.1686-40.3716 90.1686-90.1649s-40.3723-90.1659-90.1686-90.1659c-49.7963 0-90.1696 40.3726-90.1696 90.1659S465.3616 511.067 515.1578 511.067zM920.9144 511.067c49.7963 0 90.1696-40.3716 90.1696-90.1649s-40.3723-90.1659-90.1696-90.1659c-49.7943 0-90.1686 40.3726-90.1686 90.1659S871.1201 511.067 920.9144 511.067z" horiz-adv-x="1000" /> |
31 | 24 | ||
32 | 25 | ||
@@ -270,6 +263,9 @@ t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q- | @@ -270,6 +263,9 @@ t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q- | ||
270 | <glyph glyph-name="2" unicode="" d="M561.511784 223.813189l109.097514 0 0-110.702703-109.097514 0 0 110.702703ZM888.942703 223.813189l109.097514 0 0-110.702703-109.097514 0 0 110.702703ZM561.594811 113.387243l109.097514 0 0-110.702703-109.097514 0 0 110.702703ZM437.524757 458.447568 0 458.447568 0 896l437.524757 0L437.524757 458.447568zM110.702703 569.15027l216.119351 0L326.822054 785.297297 110.702703 785.297297 110.702703 569.15027zM999.507027 458.087784 561.98227 458.087784 561.98227 895.612541l437.524757 0L999.507027 458.087784zM672.684973 568.790486l216.119351 0 0 216.147027-216.119351 0L672.684973 568.790486zM437.524757-105.776432 0-105.776432l0 437.552432 437.524757 0L437.524757-105.776432zM110.702703 4.92627l216.119351 0 0 216.147027L110.702703 221.073297 110.702703 4.92627zM561.207351 334.792649l221.405405 0 0-110.702703-221.405405 0 0 110.702703ZM888.942703 333.934703l109.097514 0 0-110.702703-109.097514 0 0 110.702703ZM779.540757 112.695351l109.097514 0 0-110.702703-109.097514 0 0 110.702703ZM562.065297 2.407784l217.945946 0 0-110.702703-217.945946 0 0 110.702703ZM888.942703 2.407784l109.097514 0 0-110.702703-109.097514 0 0 110.702703Z" horiz-adv-x="1024" /> | 263 | <glyph glyph-name="2" unicode="" d="M561.511784 223.813189l109.097514 0 0-110.702703-109.097514 0 0 110.702703ZM888.942703 223.813189l109.097514 0 0-110.702703-109.097514 0 0 110.702703ZM561.594811 113.387243l109.097514 0 0-110.702703-109.097514 0 0 110.702703ZM437.524757 458.447568 0 458.447568 0 896l437.524757 0L437.524757 458.447568zM110.702703 569.15027l216.119351 0L326.822054 785.297297 110.702703 785.297297 110.702703 569.15027zM999.507027 458.087784 561.98227 458.087784 561.98227 895.612541l437.524757 0L999.507027 458.087784zM672.684973 568.790486l216.119351 0 0 216.147027-216.119351 0L672.684973 568.790486zM437.524757-105.776432 0-105.776432l0 437.552432 437.524757 0L437.524757-105.776432zM110.702703 4.92627l216.119351 0 0 216.147027L110.702703 221.073297 110.702703 4.92627zM561.207351 334.792649l221.405405 0 0-110.702703-221.405405 0 0 110.702703ZM888.942703 333.934703l109.097514 0 0-110.702703-109.097514 0 0 110.702703ZM779.540757 112.695351l109.097514 0 0-110.702703-109.097514 0 0 110.702703ZM562.065297 2.407784l217.945946 0 0-110.702703-217.945946 0 0 110.702703ZM888.942703 2.407784l109.097514 0 0-110.702703-109.097514 0 0 110.702703Z" horiz-adv-x="1024" /> |
271 | 264 | ||
272 | 265 | ||
266 | + <glyph glyph-name="more-down" unicode="" d="M503.074 322.55100000000004a51.6864 51.6864 0 0 1 73.3184 0l369.707 370.492a52.224 52.224 0 0 1 0 73.6597 51.6693 51.6693 0 0 1-73.3184 0L539.716 432.93 206.652 766.703a51.6693 51.6693 0 0 1-73.3184 0 52.2667 52.2667 0 0 1 0-73.6597l369.741-370.492Zm369.707 122.871L539.716 111.65899999999999 206.652 445.423a51.6693 51.6693 0 0 1-73.3184 0 52.2496 52.2496 0 0 1 0-73.6427l369.732-370.492a51.7035 51.7035 0 0 1 73.3184 0l369.741 370.492a52.2581 52.2581 0 0 1 0 73.6427 51.7035 51.7035 0 0 1-73.344 0Z" horiz-adv-x="1079" /> | ||
267 | + | ||
268 | + | ||
273 | <glyph glyph-name="cuxiaobiaoqian" unicode="" d="M512 896C228.505967 896 0 667.494033 0 384 0 101.727924 228.505967-128 512-128 794.272076-128 1024 101.727924 1024 384 1024 667.494033 794.272076 896 512 896z m277.384248-526.663484l-85.536993-85.536993-51.322195 51.322195 64.763723 64.763724 1.221957 183.293556-182.071599-1.221957-277.384248-276.162292c-2.443914-2.443914-2.443914-7.331742 0-9.775656l171.073985-171.073986c3.665871-3.665871 6.109785-3.665871 9.775657 0L601.202864 285.02148l51.322196-51.322196-160.076373-161.298329c-15.885442-15.885442-36.658711-23.217184-57.431981-23.217184s-41.546539 7.331742-57.43198 23.217184l-171.073986 171.073985c-31.770883 31.770883-31.770883 81.871122 0 113.642005l296.935561 296.935561 287.159904 2.443914-1.221957-287.159904z" horiz-adv-x="1024" /> | 269 | <glyph glyph-name="cuxiaobiaoqian" unicode="" d="M512 896C228.505967 896 0 667.494033 0 384 0 101.727924 228.505967-128 512-128 794.272076-128 1024 101.727924 1024 384 1024 667.494033 794.272076 896 512 896z m277.384248-526.663484l-85.536993-85.536993-51.322195 51.322195 64.763723 64.763724 1.221957 183.293556-182.071599-1.221957-277.384248-276.162292c-2.443914-2.443914-2.443914-7.331742 0-9.775656l171.073985-171.073986c3.665871-3.665871 6.109785-3.665871 9.775657 0L601.202864 285.02148l51.322196-51.322196-160.076373-161.298329c-15.885442-15.885442-36.658711-23.217184-57.431981-23.217184s-41.546539 7.331742-57.43198 23.217184l-171.073986 171.073985c-31.770883 31.770883-31.770883 81.871122 0 113.642005l296.935561 296.935561 287.159904 2.443914-1.221957-287.159904z" horiz-adv-x="1024" /> |
274 | 270 | ||
275 | 271 |
No preview for this file type
No preview for this file type
@@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
17 | {{/ifcond}} | 17 | {{/ifcond}} |
18 | 18 | ||
19 | {{#ifcond status '===' 4}} | 19 | {{#ifcond status '===' 4}} |
20 | - <div class="btn more js-fellow">查看中奖信息</div> | 20 | + <div class="btn more js-fellow" data-id="{{act_prize_id}}">查看中奖信息</div> |
21 | {{/ifcond}} | 21 | {{/ifcond}} |
22 | 22 | ||
23 | {{#ifcond status '===' 5}} | 23 | {{#ifcond status '===' 5}} |
public/img/activity/yoluck/lottery-more.png
0 → 100644

3.37 KB
public/img/activity/yoluck/lottery.png
0 → 100644

6.35 KB
public/img/activity/yoluck/share-tip.png
0 → 100644

17 KB
public/img/passport/quick-login-logo.png
0 → 100644

21.3 KB
@@ -9,11 +9,13 @@ let formatCountDown = require('./yoluck/formatCountDown'); | @@ -9,11 +9,13 @@ let formatCountDown = require('./yoluck/formatCountDown'); | ||
9 | let YolukcApi = require('./yoluck/api'); | 9 | let YolukcApi = require('./yoluck/api'); |
10 | let api = new YolukcApi(); | 10 | let api = new YolukcApi(); |
11 | let tip = require('js/plugin/tip'); | 11 | let tip = require('js/plugin/tip'); |
12 | +let dialog = require('js/plugin/dialog'); | ||
12 | let yoSdk = require('yoho-activity-sdk'); | 13 | let yoSdk = require('yoho-activity-sdk'); |
13 | let yoho = require('js/yoho-app'); | 14 | let yoho = require('js/yoho-app'); |
14 | 15 | ||
15 | let Clipboard = require('clipboard'); | 16 | let Clipboard = require('clipboard'); |
16 | let makeShareData = require('./yoluck/share'); | 17 | let makeShareData = require('./yoluck/share'); |
18 | +let Lottery = require('./yoluck/lottery'); | ||
17 | let versionCompare = require('./yoluck/version'); | 19 | let versionCompare = require('./yoluck/version'); |
18 | 20 | ||
19 | function reload() { | 21 | function reload() { |
@@ -21,6 +23,7 @@ function reload() { | @@ -21,6 +23,7 @@ function reload() { | ||
21 | } | 23 | } |
22 | 24 | ||
23 | require('js/plugin/modal.alert'); | 25 | require('js/plugin/modal.alert'); |
26 | +require('js/common'); | ||
24 | 27 | ||
25 | let store = { | 28 | let store = { |
26 | running: false, | 29 | running: false, |
@@ -29,6 +32,9 @@ let store = { | @@ -29,6 +32,9 @@ let store = { | ||
29 | targetVersion: '6.8.3', | 32 | targetVersion: '6.8.3', |
30 | }; | 33 | }; |
31 | 34 | ||
35 | +let hideInfo = $('#hide-info').remove().data(); | ||
36 | + | ||
37 | +let $fellowBar = $('#fellow-bar'); | ||
32 | let $product = $('.product_name'); | 38 | let $product = $('.product_name'); |
33 | let name = $product.data('name'); | 39 | let name = $product.data('name'); |
34 | let img = $product.data('img'); | 40 | let img = $product.data('img'); |
@@ -37,6 +43,9 @@ let id = $product.data('id'); | @@ -37,6 +43,9 @@ let id = $product.data('id'); | ||
37 | let user; | 43 | let user; |
38 | let shareData; | 44 | let shareData; |
39 | 45 | ||
46 | +let lottery = new Lottery('#lottery-list'); | ||
47 | +let sharePlugin = require('js/common/share'); | ||
48 | + | ||
40 | loading.init($(document.body), {timeout: 20000}); | 49 | loading.init($(document.body), {timeout: 20000}); |
41 | new Swiper('.swiper-container', { | 50 | new Swiper('.swiper-container', { |
42 | direction: 'vertical', | 51 | direction: 'vertical', |
@@ -46,7 +55,14 @@ new Swiper('.swiper-container', { | @@ -46,7 +55,14 @@ new Swiper('.swiper-container', { | ||
46 | autoplay: 4000 | 55 | autoplay: 4000 |
47 | }); | 56 | }); |
48 | 57 | ||
49 | -function fellow() { | 58 | +function fellow(content) { |
59 | + if (content) { | ||
60 | + $.yAlert({ | ||
61 | + content: `<div class="fellow-tip-content">${content}</div>` // eslint-disable-line | ||
62 | + }); | ||
63 | + return; | ||
64 | + } | ||
65 | + | ||
50 | $.yAlert({ | 66 | $.yAlert({ |
51 | content: `<div>公众号 | 67 | content: `<div>公众号 |
52 | <span style="font-weight: bolder">“潮流有货”</span>已经复制成功,</div> | 68 | <span style="font-weight: bolder">“潮流有货”</span>已经复制成功,</div> |
@@ -71,8 +87,11 @@ function getUser() { | @@ -71,8 +87,11 @@ function getUser() { | ||
71 | imgUrl: img, | 87 | imgUrl: img, |
72 | price: price, | 88 | price: price, |
73 | shareUid: user && user.uid, | 89 | shareUid: user && user.uid, |
90 | + userName: hideInfo && hideInfo.username, | ||
74 | actPrizeId: id | 91 | actPrizeId: id |
75 | }); | 92 | }); |
93 | + | ||
94 | + sharePlugin(shareData.h5); | ||
76 | }); | 95 | }); |
77 | } catch (e) { | 96 | } catch (e) { |
78 | return Promise.resolve(); | 97 | return Promise.resolve(); |
@@ -81,6 +100,16 @@ function getUser() { | @@ -81,6 +100,16 @@ function getUser() { | ||
81 | 100 | ||
82 | getUser(); | 101 | getUser(); |
83 | 102 | ||
103 | +(function() { | ||
104 | + api.getDetailMyCode({id}).then(res => { | ||
105 | + if (res.code !== 200) { | ||
106 | + return; | ||
107 | + } | ||
108 | + | ||
109 | + lottery.print(res.data); | ||
110 | + }); | ||
111 | +}()); | ||
112 | + | ||
84 | function share() { | 113 | function share() { |
85 | if (yoSdk.env === 'app') { | 114 | if (yoSdk.env === 'app') { |
86 | // 由于app版本兼容性问题 | 115 | // 由于app版本兼容性问题 |
@@ -102,6 +131,9 @@ function share() { | @@ -102,6 +131,9 @@ function share() { | ||
102 | loading.hideLoading(); | 131 | loading.hideLoading(); |
103 | store.running = false; | 132 | store.running = false; |
104 | }); | 133 | }); |
134 | + } else if (/QQ/i.test(navigator.userAgent) || | ||
135 | + /MicroMessenger/i.test(navigator.userAgent)) { | ||
136 | + dialog.showDialog({hasClass: 'yoluck-guide-mask'}); | ||
105 | } else if (yoSdk.env === 'h5') { | 137 | } else if (yoSdk.env === 'h5') { |
106 | $('.js-clipbroad').trigger('click'); | 138 | $('.js-clipbroad').trigger('click'); |
107 | } | 139 | } |
@@ -137,20 +169,69 @@ let luckAlert = { | @@ -137,20 +169,69 @@ let luckAlert = { | ||
137 | } | 169 | } |
138 | }; | 170 | }; |
139 | 171 | ||
140 | -let clipboardFellow = new Clipboard('.js-fellow', { | ||
141 | - text: function() { | ||
142 | - return '潮流有货'; | 172 | +let fellowInfo = $fellowBar.data() || {}; |
173 | + | ||
174 | +if (+fellowInfo.type === 2) { | ||
175 | + $fellowBar.on('click', '.js-fellow', function() { | ||
176 | + if (fellowInfo.link) { | ||
177 | + window.location.href = fellowInfo.link; | ||
178 | + } | ||
179 | + }); | ||
180 | +} else { | ||
181 | + let clipboardFellow = new Clipboard('.js-fellow', { | ||
182 | + text: function() { | ||
183 | + return fellowInfo.copy || '潮流有货'; | ||
184 | + } | ||
185 | + }); | ||
186 | + | ||
187 | + clipboardFellow.on('success', function(e) { | ||
188 | + fellow(fellowInfo.tip); | ||
189 | + tip.show('内容已复制', 2000); | ||
190 | + e.clearSelection(); | ||
191 | + }); | ||
192 | +} | ||
193 | + | ||
194 | +(function() { | ||
195 | + let lotteryInfo = $('.js-lottery').data('lottery') || {}; | ||
196 | + let clipboardLottery = new Clipboard('.js-lottery', { | ||
197 | + text: function() { | ||
198 | + return lotteryInfo.h5Copy || '潮流有货'; | ||
199 | + } | ||
200 | + }); | ||
201 | + | ||
202 | + clipboardLottery.on('success', function(e) { | ||
203 | + fellow(lotteryInfo.h5Tip); | ||
204 | + tip.show('内容已复制', 2000); | ||
205 | + e.clearSelection(); | ||
206 | + }); | ||
207 | + | ||
208 | + let clickFn; | ||
209 | + | ||
210 | + if (lotteryInfo) { | ||
211 | + if (yoSdk.env === 'app' && lotteryInfo.app) { | ||
212 | + clickFn = function() { | ||
213 | + $.yAlert({ | ||
214 | + content: `<div>本期中奖号码: <span style="font-weight: bolder;">${lotteryInfo.app}</span></div>` // eslint-disable-line | ||
215 | + }); | ||
216 | + }; | ||
217 | + } else if (yoSdk.env === 'h5' && +lotteryInfo.h5Type) { | ||
218 | + if (+lotteryInfo.h5Type === 2 && lotteryInfo.h5Link) { | ||
219 | + clickFn = function() { | ||
220 | + window.location.href = lotteryInfo.h5Link; | ||
221 | + }; | ||
222 | + } | ||
223 | + } | ||
143 | } | 224 | } |
144 | -}); | ||
145 | 225 | ||
146 | -clipboardFellow.on('success', function(e) { | ||
147 | - fellow(); | ||
148 | - e.clearSelection(); | ||
149 | -}); | 226 | + if (clickFn) { |
227 | + clipboardLottery.destroy(); | ||
228 | + $('.js-lottery').on('click', clickFn); | ||
229 | + } | ||
230 | +}()); | ||
150 | 231 | ||
151 | let clipboardShare = new Clipboard('.js-clipbroad', { | 232 | let clipboardShare = new Clipboard('.js-clipbroad', { |
152 | text: function() { | 233 | text: function() { |
153 | - return shareData && shareData.h5.link; | 234 | + return shareData && shareData.h5.copyDeac; |
154 | } | 235 | } |
155 | }); | 236 | }); |
156 | 237 | ||
@@ -163,6 +244,11 @@ clipboardShare.on('success', function(e) { | @@ -163,6 +244,11 @@ clipboardShare.on('success', function(e) { | ||
163 | e.clearSelection(); | 244 | e.clearSelection(); |
164 | }); | 245 | }); |
165 | 246 | ||
247 | +if (window.cookie('yoluck_share') && store.shareUid) { | ||
248 | + window.setCookie('yoluck_share', null); | ||
249 | + share(); | ||
250 | +} | ||
251 | + | ||
166 | luckAlert.init(); | 252 | luckAlert.init(); |
167 | 253 | ||
168 | setInterval(() => { | 254 | setInterval(() => { |
@@ -185,6 +271,7 @@ $('.action-bar-comp').on('click', '.js-join', function() { | @@ -185,6 +271,7 @@ $('.action-bar-comp').on('click', '.js-join', function() { | ||
185 | store.running = true; | 271 | store.running = true; |
186 | api.getCode({shareUid: store.shareUid, ...yoSdk.getQueryObj()}).then(result => { | 272 | api.getCode({shareUid: store.shareUid, ...yoSdk.getQueryObj()}).then(result => { |
187 | if (result.code === 200) { | 273 | if (result.code === 200) { |
274 | + lottery.print(result.data); | ||
188 | luckAlert.show(result.data.prizeCode); | 275 | luckAlert.show(result.data.prizeCode); |
189 | } else { | 276 | } else { |
190 | if (result.code === 400) { | 277 | if (result.code === 400) { |
1 | import 'scss/activity/yoluck/yoluck-list.page.scss'; | 1 | import 'scss/activity/yoluck/yoluck-list.page.scss'; |
2 | 2 | ||
3 | -const cookie = require('yoho-cookie'); | ||
4 | const loading = require('js/plugin/loading'); | 3 | const loading = require('js/plugin/loading'); |
5 | let $ = require('yoho-jquery'); | 4 | let $ = require('yoho-jquery'); |
6 | let Api = require('./yoluck/api'); | 5 | let Api = require('./yoluck/api'); |
@@ -10,12 +9,11 @@ let timeCountDownTpl = require('hbs/activity/yoluck/time-countdown.hbs'); | @@ -10,12 +9,11 @@ let timeCountDownTpl = require('hbs/activity/yoluck/time-countdown.hbs'); | ||
10 | let formatCountDown = require('./yoluck/formatCountDown'); | 9 | let formatCountDown = require('./yoluck/formatCountDown'); |
11 | let yoSdk = require('yoho-activity-sdk'); | 10 | let yoSdk = require('yoho-activity-sdk'); |
12 | let yoho = require('js/yoho-app'); | 11 | let yoho = require('js/yoho-app'); |
13 | -const tip = require('js/plugin/tip'); | ||
14 | -const makeShareData = require('./yoluck/share'); | ||
15 | const DETAIL_URI = location.protocol + '//m.yohobuy.com/activity/yoluck'; | 12 | const DETAIL_URI = location.protocol + '//m.yohobuy.com/activity/yoluck'; |
16 | 13 | ||
14 | +let tip = require('js/plugin/tip'); | ||
17 | let Clipboard = require('clipboard'); | 15 | let Clipboard = require('clipboard'); |
18 | -let versionCompare = require('./yoluck/version'); | 16 | +let publicCopyInfo = ''; |
19 | 17 | ||
20 | require('js/plugin/modal.alert'); | 18 | require('js/plugin/modal.alert'); |
21 | 19 | ||
@@ -52,8 +50,24 @@ let tabpanelStore = { | @@ -52,8 +50,24 @@ let tabpanelStore = { | ||
52 | footer: null | 50 | footer: null |
53 | }; | 51 | }; |
54 | 52 | ||
55 | -let currentVersion = cookie.get('app_version'); | ||
56 | -let targetVersion = '6.8.3'; | 53 | +let prizeListStore = { |
54 | + push(arr) { | ||
55 | + if (!arr || !arr.length) { | ||
56 | + return; | ||
57 | + } | ||
58 | + | ||
59 | + this.list = this.list || {}; | ||
60 | + | ||
61 | + $.each(arr, (index, value) => { | ||
62 | + if (value && value.act_prize_id) { | ||
63 | + this.list[value.act_prize_id] = value; | ||
64 | + } | ||
65 | + }); | ||
66 | + }, | ||
67 | + get(id) { | ||
68 | + return this.list && this.list[id]; | ||
69 | + } | ||
70 | +}; | ||
57 | 71 | ||
58 | function initStore() { | 72 | function initStore() { |
59 | // 初始化为 | 73 | // 初始化为 |
@@ -125,6 +139,8 @@ function fetchPage(page, index) { | @@ -125,6 +139,8 @@ function fetchPage(page, index) { | ||
125 | let $node = tabpanelStore.nodes.eq(index); | 139 | let $node = tabpanelStore.nodes.eq(index); |
126 | let $products = prizeListTpl({running: result.data[0], finished: result.data[1]}); | 140 | let $products = prizeListTpl({running: result.data[0], finished: result.data[1]}); |
127 | 141 | ||
142 | + prizeListStore.push(result.data[1]); | ||
143 | + | ||
128 | $node.find('.js-panel-body').html($products); | 144 | $node.find('.js-panel-body').html($products); |
129 | } else { | 145 | } else { |
130 | let $node = tabpanelStore.nodes.eq(index); | 146 | let $node = tabpanelStore.nodes.eq(index); |
@@ -180,7 +196,40 @@ function onReachBottom(type) { | @@ -180,7 +196,40 @@ function onReachBottom(type) { | ||
180 | fetchPage(page, store.tabIndex); | 196 | fetchPage(page, store.tabIndex); |
181 | } | 197 | } |
182 | 198 | ||
183 | -function fellow() { | 199 | +function fellow(id, lottery) { |
200 | + let info = prizeListStore.get(id); | ||
201 | + let lotteryInfo; | ||
202 | + | ||
203 | + if (info && info.lottery_info) { | ||
204 | + try { | ||
205 | + lotteryInfo = $.parseJSON(info.lottery_info); | ||
206 | + } catch(e) {} // eslint-disable-line | ||
207 | + } | ||
208 | + | ||
209 | + lotteryInfo = lotteryInfo || lottery; | ||
210 | + | ||
211 | + if (lotteryInfo) { | ||
212 | + if (yoSdk.env === 'app' && lotteryInfo.app) { | ||
213 | + $.yAlert({ | ||
214 | + content: `<div class="modal-view-lottery">本期中奖号码: <span style="font-weight: bolder;">${lotteryInfo.app}</span></div>` // eslint-disable-line | ||
215 | + }); | ||
216 | + return; | ||
217 | + } else if (yoSdk.env === 'h5' && +lotteryInfo.h5Type) { | ||
218 | + if (+lotteryInfo.h5Type === 1) { | ||
219 | + $.yAlert({ | ||
220 | + content: `<div class="modal-view-lottery">${lotteryInfo.h5Tip}</div>` // eslint-disable-line | ||
221 | + }); | ||
222 | + | ||
223 | + publicCopyInfo = lotteryInfo.h5Copy || ''; | ||
224 | + $('.js-clipbroad').trigger('click'); | ||
225 | + } else if (lotteryInfo.h5Link) { | ||
226 | + window.location.href = lotteryInfo.h5Link; | ||
227 | + } | ||
228 | + | ||
229 | + return; | ||
230 | + } | ||
231 | + } | ||
232 | + | ||
184 | $.yAlert({ | 233 | $.yAlert({ |
185 | content: `<div>微信搜索公众号</div> | 234 | content: `<div>微信搜索公众号</div> |
186 | <div><span style="font-weight: bolder;">“潮流有货”</span>并关注,发送</div> | 235 | <div><span style="font-weight: bolder;">“潮流有货”</span>并关注,发送</div> |
@@ -188,10 +237,6 @@ function fellow() { | @@ -188,10 +237,6 @@ function fellow() { | ||
188 | }); | 237 | }); |
189 | } | 238 | } |
190 | 239 | ||
191 | -function alertVersion() { | ||
192 | - $.yAlert({content: '您的版本较低,请更新最新版本体验'}); | ||
193 | -} | ||
194 | - | ||
195 | function getUser() { | 240 | function getUser() { |
196 | try { | 241 | try { |
197 | if (store.user) { | 242 | if (store.user) { |
@@ -209,61 +254,20 @@ function getUser() { | @@ -209,61 +254,20 @@ function getUser() { | ||
209 | } | 254 | } |
210 | } | 255 | } |
211 | 256 | ||
212 | -function share($el) { | ||
213 | - let name = $el.data('name'); | ||
214 | - let img = $el.data('img'); | ||
215 | - let price = $el.data('price'); | ||
216 | - let id = $el.data('id'); | ||
217 | - | ||
218 | - store.shareData = makeShareData({ | ||
219 | - name, | ||
220 | - imgUrl: img, | ||
221 | - price: price, | ||
222 | - actPrizeId: id, | ||
223 | - shareUid: store.user && store.user.uid | ||
224 | - }); | ||
225 | - | ||
226 | - if (yoSdk.env === 'app') { | ||
227 | - // 由于app版本兼容性问题 | ||
228 | - if (versionCompare(currentVersion, targetVersion) < 0) { | ||
229 | - alertVersion(); | ||
230 | - return; | ||
231 | - } | ||
232 | - loading.showLoading(); | ||
233 | - if (store.running) { | ||
234 | - return; | ||
235 | - } | ||
236 | - | ||
237 | - store.running = true; | ||
238 | - | ||
239 | - getUser().then(() => { | ||
240 | - yoho.invokeMethod('go.showshareaction', store.shareData && store.shareData.app); | ||
241 | - loading.hideLoading(); | ||
242 | - | ||
243 | - store.running = false; | ||
244 | - }); | ||
245 | - } else if (yoSdk.env === 'h5') { | ||
246 | - $('.js-clipbroad').trigger('click'); | ||
247 | - } | ||
248 | -} | ||
249 | - | ||
250 | bus$.add(onTabClick); | 257 | bus$.add(onTabClick); |
251 | bus$.add(onReachBottom); | 258 | bus$.add(onReachBottom); |
252 | 259 | ||
253 | function initClipboard() { | 260 | function initClipboard() { |
254 | - let clipboardShare = new Clipboard('.js-clipbroad', { | 261 | + let _clipboard = new Clipboard('.js-clipbroad', { |
255 | text: function() { | 262 | text: function() { |
256 | - return store.shareData && store.shareData.h5.link; | 263 | + return publicCopyInfo; |
257 | } | 264 | } |
258 | }); | 265 | }); |
259 | 266 | ||
260 | - clipboardShare.on('success', function(e) { | ||
261 | - if (yoSdk.env === 'app') { | ||
262 | - return; | 267 | + _clipboard.on('success', function() { |
268 | + if (publicCopyInfo) { | ||
269 | + tip.show('内容已复制', 2000); | ||
263 | } | 270 | } |
264 | - | ||
265 | - tip.show('复制成功,发送给好友为您助力', 3500); | ||
266 | - e.clearSelection(); | ||
267 | }); | 271 | }); |
268 | } | 272 | } |
269 | 273 | ||
@@ -308,12 +312,8 @@ $tabpanel | @@ -308,12 +312,8 @@ $tabpanel | ||
308 | 312 | ||
309 | return false; | 313 | return false; |
310 | }) | 314 | }) |
311 | - .on('click', '.js-share', function() { | ||
312 | - share($(this)); | ||
313 | - return false; | ||
314 | - }) | ||
315 | .on('click', '.js-fellow', function() { | 315 | .on('click', '.js-fellow', function() { |
316 | - fellow(); | 316 | + fellow($(this).data('id'), $(this).data('lottery')); |
317 | return false; | 317 | return false; |
318 | }); | 318 | }); |
319 | 319 |
@@ -18,6 +18,10 @@ class Api { | @@ -18,6 +18,10 @@ class Api { | ||
18 | getCode(params) { | 18 | getCode(params) { |
19 | return $.post('', params); | 19 | return $.post('', params); |
20 | } | 20 | } |
21 | + | ||
22 | + getDetailMyCode(params) { | ||
23 | + return $.post(this.url + '/detail/mylist.html', params); | ||
24 | + } | ||
21 | } | 25 | } |
22 | 26 | ||
23 | module.exports = Api; | 27 | module.exports = Api; |
public/js/activity/yoluck/lottery.js
0 → 100644
1 | +let $ = require('yoho-jquery'); | ||
2 | + | ||
3 | +class Lottery { | ||
4 | + constructor(seletor) { | ||
5 | + this.$list = $(seletor); | ||
6 | + | ||
7 | + if (!this.$list.length) { | ||
8 | + return; | ||
9 | + } | ||
10 | + | ||
11 | + this.$block = this.$list.parent(); | ||
12 | + this.$tpl = this.$list.find('.lottery-tpl'); | ||
13 | + this.tpl = this.$tpl.prop('outerHTML'); | ||
14 | + } | ||
15 | + | ||
16 | + print(lottery) { | ||
17 | + if (!this.$list.length) { | ||
18 | + return; | ||
19 | + } | ||
20 | + | ||
21 | + if (lottery) { | ||
22 | + if (!Array.isArray(lottery)) { | ||
23 | + lottery = [lottery]; | ||
24 | + } | ||
25 | + | ||
26 | + if (lottery.length > 3) { | ||
27 | + lottery.length = 3; | ||
28 | + this.$list.addClass('more'); | ||
29 | + } | ||
30 | + | ||
31 | + for (let i = 0; i < lottery.length; i++) { | ||
32 | + let info = lottery[i]; | ||
33 | + | ||
34 | + if (!info || !info.prizeCode) { | ||
35 | + return; | ||
36 | + } | ||
37 | + | ||
38 | + let $lottery = $(this.tpl).removeClass('lottery-tpl'); | ||
39 | + | ||
40 | + $lottery.find('.l-code').text(info.prizeCode); | ||
41 | + $lottery.find('.l-thumb').html('<img src="' + info.userThumb + '">'); | ||
42 | + | ||
43 | + this.$tpl.after($lottery); | ||
44 | + } | ||
45 | + } | ||
46 | + | ||
47 | + this.$block.animate({ | ||
48 | + height: this.$list.height() | ||
49 | + }, this.$list.children().length * 300); | ||
50 | + } | ||
51 | +} | ||
52 | + | ||
53 | +module.exports = Lottery; |
@@ -12,38 +12,43 @@ function h5Path(shareUid, actPrizeId) { | @@ -12,38 +12,43 @@ function h5Path(shareUid, actPrizeId) { | ||
12 | return location.protocol + `//m.yohobuy.com/activity/yoluck/${actPrizeId}.html?shareUid=${shareUid}`; | 12 | return location.protocol + `//m.yohobuy.com/activity/yoluck/${actPrizeId}.html?shareUid=${shareUid}`; |
13 | } | 13 | } |
14 | 14 | ||
15 | -function h5Name(name) { | ||
16 | - return `【0元抽奖】${name}`; | 15 | +function shareName(userName) { |
16 | + return `${userName || ''}邀请你参加0元抽奖活动`; | ||
17 | } | 17 | } |
18 | 18 | ||
19 | -function h5Desc(name) { | ||
20 | - return `【限时抽奖】0元免费拿${name}`; | 19 | +function shareDesc(name) { |
20 | + return `奖品:${name}`; | ||
21 | } | 21 | } |
22 | 22 | ||
23 | -function shareData({name, imgUrl, price, shareUid, actPrizeId}) { | 23 | +function shareData({name, imgUrl, price, shareUid, userName, actPrizeId}) { |
24 | + let link = h5Path(shareUid, actPrizeId); | ||
24 | let urls = imgUrl.split('?'); | 25 | let urls = imgUrl.split('?'); |
25 | let shareImg = urls[0] || imgUrl; | 26 | let shareImg = urls[0] || imgUrl; |
26 | 27 | ||
27 | if (urls[0]) { | 28 | if (urls[0]) { |
28 | shareImg = `${shareImg}?imageView2/2/w/375/h/235/q/60`; | 29 | shareImg = `${shareImg}?imageView2/2/w/375/h/235/q/60`; |
29 | } | 30 | } |
31 | + | ||
32 | + userName = userName || ''; | ||
33 | + | ||
30 | return { | 34 | return { |
31 | app: { | 35 | app: { |
32 | shareType: 'yoluck', | 36 | shareType: 'yoluck', |
33 | - title: name, | 37 | + title: shareName(userName), |
34 | imgUrl: shareImg, | 38 | imgUrl: shareImg, |
35 | market_price: price, | 39 | market_price: price, |
36 | miniProgramUrl: miniPath(shareUid, actPrizeId), | 40 | miniProgramUrl: miniPath(shareUid, actPrizeId), |
37 | miniProgramQCodeUrl: miniQrcode(shareUid, actPrizeId), | 41 | miniProgramQCodeUrl: miniQrcode(shareUid, actPrizeId), |
38 | - link: h5Path(shareUid, actPrizeId), | ||
39 | - desc: h5Desc(name), | 42 | + link: link, |
43 | + desc: shareDesc(name), | ||
40 | hideType: ['7', '8', '9'] | 44 | hideType: ['7', '8', '9'] |
41 | }, | 45 | }, |
42 | h5: { | 46 | h5: { |
43 | - title: h5Name(name), | 47 | + title: shareName(userName), |
44 | imgUrl: imgUrl, | 48 | imgUrl: imgUrl, |
45 | - link: h5Path(shareUid, actPrizeId), | ||
46 | - desc: h5Desc(name) | 49 | + link: link, |
50 | + desc: shareDesc(name), | ||
51 | + copyDeac: `【0元抽奖】点一下免费拿走${name} ${link} (分享自@Yoho!Buy有货APP)` | ||
47 | } | 52 | } |
48 | }; | 53 | }; |
49 | } | 54 | } |
@@ -13,6 +13,8 @@ const validate = new Validate($captcha, { | @@ -13,6 +13,8 @@ const validate = new Validate($captcha, { | ||
13 | } | 13 | } |
14 | }); | 14 | }); |
15 | 15 | ||
16 | +require('../login/wechat-quick-login'); | ||
17 | + | ||
16 | class SmsLoginNew extends Page { | 18 | class SmsLoginNew extends Page { |
17 | constructor() { | 19 | constructor() { |
18 | super(); | 20 | super(); |
1 | 1 | ||
2 | .fellow-bar-comp { | 2 | .fellow-bar-comp { |
3 | + height: 66px; | ||
4 | + | ||
3 | .fellow-bar { | 5 | .fellow-bar { |
4 | display: flex; | 6 | display: flex; |
5 | justify-content: space-between; | 7 | justify-content: space-between; |
@@ -12,19 +14,32 @@ | @@ -12,19 +14,32 @@ | ||
12 | } | 14 | } |
13 | 15 | ||
14 | .title { | 16 | .title { |
17 | + max-width: 76%; | ||
15 | color: white; | 18 | color: white; |
16 | font-size: 20px; | 19 | font-size: 20px; |
17 | margin-bottom: 0 !important; | 20 | margin-bottom: 0 !important; |
21 | + text-overflow: -o-ellipsis-lastline; | ||
22 | + overflow: hidden; | ||
23 | + text-overflow: ellipsis; | ||
24 | + display: -webkit-box; | ||
25 | + -webkit-line-clamp: 2; | ||
26 | + line-clamp: 2; | ||
27 | + -webkit-box-orient: vertical; | ||
18 | } | 28 | } |
19 | 29 | ||
20 | .btn { | 30 | .btn { |
31 | + max-width: 160px; | ||
21 | display: inline-block; | 32 | display: inline-block; |
22 | color: white; | 33 | color: white; |
23 | - width: 100px; | 34 | + padding: 0 16px; |
24 | height: 40px; | 35 | height: 40px; |
25 | font-size: 24px; | 36 | font-size: 24px; |
26 | line-height: 40px; | 37 | line-height: 40px; |
27 | background-color: #d0021b; | 38 | background-color: #d0021b; |
28 | text-align: center; | 39 | text-align: center; |
40 | + overflow: hidden; | ||
41 | + text-overflow: ellipsis; | ||
42 | + white-space: nowrap; | ||
43 | + box-sizing: border-box; | ||
29 | } | 44 | } |
30 | } | 45 | } |
1 | +.lottery-machine { | ||
2 | + position: relatve; | ||
3 | + display: flex; | ||
4 | + justify-content: center; | ||
5 | + | ||
6 | + .machine { | ||
7 | + width: 620px; | ||
8 | + min-height: 300px; | ||
9 | + margin-right: -20px; | ||
10 | + | ||
11 | + > img { | ||
12 | + width: 100%; | ||
13 | + position: relative; | ||
14 | + z-index: -1; | ||
15 | + } | ||
16 | + } | ||
17 | + | ||
18 | + .lottery-block { | ||
19 | + width: 414px; | ||
20 | + margin-left: 84px; | ||
21 | + margin-top: -146px; | ||
22 | + overflow: hidden; | ||
23 | + height: 0; | ||
24 | + position: relative; | ||
25 | + z-index: 1; | ||
26 | + | ||
27 | + &:before { | ||
28 | + content: ""; | ||
29 | + width: 100%; | ||
30 | + height: 10px; | ||
31 | + position: absolute; | ||
32 | + left: 0; | ||
33 | + top: -12px; | ||
34 | + z-index: 10; | ||
35 | + box-shadow: 0 10px 20px #000; | ||
36 | + } | ||
37 | + } | ||
38 | + | ||
39 | + .lottery-list { | ||
40 | + position: absolute; | ||
41 | + bottom: 0; | ||
42 | + | ||
43 | + .lottery:first-child { | ||
44 | + margin-top: -144px; | ||
45 | + } | ||
46 | + | ||
47 | + .lottery { | ||
48 | + width: 414px; | ||
49 | + height: 166px; | ||
50 | + background: url("img/activity/yoluck/lottery.png"); | ||
51 | + background-size: 100% 100%; | ||
52 | + margin-top: -14px; | ||
53 | + padding: 0 20px 10px; | ||
54 | + display: flex; | ||
55 | + align-items: center; | ||
56 | + | ||
57 | + .l-thumb { | ||
58 | + width: 60px; | ||
59 | + height: 60px; | ||
60 | + border-radius: 50%; | ||
61 | + overflow: hidden; | ||
62 | + margin-left: 14px; | ||
63 | + background-image: url("//img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif"); | ||
64 | + background-size: 100% 100%; | ||
65 | + } | ||
66 | + | ||
67 | + .l-title { | ||
68 | + font-size: 16px; | ||
69 | + margin-left: 8px; | ||
70 | + } | ||
71 | + | ||
72 | + .l-code { | ||
73 | + font-size: 30px; | ||
74 | + color: #222; | ||
75 | + flex-grow: 1; | ||
76 | + text-align: center; | ||
77 | + } | ||
78 | + } | ||
79 | + | ||
80 | + .more-lottery { | ||
81 | + font-size: 22px; | ||
82 | + line-height: 60px; | ||
83 | + text-align: center; | ||
84 | + color: #555; | ||
85 | + display: none; | ||
86 | + | ||
87 | + &:before { | ||
88 | + content: ""; | ||
89 | + width: 100%; | ||
90 | + height: 40px; | ||
91 | + margin-top: -40px; | ||
92 | + background: url("img/activity/yoluck/lottery-more.png"); | ||
93 | + background-size: 100%; | ||
94 | + background-repeat: no-repeat; | ||
95 | + display: block; | ||
96 | + position: relative; | ||
97 | + z-index: -1; | ||
98 | + } | ||
99 | + | ||
100 | + a { | ||
101 | + display: block; | ||
102 | + width: 100%; | ||
103 | + } | ||
104 | + } | ||
105 | + | ||
106 | + &.more { | ||
107 | + .lottery:last-child { | ||
108 | + background-color: #eee; | ||
109 | + } | ||
110 | + | ||
111 | + .more-lottery { | ||
112 | + display: block; | ||
113 | + } | ||
114 | + } | ||
115 | + } | ||
116 | +} |
@@ -14,13 +14,14 @@ | @@ -14,13 +14,14 @@ | ||
14 | color: #444; | 14 | color: #444; |
15 | margin-left: 32px; | 15 | margin-left: 32px; |
16 | margin-right: 32px; | 16 | margin-right: 32px; |
17 | + text-align: left; | ||
17 | } | 18 | } |
18 | 19 | ||
19 | .product_lucky_bg { | 20 | .product_lucky_bg { |
20 | display: flex; | 21 | display: flex; |
21 | flex-direction: row; | 22 | flex-direction: row; |
22 | align-items: baseline; | 23 | align-items: baseline; |
23 | - justify-content: center; | 24 | + justify-content: space-between; |
24 | margin-left: 32px; | 25 | margin-left: 32px; |
25 | margin-right: 32px; | 26 | margin-right: 32px; |
26 | } | 27 | } |
1 | @import "help"; | 1 | @import "help"; |
2 | @import "product-detail-header"; | 2 | @import "product-detail-header"; |
3 | +@import "lottery-machine"; | ||
3 | @import "desc"; | 4 | @import "desc"; |
4 | @import "more"; | 5 | @import "more"; |
5 | @import "fellow-bar"; | 6 | @import "fellow-bar"; |
@@ -24,7 +25,6 @@ | @@ -24,7 +25,6 @@ | ||
24 | position: relative; | 25 | position: relative; |
25 | text-align: center; | 26 | text-align: center; |
26 | overflow: hidden; | 27 | overflow: hidden; |
27 | - margin-top: 56px; | ||
28 | } | 28 | } |
29 | 29 | ||
30 | .help { | 30 | .help { |
@@ -113,3 +113,23 @@ | @@ -113,3 +113,23 @@ | ||
113 | text-align: center; | 113 | text-align: center; |
114 | border-top: 1px solid #e0e0e0; | 114 | border-top: 1px solid #e0e0e0; |
115 | } | 115 | } |
116 | + | ||
117 | +.dialog-wrapper .dialog-box.yoluck-guide-mask { | ||
118 | + width: 284px; | ||
119 | + height: 278px; | ||
120 | + background: url("img/activity/yoluck/share-tip.png"); | ||
121 | + background-size: 100% 100%; | ||
122 | + margin: 0 !important; | ||
123 | + border: 0; | ||
124 | + right: 92px; | ||
125 | + top: 28px !important; | ||
126 | + left: auto; | ||
127 | + | ||
128 | + > * { | ||
129 | + display: none !important; | ||
130 | + } | ||
131 | +} | ||
132 | + | ||
133 | +.yoho-tip { | ||
134 | + top: 350px; | ||
135 | +} |
@@ -79,3 +79,17 @@ | @@ -79,3 +79,17 @@ | ||
79 | .bottom-banner { | 79 | .bottom-banner { |
80 | width: 100%; | 80 | width: 100%; |
81 | } | 81 | } |
82 | + | ||
83 | +.bottom-banner-img { | ||
84 | + width: 100%; | ||
85 | + height: 234px; | ||
86 | +} | ||
87 | + | ||
88 | +.modal-view-lottery { | ||
89 | + padding-top: 20px; | ||
90 | + word-break: break-all; | ||
91 | +} | ||
92 | + | ||
93 | +.yoho-tip { | ||
94 | + top: 350px; | ||
95 | +} |
@@ -10,4 +10,31 @@ | @@ -10,4 +10,31 @@ | ||
10 | background: url("img/common/404.png") no-repeat; | 10 | background: url("img/common/404.png") no-repeat; |
11 | background-size: 100% 100%; | 11 | background-size: 100% 100%; |
12 | } | 12 | } |
13 | + | ||
14 | + .err-refresh { | ||
15 | + margin-top: -250px; | ||
16 | + } | ||
17 | + | ||
18 | + .refresh-wrap { | ||
19 | + width: 460px; | ||
20 | + position: absolute; | ||
21 | + left: 50%; | ||
22 | + top: 100%; | ||
23 | + margin-left: -230px; | ||
24 | + text-align: center; | ||
25 | + | ||
26 | + .refresh-msg { | ||
27 | + line-height: 1.4; | ||
28 | + padding: 20px 0; | ||
29 | + } | ||
30 | + | ||
31 | + .refresh-btn { | ||
32 | + width: 200px; | ||
33 | + line-height: 60px; | ||
34 | + background-color: #414141; | ||
35 | + display: block; | ||
36 | + color: #fff; | ||
37 | + margin: 10px auto; | ||
38 | + } | ||
39 | + } | ||
13 | } | 40 | } |
@@ -100,7 +100,7 @@ button { | @@ -100,7 +100,7 @@ button { | ||
100 | color: #fff; | 100 | color: #fff; |
101 | font-size: 24px; | 101 | font-size: 24px; |
102 | border: none; | 102 | border: none; |
103 | - z-index: 100; | 103 | + z-index: 1000; |
104 | box-sizing: border-box; | 104 | box-sizing: border-box; |
105 | border-radius: 10PX; | 105 | border-radius: 10PX; |
106 | } | 106 | } |
public/scss/passport/wechat-quick-login.scss
0 → 100644
1 | +.wechat-quick-wrap { | ||
2 | + position: fixed; | ||
3 | + top: 0; | ||
4 | + bottom: 0; | ||
5 | + left: 0; | ||
6 | + right: 0; | ||
7 | + background: #fff; | ||
8 | + z-index: 9999; | ||
9 | + display: flex; | ||
10 | + justify-content: center; | ||
11 | + align-items: center; | ||
12 | + | ||
13 | + .quick-login-main { | ||
14 | + width: 100%; | ||
15 | + margin-top: -50px; | ||
16 | + } | ||
17 | + | ||
18 | + .quick-login-logo { | ||
19 | + width: 372px; | ||
20 | + height: 374px; | ||
21 | + background-image: url("img/passport/quick-login-logo.png"); | ||
22 | + background-size: 100% 100%; | ||
23 | + margin: auto; | ||
24 | + margin-bottom: 180px; | ||
25 | + } | ||
26 | + | ||
27 | + .quick-btn { | ||
28 | + width: 68%; | ||
29 | + height: 80px; | ||
30 | + color: #fff; | ||
31 | + line-height: 82px; | ||
32 | + background-color: #444; | ||
33 | + margin: 30px auto; | ||
34 | + text-align: center; | ||
35 | + border-radius: 40px; | ||
36 | + overflow: hidden; | ||
37 | + | ||
38 | + a { | ||
39 | + width: 100%; | ||
40 | + color: #fff; | ||
41 | + display: block; | ||
42 | + } | ||
43 | + } | ||
44 | +} |
This diff could not be displayed because it is too large.
-
Please register or login to post a comment