16 lines
497 B
JavaScript
16 lines
497 B
JavaScript
import request from "../base/request";
|
|
import { useAppStore } from "@/store";
|
|
|
|
export const getServiceUrl = async (versionValue) => {
|
|
const apiUrl = "/hotelBiz/versionManager/getInfo";
|
|
const res = await request.post(apiUrl, { versionValue: versionValue });
|
|
if (res && res.code == 0 && res.data) {
|
|
const appStore = useAppStore();
|
|
appStore.setServerConfig({
|
|
baseUrl: res.data.httpUrl, // 服务器基础地址
|
|
wssUrl: res.data.wssUrl, // 服务器wss地址
|
|
});
|
|
}
|
|
};
|
|
|