Commit 340cbded3ae8821b95b61cb1895dc48e99082088
1 parent
dfdbbdaf
幸运购自定义模块单行滑动下商品已抢光情况判断显示
Showing
3 changed files
with
22 additions
and
3 deletions
components/diy_luckyGo/diy_luckyGo.js
| ... | ... | @@ -224,7 +224,14 @@ Component({ |
| 224 | 224 | go: function (e) { |
| 225 | 225 | let url = e.currentTarget.dataset.url; |
| 226 | 226 | getApp().goto(url); |
| 227 | - } | |
| 227 | + }, | |
| 228 | + | |
| 229 | + alert: function() { | |
| 230 | + wx.showToast({ | |
| 231 | + title: '本活动商品已抢光!', | |
| 232 | + icon: 'none', | |
| 233 | + }) | |
| 234 | + }, | |
| 228 | 235 | }, |
| 229 | 236 | |
| 230 | 237 | ... | ... |
components/diy_luckyGo/diy_luckyGo.wxml
| ... | ... | @@ -16,9 +16,9 @@ |
| 16 | 16 | <swiper-item class="s_it" wx:for="{{goods_array}}"> |
| 17 | 17 | <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> |
| 18 | 18 | <navigator url="{{aitem.actLen == 0 ? '':('/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=' + aitem.goods_id + '&prom_type=9&group_id=' + aitem.id)}}" |
| 19 | - class="pd20 nav" hover-class="none"> | |
| 19 | + class="pd20 nav" hover-class="none" bindtap="{{aitem.actLen == 0 ? 'alert':''}}"> | |
| 20 | 20 | <view class=""> |
| 21 | - <view class="img-container row" data-content="{{aitem.group_num}}人团"> | |
| 21 | + <view class="img-container row {{aitem.actLen == 0 ? 'active':''}}" data-content="{{aitem.group_num}}人团"> | |
| 22 | 22 | <image class="img-block" src="{{imghost + aitem.original_img}}" data-val="{{aitem.original_img}}" |
| 23 | 23 | data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3" lazy-load="true" |
| 24 | 24 | lazy-load="true"></image> | ... | ... |
components/diy_luckyGo/diy_luckyGo.wxss
| ... | ... | @@ -134,4 +134,16 @@ swiper { |
| 134 | 134 | |
| 135 | 135 | .btn.gray { |
| 136 | 136 | background-color: #ccc; |
| 137 | +} | |
| 138 | + | |
| 139 | +.img-container.active::after { | |
| 140 | + content: '已抢光'; | |
| 141 | + position: absolute; | |
| 142 | + font-size: 24rpx; | |
| 143 | + color: white; | |
| 144 | + bottom: 0; | |
| 145 | + left: 0; | |
| 146 | + width: 100%; | |
| 147 | + text-align: center; | |
| 148 | + background-color: rgba(0,0,0,.4); | |
| 137 | 149 | } |
| 138 | 150 | \ No newline at end of file | ... | ... |