k94314517
2024-07-25 a75b18a4157ab486e0b51c438ac165ab3a08e3e0
wechat_staff/utils/request.js
@@ -1,5 +1,4 @@
import { baseUrl } from "./config"
import { baseUrl } from "./config"
export function request(options){
  let loading = options.loading || '1' // 默认值1显示,否则不显示
  if(loading == '1'){
@@ -19,9 +18,9 @@
        if (res.data.code === 200) {
          resolve(res.data || true)
        } else {
          if(res.data.code && res.data.code == 5112){
          if(res.data.code && (res.data.code == 5112 || res.data.code == 5111)){
            wx.navigateTo({
              url: '/pages/auth/auth',
              url: '/pages/login/index',
            })
          }
          res.data.message && wx.showToast({