|
@@ -35,7 +35,6 @@ export function _request({
|
|
|
}
|
|
|
// eslint-disable-next-line no-undef
|
|
|
const app = getApp();
|
|
|
- const token = my.getStorageSync({ key: "YWT_TOKEN" });
|
|
|
my.request({
|
|
|
url: url.startsWith("http") ? url : joinUrl(host, url),
|
|
|
method,
|
|
@@ -44,7 +43,7 @@ export function _request({
|
|
|
"content-type": "application/x-www-form-urlencoded",
|
|
|
ticket: app.globalData.ticketData.ticket, // todo test
|
|
|
appId: app.globalData.appId, // todo test
|
|
|
- ywtToken: token.data || "",
|
|
|
+ Authorization: app.globalData.ywtToken || "",
|
|
|
...headers,
|
|
|
},
|
|
|
dataType: "json",
|
|
@@ -103,13 +102,13 @@ export function _ywtRequest({
|
|
|
if (isShowLoadig) {
|
|
|
my.showLoading();
|
|
|
}
|
|
|
- const token = my.getStorageSync({ key: "YWT_TOKEN" });
|
|
|
+ const app = getApp();
|
|
|
my.request({
|
|
|
url: url.startsWith("http") ? url : joinUrl(ywtRequestUrl, url),
|
|
|
method,
|
|
|
data,
|
|
|
headers: {
|
|
|
- ywtToken: token.data || "",
|
|
|
+ Authorization: app.globalData.ywtToken || "",
|
|
|
...headers,
|
|
|
},
|
|
|
dataType: "json",
|