...
|
...
|
@@ -138,14 +138,13 @@ exports.getGeo = function(callback) { |
|
|
};
|
|
|
|
|
|
exports.queryString = function() {
|
|
|
var vars = [],
|
|
|
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;
|
...
|
...
|
@@ -175,4 +174,21 @@ exports.getChannel = function() { |
|
|
kids: 3,
|
|
|
lifestyle: 4
|
|
|
}[cookie('_Channel')];
|
|
|
}
|
|
|
|
|
|
var _getAppVersionByUa = function() {
|
|
|
var vars = navigator.userAgent.split(';') || [];
|
|
|
for (var i = 0; i < vars.length; i++) {
|
|
|
if (vars[i].indexOf('app_version') > -1) {
|
|
|
return vars[i].split('=')[1];
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
exports.getAppVersion = function() {
|
|
|
var appVer = window.qs.app_version || window.qs.appVersion;
|
|
|
if (!appVer) {
|
|
|
appVer = _getAppVersionByUa();
|
|
|
}
|
|
|
return appVer;
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|