调整前端获取服务ID方式

This commit is contained in:
648540858
2024-12-30 16:32:37 +08:00
parent 0cebbee0a9
commit 785da6d5ef
6 changed files with 23 additions and 16 deletions

View File

@@ -76,6 +76,17 @@ axios.interceptors.request.use(
Vue.prototype.$axios = axios;
Vue.prototype.$cookies.config(60 * 30);
// 获取本平台的服务ID
axios({
method: 'get',
url: `/api/server/system/configInfo`,
}).then( (res)=> {
if (res.data.code === 0) {
Vue.prototype.$myServerId = res.data.data.addOn.serverId;
}
}).catch( (error)=> {
});
new Vue({
router: router,
render: h => h(App),