ll
liukangdong
2024-12-06 86baa8ff948d2e79588e0dd7efa16f6b8ac3b157
h5/utils/service.js
@@ -18,7 +18,7 @@
            method: options.method || 'GET',
            header: options.header || {
               // 根据实际接口设计 key 取 token 或者 authorization
               dm_user_token: token,
               dm_user_token: token || '',
               "content-type": 'application/json'
            },
            success: (res) => {
@@ -34,11 +34,13 @@
                        duration: 2000
                     })
                  })
               }
               if (data.code === 5112) {
                  uni.navigateTo({
                     url: '/pages/staffLogin/login'
                  })
                  if (data.code === 500 || data.code === 5112) {
                     uni.clearStorageSync()
                     return uni.navigateTo({
                        url: '/pages/login/login'
                     })
                  }
                  return
               }
               resolve(data)
               // return response.data