|
@@ -2,7 +2,6 @@ import { createRouter, createWebHistory } from "vue-router";
|
|
|
import HomeIndex from "../views/HomeIndex.vue";
|
|
import HomeIndex from "../views/HomeIndex.vue";
|
|
|
import AppIndex from "../views/index/Index.vue";
|
|
import AppIndex from "../views/index/Index.vue";
|
|
|
import MarketIndex from "../views/market/Index.vue";
|
|
import MarketIndex from "../views/market/Index.vue";
|
|
|
-import BitcoinIndex from "../views/bitcoin/Index.vue";
|
|
|
|
|
import AssetIndex from "../views/asset/Index.vue";
|
|
import AssetIndex from "../views/asset/Index.vue";
|
|
|
import UserIndex from "../views/user/Index.vue";
|
|
import UserIndex from "../views/user/Index.vue";
|
|
|
import ApplyPermission from "../views/index/ApplyPermission.vue";
|
|
import ApplyPermission from "../views/index/ApplyPermission.vue";
|
|
@@ -30,6 +29,8 @@ import RechargeChangeCoin from "../views/index/recharge/ChangeCoin.vue";
|
|
|
import Transfer from "../views/index/recharge/Transfer.vue";
|
|
import Transfer from "../views/index/recharge/Transfer.vue";
|
|
|
import TransferHistory from "../views/index/recharge/TransferHistory.vue";
|
|
import TransferHistory from "../views/index/recharge/TransferHistory.vue";
|
|
|
import UserAsset from "../views/asset/UserAsset.vue";
|
|
import UserAsset from "../views/asset/UserAsset.vue";
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
import TradeLayout from '@/views/bitcoin/TradeLayout.vue'; // 新建的公共父组件
|
|
import TradeLayout from '@/views/bitcoin/TradeLayout.vue'; // 新建的公共父组件
|
|
|
import TradeFutures from '@/views/bitcoin/TradeFutures.vue'; // (合约)
|
|
import TradeFutures from '@/views/bitcoin/TradeFutures.vue'; // (合约)
|
|
|
import TradeSeconds from '@/views/bitcoin/lever/TradeSeconds.vue'; // 秒合约(占位)
|
|
import TradeSeconds from '@/views/bitcoin/lever/TradeSeconds.vue'; // 秒合约(占位)
|
|
@@ -58,10 +59,44 @@ const routes = [
|
|
|
component: MarketIndex,
|
|
component: MarketIndex,
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- path: "bitcoinIndex",
|
|
|
|
|
- name: "bitcoinIndex",
|
|
|
|
|
- component: BitcoinIndex,
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ 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: 'calculator',
|
|
|
|
|
+ name: 'calculator',
|
|
|
|
|
+ component: Calculator },
|
|
|
|
|
+ ]
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
path: "assetIndex",
|
|
path: "assetIndex",
|
|
|
name: "assetIndex",
|
|
name: "assetIndex",
|
|
@@ -199,50 +234,7 @@ const routes = [
|
|
|
name: "userAsset",
|
|
name: "userAsset",
|
|
|
component: UserAsset,
|
|
component: UserAsset,
|
|
|
},
|
|
},
|
|
|
- {
|
|
|
|
|
- path: "/",
|
|
|
|
|
- name: "home",
|
|
|
|
|
- component: HomeIndex,
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- 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: 'calculator',
|
|
|
|
|
- name: 'calculator',
|
|
|
|
|
- component: Calculator },
|
|
|
|
|
- ]
|
|
|
|
|
- },
|
|
|
|
|
|
|
+
|
|
|
{
|
|
{
|
|
|
path: "/applyPermission",
|
|
path: "/applyPermission",
|
|
|
name: "applyPermission",
|
|
name: "applyPermission",
|