新增环境header
This commit is contained in:
parent
f8c31d6bb7
commit
756f567dba
|
@ -20,10 +20,13 @@ const requestWithoutCookie = promisify(wx.request);
|
|||
// 考虑了Cookie的请求
|
||||
const request = async function (options) {
|
||||
let token = wx.getStorageSync('token');
|
||||
const result = wx.getAccountInfoSync();
|
||||
const { envVersion } = result.miniProgram;
|
||||
options.header = {
|
||||
Accept: 'application/json',
|
||||
'content-type': 'application/json; charset=utf-8',
|
||||
"Authorization": token
|
||||
"Authorization": token,
|
||||
"env": envVersion
|
||||
};
|
||||
let response;
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue
Block a user