diff --git a/src/components/common/goods/GoodsDetail.vue b/src/components/common/goods/GoodsDetail.vue index beebac9..18a1244 100644 --- a/src/components/common/goods/GoodsDetail.vue +++ b/src/components/common/goods/GoodsDetail.vue @@ -227,6 +227,10 @@ const getHilistInfo = (item: any) => { console.log("item", item) if (item.hilistCode != null) { post("social/directory/getByCode", {code: item.hilistCode}).then((res: any) => { + if (!res){ + hilistInfo.value = {} + return + } hilistInfo.value = res }) } diff --git a/src/components/common/service/ServiceDetail.vue b/src/components/common/service/ServiceDetail.vue index 63f69fc..ef0e5fe 100644 --- a/src/components/common/service/ServiceDetail.vue +++ b/src/components/common/service/ServiceDetail.vue @@ -155,13 +155,16 @@ const getTotalPrice = () => { const focus = (e: any) => { emit('focus', e) } +const popoverRef = ref(null); const itemInfo = ref({}); const show = (item: any) => { - if(item.itemSocialCode){ - post('social/directory/getItemByCode', {code: item.itemSocialCode}).then((res: any) => { - itemInfo.value = res - }) - } + post('social/directory/getItemByCode', {code: item.itemSocialCode}).then((res: any) => { + if (!res){ + itemInfo.value = {} + return + } + itemInfo.value = res + }) } const hide = () => { itemInfo.value = {}