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([])