From 228eebbb7541f525eb42e569ade2bc12e2dd9c11 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Fri, 13 Dec 2024 17:25:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A3=85=E5=A4=87=E4=B8=8A=E4=BC=A0=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E5=A4=A7=E5=B0=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.ts | 9 +++++++-- src/views/user/goodsManagement/index.vue | 20 ++++++++++---------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/router/index.ts b/src/router/index.ts index e2ea71a..1447835 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -3,6 +3,7 @@ import test from './module/test' import myInfo from './module/myInfo' import { mainStore } from 'store/main' +import { el } from 'element-plus/es/locale' @@ -720,15 +721,19 @@ const router = createRouter({ }) +const white = ['/qr-code'] // 使页面跳转后滚动条恢复至顶部 router.beforeEach((to, from, next) => { - const store = mainStore() if (to.meta.isLogin && !to.meta.AuthFlag) { if (store.token) { next() } else { - next(`/login?redirect=${encodeURIComponent(to.fullPath)}`) + if (white.includes(to.path)) { + next() + } else { + next(`/login?redirect=${encodeURIComponent(to.fullPath)}`) + } } } else { next() diff --git a/src/views/user/goodsManagement/index.vue b/src/views/user/goodsManagement/index.vue index 4bd201e..dc0d4ab 100644 --- a/src/views/user/goodsManagement/index.vue +++ b/src/views/user/goodsManagement/index.vue @@ -753,9 +753,9 @@ const beforeUpload = (file: any) => { if (file.size / 1024 / 1024 > 2) { ElMessage({ type: 'error', - message: '上传文件大小不能超过2M!', + message: '上传文件大小不能超过5M!', }) - // this.$message.error({ message: `上传文件大小不能超过2M!`,}); + // this.$message.error({ message: `上传文件大小不能超过5M!`,}); return false } } @@ -1468,7 +1468,7 @@ const options = ref([]) - 支持格式:.jpg、.png 单个文件大小不能超过2M + 支持格式:.jpg、.png 单个文件大小不能超过5M
*注:图片排序为平台展示顺序,不得少于1张,不得多于6张,建议使用图片比例1:1
@@ -1499,7 +1499,7 @@ const options = ref([]) ([]) - 支持格式:.jpg、.png 单个文件大小不能超过2M + 支持格式:.jpg、.png 单个文件大小不能超过5M
*注:图片排序为平台展示顺序,不得少于1张,不得多于6张,建议使用图片比例16:9
@@ -1554,7 +1554,7 @@ const options = ref([]) ([]) - 支持格式:.jpg、.png 单个文件大小不能超过2M + 支持格式:.jpg、.png 单个文件大小不能超过5M @@ -1630,7 +1630,7 @@ const options = ref([]) ([]) - 支持格式:.jpg、.png 单个文件大小不能超过2M, + 支持格式:.jpg、.png 单个文件大小不能超过5M, @@ -1690,7 +1690,7 @@ const options = ref([])