wangfukang 1 month ago
parent
commit
5f78b78f20
  1. 8
      package2/group/groupBuyList.vue
  2. 103
      package2/group/groupBuySingle.vue

8
package2/group/groupBuyList.vue

@ -129,10 +129,11 @@
<text class="shop-status-tag" :class="{'shop-status-disabled': item.supportDineIn != 1}">
{{getDineInText(item)}}
</text>
<text class="shop-delivery-fee-tag" v-if="shouldShowBaseDeliveryFee(item)">
<text class="shop-delivery-fee-tag" v-if="shouldShowBaseDeliveryFee(item) && !isStoreConsumeOnly(item)">
配送费{{formatAmountText(item.baseDeliveryFee)}}元起
</text>
<text class="shop-time-tag">{{item.groupDeliveryTime}}分钟</text>
<text class="shop-time-tag" v-if="isStoreConsumeOnly(item)">到店消费</text>
<text class="shop-time-tag" v-else>{{item.groupDeliveryTime}}分钟</text>
</view>
<view class="shop-name">
{{item.shopName}}
@ -815,6 +816,9 @@
getDineInText(item) {
return item && item.supportDineIn == 1 ? '可堂食' : '无堂食'
},
isStoreConsumeOnly(item) {
return item && item.storeConsumeOnly == 1
},
getShopStatus(item) {
const status = Number(item && item.status)
return isNaN(status) ? 1 : status

103
package2/group/groupBuySingle.vue

@ -31,6 +31,7 @@
<view class="shop-top">
<view class="shop-img">
<img :src="shopItem.shopIcon" alt="">
<view class="shop-img-store-badge" v-if="isStoreConsumeOnly(shopItem)">到店消费</view>
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/6c4ab92a43c842d8bb22035bce1f65cc.png"
alt=""
style="width:30rpx;height:30rpx;position: absolute;top: 0;left: 0;background-size: 100%;" />
@ -526,7 +527,7 @@
<uni-icons type="close" size="30" color="#fff"></uni-icons>
</view>
<view class="join-popup-title" style="font-size: 28rpx;font-weight: 700;">
<view class="join-popup-main">快来加入拼团吧!</view>
<view class="join-popup-main">参与拼单后,店铺内可任选商品拼单!</view>
<view class="join-popup-sub">选一支快成团的队伍,马上省</view>
</view>
<scroll-view class="join-team-scroll" scroll-y :show-scrollbar="false">
@ -560,9 +561,9 @@
<view class="join-popup-footer">
<view class="join-rule-check" @tap.stop="toggleWaitRuleKnown">
<view :class="autoWaitRuleKnown ? 'radio-check join-rule-icon' : 'radio-no-check join-rule-icon'">
<uni-icons v-if="autoWaitRuleKnown" type="checkmarkempty" size="12"></uni-icons>
<uni-icons v-if="autoWaitRuleKnown" type="checkmarkempty" size="14" color="#fff"></uni-icons>
</view>
<text>我已知晓参团规则,后续不再自动弹出</text>
<text>勾选后后续不再自动弹出</text>
</view>
</view>
</view>
@ -709,7 +710,7 @@
</view>
</uni-popup>
<!-- 参团成功提示弹出层 -->
<uni-popup ref="tishiPopup" background-color="transparent">
<uni-popup ref="tishiPopup" background-color="transparent" @change="onTishiPopupChange">
<view v-if="!isPindan && isStoreGroupOrder" class="group-face-tip-popup" @tap.stop>
<view class="group-face-tip-close" @tap="$refs.tishiPopup.close()">
<uni-icons type="closeempty" size="22" color="#9a6a42"></uni-icons>
@ -869,6 +870,7 @@
remark: '',
openKitchenVideoUrl: '',
supportDineIn: 0,
storeConsumeOnly: 0,
},
productId: '',
nowMake: true,
@ -888,6 +890,7 @@
pageNum: 1,
total: 1,
chooseWaitType: false,
pendingOpenPintuanAfterGuide: false,
// 导航栏高度(用于sticky top偏移)
navBarHeight: 0,
orderListWait: [],
@ -1163,6 +1166,24 @@
getWaitRuleKnownKey() {
return 'groupBuySingleWaitRuleKnown';
},
getPindanGuideCacheKey() {
return 'groupBuySinglePindanGuideShown';
},
shouldShowPindanGuide() {
return uni.getStorageSync(this.getPindanGuideCacheKey()) != 1;
},
markPindanGuideShown() {
uni.setStorageSync(this.getPindanGuideCacheKey(), 1);
},
onTishiPopupChange(e) {
if (e && e.show) return;
if (!this.pendingOpenPintuanAfterGuide) return;
this.pendingOpenPintuanAfterGuide = false;
this.fetchCoupons();
this.$nextTick(() => {
if (this.$refs.pintuanPopup) this.$refs.pintuanPopup.open('bottom');
});
},
initWaitRuleKnown() {
this.autoWaitRuleKnown = uni.getStorageSync(this.getWaitRuleKnownKey()) == 1;
},
@ -1780,14 +1801,23 @@
chooseOrderWait(item) {
this.$refs.pintuanGroupPopup.close();
this.isPindan = true;
this.$refs.tishiPopup.open();
this.groupId = item.id;
this.targetMembers = parseInt(item.targetMembers);
this.selectedCoupon = null;
if (this.chooseWaitType) {
const openOrderPopup = () => {
if (!this.chooseWaitType) return;
this.fetchCoupons();
this.$refs.pintuanPopup.open('bottom');
};
if (this.shouldShowPindanGuide()) {
this.markPindanGuideShown();
this.pendingOpenPintuanAfterGuide = !!this.chooseWaitType;
this.$nextTick(() => {
if (this.$refs.tishiPopup) this.$refs.tishiPopup.open();
});
return;
}
openOrderPopup();
},
openPopup(type, index, item) {
if (type == 'car') {
@ -2246,6 +2276,9 @@
getDineInText(item) {
return item && item.supportDineIn == 1 ? '可堂食' : '无堂食'
},
isStoreConsumeOnly(item) {
return item && item.storeConsumeOnly == 1
},
openGoodsDetail(item) {
this.detailItem = item || {};
this.$refs.goodsDetailPopup.open('bottom');
@ -2904,6 +2937,22 @@
}
}
.shop-img-store-badge {
position: absolute;
left: 1rpx;
top: 1rpx;
z-index: 2;
height: 36rpx;
line-height: 36rpx;
padding: 0 12rpx;
border-radius: 999rpx;
background: rgba(255, 255, 255, 0.94);
color: #ff5b37;
font-size: 19rpx;
font-weight: 900;
box-shadow: 0 8rpx 16rpx rgba(255, 83, 42, 0.18);
}
.shop-top {
display: flex;
}
@ -4743,20 +4792,26 @@
.join-popup-footer {
flex-shrink: 0;
padding: 18rpx 20rpx 22rpx;
padding: 12rpx 24rpx 14rpx;
margin: 4rpx -20rpx 0;
background: rgba(246, 255, 251, 0.96);
border-top: 1rpx solid rgba(166, 255, 234, 0.45);
background: #e7fff6;
border-top: 2rpx solid #7ad8b8;
}
.join-rule-check {
display: flex;
align-items: center;
justify-content: center;
color: #52615d;
font-size: 24rpx;
font-weight: 700;
line-height: 34rpx;
min-height: 68rpx;
padding: 0 22rpx;
border-radius: 999rpx;
background: #fff;
border: 2rpx solid #0b9b73;
color: #08735d;
font-size: 26rpx;
font-weight: 800;
line-height: 36rpx;
box-shadow: 0 8rpx 18rpx rgba(11, 155, 115, 0.12);
}
.join-rule-icon {
@ -4764,6 +4819,28 @@
margin-right: 12rpx;
}
.join-rule-icon.radio-no-check {
width: 36rpx;
height: 36rpx;
margin: 0 12rpx 0 0;
border: 3rpx solid #0b9b73;
background: #f4fff9;
box-sizing: border-box;
}
.join-rule-icon.radio-check {
width: 36rpx;
height: 36rpx;
margin: 0 12rpx 0 0;
background: #0b9b73;
color: #fff;
box-shadow: none;
display: flex;
align-items: center;
justify-content: center;
line-height: 36rpx;
}
.group-order-popup .popup-product-card {
padding: 14rpx 18rpx;
margin-bottom: 10rpx;

Loading…
Cancel
Save