http icon indicating copy to clipboard operation
http copied to clipboard

:bento: Promise Based request / fetch / http For Real Project, Support Multiple Platforms

Results 2 http issues
Sort by recently updated
recently updated
newest added

![image](https://user-images.githubusercontent.com/11813048/62912282-15decb00-bdba-11e9-9d91-1edb2f257adc.png) VM3725:1 thirdScriptError http.init is not a function;at App login function TypeError: http.init is not a function at pe.login (http://127.0.0.1:35457/appservice/app.js:12:10) at pe. (WAService.js:1:1316840) at pe.onLaunch (http://127.0.0.1:35457/appservice/app.js:44:10) at pe. (WAService.js:1:1317346) at...

### 当前版本 > 3.0.0 ### 环境 + 小程序内 ### 需求描述 在小程序内有很多业务接口需要在登陆后在获取接口信息,那么是否可能在请求发起前先校验本地 token 是否存在,不存在直接挂起这个请求发情登录请求,等登录完成后,再将这个请求继续下去呢 示例: ```javascript http.interceptors.request.use(async config => { let token = wx.getStorageSync('token') if (!token) { // 没有登录的的情况下重新发起登录 await store.dispatch('login')...