Authored by 郝肖肖

Merge branch 'feature/plusstarSpeck' into release/5.1

@@ -85,8 +85,7 @@ exports.resourcesGoodsList = (req, res, next) => { @@ -85,8 +85,7 @@ exports.resourcesGoodsList = (req, res, next) => {
85 let param = {}; 85 let param = {};
86 86
87 param = { 87 param = {
88 - productSkn: productSkn.split(','),  
89 - yh_channel: req.body.yh_channel 88 + productSkn: productSkn.split(',')
90 }; 89 };
91 90
92 plusstarModel.getProductBatch(param, { 91 plusstarModel.getProductBatch(param, {
@@ -49,8 +49,7 @@ const getProductBatch = (param, options) => { @@ -49,8 +49,7 @@ const getProductBatch = (param, options) => {
49 param.productSkn = _.isArray(param.productSkn) ? param.productSkn : [param.productSkn]; 49 param.productSkn = _.isArray(param.productSkn) ? param.productSkn : [param.productSkn];
50 return api.get('', { 50 return api.get('', {
51 method: 'h5.product.batch', 51 method: 'h5.product.batch',
52 - productSkn: param.productSkn.join(','),  
53 - yh_channel: param.yh_channel 52 + productSkn: param.productSkn.join(',')
54 }).then(result => { 53 }).then(result => {
55 let data = {}; 54 let data = {};
56 55
@@ -41,6 +41,11 @@ plusstar = { @@ -41,6 +41,11 @@ plusstar = {
41 width: 100 / $tabUlDom.find('li').length + '%' 41 width: 100 / $tabUlDom.find('li').length + '%'
42 }); 42 });
43 43
  44 + $tabUlDom.find('li').each(function() {
  45 + // 重新进入滑动位置清除
  46 + window.setCookie($(this).data('code'), 0);
  47 + });
  48 +
44 // 事情委托机制 49 // 事情委托机制
45 $tabUlDom.bind('click', function(event) { 50 $tabUlDom.bind('click', function(event) {
46 $liDom = $(event.target).closest('li'); 51 $liDom = $(event.target).closest('li');
@@ -80,10 +85,10 @@ plusstar = { @@ -80,10 +85,10 @@ plusstar = {
80 } 85 }
81 $tabUlDom.find('li').removeClass('focus'); 86 $tabUlDom.find('li').removeClass('focus');
82 $liDom.addClass('focus'); 87 $liDom.addClass('focus');
  88 + that.ParentLiDom = $liDom;// 保留当前tab先中的对象
83 that.tabNav($liDom.data('code')); 89 that.tabNav($liDom.data('code'));
84 90
85 // ent -- 默认选中 91 // ent -- 默认选中
86 - that.ParentLiDom = $liDom;// 保留当前tab先中的对象  
87 setTimeout(function() { 92 setTimeout(function() {
88 that._yas(); 93 that._yas();
89 }, 1000); 94 }, 1000);
@@ -166,7 +171,8 @@ plusstar = { @@ -166,7 +171,8 @@ plusstar = {
166 data: { 171 data: {
167 code: code, 172 code: code,
168 uid: window.queryString.uid, 173 uid: window.queryString.uid,
169 - app_version: isApp 174 + app_version: isApp,
  175 + yh_channel: that.ParentLiDom.index() + 1
170 }, 176 },
171 dataType: 'html', 177 dataType: 'html',
172 success: function(data) { 178 success: function(data) {
@@ -178,7 +184,8 @@ plusstar = { @@ -178,7 +184,8 @@ plusstar = {
178 tip.show('没有更多内容了'); 184 tip.show('没有更多内容了');
179 return true; 185 return true;
180 } 186 }
181 - //记录切换tab位置 187 +
  188 + // 记录切换tab位置
182 $(document).scrollTop(window.cookie(code) || 0); 189 $(document).scrollTop(window.cookie(code) || 0);
183 190
184 that.resInit(); 191 that.resInit();
@@ -233,8 +240,7 @@ plusstar = { @@ -233,8 +240,7 @@ plusstar = {
233 timeout: 5000, 240 timeout: 5000,
234 data: { 241 data: {
235 productSkn: skn.join(','), 242 productSkn: skn.join(','),
236 - app_version: isApp,  
237 - yh_channel: that.ParentLiDom.index() + 1 243 + app_version: isApp
238 }, 244 },
239 dataType: 'html', 245 dataType: 'html',
240 success: function(data) { 246 success: function(data) {
@@ -275,10 +281,12 @@ plusstar = { @@ -275,10 +281,12 @@ plusstar = {
275 281
276 scrollFn = debounce(function() { 282 scrollFn = debounce(function() {
277 scrollTop = $(document).scrollTop(); 283 scrollTop = $(document).scrollTop();
278 - //保留滑动位置,产品要求 284 +
  285 + // 保留滑动位置,产品要求
279 window.setCookie(plusstar.common.codeDefault, $(this).scrollTop()); 286 window.setCookie(plusstar.common.codeDefault, $(this).scrollTop());
  287 +
280 // 当scroll到最后一列商品的高度后继续请求下一页数据 288 // 当scroll到最后一列商品的高度后继续请求下一页数据
281 - if (300 + scrollTop >= $(document).height() - windowHeight) { 289 + if (400 + scrollTop >= $(document).height() - windowHeight) {
282 plusstar.goodsList(); 290 plusstar.goodsList();
283 } 291 }
284 292