Browse Source

first commit

xubo 1 năm trước cách đây
mục cha
commit
c3cc116ac6
5 tập tin đã thay đổi với 5 bổ sung5 xóa
  1. BIN
      dist/.DS_Store
  2. 0 0
      dist/assets/index-DQOcyLOj.js
  3. 1 1
      dist/index.html
  4. 1 1
      src/App.vue
  5. 3 3
      vite.config.js

BIN
dist/.DS_Store


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/assets/index-DQOcyLOj.js


+ 1 - 1
dist/index.html

@@ -5,7 +5,7 @@
     <link rel="icon" href="/favicon.ico">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <title>Vite App</title>
-    <script type="module" crossorigin src="/assets/index-CYnuoGe6.js"></script>
+    <script type="module" crossorigin src="/assets/index-DQOcyLOj.js"></script>
     <link rel="stylesheet" crossorigin href="/assets/index-D6hfMaVG.css">
   </head>
   <body>

+ 1 - 1
src/App.vue

@@ -23,7 +23,7 @@ export default {
       const formData = new FormData();
       formData.append('file', this.selectedFile, this.selectedFile.name);
 
-      axios.post('/path/api/upload', formData, {
+      axios.post('/api/upload', formData, {
         headers: {
           'Content-Type': 'multipart/form-data'
         }

+ 3 - 3
vite.config.js

@@ -11,11 +11,11 @@ export default defineConfig({
     open: true,
     cors: true,
     proxy: {
-      '/path': {
-        target: 'https://dev.maxwebx.cn/',    // 接口域名,接口服务器地止
+      '/api': {
+        target: 'https://dev.maxwebx.cn',    // 接口域名,接口服务器地止
         changeOrigin: true,
         secure: false,
-        rewrite: (path) => path.replace(/^\/path/, '')
+        rewrite: (path) => path.replace(/^\/api/, '')
       },
     }
   },

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác