diff --git a/src/assets/icon/arrowBack.png b/src/assets/icon/arrowBack.png new file mode 100644 index 0000000..cfcf42d Binary files /dev/null and b/src/assets/icon/arrowBack.png differ diff --git a/src/assets/images/Ranking/bgCharm.png b/src/assets/images/Ranking/bgCharm.png new file mode 100644 index 0000000..ead3649 Binary files /dev/null and b/src/assets/images/Ranking/bgCharm.png differ diff --git a/src/assets/images/Ranking/bgRoom.png b/src/assets/images/Ranking/bgRoom.png new file mode 100644 index 0000000..78049d3 Binary files /dev/null and b/src/assets/images/Ranking/bgRoom.png differ diff --git a/src/assets/images/Ranking/bgWealth.png b/src/assets/images/Ranking/bgWealth.png new file mode 100644 index 0000000..30c5b0a Binary files /dev/null and b/src/assets/images/Ranking/bgWealth.png differ diff --git a/src/assets/images/Ranking/coinNumBg.png b/src/assets/images/Ranking/coinNumBg.png new file mode 100644 index 0000000..1a7beab Binary files /dev/null and b/src/assets/images/Ranking/coinNumBg.png differ diff --git a/src/assets/images/Ranking/top1-charm.png b/src/assets/images/Ranking/top1-charm.png new file mode 100644 index 0000000..aa53ddd Binary files /dev/null and b/src/assets/images/Ranking/top1-charm.png differ diff --git a/src/assets/images/Ranking/top1-room.png b/src/assets/images/Ranking/top1-room.png new file mode 100644 index 0000000..d73aff4 Binary files /dev/null and b/src/assets/images/Ranking/top1-room.png differ diff --git a/src/assets/images/Ranking/top1-wealth.png b/src/assets/images/Ranking/top1-wealth.png new file mode 100644 index 0000000..90a09a4 Binary files /dev/null and b/src/assets/images/Ranking/top1-wealth.png differ diff --git a/src/assets/images/Ranking/top2-room.png b/src/assets/images/Ranking/top2-room.png new file mode 100644 index 0000000..9ccd7ef Binary files /dev/null and b/src/assets/images/Ranking/top2-room.png differ diff --git a/src/assets/images/Ranking/top2.png b/src/assets/images/Ranking/top2.png new file mode 100644 index 0000000..c8e459b Binary files /dev/null and b/src/assets/images/Ranking/top2.png differ diff --git a/src/assets/images/Ranking/top3-room.png b/src/assets/images/Ranking/top3-room.png new file mode 100644 index 0000000..f55b575 Binary files /dev/null and b/src/assets/images/Ranking/top3-room.png differ diff --git a/src/assets/images/Ranking/top3.png b/src/assets/images/Ranking/top3.png new file mode 100644 index 0000000..ab5178d Binary files /dev/null and b/src/assets/images/Ranking/top3.png differ diff --git a/src/components/Ranking/topUser.vue b/src/components/Ranking/topUser.vue new file mode 100644 index 0000000..a510be0 --- /dev/null +++ b/src/components/Ranking/topUser.vue @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + {{ name }} + + + + + + + + {{ distributionValue }} + + + + + + + + + + + diff --git a/src/router/index.js b/src/router/index.js index fac0854..17c2255 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -209,6 +209,12 @@ const router = createRouter({ component: () => import('../views/WeeklyStar/WeeklyStar.vue'), meta: { requiresAuth: true }, }, + { + path: '/ranking', + name: 'ranking', + component: () => import('../views/Ranking/Ranking.vue'), + meta: { requiresAuth: true }, + }, ], }) diff --git a/src/utils/permissionManager.js b/src/utils/permissionManager.js index 7323adc..2d2571c 100644 --- a/src/utils/permissionManager.js +++ b/src/utils/permissionManager.js @@ -112,6 +112,7 @@ export const ROLE_PERMISSIONS = { '/recharge-freight-agent', '/top-list', //排行榜 '/weekly-star', //每周明星 + '/ranking', //总排行榜 ], // 加载页面 diff --git a/src/utils/routeGuard.js b/src/utils/routeGuard.js index 9ea7319..dca3fa2 100644 --- a/src/utils/routeGuard.js +++ b/src/utils/routeGuard.js @@ -19,7 +19,7 @@ import { appConnectionManager, isAppConnected } from './appConnectionManager.js' * APP连接检查器 */ class AppConnectionChecker { - constructor () { + constructor() { this.isConnecting = false } @@ -27,7 +27,7 @@ class AppConnectionChecker { * 确保APP连接 * @returns {Promise} 连接是否成功 */ - async ensureConnection () { + async ensureConnection() { console.debug('🔗 Checking APP connection...') // 如果不在APP环境中,直接返回成功 @@ -66,7 +66,7 @@ class AppConnectionChecker { * 执行APP连接 * @returns {Promise} */ - async _performConnection () { + async _performConnection() { try { console.debug('📱 Starting new APP connection...') @@ -120,7 +120,7 @@ class AppConnectionChecker { * APP连接成功后获取用户信息 * @private */ - async _fetchUserInfoAfterConnection () { + async _fetchUserInfoAfterConnection() { try { console.debug('👤 Fetching user info after connection...') @@ -143,7 +143,7 @@ class AppConnectionChecker { /** * 重置连接状态 */ - reset () { + reset() { appConnectionManager.reset() } } @@ -152,7 +152,7 @@ class AppConnectionChecker { * 身份检查器 */ class IdentityChecker { - constructor () { + constructor() { this.isChecking = false this.checkPromise = null } @@ -162,7 +162,7 @@ class IdentityChecker { * @param {string} userId - 用户ID * @returns {Promise} 返回主要身份 */ - async checkUserIdentity (userId) { + async checkUserIdentity(userId) { if (!userId) { console.warn('⚠️ No user ID provided') permissionManager.setUserIdentity(null) @@ -192,7 +192,7 @@ class IdentityChecker { * @param {string} userId - 用户ID * @returns {Promise} 主要身份 */ - async _performIdentityCheck (userId) { + async _performIdentityCheck(userId) { try { console.debug('🔍 Checking user identity for:', userId) @@ -221,7 +221,7 @@ class IdentityChecker { /** * 重置检查状态 */ - reset () { + reset() { this.isChecking = false this.checkPromise = null } @@ -238,7 +238,7 @@ class PageRedirector { * @param {string} currentPath - 当前页面路径 * @returns {Promise} 是否进行了重定向 */ - async redirectToCorrectPage (router, targetPath, currentPath) { + async redirectToCorrectPage(router, targetPath, currentPath) { const primaryRole = permissionManager.getPrimaryRole() // 检查目标页面权限 @@ -277,7 +277,7 @@ class PageRedirector { * @param {Object} router - Vue Router 实例 * @param {string} attemptedPage - 尝试访问的页面 */ - async handleUnauthorizedAccess (router, attemptedPage) { + async handleUnauthorizedAccess(router, attemptedPage) { const primaryRole = permissionManager.getPrimaryRole() const defaultPage = permissionManager.getDefaultPage() @@ -296,7 +296,7 @@ class PageRedirector { * 路由守卫类 */ class RouteGuard { - constructor () { + constructor() { this.appConnectionChecker = new AppConnectionChecker() this.identityChecker = new IdentityChecker() this.pageRedirector = new PageRedirector() @@ -307,7 +307,7 @@ class RouteGuard { * 安装路由守卫 * @param {Object} router - Vue Router 实例 */ - install (router) { + install(router) { router.beforeEach(async (to, from, next) => { await this.handleRouteChange(to, from, next) }) @@ -322,7 +322,7 @@ class RouteGuard { * @param {Object} from - 来源路由 * @param {Function} next - 路由继续函数 */ - async handleRouteChange (to, from, next) { + async handleRouteChange(to, from, next) { console.group('🛡️ Route Guard Check') console.debug('📍 Route change:', from.path, '→', to.path) @@ -394,7 +394,7 @@ class RouteGuard { * @param {string} path - 页面路径 * @returns {boolean} */ - isPublicPage (path) { + isPublicPage(path) { const publicPages = [ PAGES.APPLY, // 申请页面 - 重要:申请页面不需要权限检查 PAGES.NOT_APP, // 错误页面 - APP连接失败时的页面 @@ -406,6 +406,7 @@ class RouteGuard { '/pay-result', '/top-list', //排行榜 '/weekly-star', //每周明星 + '/ranking', //总排行榜 ] return publicPages.includes(path) } @@ -415,7 +416,7 @@ class RouteGuard { * @param {Object} router - Vue Router 实例 * @param {string} userId - 用户ID */ - async checkAndRedirect (router, userId) { + async checkAndRedirect(router, userId) { try { console.debug('🔄 Manual identity check and redirect') @@ -443,7 +444,7 @@ class RouteGuard { /** * 重置守卫状态 */ - reset () { + reset() { this.appConnectionChecker.reset() this.identityChecker.reset() permissionManager.reset() diff --git a/src/views/Ranking/Ranking.vue b/src/views/Ranking/Ranking.vue new file mode 100644 index 0000000..e553924 --- /dev/null +++ b/src/views/Ranking/Ranking.vue @@ -0,0 +1,426 @@ + + + + + + + + + + + + + + + Wealth + + + Charm + + + Room + + + + + + + + + + + Hourly + + + Daily + + + Weekly + + + Monthly + + + + + + + + + + + + + + + + + + + + + + + + 999 + + + aaaaaaaaaaaa + + + + + + 123456789 + + + + + + + + + + + 999 + + + aaaaaaaaaaaa + + + + + + 123456789 + + + + + + + + + +