diff --git a/.env.dev b/.env.dev index c249191..7f1c9e6 100644 --- a/.env.dev +++ b/.env.dev @@ -12,7 +12,7 @@ VITE_ROUTER_BASE=/ VITE_ROUTER_HISTORY=hash # api -VITE_API_BASIC=http://10.10.1.6:8060 +VITE_API_BASIC=https://api.hailin-keji.com VITE_API_HTTP=/api/v1/ # storage VITE_STORAGE_NAMESPACE = gin-admin_local_ \ No newline at end of file diff --git a/.env.prod b/.env.prod index d68d87a..ccd9c5b 100644 --- a/.env.prod +++ b/.env.prod @@ -11,7 +11,7 @@ VITE_PERMISSION=true VITE_ROUTER_HISTORY=hash # api -VITE_API_BASIC=/ +VITE_API_BASIC=https://api.hailin-keji.com VITE_API_HTTP=/api/v1/ # storage diff --git a/src/locales/lang/zh-CN/pages.js b/src/locales/lang/zh-CN/pages.js index 0d2b938..6fc9ff3 100644 --- a/src/locales/lang/zh-CN/pages.js +++ b/src/locales/lang/zh-CN/pages.js @@ -1,6 +1,6 @@ export default { 'pages.layouts.userLayout.title': - '轻量级、灵活、优雅且功能齐全的脚手架。', + '成为中国领先的新型饲用蛋白供应商', 'pages.login.accountLogin.tab': '账户密码登录', 'pages.login.failure': '登录失败,请重试!', 'pages.login.success': '登录成功!', diff --git a/src/router/util.js b/src/router/util.js index 46f97a4..c9b58b1 100644 --- a/src/router/util.js +++ b/src/router/util.js @@ -73,7 +73,10 @@ export function formatRoutes(routes = [], parent = {}) { const modules = import.meta.glob('../views/**/*.vue') return routes .map((item) => { + console.log(111) const localRoute = find(toList(localRoutes), { name: item.name }) + console.log(222,localRoute) + if (!localRoute) return const component = localRoute?.component || 'exception/404' const isLink = localRoute?.meta?.type === 'link' diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 30ed4f6..7bd76f3 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -20,7 +20,7 @@ - + {{ $t('pages.login.submit') }} @@ -145,18 +145,18 @@ function getFirstValidRoute() { * 去首页 */ function goIndex() { - router.push('/home') - // if (redirect.value) { - // location.href = redirect.value - // } else { - // const indexRoute = getFirstValidRoute() - // if (!indexRoute) return - // router.push(indexRoute) - // } - // notification.success({ - // message: t('welcome'), - // description: `${timeFix()},${t('home')}`, - // }) + // router.push('/home') + if (redirect.value) { + location.href = redirect.value + } else { + const indexRoute = getFirstValidRoute() + if (!indexRoute) return + router.push(indexRoute) + } + notification.success({ + message: t('welcome'), + // description: `${timeFix()},${t('home')}`, + }) }