Browse Source

fix:uploadimg

lvkun996 2 years ago
parent
commit
f28ea56783
3 changed files with 6 additions and 4 deletions
  1. 2 2
      config/proxy.ts
  2. 1 1
      src/components/UploadImage/index.tsx
  3. 3 1
      src/services/api/request.ts

+ 2 - 2
config/proxy.ts

@@ -11,8 +11,8 @@ export default {
     // localhost:8000/api/** -> https://preview.pro.ant.design/api/**
     '/api': {
       // 要代理的地址
-      // target: 'http://open.test.luojigou.vip:8899',
-      target: 'http://192.168.1.2:38092',
+      target: 'http://open.test.luojigou.vip:8899',
+      // target: 'http://192.168.1.2:38092',
       // target: 'https://preview.pro.ant.design',
       // 配置了这个可以从 http 代理到 https
       // 依赖 origin 的功能可能需要这个,比如 cookie

+ 1 - 1
src/components/UploadImage/index.tsx

@@ -77,7 +77,7 @@ const UploadImage: React.FC<IProps> = ({
               listType="picture-card"
               className="avatar-uploader"
               showUploadList={false}
-              action={ action  + '/gamecontest/admin/file/uploadImage' }
+              action={ action  + 'gamecontest/admin/file/uploadImage' }
               data={{
                 token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIxMzY2NzAwNTY3OTUzMzYyOTQ2IiwiZXhwIjoxNjIxODI1MDEzfQ.8LLmL6Mfb_pQxLjDmM13ekzq7nnWGWwWuANLQHvF3CM',
               }}

+ 3 - 1
src/services/api/request.ts

@@ -21,4 +21,6 @@ export const CRequest = <T>(
     
     // resolve( )
   })
-}
+}
+
+