C端小程序
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

62 строки
4.3 KiB

  1. <view class='navigator' bindtap='gotoDetail' data-id='{{data.id}}' data-targetAd='{{data.targetAd}}' hover-class='hover' data-couponId='{{data.couponId}}' data-title='{{data.title}}'>
  2. <view class="presell" wx:if="{{data.type==10}}" style="{{mouldType==1?'top: 280rpx;':''}}">预售 </view>
  3. <!-- 首页优惠券列表页面 -->
  4. <view class="coupons">
  5. <!-- fromMerchant 根据这个字段判断 -->
  6. <view class="superscript" wx:if="{{from == 'fromMerchant'}}">
  7. <!-- 角标的三种实现 -->
  8. <view class="rect" style='background: #31b968;' wx:if="{{data.targetAd == 2}}"></view>
  9. <view class="rect" style='background: orange;' wx:if="{{data.targetAd == 6}}"></view>
  10. <view class="rect" style='background: #d900ae;' wx:if="{{data.targetAd == 7}}"></view>
  11. <view class="rect" style='background: #5dae01;' wx:if="{{data.targetAd == 5}}"></view>
  12. <view class="desc" wx:if="{{data.targetAd == 2}}">限时券</view>
  13. <view class="desc" wx:if="{{data.targetAd == 6}}">砍价券</view>
  14. <view class="desc" wx:if="{{data.targetAd == 7}}">拼团券</view>
  15. <view class="desc" wx:if="{{data.targetAd == 5}}">消费卡</view>
  16. </view>
  17. <view class="coupons-img">
  18. <image class="img" src="{{data.coverImg}}" style="{{mouldConfig.imgHomeH}}" mode='aspectFill' lazy-load="true"></image>
  19. </view>
  20. <view class="coupons-info">
  21. <view class="coupons-info-name tit">{{data.title}}</view>
  22. <text class='saleRamin' wx:if="{{couponListShowSelled && couponListShowSelled==1}}">已售{{data.inventory - data.remainInventory}}</text>
  23. <view class="coupons-info-name subtitle">{{data.subTitle}}</view>
  24. <view class="coupons-info-price-p">
  25. <view class='price' wx:if="{{data.type!=10}}">
  26. <text wx:if="{{data.targetAd == 1||data.targetAd == 5}}"><text class='rmb'>¥</text>
  27. <text class='num'>{{data.salePriceStr}}</text>
  28. <text wx:if="{{!(data.type==5&&data.unit==1)}}" class='view02'>¥{{data.priceStr}}</text></text>
  29. <text wx:if="{{data.targetAd == 2}}"><text class='saleprice'>抢购价</text>
  30. <text class='rmb'>¥</text>{{data.salePriceStr}}</text>
  31. <text wx:if="{{data.targetAd == 6}}"><text class='saleprice'>可砍至</text>
  32. <text class='rmb'>¥</text>{{data.salePriceStr}}</text>
  33. <text wx:if="{{data.targetAd == 7}}"><text class='saleprice'>拼团价</text>
  34. <text class='rmb'>¥</text>{{data.salePriceStr}}</text>
  35. <view class="coupons-info-manjian" style="margin-top:10rpx;" wx:if="{{data.type == 1}}">
  36. <!-- <view class='view01' wx:if="{{data.unit==0}}">¥{{data.priceStr}}</view> -->
  37. <view wx:if="{{data.unit==1}}">{{data.priceStr}}小时</view>
  38. </view>
  39. <view class="coupons-info-manjian" wx:elif="{{data.type == 3||data.type==4||data.type==5}}">
  40. <!-- <text class='view01' wx:if="{{data.unit==0}}">¥{{data.priceStr}}</text> -->
  41. <text class="text" wx:if="{{data.unit==1}}">{{data.priceStr}}小时</text>
  42. </view>
  43. </view>
  44. <view class="earnest" wx:if="{{data.type==10}}">
  45. 预售定金:¥{{data.salePriceStr}}
  46. </view>
  47. </view>
  48. </view>
  49. <view class="coupons-btn">
  50. <!-- 优惠券价格 -->
  51. <i-button i-class="coupons-btn-gm" wx:if="{{data.salePriceStr==0&&data.remainInventory!=0&&data.targetAd == 1}}" data-date='{{data}}'>免费领</i-button>
  52. <i-button i-class="coupons-btn-gm" wx:if="{{data.salePriceStr!=0&&data.remainInventory!=0&&data.targetAd == 1||data.salePriceStr!=0&&data.remainInventory!=0&&data.targetAd == 5}}" data-date='{{data}}'>购买</i-button>
  53. <i-button i-class="coupons-btn-gm" wx:if="{{data.remainInventory!=0&&data.targetAd == 2}}" data-date='{{data}}'>去抢购</i-button>
  54. <i-button i-class="coupons-btn-gm" wx:if="{{data.remainInventory!=0&&data.targetAd == 6}}" data-date='{{data}}'>去砍价</i-button>
  55. <i-button i-class="coupons-btn-gm" wx:if="{{data.remainInventory!=0&&data.targetAd == 7}}" data-date='{{data}}'>去拼团</i-button>
  56. <i-button i-class="coupons-btn-gms" wx:if="{{data.remainInventory==0}}" data-date='{{data}}'>已售罄</i-button>
  57. <i-button i-class="coupons-btn-gms" wx:if="{{data.status==1}}" data-date='{{data}}'>已下架</i-button>
  58. </view>
  59. </view>
  60. </view>