From 433c5ab2fd2a6fd48fb931b5070b742503a99a6b Mon Sep 17 00:00:00 2001
From: Jacob <hlnie@tohours.com>
Date: 星期五, 23 十月 2026 13:35:07 +0800
Subject: [PATCH] Merge branch 'dev' into sit

---
 components/productConSwiper/index.vue |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/components/productConSwiper/index.vue b/components/productConSwiper/index.vue
index 812c365..7bb447d 100644
--- a/components/productConSwiper/index.vue
+++ b/components/productConSwiper/index.vue
@@ -20,7 +20,7 @@
 			<block v-for="(item,index) in imgUrls" :key='index'>
 				<swiper-item>
 					<image :src="item" class="slide-image" />
-					<image v-if="productSelect.stock !== undefined && productSelect.stock !== null && (!productSelect.stock || productSelect.stock <= 0)" style="position:absolute;left:0;top:0" class="slide-image" src="https://ossacmall.bluedeer.com.cn/app/static/images/noStock.png"  mode="aspectFill"></image>
+					<image v-if="isSoldOut" style="position:absolute;left:0;top:0" class="slide-image" src="https://ossacmall.bluedeer.com.cn/app/static/images/noStock.png"  mode="aspectFill"></image>
 				</swiper-item>
 			</block>
 		</swiper>
@@ -72,6 +72,16 @@
 				type: 'image'
 			};
 		},
+		computed: {
+			// 搴撳瓨瀛楁鏈姞杞斤紙undefined/null锛夋椂涓嶈涓� 0锛岄伩鍏嶆帴鍙h繑鍥炲墠璇洊鍞絼姘村嵃
+			isSoldOut() {
+				const stock = this.productSelect && this.productSelect.stock;
+				if (stock === undefined || stock === null || stock === '') {
+					return false;
+				}
+				return Number(stock) <= 0;
+			}
+		},
 		mounted() {
 			
 		},

--
Gitblit v1.4.0