Authored by ccbikai

完善 分享

... ... @@ -119,7 +119,7 @@ exports.collocationList = (req, res) => {
layout: false,
params: params,
list: result,
isApp: req.query.app_version || false
isApp: req.query.appVersion || false
}));
});
};
... ...
... ... @@ -266,21 +266,23 @@ $('.nav-home').on('touchstart', function() {
window.cancelAnimationFrame = cancelAnimationFrame;
}());
function queryString() {
var vars = [],
hash,
i;
var hashes = window.location.search.slice(1).split('&');
for (i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
}
// 给jQuery 扩展 queryString函数
$.extend({
queryString: function() {
var vars = [],
hash,
i;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for (i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
}
queryString: queryString
});
// 临时修改 footer
... ... @@ -308,3 +310,5 @@ window.getShoppingKey = getShoppingKey;
window.rePosFooter = rePosFooter;
window.reMarginFooter = reMarginFooter;
window.queryString = queryString();
... ...
... ... @@ -25,7 +25,8 @@ function massageAJAX(pageData) {
type: 'GET',
url: '/guang/star/collocation/list',
data: {
page: pageData
page: pageData,
appVersion: window.queryString.app_version
},
dataType: 'html',
success: function(data) {
... ...