Merge branch 'hotfix/classtip' into 'gray'
Hotfix/classtip See merge request !1347
Showing
4 changed files
with
33 additions
and
8 deletions
@@ -11,6 +11,7 @@ const moment = require('moment'); | @@ -11,6 +11,7 @@ const moment = require('moment'); | ||
11 | const mRoot = '../models'; | 11 | const mRoot = '../models'; |
12 | const headerModel = require('../../../doraemon/models/header'); | 12 | const headerModel = require('../../../doraemon/models/header'); |
13 | const seckillModel = require(`${mRoot}/seckill`); | 13 | const seckillModel = require(`${mRoot}/seckill`); |
14 | +const _ = require('lodash'); | ||
14 | 15 | ||
15 | let headerData = headerModel.setNav({ | 16 | let headerData = headerModel.setNav({ |
16 | navTitle: '秒杀活动', | 17 | navTitle: '秒杀活动', |
@@ -18,6 +19,16 @@ let headerData = headerModel.setNav({ | @@ -18,6 +19,16 @@ let headerData = headerModel.setNav({ | ||
18 | }); | 19 | }); |
19 | 20 | ||
20 | /** | 21 | /** |
22 | + * hotfix ios 6.5.5 版本隐藏设置提醒按钮 | ||
23 | + */ | ||
24 | +const _iosHideRemindBtn = (products) => { | ||
25 | + return _.map(products, goods => { | ||
26 | + goods.hideRemind = true; | ||
27 | + return goods; | ||
28 | + }); | ||
29 | +}; | ||
30 | + | ||
31 | +/** | ||
21 | * [时间缺0补0] | 32 | * [时间缺0补0] |
22 | */ | 33 | */ |
23 | const _timeFormat = (tick) => { | 34 | const _timeFormat = (tick) => { |
@@ -228,6 +239,10 @@ const indexData = (req, res, next) => { | @@ -228,6 +239,10 @@ const indexData = (req, res, next) => { | ||
228 | return fetchProductList(activityInfo, uid).then((resultProducts) => { | 239 | return fetchProductList(activityInfo, uid).then((resultProducts) => { |
229 | result.products = resultProducts; | 240 | result.products = resultProducts; |
230 | 241 | ||
242 | + if (/^6.5.5/.test(req.query.app_version) && req.query.client_type === 'iphone') { | ||
243 | + result.products = _iosHideRemindBtn(resultProducts); | ||
244 | + } | ||
245 | + | ||
231 | res.json(result); | 246 | res.json(result); |
232 | }); | 247 | }); |
233 | }); | 248 | }); |
@@ -256,6 +271,9 @@ const getProductList = (req, res, next) => { | @@ -256,6 +271,9 @@ const getProductList = (req, res, next) => { | ||
256 | }; | 271 | }; |
257 | 272 | ||
258 | return fetchProductList(activityInfo, uid).then(resultProducts => { | 273 | return fetchProductList(activityInfo, uid).then(resultProducts => { |
274 | + if (/^6.5.5/.test(req.query.app_version) && req.query.client_type === 'iphone') { | ||
275 | + resultProducts = _iosHideRemindBtn(resultProducts); | ||
276 | + } | ||
259 | res.json({products: resultProducts}); | 277 | res.json({products: resultProducts}); |
260 | }).catch(error => { | 278 | }).catch(error => { |
261 | logger.error(error); | 279 | logger.error(error); |
@@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
4 | <span class="tag">{{tag}}</span> | 4 | <span class="tag">{{tag}}</span> |
5 | <img src="{{image2 image mode=2 q=60}}"> | 5 | <img src="{{image2 image mode=2 q=60}}"> |
6 | <div class="info"> | 6 | <div class="info"> |
7 | - <span class="name">{{name}}</span> | 7 | + <span class="name eps">{{name}}</span> |
8 | {{#if free}} | 8 | {{#if free}} |
9 | <span class="free">免费</span> | 9 | <span class="free">免费</span> |
10 | {{else}} | 10 | {{else}} |
@@ -32,4 +32,4 @@ | @@ -32,4 +32,4 @@ | ||
32 | </div> | 32 | </div> |
33 | </a> | 33 | </a> |
34 | </div> | 34 | </div> |
35 | -</div> | ||
35 | +</div> |
@@ -11,6 +11,7 @@ let $ = require('yoho-jquery'), | @@ -11,6 +11,7 @@ let $ = require('yoho-jquery'), | ||
11 | loading = require('plugin/loading'), | 11 | loading = require('plugin/loading'), |
12 | lazyload = require('yoho-jquery-lazyload'), | 12 | lazyload = require('yoho-jquery-lazyload'), |
13 | tip = require('plugin/tip'); | 13 | tip = require('plugin/tip'); |
14 | +let qs = require('yoho-qs'); | ||
14 | 15 | ||
15 | loading.init($(document.body)); | 16 | loading.init($(document.body)); |
16 | 17 | ||
@@ -243,16 +244,22 @@ seckillObj = { | @@ -243,16 +244,22 @@ seckillObj = { | ||
243 | refreshProductList: function(activityId, startTime) { | 244 | refreshProductList: function(activityId, startTime) { |
244 | let self = this; | 245 | let self = this; |
245 | let url = '/product/seckill/get-product-list'; | 246 | let url = '/product/seckill/get-product-list'; |
247 | + let reqData = { | ||
248 | + uid: yoho.isLogin(), // only app use; | ||
249 | + activityId: activityId, | ||
250 | + startTime: startTime | ||
251 | + }; | ||
252 | + | ||
253 | + if (qs.app_version && qs.client_type) { | ||
254 | + reqData.app_version = qs.app_version; | ||
255 | + reqData.client_type = qs.client_type; | ||
256 | + } | ||
246 | 257 | ||
247 | loading.showLoading(); | 258 | loading.showLoading(); |
248 | self.el.$navList.toggleClass('fix-top', false); | 259 | self.el.$navList.toggleClass('fix-top', false); |
249 | $.ajax({ | 260 | $.ajax({ |
250 | url: url, | 261 | url: url, |
251 | - data: { | ||
252 | - uid: yoho.isLogin(), // only app use; | ||
253 | - activityId: activityId, | ||
254 | - startTime: startTime | ||
255 | - }, | 262 | + data: reqData, |
256 | success: function(data) { | 263 | success: function(data) { |
257 | data = $.extend(data, {isApp: yoho.isApp}); | 264 | data = $.extend(data, {isApp: yoho.isApp}); |
258 | $('.product-list').html(self.listTemplate(data)); | 265 | $('.product-list').html(self.listTemplate(data)); |
-
Please register or login to post a comment