闫增涛
2024-02-23 fdfb3ca757ecd6c396632ed276ff354671d3a7e5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<wxs src="./index.wxs" module="handlePromotion" />
<wxs src="./utils.wxs" module="utils" />
 
<view class="cart-group">
  <view class="goods-wrap" wx:for="{{_storeGoods}}" wx:for-item="store" wx:for-index="si" wx:key="storeId">
    <view class="cart-store">
      <t-icon
        size="40rpx"
        color="{{store.isSelected ? '#FA4126' : '#BBBBBB'}}"
        name="{{store.isSelected ? 'check-circle-filled' : 'circle'}}"
        class="cart-store__check"
        bindtap="selectStore"
        data-store-index="{{si}}"
      />
      <view class="cart-store__content">
        <view class="store-title">
          <t-icon prefix="wr" size="40rpx" color="#333333" name="store" />
          <view class="store-name">{{store.storeName}}</view>
        </view>
        <view class="get-coupon" catch:tap="gotoCoupons">优惠券</view>
      </view>
    </view>
    <block wx:for="{{store.promotionGoodsList}}" wx:for-item="promotion" wx:for-index="promoindex" wx:key="promoindex">
      <view
        class="promotion-wrap"
        wx:if="{{handlePromotion.hasPromotion(promotion.promotionCode)}}"
        bindtap="gotoBuyMore"
        data-promotion="{{promotion}}"
        data-store-id="{{store.storeId}}"
      >
        <view class="promotion-title">
          <view class="promotion-icon">{{promotion.tag}}</view>
          <view class="promotion-text">{{promotion.description}}</view>
        </view>
        <view class="promotion-action action-btn" hover-class="action-btn--active">
          <view class="promotion-action-label"> {{promotion.isNeedAddOnShop == 1 ? '去凑单' : '再逛逛'}} </view>
          <t-icon name="chevron-right" size="32rpx" color="#BBBBBB" />
        </view>
      </view>
      <view
        class="goods-item"
        wx:for="{{promotion.goodsPromotionList}}"
        wx:for-item="goods"
        wx:for-index="gi"
        wx:key="extKey"
      >
        <swipeout right-width="{{ 72 }}">
          <view class="goods-item-info">
            <view class="check-wrap" catchtap="selectGoods" data-goods="{{goods}}">
              <t-icon
                size="40rpx"
                color="{{goods.isSelected ? '#FA4126' : '#BBBBBB'}}"
                name="{{goods.isSelected ? 'check-circle-filled' : 'circle'}}"
                class="check"
              />
            </view>
            <view class="goods-sku-info">
              <goods-card
                layout="horizontal-wrap"
                thumb-width="{{thumbWidth}}"
                thumb-height="{{thumbHeight}}"
                centered="{{true}}"
                data="{{goods}}"
                data-goods="{{goods}}"
                catchspecs="specsTap"
                catchclick="goGoodsDetail"
              >
                <view slot="thumb-cover" class="stock-mask" wx:if="{{goods.shortageStock || goods.stockQuantity <= 3}}">
                  仅剩{{goods.stockQuantity}}件
                </view>
                <view slot="append-body" class="goods-stepper">
                  <view class="stepper-tip" wx:if="{{goods.shortageStock}}">库存不足</view>
                  <t-stepper
                    classname="stepper-info"
                    value="{{goods.quantity}}"
                    min="{{1}}"
                    max="{{999}}"
                    data-goods="{{goods}}"
                    data-gi="{{gi}}"
                    data-si="{{si}}"
                    catchchange="changeStepper"
                    catchblur="input"
                    catchoverlimit="overlimit"
                    theme="filled"
                  />
                </view>
              </goods-card>
            </view>
          </view>
          <view slot="right" class="swiper-right-del" bindtap="deleteGoods" data-goods="{{goods}}"> 删除 </view>
        </swipeout>
      </view>
      <view
        class="promotion-line-wrap"
        wx:if="{{handlePromotion.hasPromotion(promotion.promotionCode) && promoindex != (store.promotionGoodsList.length - 2)}}"
      >
        <view class="promotion-line" />
      </view>
    </block>
    <block wx:if="{{store.shortageGoodsList.length>0}}">
      <view
        class="goods-item"
        wx:for="{{store.shortageGoodsList}}"
        wx:for-item="goods"
        wx:for-index="gi"
        wx:key="extKey"
      >
        <swipeout right-width="{{ 72 }}">
          <view class="goods-item-info">
            <view class="check-wrap">
              <view class="unCheck-icon" />
            </view>
            <view class="goods-sku-info">
              <goods-card
                layout="horizontal-wrap"
                thumb-width="{{thumbWidth}}"
                thumb-height="{{thumbHeight}}"
                centered="{{true}}"
                data="{{goods}}"
                data-goods="{{goods}}"
                catchspecs="specsTap"
                catchclick="goGoodsDetail"
              >
                <view slot="thumb-cover" class="no-storage-mask" wx:if="{{goods.stockQuantity <=0}}">
                  <view class="no-storage-content">无货</view>
                </view>
              </goods-card>
            </view>
          </view>
          <view slot="right" class="swiper-right-del" bindtap="deleteGoods" data-goods="{{goods}}"> 删除 </view>
        </swipeout>
      </view>
      <view
        class="promotion-line-wrap"
        wx:if="{{handlePromotion.hasPromotion(promotion.promotionCode) && promoindex != (store.promotionGoodsList.length - 2)}}"
      >
        <view class="promotion-line" />
      </view>
    </block>
  </view>
</view>
<specs-popup
  show="{{isShowSpecs}}"
  title="{{currentGoods.title || ''}}"
  price="{{currentGoods.price || ''}}"
  thumb="{{utils.imgCut(currentGoods.thumb, 180, 180)}}"
  specs="{{currentGoods.specs || []}}"
  zIndex="{{999}}"
  bindclose="hideSpecsPopup"
/>
 
<t-toast id="t-toast" />