MrShi
12 小时以前 00a7a61df86db969f2ba61c508d02ba4709ce3d4
app/utils/http.interceptor.js
@@ -1,7 +1,11 @@
const install = (Vue, vm) => {
   let arr = [
      'web/driverInfo/updateLocation',
      'web/driverInfo/activeOrderCount'
   ]
   // 请求拦截器
   uni.$u.http.interceptors.request.use((config) => {
      if (!['web/driverInfo/updateLocation'].includes(config.url)) {
      if (!arr.includes(config.url)) {
         uni.showLoading({ title: '加载中' });
      }
      const Headtoken = vm.$store.state.token
@@ -16,8 +20,7 @@
   
   // 响应拦截器
   uni.$u.http.interceptors.response.use((response) => {
      console.log(response)
      if (!['web/driverInfo/updateLocation'].includes(response.config.url)) {
      if (!arr.includes(response.config.url)) {
         uni.hideLoading();
      }
      // 未登录/登录过期