feat: 修复环境的问题
This commit is contained in:
@@ -1,10 +1,25 @@
|
||||
import request from "../base/request";
|
||||
import { isProd } from "@/constant/base";
|
||||
import { isZhiNian } from "@/constant/base";
|
||||
import { useAppStore } from "@/store";
|
||||
import { devUrl, proUrl, wssDevUrl } from "../base/baseUrl";
|
||||
|
||||
/// 版本号, 每次发版本前增加
|
||||
const versionValue = "1.0.3";
|
||||
|
||||
// 获取服务地址
|
||||
const getEvnUrl = async (args) => {
|
||||
const res = await request.post("https://biz.nianxx.cn/hotelBiz/mainScene/getServiceUrl", args)
|
||||
const getEvnUrl = async () => {
|
||||
/// 智念客户端不需要获取环境地址
|
||||
if (isZhiNian) {
|
||||
const appStore = useAppStore();
|
||||
appStore.setServerConfig({
|
||||
baseUrl: devUrl, // 服务器基础地址
|
||||
wssUrl: wssDevUrl, // 服务器wss地址
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const apiUrl = proUrl + "/hotelBiz/mainScene/getServiceUrl";
|
||||
const res = await request.post(apiUrl, { versionValue: versionValue });
|
||||
if (res && res.code == 0 && res.data) {
|
||||
const appStore = useAppStore();
|
||||
appStore.setServerConfig(res.data);
|
||||
|
||||
@@ -1 +1,12 @@
|
||||
/// 生产环境基础地址
|
||||
export const proUrl = "https://biz.nianxx.cn";
|
||||
|
||||
/// 生产环境服务器wss地址
|
||||
export const wssProUrl = "wss://biz.nianxx.cn/ingress/agent/ws/chat";
|
||||
|
||||
/// 服务器基础地址
|
||||
export const devUrl = "https://onefeel.brother7.cn/ingress";
|
||||
|
||||
/// 测试服务器wss地址
|
||||
export const wssDevUrl = "wss://onefeel.brother7.cn/ingress/agent/ws/chat";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user