增加站内信未读提醒和后台通知中心+txt 校验
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
import { getMobilePath, getPcPath } from '../mobileHost'
|
||||
|
||||
describe('mobileHost path mapping', () => {
|
||||
it('maps notification routes between PC and mobile views', () => {
|
||||
expect(getMobilePath('/notifications')).toBe('/m/notifications')
|
||||
expect(getPcPath('/m/notifications')).toBe('/notifications')
|
||||
})
|
||||
})
|
||||
@@ -126,6 +126,12 @@ export const adminRoutes: RouteRecordRaw[] = [
|
||||
component: () => import('@/features/admin/views/AdminAuditLogsView.vue'),
|
||||
meta: adminMeta,
|
||||
},
|
||||
{
|
||||
path: adminPath('notifications'),
|
||||
name: 'admin-notifications',
|
||||
component: () => import('@/features/admin/views/AdminNotificationsView.vue'),
|
||||
meta: adminMeta,
|
||||
},
|
||||
{
|
||||
path: adminPath('admin-users'),
|
||||
name: 'admin-admin-users',
|
||||
|
||||
@@ -27,6 +27,7 @@ export function getMobilePath(path: string): string {
|
||||
return `/m${path}`
|
||||
}
|
||||
if (path === '/realname') return '/m/realname'
|
||||
if (path === '/notifications') return '/m/notifications'
|
||||
if (path === '/login') return '/m/login'
|
||||
if (path === '/register') return '/m/register'
|
||||
|
||||
@@ -43,7 +44,7 @@ export function getMobilePath(path: string): string {
|
||||
// PC-only views that don't have mobile counterparts go to mobile profile as fallback
|
||||
if (path === '/wallet/withdrawal') return '/m/wallet/withdrawal'
|
||||
|
||||
if (path === '/wallet' || path === '/notifications' || path.startsWith('/seller')) {
|
||||
if (path === '/wallet' || path.startsWith('/seller')) {
|
||||
return '/m/profile'
|
||||
}
|
||||
|
||||
@@ -70,6 +71,7 @@ export function getPcPath(path: string): string {
|
||||
if (subPath === '/login') return '/login'
|
||||
if (subPath === '/register') return '/login' // PC uses /login for both auth actions
|
||||
if (subPath === '/realname') return '/realname'
|
||||
if (subPath === '/notifications') return '/notifications'
|
||||
if (subPath === '/wallet/withdrawal') return '/wallet/withdrawal'
|
||||
if (subPath === '/seller/listings/create') return '/seller/listings/create'
|
||||
if (subPath.startsWith('/seller/listings/') && subPath.endsWith('/edit')) return subPath
|
||||
|
||||
@@ -79,6 +79,12 @@ export const mobileRoutes: RouteRecordRaw[] = [
|
||||
component: () => import('@/features/auth/views/MobileProfileView.vue'),
|
||||
meta: { layout: 'blank', requiresAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/m/notifications',
|
||||
name: 'mobile-notifications',
|
||||
component: () => import('@/features/auth/views/MobileNotificationsView.vue'),
|
||||
meta: { layout: 'blank', requiresAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/m/wallet/withdrawal',
|
||||
name: 'mobile-withdrawal',
|
||||
|
||||
Reference in New Issue
Block a user