97 lines
3.1 KiB
JavaScript
97 lines
3.1 KiB
JavaScript
// 组件映射表 - 将后端返回的组件路径映射到实际的 Vue 组件
|
|
// 后端返回的 component 字段需要与这里的 key 对应
|
|
|
|
// ========== AI 模块 ==========
|
|
import AiMessages from '../views/ai/ai_messages.vue'
|
|
|
|
// ========== 球场模块 ==========
|
|
import GameComments from '../views/ball/game_comments.vue'
|
|
import GameParticipants from '../views/ball/game_participants.vue'
|
|
import Games from '../views/ball/games.vue'
|
|
import Venues from '../views/ball/venues.vue'
|
|
import WchUsers from '../views/ball/wch_users.vue'
|
|
|
|
// ========== 业务模块 ==========
|
|
import HotCityQr from '../views/business/hot_city_qr.vue'
|
|
|
|
// ========== 消息模块 ==========
|
|
import MsgNotifications from '../views/message/msg_notifications.vue'
|
|
|
|
// ========== NTRP 模块 ==========
|
|
import NtrQuestions from '../views/ntrp/ntr_questions.vue'
|
|
import NtrRecords from '../views/ntrp/ntr_records.vue'
|
|
|
|
// ========== 订单模块 ==========
|
|
import FrozenFunds from '../views/order/frozen_funds.vue'
|
|
import PayOrders from '../views/order/pay_orders.vue'
|
|
import TransferDetails from '../views/order/transfer_details.vue'
|
|
import WalletTransactions from '../views/order/wallet_transactions.vue'
|
|
import WchWallets from '../views/order/wch_wallets.vue'
|
|
|
|
// ========== 统计模块 ==========
|
|
import Resources from '../views/statistics/resources.vue'
|
|
|
|
// ========== 用户模块 ==========
|
|
import RecommendBlocks from '../views/users/recommend_blocks.vue'
|
|
import UserFollows from '../views/users/user_follows.vue'
|
|
import UserTracking from '../views/users/user_tracking.vue'
|
|
import WchCities from '../views/users/wch_cities.vue'
|
|
import WchProfessions from '../views/users/wch_professions.vue'
|
|
|
|
|
|
/**
|
|
* 组件映射对象
|
|
*
|
|
* ✅ 重要提示:只需传递不带 .vue 后缀的路径!
|
|
* 框架会自动为每个组件创建带 .vue 和不带 .vue 的两个映射
|
|
*
|
|
* 例如:'ai/ai_messages': AiMessages
|
|
* 框架自动处理为:
|
|
* - 'ai/ai_messages' → AiMessages
|
|
* - 'ai/ai_messages.vue' → AiMessages (自动添加)
|
|
*
|
|
* key: 后端返回的组件路径(不带 .vue 后缀)
|
|
* value: 实际的 Vue 组件
|
|
*/
|
|
const componentMap = {
|
|
// ===== AI 模块 =====
|
|
'ai/ai_messages': AiMessages,
|
|
|
|
// ===== 球场模块 =====
|
|
'ball/game_comments': GameComments,
|
|
'ball/game_participants': GameParticipants,
|
|
'ball/games': Games,
|
|
'ball/venues': Venues,
|
|
'ball/wch_users': WchUsers,
|
|
|
|
// ===== 业务模块 =====
|
|
'business/hot_city_qr': HotCityQr,
|
|
|
|
// ===== 消息模块 =====
|
|
'message/msg_notifications': MsgNotifications,
|
|
|
|
// ===== NTRP 模块 =====
|
|
'ntrp/ntr_questions': NtrQuestions,
|
|
'ntrp/ntr_records': NtrRecords,
|
|
|
|
// ===== 订单模块 =====
|
|
'order/frozen_funds': FrozenFunds,
|
|
'order/pay_orders': PayOrders,
|
|
'order/transfer_details': TransferDetails,
|
|
'order/wallet_transactions': WalletTransactions,
|
|
'order/wch_wallets': WchWallets,
|
|
|
|
// ===== 统计模块 =====
|
|
'statistics/resources': Resources,
|
|
|
|
// ===== 用户模块 =====
|
|
'users/recommend_blocks': RecommendBlocks,
|
|
'users/user_follows': UserFollows,
|
|
'users/user_tracking': UserTracking,
|
|
'users/wch_cities': WchCities,
|
|
'users/wch_professions': WchProfessions,
|
|
}
|
|
|
|
export default componentMap
|
|
|