diff --git a/frontend/src/components/SelectStock.vue b/frontend/src/components/SelectStock.vue index af17d2d..f52a0fa 100644 --- a/frontend/src/components/SelectStock.vue +++ b/frontend/src/components/SelectStock.vue @@ -3,16 +3,22 @@ import {h, onBeforeMount, onMounted, onUnmounted, ref} from 'vue' import {SearchStock} from "../../wailsjs/go/main/App"; import {useMessage, NText, NTag} from 'naive-ui' const message = useMessage() -const search = ref('科技股;换手率连续3日大于2') +const search = ref('') const columns = ref([]) const dataList = ref([]) - +const traceInfo = ref('') function Search() { + if(!search.value){ + message.warning('请输入选股指标或者要求') + return + } + const loading = message.loading("正在获取选股数据...", {duration: 0}); SearchStock(search.value).then(res => { loading.destroy() - //console.log(res) + console.log(res) if(res.code==100){ + traceInfo.value=res.data.traceInfo.showText message.success(res.msg) columns.value=res.data.result.columns.filter(item=>!item.hiddenNeed&&(item.title!="市场码"&&item.title!="市场简称")).map(item=>{ @@ -70,24 +76,16 @@ onBeforeMount(() => {