diff --git a/.env b/.env index 5052f27..9d17bff 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ # 应用版本号 -VITE_APP_VERSION=7.0.59 +VITE_APP_VERSION=7.0.60 # 版本类型 # major:重大更新(清除除了白名单外的所有缓存:用户缓存、图片缓存和assets缓存) diff --git a/src/locales/ar.json b/src/locales/ar.json index edc2215..ce26732 100644 --- a/src/locales/ar.json +++ b/src/locales/ar.json @@ -1,4 +1,7 @@ { + "page_not_found": "الصفحة غير موجودة", + "page_not_found_description": "رابط النشاط غير صالح أو انتهت صلاحيته.", + "close_page": "إغلاق", "apply_join_team": "تقديم طلب للانضمام إلى الفريق", "apply_reminder": "تذكير قبل التقديم:", "apply_reminder_detail": "أدخل معرف الوكلاء الخاص بك، وستصبح مضيفًا بعد موافقة طلب المضيف. بعد أن تصبح مضيفًا، سيتم تخصيص دخلك إلى وكيلك.", diff --git a/src/locales/bn.json b/src/locales/bn.json index 734dbfb..7b6f546 100644 --- a/src/locales/bn.json +++ b/src/locales/bn.json @@ -1,4 +1,7 @@ { + "page_not_found": "পৃষ্ঠা পাওয়া যায়নি", + "page_not_found_description": "এই কার্যকলাপের লিঙ্কটি অবৈধ বা মেয়াদ শেষ হয়ে গেছে।", + "close_page": "বন্ধ করুন", "apply_join_team": "দলে যোগদানের জন্য আবেদন করুন", "apply_reminder": "আবেদনের আগে সতর্কবার্তা:", "apply_reminder_detail": "আপনার এজেন্টের আইডি লিখুন, এবং হোস্ট আবেদন অনুমোদিত হওয়ার পরে আপনি হোস্ট হয়ে যাবেন। হোস্ট হওয়ার পরে, আপনার আয় আপনার এজেন্টের কাছে ন্যস্ত করা হবে।", diff --git a/src/locales/en.json b/src/locales/en.json index 08a728f..a267ddd 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1,4 +1,7 @@ { + "page_not_found": "Page not found", + "page_not_found_description": "This activity link is invalid or has expired.", + "close_page": "Close", "apply_join_team": "Apply to join the team", "apply_reminder": "Reminder before application:", "apply_reminder_detail": "Enter the lD of your agent, and you will become the host afterthe host apply is approved. After becoming an hoster,yourincome will be entrusted to your agent", diff --git a/src/locales/tr.json b/src/locales/tr.json index 27498ba..224761c 100644 --- a/src/locales/tr.json +++ b/src/locales/tr.json @@ -1,4 +1,7 @@ { + "page_not_found": "Sayfa bulunamadı", + "page_not_found_description": "Bu etkinlik bağlantısı geçersiz veya süresi dolmuş.", + "close_page": "Kapat", "apply_join_team": "Takıma katılmak için başvur", "apply_reminder": "Başvurudan önce hatırlatma:", "apply_reminder_detail": "Acentenizin ID'sini girin ve host başvurusu onaylandıktan sonra host olacaksınız. Host olduktan sonra, geliriniz acentenize emanet edilecektir.", diff --git a/src/locales/zh.json b/src/locales/zh.json index 10325b4..ea9bd3e 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -1,4 +1,7 @@ { + "page_not_found": "页面不存在", + "page_not_found_description": "该活动链接无效或已过期。", + "close_page": "关闭", "apply_join_team": "申请加入团队", "apply_reminder": "申请前提醒", "apply_reminder_detail": "输入你的代理人的ID,在主持人申请获得批准后,你将成为主持人。成为主持人后,你的收入将委托给你的代理人。", diff --git a/src/router/index.js b/src/router/index.js index c19f5a6..3ff9fa3 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,6 +1,13 @@ import { createRouter, createWebHashHistory } from 'vue-router' import { installRouteGuard } from '../utils/routeGuard.js' +// 固定活动存在多套线上历史地址;重定向时必须保留语言和 Banner 来源参数。 +const redirectPreservingLocation = (path) => (to) => ({ + path, + query: to.query, + hash: to.hash, +}) + const router = createRouter({ history: createWebHashHistory(import.meta.env.BASE_URL), routes: [ @@ -40,11 +47,39 @@ const router = createRouter({ component: () => import('../views/PlatformPolicy/PlatformPolicy.vue'), meta: { requiresAuth: true }, }, + { + path: '/invitation-to-register', + name: 'legacy-invitation-to-register', + // 线上旧 Banner 仍会打开该地址,必须转到当前邀请活动。 + redirect: redirectPreservingLocation('/invitation/invite-new-user'), + meta: { requiresAuth: false, isPublic: true }, + }, + { + path: '/ranking/king-queen', + name: 'legacy-ranking-king-queen', + // 兼容 atu_prod 和线上 Banner 使用的新版 King and Queen 地址。 + redirect: redirectPreservingLocation('/top-list'), + meta: { requiresAuth: false, isPublic: true }, + }, + { + path: '/ranking/weekly-star', + name: 'legacy-ranking-weekly-star', + // 兼容 atu_prod 和线上 Banner 使用的新版 Weekly Star 地址。 + redirect: redirectPreservingLocation('/weekly-star'), + meta: { requiresAuth: false, isPublic: true }, + }, + { + path: '/404', + name: 'not-found-page', + component: () => import('../views/LandingPage/NotFoundView.vue'), + meta: { requiresAuth: false, isPublic: true }, + }, { path: '/:pathMatch(.*)*', name: 'not-found', - redirect: '/apply', - }, // 404 页面 + // 未知活动地址必须明确展示 404,不能伪装成公会/主播申请页。 + redirect: (to) => ({ path: '/404', query: { ...to.query, from: to.path } }), + }, // 管理员中心 { diff --git a/src/utils/permissionManager.js b/src/utils/permissionManager.js index 809140e..fb9b3af 100644 --- a/src/utils/permissionManager.js +++ b/src/utils/permissionManager.js @@ -38,7 +38,8 @@ export const PAGES = { // 邀请页面 const INVITATION_PAGES = { - INVITE_USER: '/invitation-to-register', //邀请新用户(邀请码) + INVITE_USER: '/invitation/invite-new-user', // 当前邀请新用户活动 + LEGACY_INVITE_USER: '/invitation-to-register', // 兼容线上历史 Banner 地址 INVITE_RECHARGE_AGENCY: '/invite-recharge-agency', //邀请代理 INVITE_AGENCY: '/invite-agency', //邀请代理 INVITE_BD: '/invite-bd', //邀请成为BD @@ -56,8 +57,8 @@ const RANKING_PAGES = [ // 活动页面 const ACTIVITIES = [ - INVITATION_PAGES.INVITE_USER, //邀请新用户(邀请码) - '/invitation/invite-new-user', //邀请新用户 + INVITATION_PAGES.INVITE_USER, //邀请新用户 + INVITATION_PAGES.LEGACY_INVITE_USER, //历史邀请入口,由路由重定向到当前活动 '/recharge-reward', //充值奖励 '/login-reward', // 登录奖励 diff --git a/src/views/LandingPage/NotFoundView.vue b/src/views/LandingPage/NotFoundView.vue new file mode 100644 index 0000000..6887512 --- /dev/null +++ b/src/views/LandingPage/NotFoundView.vue @@ -0,0 +1,67 @@ + + + + 404 + {{ t('page_not_found') }} + {{ t('page_not_found_description') }} + {{ t('close_page') }} + + + + + + +
{{ t('page_not_found_description') }}