Commit f2017393 by agan

修改

parent f06789e3
Showing with 16 additions and 14 deletions
......@@ -132,8 +132,8 @@ function webAppComm() {
'lang6': 'Cerrar página',
}
];
this.urlData = url_get_params(location.href);
this.langType = url_get_params(location.href).lang;
this.urlData = this.url_get_params(location.href);
this.langType = this.urlData.lang;
}
//分享
......@@ -350,6 +350,19 @@ webAppComm.prototype.refreshWeb = function (callback) {
}
webAppComm.prototype.url_get_params = function (url_path) {
var url = url_path;
var theRequest = new Object();
if (url.indexOf("?") != -1) {
var str = url.substr(url.indexOf("?") + 1);
strs = str.split("&");
for (var i = 0; i < strs.length; i++) {
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
}
}
return theRequest;
}
function appCollaboration(msg) {
var sUserAgent = navigator.userAgent.toLowerCase();
......@@ -370,17 +383,6 @@ function appCollaboration(msg) {
}
}
function url_get_params(url_path) {
var url = url_path;
var theRequest = new Object();
if (url.indexOf("?") != -1) {
var str = url.substr(url.indexOf("?") + 1);
strs = str.split("&");
for (var i = 0; i < strs.length; i++) {
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
}
}
return theRequest;
}
window.$firefly = new webAppComm();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment