新增环境header
This commit is contained in:
		| @@ -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 { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user