diff --git a/front/src/views/home/infrastructurePage.vue b/front/src/views/home/infrastructurePage.vue index a7de5707..52a511b2 100644 --- a/front/src/views/home/infrastructurePage.vue +++ b/front/src/views/home/infrastructurePage.vue @@ -414,11 +414,14 @@ // } const getCamera = () => { console.log('初始化调用') - getCameraByParentId(mapSearchParam.value).then((res) => { - console.log('RRRRRRRRRR', res.data.data) - dataSource.value = res.data.data - pagination.value.total = res.data.count - }) + console.log('不选左侧树的时候不调用接口', mapSearchParam.value) + if (mapSearchParam.value.parentId) { + getCameraByParentId(mapSearchParam.value).then((res) => { + console.log('RRRRRRRRRR', res.data.data) + dataSource.value = res.data.data + pagination.value.total = res.data.count + }) + } } //加入申购车 const addShoppingCart = () => {