Commit 422ec1b4 by User

本地平台运行修改

parent 3faf04c4
# backend service base url, prod environment
VITE_SERVICE_BASE_URL=''
VITE_SERVICE_BASE_URL='http://localhost:80'
# other backend service base url, prod environment
VITE_OTHER_SERVICE_BASE_URL= `{
......
# backend service base url, test environment
VITE_SERVICE_BASE_URL=''
VITE_SERVICE_BASE_URL='http://localhost:80'
# other backend service base url, test environment
VITE_OTHER_SERVICE_BASE_URL= `{
......
......@@ -5,7 +5,7 @@ import { useRouterPush } from '@/hooks/common/router';
defineOptions({ name: 'ExceptionBase' });
type ExceptionType = '403' | '404' | '500';
type ExceptionType = '401' | '403' | '404' | '500';
interface Props {
/**
......@@ -23,6 +23,7 @@ const props = defineProps<Props>();
const { routerPushByKey } = useRouterPush();
const iconMap: Record<ExceptionType, string> = {
'401': '401',
'403': 'no-permission',
'404': 'not-found',
'500': 'service-error'
......
......@@ -133,8 +133,8 @@ function getSiderCollapsedWidth() {
<GlobalSider />
</template>
<GlobalMenu />
<GlobalContent style="display: none;" />
<div id="extjs-root" style="width: 100%; height: 100%"></div>
<GlobalContent />
<!-- <div id="extjs-root" style="width: 100%; height: 100%"></div> -->
<ThemeDrawer />
<template #footer>
<GlobalFooter />
......
......@@ -5,8 +5,8 @@ defineOptions({
name: 'GlobalLogo'
});
const DisplayName = window.uiGlobalConfig.DisplayName;
const Icon = window.uiGlobalConfig.Icon;
const DisplayName = '本地平台';
const Icon = 'window.uiGlobalConfig.Icon';
interface Props {
/** Whether to show the title */
......
......@@ -16,7 +16,7 @@ import GlobalLogo from '../../global-logo/index.vue';
defineOptions({
name: 'VerticalMenuMix'
});
const DisplayName = window.uiGlobalConfig.DisplayName;
const DisplayName = 'window.uiGlobalConfig.DisplayName';
const route = useRoute();
const appStore = useAppStore();
const themeStore = useThemeStore();
......
......@@ -18,7 +18,7 @@ const isMixLayoutMode = computed(() => layoutMode.value.includes('mix'));
const isWrapperScrollMode = computed(() => themeStore.layout.scrollMode === 'wrapper');
const DisplayName = window.uiGlobalConfig.DisplayName;
const DisplayName = 'window.uiGlobalConfig.DisplayName';
</script>
<template>
......
......@@ -9,7 +9,7 @@ export function setupLoading() {
const { r, g, b } = getRgb(themeColor);
// const DisplayName = '123';
const DisplayName = window.uiGlobalConfig.DisplayName;
const DisplayName = 'window.uiGlobalConfig.DisplayName';
const primaryColor = `--primary-color: ${r} ${g} ${b}`;
const loadingClasses = [
......
......@@ -20,5 +20,9 @@ export const views: Record<LastLevelRouteKey, RouteComponent | (() => Promise<Ro
500: () => import("@/views/_builtin/500/index.vue"),
"iframe-page": () => import("@/views/_builtin/iframe-page/[url].vue"),
login: () => import("@/views/_builtin/login/index.vue"),
test: () => import("@/views/_builtin/test/index.vue"),
test_test1: () => import("@/views/_builtin/test/test1/index.vue"),
test_test2: () => import("@/views/_builtin/test/test2/index.vue"),
test_test3: () => import("@/views/_builtin/test/test3/index.vue"),
home: () => import("@/views/home/index.vue"),
};
......@@ -73,5 +73,43 @@ export const generatedRoutes: GeneratedRoute[] = [
constant: true,
hideInMenu: true
}
},
{
name: 'test',
path: '/test',
component: 'layout.base',
meta: {
title: 'test',
i18nKey: 'route.test'
},
children: [
{
name: 'test_test1',
path: '/test/test1',
component: 'view.test_test1',
meta: {
title: 'test_test1',
i18nKey: 'route.test_test1'
}
},
{
name: 'test_test2',
path: '/test/test2',
component: 'view.test_test2',
meta: {
title: 'test_test2',
i18nKey: 'route.test_test2'
}
},
{
name: 'test_test3',
path: '/test/test3',
component: 'view.test_test3',
meta: {
title: 'test_test3',
i18nKey: 'route.test_test3'
}
}
]
}
];
......@@ -181,7 +181,11 @@ const routeMap: RouteMap = {
"500": "/500",
"home": "/home",
"iframe-page": "/iframe-page/:url",
"login": "/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?"
"login": "/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?",
"test": "/test",
"test_test1": "/test/test1",
"test_test2": "/test/test2",
"test_test3": "/test/test3"
};
/**
......
......@@ -36,6 +36,10 @@ declare module "@elegant-router/types" {
"home": "/home";
"iframe-page": "/iframe-page/:url";
"login": "/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?";
"test": "/test";
"test_test1": "/test/test1";
"test_test2": "/test/test2";
"test_test3": "/test/test3";
};
/**
......@@ -86,6 +90,7 @@ declare module "@elegant-router/types" {
| "home"
| "iframe-page"
| "login"
| "test"
>;
/**
......@@ -109,6 +114,10 @@ declare module "@elegant-router/types" {
| "500"
| "iframe-page"
| "login"
| "test"
| "test_test1"
| "test_test2"
| "test_test3"
| "home"
>;
......
......@@ -15,7 +15,7 @@ declare global {
uiGlobalConfig: {
InternalCode: string;
[key: string]: any;
}
};
}
interface ViewTransition {
......
......@@ -174,7 +174,9 @@ const handleMenuAccess = async () => {
extTag.value = handler;
}
} else {
hasError.value = true;
// hasError.value = true;
selectTag.value = `${url}`;
console.log(selectTag.value);
}
} catch (error) {
console.error('Menu access error:', error);
......
......@@ -3,7 +3,7 @@ import { computed } from 'vue';
import type { Component } from 'vue';
import { getPaletteColorByNumber, mixColor } from '@sa/color';
import { $t } from '@/locales';
import { useAppStore } from '@/store/modules/app';
// import { useAppStore } from '@/store/modules/app';
import { useThemeStore } from '@/store/modules/theme';
import { loginModuleRecord } from '@/constants/app';
import PwdLogin from './modules/pwd-login.vue';
......@@ -19,10 +19,10 @@ interface Props {
const props = defineProps<Props>();
const appStore = useAppStore();
// const appStore = useAppStore();
const themeStore = useThemeStore();
const DisplayName = window.uiGlobalConfig.DisplayName;
const Icon = window.uiGlobalConfig.Icon;
const DisplayName = 'window.uiGlobalConfig.DisplayName';
const Icon = 'window.uiGlobalConfig.Icon';
interface LoginModule {
label: string;
component: Component;
......
<script setup lang="ts">
// 测试页面组件
</script>
<template>
<div class="h-full wh-full flex-col flex-center">
<div class="text-primary text-32px font-bold mb-24px">测试页面</div>
<div class="text-16px mb-12px">这是一个用于测试的页面组件</div>
<div class="text-14px text-gray-400">您可以在这里添加任何需要测试的内容</div>
</div>
</template>
<style scoped></style>
<script setup lang="ts">
// 测试页面1组件
</script>
<template>
<div class="h-full wh-full flex-col flex-center">
<div class="text-primary text-32px font-bold mb-24px">测试页面12</div>
<div class="text-16px mb-12px">这是测试页面1</div>
<div class="text-14px text-gray-400">测试子菜单项是否能正常展示</div>
</div>
</template>
<style scoped></style>
<script setup lang="ts">
// 测试页面2组件
</script>
<template>
<div class="h-full wh-full flex-col flex-center">
<div class="text-primary text-32px font-bold mb-24px">测试页面2</div>
<div class="text-16px mb-12px">这是测试页面2</div>
<div class="text-14px text-gray-400">测试子菜单项是否能正常展示</div>
</div>
</template>
<style scoped></style>
<script setup lang="ts">
// 测试页面3组件
</script>
<template>
<div class="h-full wh-full flex-col flex-center">
<div class="text-primary text-32px font-bold mb-24px">测试页面3</div>
<div class="text-16px mb-12px">这是测试页面3</div>
<div class="text-14px text-gray-400">测试子菜单项是否能正常展示</div>
</div>
</template>
<style scoped></style>
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