Showing
2 changed files
with
18 additions
and
11 deletions
@@ -19,9 +19,9 @@ let headerData = headerModel.setNav({ | @@ -19,9 +19,9 @@ let headerData = headerModel.setNav({ | ||
19 | }); | 19 | }); |
20 | 20 | ||
21 | /** | 21 | /** |
22 | - * hotfix Android 6.5.5 版本隐藏设置提醒按钮 | 22 | + * hotfix ios 6.5.5 版本隐藏设置提醒按钮 |
23 | */ | 23 | */ |
24 | -const _androidHideRemindBtn = (products) => { | 24 | +const _iosHideRemindBtn = (products) => { |
25 | return _.map(products, goods => { | 25 | return _.map(products, goods => { |
26 | goods.hideRemind = true; | 26 | goods.hideRemind = true; |
27 | return goods; | 27 | return goods; |
@@ -239,8 +239,8 @@ const indexData = (req, res, next) => { | @@ -239,8 +239,8 @@ const indexData = (req, res, next) => { | ||
239 | return fetchProductList(activityInfo, uid).then((resultProducts) => { | 239 | return fetchProductList(activityInfo, uid).then((resultProducts) => { |
240 | result.products = resultProducts; | 240 | result.products = resultProducts; |
241 | 241 | ||
242 | - if (req.query.app_version === '6.5.5' && req.query.client_type === 'android') { | ||
243 | - result.products = _androidHideRemindBtn(resultProducts); | 242 | + if (/^6.5.5/.test(req.query.app_version) && req.query.client_type === 'iphone') { |
243 | + result.products = _iosHideRemindBtn(resultProducts); | ||
244 | } | 244 | } |
245 | 245 | ||
246 | res.json(result); | 246 | res.json(result); |
@@ -271,8 +271,8 @@ const getProductList = (req, res, next) => { | @@ -271,8 +271,8 @@ const getProductList = (req, res, next) => { | ||
271 | }; | 271 | }; |
272 | 272 | ||
273 | return fetchProductList(activityInfo, uid).then(resultProducts => { | 273 | return fetchProductList(activityInfo, uid).then(resultProducts => { |
274 | - if (req.query.app_version === '6.5.5' && req.query.client_type === 'android') { | ||
275 | - resultProducts = _androidHideRemindBtn(resultProducts); | 274 | + if (/^6.5.5/.test(req.query.app_version) && req.query.client_type === 'iphone') { |
275 | + resultProducts = _iosHideRemindBtn(resultProducts); | ||
276 | } | 276 | } |
277 | res.json({products: resultProducts}); | 277 | res.json({products: resultProducts}); |
278 | }).catch(error => { | 278 | }).catch(error => { |
@@ -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