Authored by 王涛

搜索

@@ -19,7 +19,7 @@ let http = { @@ -19,7 +19,7 @@ let http = {
19 }catch (e){ 19 }catch (e){
20 } 20 }
21 }, 21 },
22 - post: function (requestUrl, data, callback, errFunc,showLoadding) { 22 + post: function (requestUrl, data, callback, errFunc,showLoadding,setToken) {
23 if (http.proxy == null) { 23 if (http.proxy == null) {
24 const {proxy} = Vue.getCurrentInstance() 24 const {proxy} = Vue.getCurrentInstance()
25 http.proxy = proxy; 25 http.proxy = proxy;
@@ -32,11 +32,13 @@ let http = { @@ -32,11 +32,13 @@ let http = {
32 if(showLoadding && showLoadding == true){ 32 if(showLoadding && showLoadding == true){
33 loading = http.proxy.$global.showLoading(); 33 loading = http.proxy.$global.showLoading();
34 } 34 }
35 - var access_token = 'access_token=' + http.getToken();  
36 - if (requestUrl.indexOf('?') == -1) {  
37 - requestUrl += '?' + access_token;  
38 - } else {  
39 - requestUrl += '&' + access_token; 35 + if(setToken == undefined || setToken == true){
  36 + var access_token = 'access_token=' + http.getToken();
  37 + if (requestUrl.indexOf('?') == -1) {
  38 + requestUrl += '?' + access_token;
  39 + } else {
  40 + requestUrl += '&' + access_token;
  41 + }
40 } 42 }
41 $.ajax({ 43 $.ajax({
42 url: sessionStorage.getItem('domainName') + requestUrl, 44 url: sessionStorage.getItem('domainName') + requestUrl,
@@ -69,7 +71,7 @@ let http = { @@ -69,7 +71,7 @@ let http = {
69 }); 71 });
70 72
71 }, 73 },
72 - get: function (requestUrl, data, callback, errFunc,showLoadding) { 74 + get: function (requestUrl, data, callback, errFunc,showLoadding,setToken) {
73 if (http.proxy == null) { 75 if (http.proxy == null) {
74 const {proxy} = Vue.getCurrentInstance() 76 const {proxy} = Vue.getCurrentInstance()
75 http.proxy = proxy; 77 http.proxy = proxy;
@@ -82,12 +84,15 @@ let http = { @@ -82,12 +84,15 @@ let http = {
82 if(showLoadding == true){ 84 if(showLoadding == true){
83 loading = http.proxy.$global.showLoading(); 85 loading = http.proxy.$global.showLoading();
84 } 86 }
85 - var access_token = 'access_token=' + http.getToken();  
86 - if (requestUrl.indexOf('?') == -1) {  
87 - requestUrl += '?' + access_token;  
88 - } else {  
89 - requestUrl += '&' + access_token; 87 + if(setToken == undefined || setToken == true){
  88 + var access_token = 'access_token=' + http.getToken();
  89 + if (requestUrl.indexOf('?') == -1) {
  90 + requestUrl += '?' + access_token;
  91 + } else {
  92 + requestUrl += '&' + access_token;
  93 + }
90 } 94 }
  95 +
91 $.ajax({ 96 $.ajax({
92 url: sessionStorage.getItem('domainName') + requestUrl, 97 url: sessionStorage.getItem('domainName') + requestUrl,
93 method: "get", 98 method: "get",