- 新增 src/mock/{page1,page2,page3,registry}.ts,按 URL 路由 13+10+25 个接口
- request.ts 在 proxyService 顶部加 mock 短路,命中直接返回本地假数据
- .env.development 新增 VITE_USE_MOCK='true',生产环境不设即默认关闭
- 业务代码(API、视图)零改动
47 lines
1.2 KiB
Plaintext
47 lines
1.2 KiB
Plaintext
# 开发环境配置
|
|
VITE_ENV = 'development'
|
|
|
|
# 主域名
|
|
VITE_HOST = 'https://test.gitcode.net'
|
|
|
|
# 接口地址
|
|
VITE_API_HOST = 'http://222.20.126.217:8100/'
|
|
|
|
# devPress接口地址
|
|
VITE_DEV_API_HOST = 'http://222.20.126.217:8100/'
|
|
|
|
# devPress地址
|
|
VITE_DEV_HOST = 'https://test.gitcode.net'
|
|
|
|
# 仓库文件上传域名
|
|
VITE_FILE_HOST = 'https://test.gitcode.net'
|
|
# 仓库文件下载域名
|
|
VITE_DOWNLOAD_HOST = 'https://test.gitcode.net'
|
|
|
|
# csdn登陆绑定地址
|
|
VITE_CSDN_URL = 'https://test.gitcode.net/oauth/login/csdn'
|
|
|
|
# 组织社区跳转地址
|
|
VITE_ORG_COMMUNITY = 'https://test.gitcode.net'
|
|
|
|
# 静态资源域名
|
|
VITE_STATIC_HOST = 'https://test.gitcode.net'
|
|
|
|
# 主页搜索子应用
|
|
VITE_CHILD_HOMEWEB_HOST = 'https://test.gitcode.net/child/homeweb-app/'
|
|
# 用户中心子应用
|
|
VITE_USER_CENTER_HOST = 'https://test.gitcode.net/child/user-center/'
|
|
|
|
# ai-copilot 子应用
|
|
VITE_COPILOT_HOST = 'https://test.gitcode.net/child/aichat-app/'
|
|
|
|
VITE_BASE_URL=/
|
|
|
|
# AI大模型接口地址
|
|
VITE_AI_API_HOST = 'http://222.20.126.208:8087'
|
|
# 治理平台地址
|
|
VITE_GOVERNANCE_HOST = 'http://222.20.126.217:10010/governancePortal'
|
|
|
|
# 启用 mock 模式(内网不可达时使用本地假数据)
|
|
VITE_USE_MOCK = 'true'
|