From 4897edce742a64b5c15d26ad3bbded3853d517a4 Mon Sep 17 00:00:00 2001 From: LinCyJang Date: Wed, 14 Jan 2026 23:21:15 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A4735=20=E3=80=90=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E3=80=91=E7=AE=A1=E7=90=86=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E6=9C=AA=E9=85=8D=E7=BD=AE=E5=85=BB=E7=94=9F=E6=A6=9C?= =?UTF-8?q?=E5=8D=95=E6=95=B0=E6=8D=AE=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E3=80=90=E7=A1=AE=E8=AE=A4=E3=80=91=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E5=89=8D=E7=AB=AF=E6=97=A0=E9=9C=80=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=85=BB=E7=94=9F=E6=A6=9C=E5=8D=95=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg_product/views/healthFoods.vue | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/pkg_product/views/healthFoods.vue b/pkg_product/views/healthFoods.vue index b1c5114..43f5971 100644 --- a/pkg_product/views/healthFoods.vue +++ b/pkg_product/views/healthFoods.vue @@ -57,14 +57,14 @@ - + - + @@ -196,6 +196,31 @@ export default { ProductWindow }, mixins: [goCartMixin], + computed: { + hasRankData() { + if (!Array.isArray(this.rank)) return false; + const hasText = (v) => typeof v === "string" && v.trim() !== ""; + const hasValue = (v) => v !== null && v !== undefined && v !== ""; + return this.rank.some((item) => { + if (!item) return false; + if (hasText(item.title) || hasText(item.backgroundImage)) { + return true; + } + if (Array.isArray(item.products)) { + return item.products.some((p) => { + if (!p) return false; + return ( + hasText(p.productTitle) || + hasText(p.productDesc) || + hasValue(p.productImage) || + hasValue(p.productId) + ); + }); + } + return false; + }); + } + }, data() { return { webUrl: this.$VUE_APP_RESOURCES_URL,