...
|
...
|
@@ -19,7 +19,7 @@ let http = { |
|
|
}catch (e){
|
|
|
}
|
|
|
},
|
|
|
post: function (requestUrl, data, callback, errFunc,showLoadding) {
|
|
|
post: function (requestUrl, data, callback, errFunc,showLoadding,setToken) {
|
|
|
if (http.proxy == null) {
|
|
|
const {proxy} = Vue.getCurrentInstance()
|
|
|
http.proxy = proxy;
|
...
|
...
|
@@ -32,11 +32,13 @@ let http = { |
|
|
if(showLoadding && showLoadding == true){
|
|
|
loading = http.proxy.$global.showLoading();
|
|
|
}
|
|
|
var access_token = 'access_token=' + http.getToken();
|
|
|
if (requestUrl.indexOf('?') == -1) {
|
|
|
requestUrl += '?' + access_token;
|
|
|
} else {
|
|
|
requestUrl += '&' + access_token;
|
|
|
if(setToken == undefined || setToken == true){
|
|
|
var access_token = 'access_token=' + http.getToken();
|
|
|
if (requestUrl.indexOf('?') == -1) {
|
|
|
requestUrl += '?' + access_token;
|
|
|
} else {
|
|
|
requestUrl += '&' + access_token;
|
|
|
}
|
|
|
}
|
|
|
$.ajax({
|
|
|
url: sessionStorage.getItem('domainName') + requestUrl,
|
...
|
...
|
@@ -69,7 +71,7 @@ let http = { |
|
|
});
|
|
|
|
|
|
},
|
|
|
get: function (requestUrl, data, callback, errFunc,showLoadding) {
|
|
|
get: function (requestUrl, data, callback, errFunc,showLoadding,setToken) {
|
|
|
if (http.proxy == null) {
|
|
|
const {proxy} = Vue.getCurrentInstance()
|
|
|
http.proxy = proxy;
|
...
|
...
|
@@ -82,12 +84,15 @@ let http = { |
|
|
if(showLoadding == true){
|
|
|
loading = http.proxy.$global.showLoading();
|
|
|
}
|
|
|
var access_token = 'access_token=' + http.getToken();
|
|
|
if (requestUrl.indexOf('?') == -1) {
|
|
|
requestUrl += '?' + access_token;
|
|
|
} else {
|
|
|
requestUrl += '&' + access_token;
|
|
|
if(setToken == undefined || setToken == true){
|
|
|
var access_token = 'access_token=' + http.getToken();
|
|
|
if (requestUrl.indexOf('?') == -1) {
|
|
|
requestUrl += '?' + access_token;
|
|
|
} else {
|
|
|
requestUrl += '&' + access_token;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
$.ajax({
|
|
|
url: sessionStorage.getItem('domainName') + requestUrl,
|
|
|
method: "get",
|
...
|
...
|
|