2025-01-23 01:10:59 +00:00
|
|
|
<!--
|
|
|
|
* @Description:
|
|
|
|
* @Author: zenghua.wang
|
|
|
|
* @Date: 2024-01-24 18:54:01
|
|
|
|
* @LastEditors: zenghua.wang
|
2025-02-28 06:28:54 +00:00
|
|
|
* @LastEditTime: 2025-02-28 11:31:12
|
2025-01-23 01:10:59 +00:00
|
|
|
-->
|
|
|
|
<template>
|
|
|
|
<el-config-provider :size="size" :locale="zhCn">
|
|
|
|
<router-view />
|
|
|
|
</el-config-provider>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup name="app">
|
2025-06-30 09:27:07 +08:00
|
|
|
import { computed, onMounted, onBeforeMount } from 'vue';
|
2025-01-23 01:10:59 +00:00
|
|
|
import { useSettingStore } from '@/store/modules/setting';
|
|
|
|
// 配置element中文
|
|
|
|
import zhCn from 'element-plus/es/locale/lang/zh-cn';
|
|
|
|
|
2025-06-30 09:27:07 +08:00
|
|
|
import { useRouter, useRoute } from 'vue-router';
|
|
|
|
const route = useRoute();
|
2025-06-26 10:54:53 +08:00
|
|
|
const router = useRouter();
|
|
|
|
onMounted(() => {
|
2025-06-30 09:27:07 +08:00
|
|
|
if (route.query.source) {
|
|
|
|
localStorage.setItem('source', route.query.source);
|
2025-06-26 10:54:53 +08:00
|
|
|
router.push('/sub-government-affairs-service/home');
|
|
|
|
} else {
|
2025-06-26 14:14:30 +08:00
|
|
|
if (localStorage.getItem('daimp-front-main_userStore') && JSON.parse(localStorage.getItem('daimp-front-main_userStore')).token) {
|
2025-06-26 10:54:53 +08:00
|
|
|
router.push('/sub-government-affairs-service/home');
|
|
|
|
} else {
|
|
|
|
router.push('/sub-government-affairs-service/login');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2025-01-23 01:10:59 +00:00
|
|
|
const SettingStore = useSettingStore();
|
|
|
|
// 配置全局组件大小
|
|
|
|
const size = computed(() => SettingStore.themeConfig.globalComSize);
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
2025-02-26 17:03:50 +08:00
|
|
|
@import './styles/style';
|
2025-01-23 01:10:59 +00:00
|
|
|
</style>
|