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,21 +266,23 @@ $('.nav-home').on('touchstart', function() { @@ -266,21 +266,23 @@ $('.nav-home').on('touchstart', function() {
266 window.cancelAnimationFrame = cancelAnimationFrame; 266 window.cancelAnimationFrame = cancelAnimationFrame;
267 }()); 267 }());
268 268
  269 +function queryString() {
  270 + var vars = [],
  271 + hash,
  272 + i;
  273 + var hashes = window.location.search.slice(1).split('&');
  274 +
  275 + for (i = 0; i < hashes.length; i++) {
  276 + hash = hashes[i].split('=');
  277 + vars.push(hash[0]);
  278 + vars[hash[0]] = hash[1];
  279 + }
  280 + return vars;
  281 +}
  282 +
269 // 给jQuery 扩展 queryString函数 283 // 给jQuery 扩展 queryString函数
270 $.extend({ 284 $.extend({
271 - queryString: function() {  
272 - var vars = [],  
273 - hash,  
274 - i;  
275 - var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');  
276 -  
277 - for (i = 0; i < hashes.length; i++) {  
278 - hash = hashes[i].split('=');  
279 - vars.push(hash[0]);  
280 - vars[hash[0]] = hash[1];  
281 - }  
282 - return vars;  
283 - } 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) {