|
@@ -29,7 +29,10 @@ export const ajax = data => {
|
|
|
wx.request({
|
|
|
url: base[data.urlType || 'apiurl'] + (data.api || ''),
|
|
|
data: data.data,
|
|
|
- header: data.header,
|
|
|
+ header: {
|
|
|
+ Authorization: wx.getStorageSync('token') || undefined,
|
|
|
+ ...(data.header || {})
|
|
|
+ },
|
|
|
timeout: data.timeout || 60000,
|
|
|
method: (data.method || 'get').toUpperCase(),
|
|
|
responseType: data.responseType || 'text',
|