diff --git a/src/App.vue b/src/App.vue index 8007417..780d599 100644 --- a/src/App.vue +++ b/src/App.vue @@ -20,6 +20,7 @@ import other from '/@/utils/other'; import { Local, Session } from '/@/utils/storage'; import mittBus from '/@/utils/mitt'; import setIntroduction from '/@/utils/setIconfont'; +import logoMini from '/@/assets/logo-mini.svg'; // 引入组件 const LockScreen = defineAsyncComponent(() => import('/@/layout/lockScreen/index.vue')); @@ -59,6 +60,14 @@ const getGlobalComponentSize = computed(() => { const getGlobalI18n = computed(() => { return messages.value[locale.value]; }); + +// 动态设置网站图标 +let link: any = document.querySelector("link[rel*='icon']") || document.createElement("link"); +link.type = "image/x-icon"; +link.rel = "shortcut icon"; +link.href = themeConfig.value.logoMini||logoMini; +document.getElementsByTagName("head")[0].appendChild(link); + // 设置初始化,防止刷新时恢复默认 onBeforeMount(() => { // 设置批量第三方 icon 图标 diff --git a/src/api/log/index.ts b/src/api/log/index.ts new file mode 100644 index 0000000..edd1cc8 --- /dev/null +++ b/src/api/log/index.ts @@ -0,0 +1,24 @@ +import request from '/@/utils/request'; +import { baseUrlHost } from '../baseUrlHost'; + +/** + * (不建议写成 request.post(xxx),因为这样 post 时,无法 params 与 data 同时传参) + * 注意在写get请求时,参数是params,而不是data,要标注好 + * + * 登录api接口集合 + * @method getlogList 获取日志列表 + */ + +export function logApi() { + return { + getlogList: (params: object) => { + // console.log(1111111111111111); + + return request({ + url: baseUrlHost + '/acLog', + method: 'get', + params, + }); + }, + }; +} diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 71e74e0..e4a69cc 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -14,6 +14,7 @@ export default { articleDetail: 'articleDetail', addArticle: 'addArticle', editArticle: 'editArticle', + log:'log', limits: 'limits', limitsFrontEnd: 'FrontEnd', limitsFrontEndPage: 'FrontEndPage', @@ -171,6 +172,10 @@ export default { fourIsDark: 'Dark Mode', fourIsWartermark: 'Turn on watermark', fourWartermarkText: 'Watermark copy', + logoTitle: 'Logo title', + footTitle: 'Foot title', + footTip: 'Foot tip', + logoSetting: 'Logo setting', fiveTitle: 'Other settings', fiveTagsStyle: 'Tagsview style', fiveAnimation: 'page animation', diff --git a/src/i18n/lang/zh-cn.ts b/src/i18n/lang/zh-cn.ts index 2c13ff3..650be90 100644 --- a/src/i18n/lang/zh-cn.ts +++ b/src/i18n/lang/zh-cn.ts @@ -14,6 +14,7 @@ export default { articleDetail: '文章详情', addArticle: '新增文章', editArticle: '编辑文章', + log:'系统日志', limits: '权限管理', limitsFrontEnd: '前端控制', limitsFrontEndPage: '页面权限', @@ -171,6 +172,10 @@ export default { fourIsDark: '深色模式', fourIsWartermark: '开启水印', fourWartermarkText: '水印文案', + logoTitle: 'Logo名称', + footTitle: '页脚版权说明', + logoSetting: 'Logo设置', + footTip: '页脚Tip', fiveTitle: '其它设置', fiveTagsStyle: 'Tagsview 风格', fiveAnimation: '主页面切换动画', diff --git a/src/i18n/lang/zh-tw.ts b/src/i18n/lang/zh-tw.ts index 76adb57..2576d77 100644 --- a/src/i18n/lang/zh-tw.ts +++ b/src/i18n/lang/zh-tw.ts @@ -14,6 +14,7 @@ export default { articleDetail: '文章詳情', addArticle: '文章新增', editArticle: '文章編輯', + log:'系統日誌', limits: '許可權管理', limitsFrontEnd: '前端控制', limitsFrontEndPage: '頁面許可權', @@ -171,6 +172,10 @@ export default { fourIsDark: '深色模式', fourIsWartermark: '開啟浮水印', fourWartermarkText: '浮水印文案', + logoTitle: 'Logo 標題', + footTitle: '頁腳版權說明', + footTip: '頁腳tip', + logoSetting: 'Logo 配置', fiveTitle: '其它設定', fiveTagsStyle: 'Tagsview 風格', fiveAnimation: '主頁面切換動畫', diff --git a/src/layout/footer/index.vue b/src/layout/footer/index.vue index 97cffbf..cd58efb 100644 --- a/src/layout/footer/index.vue +++ b/src/layout/footer/index.vue @@ -1,14 +1,19 @@ diff --git a/src/router/route.ts b/src/router/route.ts index 8956a44..9a5f7a3 100644 --- a/src/router/route.ts +++ b/src/router/route.ts @@ -232,6 +232,21 @@ export const dynamicRoutes: Array = [ icon: 'iconfont icon-fuwenbenkuang', }, }, + { + path: '/log', + name: 'log', + component: () => import('/@/views/log/index.vue'), + meta: { + title: 'message.router.log', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + roles: ['admin', 'common'], + icon: 'fa fa-wpforms', + }, + }, { path: '/order', name: 'order', diff --git a/src/stores/themeConfig.ts b/src/stores/themeConfig.ts index 3e8e683..364167b 100644 --- a/src/stores/themeConfig.ts +++ b/src/stores/themeConfig.ts @@ -105,6 +105,10 @@ export const useThemeConfig = defineStore('themeConfig', { isWartermark: true, // 水印文案 wartermarkText: 'vue-next-admin', + // 页脚版权信息内容 + globalFootTitleMsg: '深圳市 xxx 公司版权所有', + // 页脚tip + globalFootTipMsg: 'vue-next-admin,Made by lyt with ❤️', /** * 其它设置 @@ -146,6 +150,8 @@ export const useThemeConfig = defineStore('themeConfig', { globalI18n: 'zh-cn', // 默认全局组件大小,可选值"",默认 'large' globalComponentSize: 'large', + // 网站logo + logoMini: '/@/assets/logo-mini.svg', }, }), actions: { diff --git a/src/types/pinia.d.ts b/src/types/pinia.d.ts index f7c32ad..5d57588 100644 --- a/src/types/pinia.d.ts +++ b/src/types/pinia.d.ts @@ -77,6 +77,8 @@ declare interface ThemeConfigState { isIsDark: boolean; isWartermark: boolean; wartermarkText: string; + globalFootTitleMsg: string; + globalFootTipMsg: string; tagsStyle: string; animation: string; columnsAsideStyle: string; @@ -88,5 +90,6 @@ declare interface ThemeConfigState { globalViceTitleMsg: string; globalI18n: string; globalComponentSize: string; + logoMini: string; }; } diff --git a/src/views/log/index.vue b/src/views/log/index.vue new file mode 100644 index 0000000..ad44836 --- /dev/null +++ b/src/views/log/index.vue @@ -0,0 +1,189 @@ + + + + + \ No newline at end of file