From 3baa441fbb8e1465bbdf03c2881ee6f997a11f0a Mon Sep 17 00:00:00 2001 From: simple321vip Date: Tue, 13 Sep 2022 16:33:17 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E8=B5=84=E9=87=91=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/capital.ts | 34 +++++ src/router/index.ts | 10 +- src/view/capital/index.vue | 188 ++++++++++++++++++++++++++ src/view/dashboard/index.vue | 83 +++++------- src/view/download/index.vue | 20 --- src/view/recommend/index.vue | 6 +- src/view/trader/cta_strategy.vue | 20 --- src/view/trader/cta_strategy_file.vue | 45 ++++-- 8 files changed, 306 insertions(+), 100 deletions(-) create mode 100644 src/api/capital.ts create mode 100644 src/view/capital/index.vue delete mode 100644 src/view/download/index.vue diff --git a/src/api/capital.ts b/src/api/capital.ts new file mode 100644 index 0000000..1f0fc28 --- /dev/null +++ b/src/api/capital.ts @@ -0,0 +1,34 @@ +import { trader_service } from '../utils/request' + +"CTA strategy" + +"query account" +const get_accounts = () => { + return trader_service({ + url: '/trader/api/v1/accounts', + method: 'GET', + }) +} + +"get contract" +const get_contract = (symbol: string) => { + return trader_service({ + url: '/trader/api/v1/contract/' + symbol, + method: 'GET', + }) +} + +"unload a strategy file" +const send_order = (data: any) => { + return trader_service({ + url: '/trader/api/v1/order', + method: 'POST', + data: data + }) +} + +export { + get_accounts, + get_contract, + send_order +} \ No newline at end of file diff --git a/src/router/index.ts b/src/router/index.ts index e96a7b6..dd5082c 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -48,17 +48,17 @@ const routes: Array = [ } }, { - path: '/recommend', + path: '/market', component: () => import('../view/recommend/index.vue'), meta: { - name: '推荐中' + name: '市场行情' } }, { - path: '/download', - component: () => import('../view/download/index.vue'), + path: '/capital', + component: () => import('../view/capital/index.vue'), meta: { - name: '一键打包' + name: '资金管理' } }, // { diff --git a/src/view/capital/index.vue b/src/view/capital/index.vue new file mode 100644 index 0000000..9db0225 --- /dev/null +++ b/src/view/capital/index.vue @@ -0,0 +1,188 @@ + + + + + \ No newline at end of file diff --git a/src/view/dashboard/index.vue b/src/view/dashboard/index.vue index f097291..7dbb457 100644 --- a/src/view/dashboard/index.vue +++ b/src/view/dashboard/index.vue @@ -8,56 +8,47 @@ \ No newline at end of file diff --git a/src/view/download/index.vue b/src/view/download/index.vue deleted file mode 100644 index 59db456..0000000 --- a/src/view/download/index.vue +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/view/recommend/index.vue b/src/view/recommend/index.vue index cda1e0b..2d29cc5 100644 --- a/src/view/recommend/index.vue +++ b/src/view/recommend/index.vue @@ -1,5 +1,9 @@