Skip to content

Commit

Permalink
chore: 切换在线 mock 接口地址
Browse files Browse the repository at this point in the history
  • Loading branch information
pany-ang committed Feb 7, 2024
1 parent a00e57a commit e81668e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .env.production
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 生产环境自定义的环境变量(命名必须以 VITE_ 开头)

## 后端接口公共路径(如果解决跨域问题采用 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
VITE_ROUTER_HISTORY = 'hash'
Expand Down
2 changes: 1 addition & 1 deletion .env.staging
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 预发布环境自定义的环境变量(命名必须以 VITE_ 开头)

## 后端接口公共路径(如果解决跨域问题采用 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
VITE_ROUTER_HISTORY = 'hash'
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default (configEnv: ConfigEnv): UserConfigExport => {
/** 接口代理 */
proxy: {
"/api/v1": {
target: "https://www.fastmock.site/mock/761e2dda2b8890ab86c928a74e8f6538",
target: "https://mock.mengxuegu.com/mock/63218b5fb4c53348ed2bc212",
ws: true,
/** 是否允许跨域 */
changeOrigin: true
Expand Down

0 comments on commit e81668e

Please sign in to comment.