From 6b62385cada2a09e325f03b96caca28b3f3d9f22 Mon Sep 17 00:00:00 2001 From: spark Date: Thu, 19 Dec 2024 13:48:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E6=97=B6=E5=9B=BE=E5=92=8CK=E7=BA=BF?= =?UTF-8?q?=E5=9B=BE=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/stock.vue | 63 +++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 16 deletions(-) diff --git a/frontend/src/components/stock.vue b/frontend/src/components/stock.vue index c282f9c..1bda78f 100644 --- a/frontend/src/components/stock.vue +++ b/frontend/src/components/stock.vue @@ -13,6 +13,8 @@ const stockList=ref([]) const followList=ref([]) const options=ref([]) const modalShow = ref(false) +const modalShow2 = ref(false) +const modalShow3 = ref(false) const formModel = ref({ name: "", code: "", @@ -23,6 +25,8 @@ const formModel = ref({ const data = reactive({ name: "", code: "", + fenshiURL:"", + kURL:"", resultText: "Please enter your name below 👇", }) @@ -177,6 +181,20 @@ function setStock(code,name){ modalShow.value=true } +function showFenshi(code,name){ + data.code=code + data.name=name + data.fenshiURL='http://image.sinajs.cn/newchart/min/n/'+data.code+'.gif'+"?t="+Date.now() + modalShow2.value=true +} +function showK(code,name){ + data.code=code + data.name=name + data.kURL='http://image.sinajs.cn/newchart/daily/n/'+data.code+'.gif'+"?t="+Date.now() + modalShow3.value=true +} + + function updateCostPriceAndVolumeNew(code,price,volume){ console.log(code,price,volume) SetCostPriceAndVolume(code,price,volume).then(result => { @@ -206,29 +224,35 @@ function updateCostPriceAndVolumeNew(code,price,volume){ {{result.profitAmountToday}} - - - {{"最高 "+result["今日最高价"]+" "+result.highRate }} - - - {{"最低 "+result["今日最低价"]+" "+result.lowRate }} - - - {{"昨收 "+result["昨日收盘价"]}} - - - {{"今开 "+result["今日开盘价"]}} - - + + + {{"最高 "+result["今日最高价"]+" "+result.highRate }} + + + {{"最低 "+result["今日最低价"]+" "+result.lowRate }} + + + {{"昨收 "+result["昨日收盘价"]}} + + + {{"今开 "+result["今日开盘价"]}} + + @@ -257,6 +281,13 @@ function updateCostPriceAndVolumeNew(code,price,volume){ 保存 + + + + + + +