Procházet zdrojové kódy

fix: 恢复企微接口 api 前缀

将企微接口请求恢复为通过 /api 前缀访问,并移除单独的 /cgi-bin 代理配置,保持现有接口访问方式一致。

Made-with: Cursor
haifeng.zhang před 4 hodinami
rodič
revize
99f3330a23
2 změnil soubory, kde provedl 1 přidání a 6 odebrání
  1. 1 1
      src/api/wecom/index.ts
  2. 0 5
      src/config/proxy.ts

+ 1 - 1
src/api/wecom/index.ts

@@ -14,7 +14,7 @@ import {
 } from './types'
 
 const wecomService = axios.create({
-  baseURL: '',
+  baseURL: '/api',
   timeout: 5000,
 })
 

+ 0 - 5
src/config/proxy.ts

@@ -20,11 +20,6 @@ const proxy: Record<string, string | ProxyOptions> = {
     // secure: false,
     rewrite: (path) => path.replace(/^\/api\/chengyun/, 'api/'),
   },
-  '/cgi-bin': {
-    target: 'https://10.74.201.149:59095',
-    changeOrigin: true,
-    secure: false,
-  },
   '/api': {
     // target: 'http://192.168.3.72:8081/',
     // target: 'https://10.68.191.169:9080',