2 Commits

Author SHA1 Message Date
fyy
2f2f8fb798 Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks failed
/ Explore-Gitea-Actions (push) Has been cancelled
2025-08-25 17:06:25 +08:00
fyy
1de539ddde feat: 隐藏导航页面 2025-08-25 17:04:41 +08:00
4 changed files with 98 additions and 87 deletions

View File

@@ -84,13 +84,13 @@ const menus = computed(() => {
// icon: CircleHelp, // icon: CircleHelp,
// text: $t('ui.widgets.qa'), // text: $t('ui.widgets.qa'),
// }, // },
{ // {
handler: () => { // handler: () => {
router.push('/navigation'); // router.push('/navigation');
}, // },
// icon: TagOutlined, // // icon: TagOutlined,
text: '返回导航', // text: '返回导航',
}, // },
]; ];
/** /**
* 租户选中状态 不显示个人中心 * 租户选中状态 不显示个人中心

View File

@@ -56,9 +56,7 @@ export const useAuthStore = defineStore('auth', () => {
if (accessStore.loginExpired) { if (accessStore.loginExpired) {
accessStore.setLoginExpired(false); accessStore.setLoginExpired(false);
} else { } else {
onSuccess onSuccess ? await onSuccess?.() : await router.push('/analytics');
? await onSuccess?.()
: await router.push('/navigation');
} }
if (userInfo?.realName) { if (userInfo?.realName) {

View File

@@ -36,17 +36,17 @@ const { authPanelCenter, authPanelLeft, authPanelRight, isDark } =
usePreferences(); usePreferences();
</script> --> </script> -->
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted } from 'vue' import { ref, onMounted } from 'vue';
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router';
import { useAuthStore } from '../../../../../apps/web-antd/src/store' import { useAuthStore } from '../../../../../apps/web-antd/src/store';
import { Checkbox } from 'ant-design-vue'; import { Checkbox } from 'ant-design-vue';
const router = useRouter() const router = useRouter();
const authStore = useAuthStore(); const authStore = useAuthStore();
// 响应式数据 // 响应式数据
const username = ref('') const username = ref('');
const password = ref('') const password = ref('');
const rememberMe = ref(false) const rememberMe = ref(false);
// 页面加载时恢复用户名 // 页面加载时恢复用户名
onMounted(() => { onMounted(() => {
@@ -58,6 +58,7 @@ onMounted(() => {
}); });
function getRetUrlParam() { function getRetUrlParam() {
const urlParams = new URLSearchParams(window.location.search); const urlParams = new URLSearchParams(window.location.search);
console.log('urlParams', urlParams);
return urlParams.get('returl'); return urlParams.get('returl');
} }
const retUrl: string | null = getRetUrlParam(); const retUrl: string | null = getRetUrlParam();
@@ -66,47 +67,50 @@ const retUrl : string | null = getRetUrlParam();
const login = () => { const login = () => {
// 验证输入 // 验证输入
if (!username.value.trim()) { if (!username.value.trim()) {
alert('请输入用户名') alert('请输入用户名');
return return;
} }
if (!password.value.trim()) { if (!password.value.trim()) {
alert('请输入密码') alert('请输入密码');
return return;
} }
// 模拟登录请求 // 模拟登录请求
console.log('正在登录...', { username: username.value, password: password.value }) console.log('正在登录...', {
username: username.value,
password: password.value,
});
setTimeout(() => { setTimeout(() => {
alert('登录成功!') alert('登录成功!');
// 存储用户名 // 存储用户名
if (rememberMe.value) { if (rememberMe.value) {
localStorage.setItem('rememberedUser', username.value) localStorage.setItem('rememberedUser', username.value);
} else { } else {
localStorage.removeItem('rememberedUser') localStorage.removeItem('rememberedUser');
} }
// 跳转页面 // 跳转页面
router.push('/navigation') router.push('/navigation');
}, 800) }, 800);
} };
const handleAccountLogin = async () => { const handleAccountLogin = async () => {
try { try {
// const requestParam: any = omit(values, ['code']); // const requestParam: any = omit(values, ['code']);
// 登录 // 登录
await authStore.authLogin({ await authStore.authLogin({
grantType: "password", grantType: 'password',
password: password.value, password: password.value,
tenantId: "000000", tenantId: '000000',
username: username.value, username: username.value,
retUrl: retUrl, retUrl: retUrl,
}); });
} catch (error) { } catch (error) {
console.error(error); console.error(error);
} }
} };
</script> </script>
<template> <template>
@@ -122,7 +126,11 @@ const handleAccountLogin = async () => {
<h3>用户登录</h3> <h3>用户登录</h3>
<!-- 用户名输入 --> <!-- 用户名输入 -->
<div class="input-group"> <div class="input-group">
<img src="../../../../../apps/web-antd/src/assets/my.png" alt="User Icon" class="input-icon"> <img
src="../../../../../apps/web-antd/src/assets/my.png"
alt="User Icon"
class="input-icon"
/>
<input <input
type="text" type="text"
placeholder="请输入您的用户名" placeholder="请输入您的用户名"
@@ -132,7 +140,11 @@ const handleAccountLogin = async () => {
<!-- 密码输入 --> <!-- 密码输入 -->
<div class="input-group"> <div class="input-group">
<img src="../../../../../apps/web-antd/src/assets/mima.png" alt="Password Icon" class="input-icon"> <img
src="../../../../../apps/web-antd/src/assets/mima.png"
alt="Password Icon"
class="input-icon"
/>
<input <input
type="password" type="password"
placeholder="请输入您的密码" placeholder="请输入您的密码"
@@ -280,7 +292,8 @@ const handleAccountLogin = async () => {
<style scoped> <style scoped>
@font-face { @font-face {
font-family: 'BaiduVariety'; font-family: 'BaiduVariety';
src: url('../../../../../apps/web-antd/src/assets/fonts/百度综艺简体.ttf') format('truetype'); src: url('../../../../../apps/web-antd/src/assets/fonts/百度综艺简体.ttf')
format('truetype');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
@@ -293,9 +306,11 @@ const handleAccountLogin = async () => {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background: background:
/* url('../../../../../apps/web-antd/src/assets/juxing.png') no-repeat center center fixed, */ /* url('../../../../../apps/web-antd/src/assets/juxing.png') no-repeat center center fixed, */ url('../../../../../apps/web-antd/src/assets/222.png')
url('../../../../../apps/web-antd/src/assets/222.png') no-repeat center center fixed; no-repeat center center fixed;
background-size: 100% 100%, 100% 100%; background-size:
100% 100%,
100% 100%;
/* background-repeat: no-repeat, no-repeat; /* background-repeat: no-repeat, no-repeat;
background-position: center center, center center; */ background-position: center center, center center; */
color: #fff; color: #fff;
@@ -335,7 +350,8 @@ const handleAccountLogin = async () => {
width: 100%; width: 100%;
height: 100%; height: 100%;
text-align: center; text-align: center;
background: url('../../../../../apps/web-antd/src/assets/from.png') no-repeat center center fixed; background: url('../../../../../apps/web-antd/src/assets/from.png') no-repeat
center center fixed;
} }
.login-form { .login-form {
border-radius: 10px; border-radius: 10px;
@@ -380,8 +396,8 @@ input:-webkit-autofill {
margin-top: 20px; margin-top: 20px;
border: none; border: none;
border-radius: 5px; border-radius: 5px;
background-color: #19DCF8; background-color: #19dcf8;
color: #0254A5; color: #0254a5;
cursor: pointer; cursor: pointer;
font-size: 22px; font-size: 22px;
margin-top: 70px; margin-top: 70px;
@@ -401,8 +417,6 @@ input:-webkit-autofill {
color: #eee; color: #eee;
} }
/* 新增 .input-group 样式 */ /* 新增 .input-group 样式 */
.input-group { .input-group {
display: flex; display: flex;

View File

@@ -11,7 +11,7 @@ import {
LanguageToggle, LanguageToggle,
PreferencesButton, PreferencesButton,
ThemeToggle, ThemeToggle,
BackNavigation, // BackNavigation,
} from '../../widgets'; } from '../../widgets';
interface Props { interface Props {
@@ -44,8 +44,7 @@ const rightSlots = computed(() => {
list.push({ list.push({
index: REFERENCE_VALUE, index: REFERENCE_VALUE,
name: 'global-search', name: 'global-search',
} });
);
} }
if (preferencesButtonPosition.value.header) { if (preferencesButtonPosition.value.header) {
@@ -172,9 +171,9 @@ function clearPreferencesAndLogout() {
<template v-else-if="slot.name === 'fullscreen'"> <template v-else-if="slot.name === 'fullscreen'">
<VbenFullScreen class="mr-1" /> <VbenFullScreen class="mr-1" />
</template> </template>
<template v-else-if="slot.name === 'back-navigation'"> <!-- <template v-else-if="slot.name === 'back-navigation'">
<BackNavigation class="mr-1" /> <BackNavigation class="mr-1" />
</template> </template> -->
</slot> </slot>
</template> </template>
</div> </div>