common/http.interceptor.js
@@ -43,9 +43,7 @@ // 引用token const TOKEN = uni.getStorageSync(ACCESSTOKEN); if (TOKEN) { x.header[ACCESSTOKEN] = TOKEN; } else { delete x.header[ACCESSTOKEN] x.header[ACCESSTOKEN] = 'Bearer ' + TOKEN; } x.header['CLIENT-TYPE'] = appType() return x; @@ -78,4 +76,4 @@ vm.$u.toast("请求异常!"); //错误提示信息 return Promise.reject(response) }) } }