update
1.修改标准化大屏跳转逻辑,根据获取分中心信息,进行跳转至对应页面
This commit is contained in:
+21
@@ -7,9 +7,30 @@
|
||||
import zhCN from 'ant-design-vue/es/locale/zh_CN';
|
||||
import dayjs from 'dayjs';
|
||||
import 'dayjs/locale/zh-cn';
|
||||
import { onMounted } from 'vue';
|
||||
import { getEmergencyCenterApi } from '/@/api/user.ts';
|
||||
import { useUserStore } from '/@/store/modules/user.ts';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
dayjs.locale('zh-cn');
|
||||
const locle = zhCN;
|
||||
|
||||
const userStore = useUserStore();
|
||||
const router = useRouter();
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
if (userStore.getToken) {
|
||||
const { result } = await getEmergencyCenterApi();
|
||||
if (result?.screenPath) {
|
||||
router.replace(result?.screenPath);
|
||||
} else {
|
||||
router.replace('centralScreen');
|
||||
}
|
||||
userStore.setCenterInfo(result);
|
||||
}
|
||||
} catch (e) {}
|
||||
});
|
||||
</script>
|
||||
<style lang="less" src="./assets/less/index.less"></style>
|
||||
<style src="./assets/theme/theme.css"></style>
|
||||
|
||||
Reference in New Issue
Block a user