diff --git a/activitylink/package-lock.json b/activitylink/package-lock.json index 2cc8ee2..ab540ac 100644 --- a/activitylink/package-lock.json +++ b/activitylink/package-lock.json @@ -968,7 +968,7 @@ }, "node_modules/pinia-plugin-persistedstate": { "version": "4.4.1", - "resolved": "https://registry.npmjs.org/pinia-plugin-persistedstate/-/pinia-plugin-persistedstate-4.4.1.tgz", + "resolved": "https://registry.npmmirror.com/pinia-plugin-persistedstate/-/pinia-plugin-persistedstate-4.4.1.tgz", "integrity": "sha512-lmuMPpXla2zJKjxEq34e1E9P9jxkWEhcVwwioCCE0izG45kkTOvQfCzvwhW3i38cvnaWC7T1eRdkd15Re59ldw==", "license": "MIT", "dependencies": { diff --git a/activitylink/src/views/zhongchou/gift/index.vue b/activitylink/src/views/zhongchou/gift/index.vue index 5a954f7..c5e4f5c 100644 --- a/activitylink/src/views/zhongchou/gift/index.vue +++ b/activitylink/src/views/zhongchou/gift/index.vue @@ -143,7 +143,7 @@ const editForm = ref({ gradeId: '', imageUrl: null }) -const uploadUrl = 'https://39.101.133.168:8828/hljw/api/aws/upload'; +const uploadUrl = '/hljw/api/aws/upload'; const formRef = ref(null) const uploadRef = ref(null) diff --git a/activitylink/src/views/zhongchou/level/index.vue b/activitylink/src/views/zhongchou/level/index.vue index 4dd1178..0ef04f3 100644 --- a/activitylink/src/views/zhongchou/level/index.vue +++ b/activitylink/src/views/zhongchou/level/index.vue @@ -1,282 +1,282 @@ \ No newline at end of file diff --git a/activitylink/vite.config.js b/activitylink/vite.config.js index ff088ed..ff9349f 100644 --- a/activitylink/vite.config.js +++ b/activitylink/vite.config.js @@ -4,23 +4,28 @@ import path from 'path'; export default defineConfig({ // 设置打包后静态资源的基础路径为 testBack - base: '/testBack/', + base: '/testBack/', plugins: [vue()], resolve: { alias: { '@': path.resolve(__dirname, './src') } }, - server: { - proxy: { - '/api': { - target: 'https://dbqb.nfdxy.net', // 后端基础地址 - changeOrigin: true, - rewrite: (path) => path.replace(/^\/api/, ''), // 移除 /api 前缀 - // 或者更精确的重写(根据后端路径调整): - // rewrite: (path) => path.replace(/^\/api\/admin/, '/admin'), - }, - }, + server: { + proxy: { + '/api': { + target: 'https://dbqb.nfdxy.net', // 后端基础地址 + changeOrigin: true, + rewrite: (path) => path.replace(/^\/api/, ''), // 移除 /api 前缀 + // 或者更精确的重写(根据后端路径调整): + // rewrite: (path) => path.replace(/^\/api\/admin/, '/admin'), + }, + '/hljw/api/aws/upload': { + target: 'http://39.101.133.168:8828', // 上传接口的基础地址 + changeOrigin: true, // 开启跨域 + rewrite: (path) => path.replace(/^\/hljw/, '/hljw'), // 保留原路径 + } }, }, +}, ); \ No newline at end of file