修复了上传种子bug

Change-Id: I8b48880bafb43632f20cf2f07b43096efe5bead0
diff --git a/vue.config.js b/vue.config.js
index 7d53894..808123a 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -1,37 +1,40 @@
+// vue.config.js

 const { defineConfig } = require('@vue/cli-service')

 

 module.exports = defineConfig({

   transpileDependencies: true,

+

+  /*  dev 服务只跑在 8080;真正的后端地址改用

+      环境变量 VUE_APP_BACKEND,默认仍指向 8081  */

   devServer: {

     port: 8080,

     proxy: {

+      // ❶ 统一以 /api 开头的请求全部反向代理

       '/api': {

-        target: 'http://localhost:8081',

+        target: process.env.VUE_APP_BACKEND || 'http://localhost:8081',

         changeOrigin: true,

         ws: true,

         logLevel: 'debug'

       },

+

+      /* ❷ 可选:如果你项目里还有没改完的

+            /category、/torrent、/auth 旧写法,保留兼容性。

+            改完之后,把这一段删掉也行。 */

       '/category': {

-        target: 'http://localhost:8081',

+        target: process.env.VUE_APP_BACKEND || 'http://localhost:8081',

         changeOrigin: true,

-        pathRewrite: {

-          '^/category': '/api/category'

-        }

+        pathRewrite: { '^/category': '/api/category' }

       },

       '/torrent': {

-        target: 'http://localhost:8081',

+        target: process.env.VUE_APP_BACKEND || 'http://localhost:8081',

         changeOrigin: true,

-        pathRewrite: {

-          '^/torrent': '/api/torrent'

-        }

+        pathRewrite: { '^/torrent': '/api/torrent' }

       },

       '/auth': {

-        target: 'http://localhost:8081',

+        target: process.env.VUE_APP_BACKEND || 'http://localhost:8081',

         changeOrigin: true,

-        pathRewrite: {

-          '^/auth': '/api/auth'

-        }

+        pathRewrite: { '^/auth': '/api/auth' }

       }

     }

   }

-})
\ No newline at end of file
+})