| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360 |
- import { createRouter, createWebHistory } from "vue-router";
- import HomeIndex from "../views/HomeIndex.vue";
- import AppIndex from "../views/index/Index.vue";
- import MarketIndex from "../views/market/Index.vue";
- import AssetIndex from "../views/asset/Index.vue";
- import UserIndex from "../views/user/Index.vue";
- import ApplyPermission from "../views/index/ApplyPermission.vue";
- import SplashScreen from "../views/index/SplashScreen.vue";
- import RiskTips from "../views/index/RiskTips.vue";
- import SearchIcon from "../views/index/SearchIcon.vue";
- import Notification from "../views/notification/Index.vue";
- import IndexUser from "../views/index/User.vue";
- import UserCenter from "../views/index/UserCenter.vue";
- import MarketDetails from "../views/market/details/Index.vue";
- import HistoryIndex from "../views/asset/history/Index.vue";
- import EntrustDetails from "../views/asset/history/EntrustDetails.vue";
- import PositionDetails from "../views/asset/history/PositionDetails.vue";
- import IcoIndex from "../views/index/ico/Index.vue";
- import LoanIndex from "../views/index/loan/Index.vue";
- import LoanRules from "../views/index/loan/Rules.vue";
- import UserLoanIndex from "../views/user/loan/Index.vue";
- import CommitMessage from "../views/index/loan/CommitMessage.vue";
- import ContractTerms from "../views/index/loan/ContractTerms.vue";
- import Signature from "../views/index/loan/Signature.vue";
- import DeleteAccount from "../views/user/DeleteAccount.vue";
- import RechargeIndex from "../views/index/recharge/RechargeIndex.vue";
- import WithdrawIndex from "../views/index/recharge/WithdrawIndex.vue";
- import RechargeChangeCoin from "../views/index/recharge/ChangeCoin.vue";
- import Transfer from "../views/index/recharge/Transfer.vue";
- import TransferHistory from "../views/index/recharge/TransferHistory.vue";
- import UserAsset from "../views/asset/UserAsset.vue";
- import TradeLayout from '@/views/bitcoin/TradeLayout.vue'; // 新建的公共父组件
- import TradeFutures from '@/views/bitcoin/TradeFutures.vue'; // (合约)
- import TradeSeconds from '@/views/bitcoin/lever/TradeSeconds.vue'; // 秒合约(占位)
- import TradeOptions from '@/views/bitcoin/lever/TradeOptions.vue'; // 期权(占位)
- import TradeMargin from '@/views/bitcoin/lever/TradeMargin.vue';
- import Calculator from '../views/bitcoin/Calculator.vue' // 新建的计算器页面
- import TradeSettings from '@/views/bitcoin/CommonFunctionsPopup/GeneralLevel2/TradeSettings.vue'// 新建
- import OptionTrading from '@/views/bitcoin/lever/OptionTrading.vue'
- const routes = [
- {
- path: "/",
- name: "home",
- component: HomeIndex,
- children: [
- {
- path: "",
- name: "",
- component: AppIndex,
- },
- {
- path: "marketIndex",
- name: "marketIndex",
- component: MarketIndex,
- },
- {
- path: "/bitcoin",
- component: TradeLayout, // 而是布局组件
- // 当访问 /bitcoin 时,自动重定向到 /bitcoin/contract
- redirect: '/bitcoin/contract',
- children: [
- // 1. 核心交易子路由
- {
- path: 'contract',
- name: 'TradeContract',
- component: TradeFutures, // 核心交易逻辑
- meta: { title: '合约' }
- },
- {
- path: 'seconds',
- name: 'TradeSeconds',
- component: TradeSeconds,
- meta: { title: '秒合约' }
- },
- {
- path: 'options',
- name: 'TradeOptions',
- component: TradeOptions,
- meta: { title: '期权' },
- },
- {
- path: "margin",
- name: "TradeMargin",
- component: TradeMargin,
- meta: {title: "杠杆"},
- },
- {
- path: 'settings',
- name: 'TradeSettings',
- component: TradeSettings
- },
- ]
- },
- {
- path: 'PnLAnalysis',
- name: 'PnLAnalysis.vue',
- component: () => import('@/views/bitcoin/lever/PnLAnalysis.vue'),
- meta: { title: '' }
- },
- { path: 'calculator',
- name: 'calculator',
- component: Calculator },
- {
- path: 'OptionTrading',
- name: 'OptionTrading',
- component: OptionTrading,
- meta: { title: '' }
- },
- {
- path: "/assetIndex",
- name: "assetIndex",
- component: AssetIndex,
- },
- {
- path: "/userIndex",
- name: "userIndex",
- component: UserIndex,
- },
- ],
- },
- {
- path: "/applyPermission",
- name: "applyPermission",
- component: ApplyPermission,
- },
- {
- path: "/splashScreen",
- name: "splashScreen",
- component: SplashScreen,
- },
- {
- path: "/riskTips",
- name: "riskTips",
- component: RiskTips,
- },
- {
- path: "/searchIcon",
- name: "searchIcon",
- component: SearchIcon,
- },
- {
- path: "/notification",
- name: "notification",
- component: Notification,
- },
- {
- path: "/indexUser",
- name: "indexUser",
- component: IndexUser,
- },
- {
- path: "/userCenter",
- name: "userCenter",
- component: UserCenter,
- },
- {
- path: "/marketDetails",
- name: "marketDetails",
- component: MarketDetails,
- },
- {
- path: "/historyIndex",
- name: "historyIndex",
- component: HistoryIndex,
- },
- {
- path: "/entrustDetails",
- name: "entrustDetails",
- component: EntrustDetails,
- },
- {
- path: "/positionDetails",
- name: "positionDetails",
- component: PositionDetails,
- },
- {
- path: "/icoIndex",
- name: "icoIndex",
- component: IcoIndex,
- },
- {
- path: "/loanIndex",
- name: "loanIndex",
- component: LoanIndex,
- },
- {
- path: "/loanRules",
- name: "loanRules",
- component: LoanRules,
- },
- {
- path: "/userLoanIndex",
- name: "userLoanIndex",
- component: UserLoanIndex,
- },
- {
- path: "/commitMessage",
- name: "commitMessage",
- component: CommitMessage,
- },
- {
- path: "/contractTerms",
- name: "contractTerms",
- component: ContractTerms,
- },
- {
- path: "/signature",
- name: "signature",
- component: Signature,
- },
- {
- path: "/deleteAccount",
- name: "deleteAccount",
- component: DeleteAccount,
- },
- {
- path: "/rechargeIndex",
- name: "rechargeIndex",
- component: RechargeIndex,
- },
- {
- path: "/rechargeChangeCoin",
- name: "rechargeChangeCoin",
- component: RechargeChangeCoin,
- },
- {
- path: "/withdrawIndex",
- name: "withdrawIndex",
- component: WithdrawIndex,
- },
- {
- path: "/transfer",
- name: "transfer",
- component: Transfer,
- },
- {
- path: "/transferHistory",
- name: "transferHistory",
- component: TransferHistory,
- },
- {
- path: "/userAsset",
- name: "userAsset",
- component: UserAsset,
- },
- {
- path: "/applyPermission",
- name: "applyPermission",
- component: ApplyPermission,
- },
- {
- path: "/splashScreen",
- name: "splashScreen",
- component: SplashScreen,
- },
- {
- path: "/riskTips",
- name: "riskTips",
- component: RiskTips,
- },
- {
- path: "/searchIcon",
- name: "searchIcon",
- component: SearchIcon,
- },
- {
- path: "/notification",
- name: "notification",
- component: Notification,
- },
- {
- path: "/indexUser",
- name: "indexUser",
- component: IndexUser,
- },
- {
- path: "/userCenter",
- name: "userCenter",
- component: UserCenter,
- },
- {
- path: "/marketDetails",
- name: "marketDetails",
- component: MarketDetails,
- },
- {
- path: "/historyIndex",
- name: "historyIndex",
- component: HistoryIndex,
- },
- {
- path: "/entrustDetails",
- name: "entrustDetails",
- component: EntrustDetails,
- },
- {
- path: "/positionDetails",
- name: "positionDetails",
- component: PositionDetails,
- },
- {
- path: "/icoIndex",
- name: "icoIndex",
- component: IcoIndex,
- },
- {
- path: "/loanIndex",
- name: "loanIndex",
- component: LoanIndex,
- },
- {
- path: "/loanRules",
- name: "loanRules",
- component: LoanRules,
- },
- {
- path: "/userLoanIndex",
- name: "userLoanIndex",
- component: UserLoanIndex,
- },
- {
- path: "/rechargeHistory",
- name: "rechargeHistory",
- component: RechargeHistory,
- },
- {
- path: "/withdrawHistory",
- name: "withdrawHistory",
- component: WithdrawHistory,
- },
- {
- path: "/financialIndex",
- name: "financialIndex",
- component: FinancialIndex,
- },
- {
- path: "/financialBuy",
- name: "financialBuy",
- component: FinancialBuy,
- },
- {
- path: "/myFinancial",
- name: "myFinancial",
- component: MyFinancial,
- },
- ];
- const router = createRouter({
- history: createWebHistory(process.env.BASE_URL),
- routes,
- });
- export default router;
|