From bf5c27d8571122cf80c6176b6c1b3fd49b8ec9c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BF=97=E9=B9=8F?= <2916022834@qq.com> Date: Mon, 1 Jun 2026 11:18:35 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lang/en.ts | 4 ++-- src/lang/zh-cn.ts | 2 +- src/router/index.ts | 9 ++++++++- src/views/home/index.vue | 4 ++++ src/views/home/section-digital-items1.vue | 1 + src/views/home/section-digital-items2.vue | 3 ++- src/views/login/password-tip.vue | 6 +++--- src/views/login/tools.js | 8 ++++---- src/views/main-header.vue | 19 ++++++++++++++----- src/views/pay/payment.vue | 6 +++--- src/views/shoppingCart/order-summary.vue | 11 ++++++++++- src/views/shoppingCart/sc-list.vue | 3 ++- 12 files changed, 54 insertions(+), 22 deletions(-) diff --git a/src/lang/en.ts b/src/lang/en.ts index d145070..7681c39 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -18,7 +18,7 @@ export default { pleaseInputName: 'Please input the name', nameLengthError: 'Name length must be between {min} and {max} characters', passwordSpecial: 'Must contain special characters', - passwordCase: 'Mix of uppercase, lowercase and numbers', + passwordCase: 'A combination of numbers and letters', pleaseInputEmail: 'Please input the email', emailFormatError: 'Please input the email again', pleaseInputPassword: 'Please input the password', @@ -355,7 +355,7 @@ export default { Offices: "Offices", JoinWithUs: "Join with Us", }, - addShoppingCart:{ + addShoppingCart: { title: 'Added to your Shopping Cart', statement: 'Digital Assets Only. No physical product included.', button: 'Set Shopping Cart' diff --git a/src/lang/zh-cn.ts b/src/lang/zh-cn.ts index 76f0cc5..d98dda9 100644 --- a/src/lang/zh-cn.ts +++ b/src/lang/zh-cn.ts @@ -18,7 +18,7 @@ export default { pleaseInputName: '请输入姓名', nameLengthError: '姓名长度必须在 {min} 到 {max} 个字符之间', passwordSpecial: '必须包含特殊符号', - passwordCase: '大小写字母与数字混合组合', + passwordCase: '字母和数字组合', pleaseInputEmail: '请输入邮箱', emailFormatError: '请输入正确的邮箱', pleaseInputPassword: '请输入密码', diff --git a/src/router/index.ts b/src/router/index.ts index 1f3729c..24cfc33 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -4,6 +4,7 @@ import { useGlobalStore } from '@/stores/global' import { getUserLanguage } from '@/api/user' import { fetchAllUnreadMessage } from '@/api/notification' import i18n from '@/lang/index' +import myEvent from '@/utils/myEvent' // 语言映射:后端格式 -> i18n 格式 const backendToI18nLanguage: Record = { @@ -19,6 +20,8 @@ let languageSynced = false * 1. 设置路由的meta属性为{ cache: true },表示需要缓存 * 2. App.vue中使用RouteCache组件,通过路由的name来进行匹配 * 3. 路由的name默认是文件名,如果文件名与name不一致,通过defineOptions({ name: 'componentName' })来设置 + * + * 需要登录路由: meta={ login:true } */ const router = createRouter({ routes: [ @@ -62,7 +65,8 @@ const router = createRouter({ { path: '/shoppingCart', // 购物车 name: 'shoppingCart', - component: () => import('@/views/shoppingCart/index.vue') + component: () => import('@/views/shoppingCart/index.vue'), + meta: { login: true } }, { path: '/notifications', @@ -94,6 +98,9 @@ const router = createRouter({ }) router.beforeEach((to, from, next) => { + if(to.meta?.login && !useUserInfoStore().state.token) { + myEvent.emit('openLoginDialog') + } next() }) diff --git a/src/views/home/index.vue b/src/views/home/index.vue index ad62926..d4dc704 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -28,6 +28,7 @@ > section { width: 100%; height: auto; + min-height: 50vw; } > section.bgw { position: relative; @@ -40,5 +41,8 @@ position: absolute; } } + > .section-footer { + min-height: 0; + } } diff --git a/src/views/home/section-digital-items1.vue b/src/views/home/section-digital-items1.vue index 157d2ea..11a3a7f 100644 --- a/src/views/home/section-digital-items1.vue +++ b/src/views/home/section-digital-items1.vue @@ -78,6 +78,7 @@ > div { padding: 1rem; border: 0.1rem solid #979797; + background-color: #fff; > img { width: 27.4rem; height: 34.6rem; diff --git a/src/views/home/section-digital-items2.vue b/src/views/home/section-digital-items2.vue index 4b2899d..34eca01 100644 --- a/src/views/home/section-digital-items2.vue +++ b/src/views/home/section-digital-items2.vue @@ -1,6 +1,6 @@