增加线上接口

This commit is contained in:
gyq
2024-03-01 16:15:02 +08:00
parent 08e7939a9f
commit 51f0c8233d
2 changed files with 7 additions and 6 deletions

View File

@@ -2,6 +2,6 @@ ENV = 'production'
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇Nginx 配置
# 接口地址,注意协议,如果你没有配置 ssl需要将 https 改为 http
VUE_APP_BASE_API = 'api'
VUE_APP_BASE_API = 'https://cashieradmin.sxczgkj.cn'
# 如果接口是 http 形式, wss 需要改为 ws
VUE_APP_WS_API = 'wss://123.56.110.252

View File

@@ -8,7 +8,8 @@ import Cookies from 'js-cookie'
// 创建axios实例
const service = axios.create({
baseURL: process.env.NODE_ENV === 'production' ? process.env.VUE_APP_BASE_API : '/', // api 的 base_url
// baseURL: process.env.NODE_ENV === 'production' ? process.env.VUE_APP_BASE_API : '/',
baseURL: process.env.VUE_APP_BASE_API, // api 的 base_url
timeout: Config.timeout // 请求超时时间
})