sunjian 4 months ago
parent
commit
a248694f4d
1 changed files with 21 additions and 0 deletions
  1. 21 0
      vite.config.js

+ 21 - 0
vite.config.js

@@ -0,0 +1,21 @@
+import { defineConfig } from 'vite';
+import uni from '@dcloudio/vite-plugin-uni';
+ 
+export default defineConfig({
+	plugins: [uni()],
+	base:'/',
+	server: {
+		proxy: {
+			'/api': {
+				target: 'http://10.201.2.161:9400/centtenAdvise',
+				changeOrigin: true,
+				rewrite: (path) => path.replace(/^\/api/, '')
+			},
+			'/uploadApi':{
+				target: 'http://10.200.1.115:9000/canttenadvice/',
+				changeOrigin: true,
+				rewrite: (path) => path.replace(/^\/uploadApi/, '')
+			}
+		}
+	}
+});