diff --git a/components/shopro-auth-modal/shopro-auth-modal.vue b/components/shopro-auth-modal/shopro-auth-modal.vue index b064ef4..ab5e86d 100644 --- a/components/shopro-auth-modal/shopro-auth-modal.vue +++ b/components/shopro-auth-modal/shopro-auth-modal.vue @@ -1,7 +1,7 @@ @@ -377,6 +384,7 @@ buyType: 'sku', is_play: 'stop', grouponBuyType: 'alone', //拼团购买方式。 + joinGrouponId: 0, // 参团ID,0表示开团 showEmpty: false, showEmptyText: '', showServe: false, @@ -582,8 +590,30 @@ }, // 轮播图预览 - onGoodsSwiper(e) { - this.$tools.previewImage(this.goodsInfo.images, e); + onGoodsSwiper(index) { + const images = this.goodsInfo.images || []; + let urls = []; + let currentUrl = ''; + + if (this.detailType === 'score') { + urls = images.map((img) => this.$tools.formatImageUrl(img)); + currentUrl = urls[index]; + } else { + const current = images[index]; + if (!current || Number(current.type) !== 0) { + return; + } + urls = images + .filter((img) => Number(img.type) === 0) + .map((img) => this.$tools.formatImageUrl(img.src)); + currentUrl = this.$tools.formatImageUrl(current.src); + } + + if (!urls.length || !currentUrl) { + return; + } + + this.$tools.previewImage(urls, currentUrl); }, getActivityRules(e) { if (e) { @@ -742,8 +772,12 @@ if (this.isLogin) { if (type === 'groupon') { this.grouponBuyType = 'groupon'; + this.joinGrouponId = 0; + } else if (type === 'join') { + this.grouponBuyType = 'groupon'; } else { this.grouponBuyType = 'alone'; + this.joinGrouponId = 0; } this.buyType = 'buy'; this.showSku = true; @@ -751,6 +785,12 @@ this.$store.dispatch('showAuthModal'); } }, + onJoinGroupon(grouponId) { + this.joinGrouponId = Number(grouponId) || 0; + this.grouponBuyType = 'groupon'; + this.buyType = 'buy'; + this.showSku = true; + }, // 预约抢购 handleRobOrder() { if (!this.isLogin) { @@ -859,6 +899,18 @@ font-weight: bold; } + .goods-swiper-item { + width: 100%; + height: 100%; + } + + .goods-swiper-image { + width: 100%; + height: 100%; + display: block; + pointer-events: none; + } + // 标题栏 .nav-box { position: fixed; @@ -866,6 +918,14 @@ min-height: 140rpx; z-index: 888; top: 0; + pointer-events: none; + + .back-box, + .back-hover, + .tool-button, + .nav-item { + pointer-events: auto; + } .back-box { background-color: rgba(#000, 0.18); diff --git a/pages/index/cart.vue b/pages/index/cart.vue index cb2d344..478d4f4 100644 --- a/pages/index/cart.vue +++ b/pages/index/cart.vue @@ -184,7 +184,7 @@ this.$u.toast('活动商品只能单独购买'); return false; } - that.jump('/pages/order/confirm', { + that.$tools.toOrderConfirm({ goodsList: confirmcartList, from: 'cart' }); diff --git a/pages/index/category/one-catgory.vue b/pages/index/category/one-catgory.vue index ed43d81..6c4aac2 100644 --- a/pages/index/category/one-catgory.vue +++ b/pages/index/category/one-catgory.vue @@ -1,12 +1,12 @@