chore: 切换在线 mock 接口地址

This commit is contained in:
pany 2024-02-07 10:38:12 +08:00
parent a00e57a1e8
commit e81668e293
3 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
# 生产环境自定义的环境变量(命名必须以 VITE_ 开头) # 生产环境自定义的环境变量(命名必须以 VITE_ 开头)
## 后端接口公共路径(如果解决跨域问题采用 CORS 就需要写全路径) ## 后端接口公共路径(如果解决跨域问题采用 CORS 就需要写全路径)
VITE_BASE_API = 'https://www.fastmock.site/mock/761e2dda2b8890ab86c928a74e8f6538/api/v1' VITE_BASE_API = 'https://mock.mengxuegu.com/mock/63218b5fb4c53348ed2bc212/api/v1'
## 路由模式 hash 或 html5 ## 路由模式 hash 或 html5
VITE_ROUTER_HISTORY = 'hash' VITE_ROUTER_HISTORY = 'hash'

View File

@ -1,7 +1,7 @@
# 预发布环境自定义的环境变量(命名必须以 VITE_ 开头) # 预发布环境自定义的环境变量(命名必须以 VITE_ 开头)
## 后端接口公共路径(如果解决跨域问题采用 CORS 就需要写全路径) ## 后端接口公共路径(如果解决跨域问题采用 CORS 就需要写全路径)
VITE_BASE_API = 'https://www.fastmock.site/mock/761e2dda2b8890ab86c928a74e8f6538/api/v1' VITE_BASE_API = 'https://mock.mengxuegu.com/mock/63218b5fb4c53348ed2bc212/api/v1'
## 路由模式 hash 或 html5 ## 路由模式 hash 或 html5
VITE_ROUTER_HISTORY = 'hash' VITE_ROUTER_HISTORY = 'hash'

View File

@ -35,7 +35,7 @@ export default (configEnv: ConfigEnv): UserConfigExport => {
/** 接口代理 */ /** 接口代理 */
proxy: { proxy: {
"/api/v1": { "/api/v1": {
target: "https://www.fastmock.site/mock/761e2dda2b8890ab86c928a74e8f6538", target: "https://mock.mengxuegu.com/mock/63218b5fb4c53348ed2bc212",
ws: true, ws: true,
/** 是否允许跨域 */ /** 是否允许跨域 */
changeOrigin: true changeOrigin: true