Commit e4fe9c87 authored by chenjiahao's avatar chenjiahao

修复没有默认type(模块)的问题

parent 1e3c7ff8
......@@ -2,7 +2,7 @@
import { h, ref, onMounted, computed } from 'vue';
import { Modal, Segmented } from 'ant-design-vue';
import { useI18n } from '@/hooks/web/useI18n';
import {useUserStore, useUserStoreWithOut} from '@/store/modules/user';
import { useUserStore, useUserStoreWithOut } from '@/store/modules/user';
import { router } from '@/router';
import {
editBucketData,
......@@ -65,7 +65,8 @@
if (localStorage.getItem('segmentValue') !== null) {
value.value = localStorage.getItem('segmentValue');
} else {
switch (localStorage.getItem('matchedTypes')[0]) {
let type = localStorage.getItem('matchedTypes')[0];
switch (type) {
case '1':
value.value = '基础平台';
break;
......@@ -82,6 +83,7 @@
value.value = '数据要素';
break;
}
localStorage.setItem('type', type);
localStorage.setItem('segmentValue', value.value);
}
router.replace(localStorage.getItem('firstChild'));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment