[RPC 云端录像] 修复服务ID 获取

This commit is contained in:
648540858
2024-12-31 15:36:48 +08:00
parent 32e90b2537
commit 874733fa2c
7 changed files with 41 additions and 25 deletions

View File

@@ -76,18 +76,21 @@ 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({
beforeCreate: function () {
// 获取本平台的服务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)=> {
});
},
router: router,
render: h => h(App),
}).$mount('#app')