gaoluyang
2025-11-15 47e1cecb6f5cd01c029ff1a2f1658326a33025f4
src/utils/request.ts
@@ -22,12 +22,12 @@
    config.url = url
  }
  // 记录请求参数
  console.log('请求发送参数:', {
    url: (config.baseUrl || baseUrl) + config.url,
    method: config.method || 'GET',
    headers: config.header,
    data: config.data
  })
  // console.log('请求发送参数:', {
  //   url: (config.baseUrl || baseUrl) + config.url,
  //   method: config.method || 'GET',
  //   headers: config.header,
  //   data: config.data
  // })
  return new Promise((resolve, reject) => {
    uni.request({
      method: config.method || 'GET',
@@ -49,11 +49,11 @@
      // @ts-ignore
      const msg: string = errorCode[code] || data.msg || errorCode['default']
      // 记录接收到的参数
      console.log('接收到的参数:', {
        url: (config.baseUrl || baseUrl) + config.url,
        code: code,
        data: data
      })
      // console.log('接收到的参数:', {
      //   url: (config.baseUrl || baseUrl) + config.url,
      //   code: code,
      //   data: data
      // })
      if (code === 401) {
        showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => {
          if (res.confirm) {