Authored by ccbikai

完善 分享

@@ -119,7 +119,7 @@ exports.collocationList = (req, res) => { @@ -119,7 +119,7 @@ exports.collocationList = (req, res) => {
119 layout: false, 119 layout: false,
120 params: params, 120 params: params,
121 list: result, 121 list: result,
122 - isApp: req.query.app_version || false 122 + isApp: req.query.appVersion || false
123 })); 123 }));
124 }); 124 });
125 }; 125 };
@@ -266,13 +266,11 @@ $('.nav-home').on('touchstart', function() { @@ -266,13 +266,11 @@ $('.nav-home').on('touchstart', function() {
266 window.cancelAnimationFrame = cancelAnimationFrame; 266 window.cancelAnimationFrame = cancelAnimationFrame;
267 }()); 267 }());
268 268
269 -// 给jQuery 扩展 queryString函数  
270 -$.extend({  
271 - queryString: function() { 269 +function queryString() {
272 var vars = [], 270 var vars = [],
273 hash, 271 hash,
274 i; 272 i;
275 - var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); 273 + var hashes = window.location.search.slice(1).split('&');
276 274
277 for (i = 0; i < hashes.length; i++) { 275 for (i = 0; i < hashes.length; i++) {
278 hash = hashes[i].split('='); 276 hash = hashes[i].split('=');
@@ -280,7 +278,11 @@ $.extend({ @@ -280,7 +278,11 @@ $.extend({
280 vars[hash[0]] = hash[1]; 278 vars[hash[0]] = hash[1];
281 } 279 }
282 return vars; 280 return vars;
283 - } 281 +}
  282 +
  283 +// 给jQuery 扩展 queryString函数
  284 +$.extend({
  285 + queryString: queryString
284 }); 286 });
285 287
286 // 临时修改 footer 288 // 临时修改 footer
@@ -308,3 +310,5 @@ window.getShoppingKey = getShoppingKey; @@ -308,3 +310,5 @@ window.getShoppingKey = getShoppingKey;
308 window.rePosFooter = rePosFooter; 310 window.rePosFooter = rePosFooter;
309 311
310 window.reMarginFooter = reMarginFooter; 312 window.reMarginFooter = reMarginFooter;
  313 +
  314 +window.queryString = queryString();
@@ -25,7 +25,8 @@ function massageAJAX(pageData) { @@ -25,7 +25,8 @@ function massageAJAX(pageData) {
25 type: 'GET', 25 type: 'GET',
26 url: '/guang/star/collocation/list', 26 url: '/guang/star/collocation/list',
27 data: { 27 data: {
28 - page: pageData 28 + page: pageData,
  29 + appVersion: window.queryString.app_version
29 }, 30 },
30 dataType: 'html', 31 dataType: 'html',
31 success: function(data) { 32 success: function(data) {