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 @@