|
@@ -120,9 +120,6 @@ var BasicFunction = new (function () {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- this.get_data = function (url, callback, scope) {
|
|
|
- console.log('----------using get_data()-----------');
|
|
|
- BasicFunction.Queue.list.push({url: url, callback: callback, gid: -1, scope: scope});
|
|
|
this.get_data = function (url, callback, data, scope) {
|
|
|
BasicFunction.Queue.list.push({url: url, callback: callback, gid: -1, data:data, scope: scope});
|
|
|
};
|
|
@@ -202,10 +199,10 @@ var BasicFunction = new (function () {
|
|
|
data: data,
|
|
|
sendTime: new Date()
|
|
|
}).then(BasicFunction.checkStatus)
|
|
|
- .then(BasicFunction.parseJson)
|
|
|
- .then(function(response){return response.json()})
|
|
|
- .then(callback)
|
|
|
- .catch(BasicFunction.on_fail);
|
|
|
+ .then(BasicFunction.parseJson)
|
|
|
+ .then(function(response){return response.json()})
|
|
|
+ .then(callback)
|
|
|
+ .catch(BasicFunction.on_fail);
|
|
|
}
|
|
|
|
|
|
function g_request_data(url, callback, gid) {
|
|
@@ -216,11 +213,11 @@ var BasicFunction = new (function () {
|
|
|
gid: gid,
|
|
|
callme: callback
|
|
|
}).then(BasicFunction.checkStatus)
|
|
|
- .then(BasicFunction.parseJson)
|
|
|
- .then(function(response){return response.json()})
|
|
|
- .then(BasicFunction.onReqeustDataReceived)
|
|
|
- .then(callback)
|
|
|
- .catch(BasicFunction.on_fail);
|
|
|
+ .then(BasicFunction.parseJson)
|
|
|
+ .then(function(response){return response.json()})
|
|
|
+ .then(BasicFunction.onReqeustDataReceived)
|
|
|
+ .then(callback)
|
|
|
+ .catch(BasicFunction.on_fail);
|
|
|
}
|
|
|
|
|
|
this.on_gp_success = function(response) {
|
|
@@ -438,6 +435,7 @@ var BasicFunction = new (function () {
|
|
|
|
|
|
this.get_server_url();
|
|
|
//this.on_document_load();
|
|
|
+})();
|
|
|
|
|
|
window.BasicFunction = BasicFunction;
|
|
|
|