You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

54 lines
1.6 KiB

var domino, window, document, location, Vue, VueRouter, navigator, axios, Promise, GoUseCall, GoUse, GoUseRegistered,
govueId, useRoute, goUseCallCache, $, jQuery, GoParam;
navigator = {
userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36"
};
var wx = {
request: function (c) {
var url = c["url"];
var data = c["data"];
var header = c["header"];
var method = c["method"];
var dataType = c["dataType"];
var responseType = c["responseType"];
var success = c["success"];
var fail = c["fail"];
var complete = c["complete"];
// console.log("request");
// console.log(url);
var isHost = url.indexOf("http://") > -1 || url.indexOf("https://") > -1;
var isAbs = (url[0] == '/');
if (!isHost) {
if (!isAbs) {
url = location.pathname + "/" + url
}
url = location.host + "/" + url
for (; url.indexOf("//") > -1;) {
url = url.replace("//", "/")
}
url = location.protocol + "//" + url
}
// console.log("url",url);
var result = GoRequest({
url: url,
data: data,
method: method,
});
result = JSON.parse(result);
var statusCode = result["statusCode"];
var data = result["data"];
if (dataType == "json") {
data = JSON.parse(data)
}
success({
data: data,
statusCode: statusCode,
});
}
};