From abdf29afaa8baafc55b65011ceafbafa92ee5804 Mon Sep 17 00:00:00 2001 From: simple321vip Date: Thu, 29 Dec 2022 00:20:18 +0800 Subject: [PATCH] add cancel subscribe function --- src/api/capital.ts | 9 +++++ src/view/recommend/index.vue | 77 ++++++++++++++++++++++++++++++++---- 2 files changed, 79 insertions(+), 7 deletions(-) diff --git a/src/api/capital.ts b/src/api/capital.ts index 648ce13..aa4ee49 100644 --- a/src/api/capital.ts +++ b/src/api/capital.ts @@ -59,6 +59,14 @@ const get_subscribe_vt_symbols = () => { }) } +"cancel a subscribe for vt_symbol" +const concel_subscribe = (symbol: string) => { + return service({ + url: '/trader/api/v1/subscribe/' + symbol, + method: 'DELETE', + }) +} + "get all vt_symbols" const get_vt_symbols = () => { return service({ @@ -81,6 +89,7 @@ export { get_tick, get_ticks, subscribe, + concel_subscribe, send_order, get_vt_symbols, get_subscribe_vt_symbols, diff --git a/src/view/recommend/index.vue b/src/view/recommend/index.vue index 26a78aa..dd3cd0c 100644 --- a/src/view/recommend/index.vue +++ b/src/view/recommend/index.vue @@ -27,7 +27,8 @@ - + @@ -40,16 +41,29 @@ + + + + + + + +