deploy
This commit is contained in:
@ -46,9 +46,11 @@ class HttpClient {
|
||||
url = `${this.baseUrl}${req.url}${paramsString}`;
|
||||
}
|
||||
const app = getApp();
|
||||
|
||||
const header: any = req.header ?? {};
|
||||
if (!authWhitelist.includes(req.url)) {
|
||||
header.Authorization = `Bearer ${app.globalData.authToken}`;
|
||||
|
||||
if (!authWhitelist.includes(req.url) && !header.Authorization) {
|
||||
header.Authorization = `Bearer ${app?.globalData?.authToken}`;
|
||||
}
|
||||
return new Promise(function (resolve, reject) {
|
||||
wx.request({
|
||||
|
Reference in New Issue
Block a user