Parcourir la source

超时时长修改

cz il y a 1 an
Parent
commit
ff1007b5f8
2 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. 1 1
      src/utils/axios.js
  2. 2 1
      vue.config.js

+ 1 - 1
src/utils/axios.js

@@ -28,7 +28,7 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
 const service = axios.create({
   baseURL: process.env.VUE_APP_BASE_API,
   // 超时
-  timeout: 10000
+  timeout: 20000
 })
 
 function generateRandomString(length) {

+ 2 - 1
vue.config.js

@@ -26,8 +26,9 @@ module.exports = defineConfig({
 			// https://cn.vitejs.dev/config/#server-proxy
 			'/test-api': {
 				target: 'http://139.9.102.170:9901',
+				// target: "http://106.54.243.161:10010/prod-api",
 				changeOrigin: true,
-				rewrite: (p) => p.replace(/^\/dev-api/, '')
+				rewrite: (p) => p.replace(/^\/test-api/, '')
 			},
 			'/prod-api': {
 				target: 'http://106.54.243.161',