From 8fda94f942c495a4eeb41edf8966ee308b8f9a07 Mon Sep 17 00:00:00 2001 From: "851673013@qq.com" <851673013@qq.com> Date: Fri, 15 Jul 2022 14:56:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E7=A1=80=E8=AE=BE=E6=96=BDbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/views/home/infrastructurePage.vue | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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 = () => {