业务更名为撞车并切换crash路由

用户可见文案与页面/API路径改为撞车与crash,保留mohong表与权限码兼容;移动端入口去掉租/撞图标。
This commit is contained in:
yml2213
2026-07-16 21:19:35 +08:00
parent 8b637cf499
commit a4189db4ca
38 changed files with 232 additions and 179 deletions
+8 -8
View File
@@ -73,26 +73,26 @@ export const adminRoutes: RouteRecordRaw[] = [
meta: adminMeta,
},
{
path: adminPath('mohong/categories'),
name: 'admin-mohong-categories',
path: adminPath('crash/categories'),
name: 'admin-crash-categories',
component: () => import('@/features/admin/views/AdminMohongCategoriesView.vue'),
meta: adminMeta,
},
{
path: adminPath('mohong/products'),
name: 'admin-mohong-products',
path: adminPath('crash/products'),
name: 'admin-crash-products',
component: () => import('@/features/admin/views/AdminMohongProductsView.vue'),
meta: adminMeta,
},
{
path: adminPath('mohong/orders'),
name: 'admin-mohong-orders',
path: adminPath('crash/orders'),
name: 'admin-crash-orders',
component: () => import('@/features/admin/views/AdminMohongOrdersView.vue'),
meta: adminMeta,
},
{
path: adminPath('mohong/config'),
name: 'admin-mohong-config',
path: adminPath('crash/config'),
name: 'admin-crash-config',
component: () => import('@/features/admin/views/AdminMohongConfigView.vue'),
meta: adminMeta,
},
+9 -2
View File
@@ -23,9 +23,13 @@ export function getMobilePath(path: string): string {
if (path === '/listings' || path.startsWith('/listings/')) {
return `/m${path}`
}
if (path === '/mohong' || path.startsWith('/mohong/')) {
if (path === '/crash' || path.startsWith('/crash/')) {
return `/m${path}`
}
// 旧摸大红路径 → 移动撞车
if (path === '/mohong' || path.startsWith('/mohong/')) {
return `/m${path.replace(/^\/mohong/, '/crash')}`
}
if (path === '/orders' || path.startsWith('/orders/')) {
return `/m${path}`
}
@@ -71,9 +75,12 @@ export function getPcPath(path: string): string {
if (subPath === '/listings' || subPath.startsWith('/listings/')) {
return subPath
}
if (subPath === '/mohong' || subPath.startsWith('/mohong/')) {
if (subPath === '/crash' || subPath.startsWith('/crash/')) {
return subPath
}
if (subPath === '/mohong' || subPath.startsWith('/mohong/')) {
return subPath.replace(/^\/mohong/, '/crash')
}
if (subPath === '/orders' || subPath.startsWith('/orders/')) {
return subPath
}
+13 -8
View File
@@ -92,29 +92,34 @@ export const mobileRoutes: RouteRecordRaw[] = [
meta: { layout: 'blank', requiresAuth: true },
},
{
path: '/m/mohong',
name: 'mobile-mohong-list',
path: '/m/crash',
name: 'mobile-crash-list',
component: () => import('@/features/mohong/views/MobileMohongListView.vue'),
meta: { layout: 'blank' },
},
{
path: '/m/mohong/orders',
name: 'mobile-mohong-orders',
path: '/m/crash/orders',
name: 'mobile-crash-orders',
component: () => import('@/features/mohong/views/MobileMohongOrdersView.vue'),
meta: { layout: 'blank', requiresAuth: true },
},
{
path: '/m/mohong/orders/:id',
name: 'mobile-mohong-order-detail',
path: '/m/crash/orders/:id',
name: 'mobile-crash-order-detail',
component: () => import('@/features/mohong/views/MobileMohongOrderDetailView.vue'),
meta: { layout: 'blank', requiresAuth: true },
},
{
path: '/m/mohong/:id',
name: 'mobile-mohong-detail',
path: '/m/crash/:id',
name: 'mobile-crash-detail',
component: () => import('@/features/mohong/views/MobileMohongDetailView.vue'),
meta: { layout: 'blank' },
},
// 旧路径兼容
{ path: '/m/mohong', redirect: '/m/crash' },
{ path: '/m/mohong/orders', redirect: '/m/crash/orders' },
{ path: '/m/mohong/orders/:id', redirect: to => `/m/crash/orders/${to.params.id}` },
{ path: '/m/mohong/:id', redirect: to => `/m/crash/${to.params.id}` },
{
path: '/m/orders',
name: 'mobile-orders',
+14 -9
View File
@@ -16,27 +16,32 @@ export const publicRoutes: RouteRecordRaw[] = [
name: 'listing-detail',
component: () => import('@/features/listings/views/ListingDetailView.vue'),
},
// 摸大红 PC 端;移动端访问会被守卫重写到 /m/mohong*
// 撞车 PC 端;移动端访问会被守卫重写到 /m/crash*
{
path: '/mohong',
name: 'mohong-list',
path: '/crash',
name: 'crash-list',
component: () => import('@/features/mohong/views/MohongListView.vue'),
},
{
path: '/mohong/orders',
name: 'mohong-orders',
path: '/crash/orders',
name: 'crash-orders',
component: () => import('@/features/mohong/views/MohongOrdersView.vue'),
meta: { requiresAuth: true },
},
{
path: '/mohong/orders/:id',
name: 'mohong-order-detail',
path: '/crash/orders/:id',
name: 'crash-order-detail',
component: () => import('@/features/mohong/views/MohongOrderDetailView.vue'),
meta: { requiresAuth: true },
},
{
path: '/mohong/:id',
name: 'mohong-detail',
path: '/crash/:id',
name: 'crash-detail',
component: () => import('@/features/mohong/views/MohongDetailView.vue'),
},
// 旧路径兼容
{ path: '/mohong', redirect: '/crash' },
{ path: '/mohong/orders', redirect: '/crash/orders' },
{ path: '/mohong/orders/:id', redirect: to => `/crash/orders/${to.params.id}` },
{ path: '/mohong/:id', redirect: to => `/crash/${to.params.id}` },
]