liudong
2024-07-31 62c45e2187a481a47a60232876c52e6fb8062d3e
登录接口调试
3个文件已修改
16 ■■■■ 已修改文件
.env.development 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
config/vite.config.dev.ts 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/interceptor.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
.env.development
@@ -1,2 +1,2 @@
VUE_APP_BASE_API=/api
VITE_API_BASE_URL= 'http://192.168.20.158:8089'
VUE_APP_BASE_API=/api/v1
VITE_API_BASE_URL= 'http://aiotlink.com:8189'
config/vite.config.dev.ts
@@ -13,7 +13,7 @@
      },
      proxy: {
        '/base': {
          target: 'http://192.168.20.158:8089',//邦邦
          target: 'http://192.168.20.158:8089',
          changeOrigin: true,
          ws: true,
          // rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''),
@@ -21,12 +21,12 @@
          // secure: false
        },
        '/api/v1': {
          // target: 'http://192.168.20.116:1080/',
          target: 'http://192.168.20.158:8089',//邦邦
          // target: 'http://192.168.20.116:1080',
          target: 'http://192.168.20.158:8089',
          // target: 'http://aiotlink.com:8189',
          changeOrigin: true,
          ws: true,
          // rewrite: (path) => path.replace(new RegExp(`^/upload`), ''),
          // ws: true,
          // rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''),
        },
      },
      // warmup: {
src/api/interceptor.ts
@@ -17,7 +17,7 @@
}
if (import.meta.env.VITE_API_BASE_URL) {
  axios.defaults.baseURL = import.meta.env.VITE_API_BASE_URL;
  // axios.defaults.baseURL = import.meta.env.VITE_API_BASE_URL;
}
axios.defaults.withCredentials = true;
axios.interceptors.request.use(