From 32173389660ac31fbc5f6eca50b0716eaa1fb33c Mon Sep 17 00:00:00 2001 From: ArvinLovegood Date: Tue, 11 Mar 2025 11:49:29 +0800 Subject: [PATCH] =?UTF-8?q?refactor(stock):=20=E6=B3=A8=E9=87=8A=E6=8E=89?= =?UTF-8?q?=E6=97=A0=E7=94=A8=E7=9A=84=20ticker=20=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 注释掉了 stock.vue 文件中的 ticker 相关代码 - 包括 ticker 的初始化、使用和清除代码 - 此修改可能是为了优化性能或避免不必要的操作 --- frontend/src/components/stock.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/stock.vue b/frontend/src/components/stock.vue index 8537b6e..217edbb 100644 --- a/frontend/src/components/stock.vue +++ b/frontend/src/components/stock.vue @@ -64,7 +64,7 @@ const notify = useNotification() const dialog = useDialog() const stocks=ref([]) const results=ref({}) -const ticker=ref({}) +//const ticker=ref({}) const stockList=ref([]) const followList=ref([]) const options=ref([]) @@ -148,12 +148,12 @@ onMounted(() => { message.loading("Loading...") // console.log(`the component is now mounted.`) - ticker.value=setInterval(() => { - if(isTradingTime()){ - //monitor() - data.fenshiURL='http://image.sinajs.cn/newchart/min/n/'+data.code+'.gif'+"?t="+Date.now() - } - }, 3500) + // ticker.value=setInterval(() => { + // if(isTradingTime()){ + // //monitor() + // //data.fenshiURL='http://image.sinajs.cn/newchart/min/n/'+data.code+'.gif'+"?t="+Date.now() + // } + // }, 3500) GetVersionInfo().then((res) => { icon.value = res.icon; @@ -183,7 +183,7 @@ onMounted(() => { onBeforeUnmount(() => { // console.log(`the component is now unmounted.`) - clearInterval(ticker.value) + //clearInterval(ticker.value) ws.value.close() })