diff --git a/src/components/PieRow/index.vue b/src/components/PieRow/index.vue index 7487e30..28358ff 100644 --- a/src/components/PieRow/index.vue +++ b/src/components/PieRow/index.vue @@ -107,8 +107,9 @@ watch( () => props.dataList, (newVal) => { - console.log(chartVal.value,newVal,'newValnewValnewValnewValnewVal') + aIndex+=1 + if(aIndex>=3&&!newVal.length){ condShow.value = 1 } diff --git a/src/components/RegionTop/index.vue b/src/components/RegionTop/index.vue index 93aee20..aa84a1c 100644 --- a/src/components/RegionTop/index.vue +++ b/src/components/RegionTop/index.vue @@ -47,6 +47,7 @@ condShow.value = 1 } if (val.length > 0) { + condShow.value = 2 setTimeout(() => { init() }, 1000) diff --git a/src/views/sentiment/index.vue b/src/views/sentiment/index.vue index b2dd7da..4b6c887 100644 --- a/src/views/sentiment/index.vue +++ b/src/views/sentiment/index.vue @@ -116,13 +116,21 @@ let res = await getHotNewApi() hotNewList.value = res.data } + let timer = null onMounted(() => { getStop() getHotNew() getTotal() - getState() + timer = setInterval(()=>{ + getState() + },2000) + getLineChart() }) + onUnmounted(() => { + + if (timer) clearInterval(timer) + })