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){ 保存 + + + + + + +