فهرست منبع

fix: 调整企微接口请求前缀

将接口文档中的企微接口改为直接请求 /cgi-bin 路径,并补充本地开发代理配置,避免请求多出 /api 前缀。

Made-with: Cursor
haifeng.zhang 3 ساعت پیش
والد
کامیت
69b3713d00
2فایلهای تغییر یافته به همراه6 افزوده شده و 1 حذف شده
  1. 1 1
      src/api/wecom/index.ts
  2. 5 0
      src/config/proxy.ts

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

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

+ 5 - 0
src/config/proxy.ts

@@ -20,6 +20,11 @@ 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',