加水印
This commit is contained in:
parent
ea9113a98a
commit
b82466f17d
@ -104,23 +104,25 @@ router.beforeEach(async(to, from, next) => {
|
||||
// afterEach Router
|
||||
router.afterEach((to) => {
|
||||
const store = useUserStore();
|
||||
|
||||
// 修改网页标题
|
||||
if (to.name !== 'login') {
|
||||
document.title = `${to.meta.title} - ${store.sysConfig.sys_app_name}`;
|
||||
} else {
|
||||
document.title = store.sysConfig.sys_app_name;
|
||||
}
|
||||
|
||||
// Vincent 2023004 修复加载水印的bug
|
||||
if (store.userInfo != undefined){
|
||||
if ( store.userInfo.name != undefined ) {
|
||||
Watermark.set(store.userInfo.name)
|
||||
// Vincent 2023004 修复加载水印的bug
|
||||
if (store.userInfo != undefined){
|
||||
if ( store.userInfo.nick_name != undefined ) {
|
||||
Watermark.set(store.userInfo.nick_name)
|
||||
} else {
|
||||
Watermark.out() // 清除水印
|
||||
}
|
||||
} else{
|
||||
Watermark.out() // 清除水印
|
||||
}
|
||||
|
||||
// 修改网页标题
|
||||
if (to.name !== 'login') {
|
||||
document.title = `${to.meta.title} - ${store.sysConfig.sys_app_name}`;
|
||||
} else {
|
||||
document.title = store.sysConfig.sys_app_name;
|
||||
Watermark.out()
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
export default router;
|
||||
|
||||
@ -2,8 +2,8 @@ import { defineStore } from 'pinia';
|
||||
import { setLocalStorage, getLocalStorage } from '@/utils/storage';
|
||||
import {logout} from '@/api/admin/login'
|
||||
import { usePermissionStore } from '@/store/permission';
|
||||
import { getInfo } from '@/api/admin/sys-user';
|
||||
import { getAppConfig } from '@/api/admin/login';
|
||||
// import { getInfo } from '@/api/admin/sys-user';
|
||||
// import { getAppConfig } from '@/api/admin/login';
|
||||
|
||||
export const useUserStore = defineStore('user', {
|
||||
state: () => {
|
||||
@ -47,7 +47,7 @@ export const useUserStore = defineStore('user', {
|
||||
|
||||
if(code==200){
|
||||
this.clearInfo();
|
||||
window.location.href="/login"
|
||||
window.location.href="/login";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<div class="login-form-container">
|
||||
<div class="account-top">
|
||||
<div class="account-top-logo">
|
||||
<img :src="store.sysConfig.sys_app_logo" />
|
||||
<img src="../../icons/logo.png" />
|
||||
<span class="project-title">用户登录</span>
|
||||
</div>
|
||||
<div class="account-top-desc">肝胆相照 健康中国</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user