提交 7dd7012f authored 作者: lidongxu's avatar lidongxu

Merge branch 'release' into dev

# 王小卤链路中心 # 王小卤链路中心
## 网页层级讲解 ## 网页层级讲解
1. 水印 fixed定位,层级是: 1. 水印 fixed定位,层级是:9
\ No newline at end of file 2. 左侧导航 fixed 定位,层级是 1001
3. 头部导航 fixed 定位,层级是 9
4. el-popper 层级是 2000
<template> <template>
<el-watermark :font="{ <el-watermark :font="font"
color: `rgba(0, 0, 0, .65)`
}"
:content="content" :content="content"
class="wm-class"> class="wm-class">
<router-view /> <router-view />
</el-watermark> </el-watermark>
<back-to-up /> <back-to-up />
</template> </template>
...@@ -14,9 +11,27 @@ ...@@ -14,9 +11,27 @@
import useSettingsStore from '@/store/modules/settings' import useSettingsStore from '@/store/modules/settings'
import { handleThemeStyle } from '@/utils/theme' import { handleThemeStyle } from '@/utils/theme'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
const content = computed(() => { const content = computed(() => {
return useUserStore().userInfo.nickName + ' ' + useUserStore().userInfo.phone return useUserStore().userInfo.nickName + ' ' + useUserStore().userInfo.phone
}) })
const isDark = computed(() => {
return useSettingsStore().isDark
})
const font = reactive({
color: 'rgba(0, 0, 0, .15)',
})
watch(
isDark,
() => {
font.color = isDark.value
? 'rgba(255, 255, 255, 0.15)'
: 'rgba(0, 0, 0, .15)'
},
{
immediate: true,
}
)
onMounted(() => { onMounted(() => {
nextTick(() => { nextTick(() => {
...@@ -34,7 +49,5 @@ onMounted(() => { ...@@ -34,7 +49,5 @@ onMounted(() => {
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 999;
pointer-events: none;
} }
</style> </style>
...@@ -201,3 +201,5 @@ aside { ...@@ -201,3 +201,5 @@ aside {
width: 2px; /* 调整粗细 */ width: 2px; /* 调整粗细 */
background: #ddd; /* 可选:修改颜色 */ background: #ddd; /* 可选:修改颜色 */
} }
<template> <template>
<div class="wrap"> <div>
<el-dialog v-model="dialogVisible" <el-dialog v-model="dialogVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
:show-close="false" :show-close="false"
modal-class="version-notice-dialog"
width="40%" width="40%"
@close="handleClose" @close="handleClose"
draggable draggable
overflow > overflow
append-to-body>
<template #header> <template #header>
<p class="el-dialog__title">版本更新说明</p> <p class="el-dialog__title">版本更新说明</p>
<div class="version-tag">V{{ nowVersion }} 更新内容</div> <div class="version-tag">V{{ nowVersion }} 更新内容</div>
...@@ -89,10 +91,8 @@ const handleConfirm = () => { ...@@ -89,10 +91,8 @@ const handleConfirm = () => {
</script> </script>
<style lang="scss" <style lang="scss">
scoped> .version-notice-dialog {
.wrap {
::v-deep(.el-overlay) {
.el-overlay-dialog { .el-overlay-dialog {
.el-dialog { .el-dialog {
// 从上到下的渐变蓝色 // 从上到下的渐变蓝色
...@@ -122,9 +122,7 @@ const handleConfirm = () => { ...@@ -122,9 +122,7 @@ const handleConfirm = () => {
color: white; color: white;
line-height: 1.5; line-height: 1.5;
} }
}
}
// 更新内容 // 更新内容
.update-content { .update-content {
...@@ -161,4 +159,5 @@ const handleConfirm = () => { ...@@ -161,4 +159,5 @@ const handleConfirm = () => {
} }
} }
} }
}
</style> </style>
\ No newline at end of file
...@@ -14,7 +14,7 @@ import useVersionStore from '@/store/modules/version' ...@@ -14,7 +14,7 @@ import useVersionStore from '@/store/modules/version'
NProgress.configure({ showSpinner: false }) NProgress.configure({ showSpinner: false })
// 登录页,物流查询页 // 登录页,物流查询页
const whiteList = ['/login', '/logistics'] export const whiteList = ['/login', '/logistics']
const isWhiteList = (path) => { const isWhiteList = (path) => {
return whiteList.some(pattern => isPathMatch(pattern, path)) return whiteList.some(pattern => isPathMatch(pattern, path))
...@@ -61,6 +61,7 @@ router.beforeEach((to, from, next) => { ...@@ -61,6 +61,7 @@ router.beforeEach((to, from, next) => {
if (isWhiteList(to.path)) { if (isWhiteList(to.path)) {
next() next()
} else { } else {
console.log('登录未遂地址', to.fullPath)
next(`/login?redirect=${to.fullPath}`) next(`/login?redirect=${to.fullPath}`)
NProgress.done() NProgress.done()
} }
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<script setup> <script setup>
const reportBaseDomain = import.meta.env.VITE_APP_REPORT_URL // 基础域名 const reportBaseDomain = import.meta.env.VITE_APP_REPORT_URL // 基础域名
const route = useRoute() const route = useRoute()
console.log(route, route.fullPath)
const openUrl = reportBaseDomain + route.fullPath const openUrl = reportBaseDomain + route.fullPath
</script> </script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论