profile.wxml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <!--pages/luckDraw/profile.wxml-->
  2. <!-- 首部信息 -->
  3. <custom-page head-bg-image="https://dy.shpr.top/luckDraw/per_head.png" bind:reachbottom="scrollToBottom">
  4. <topbar slot="head" title="抽奖记录" topbar-title-class="profile-topbar"/>
  5. <view slot="body">
  6. <view class="head flex-column">
  7. <image wx:if="{{!isLogin}}" class="head_portrait" src="/images/welfareMall/head-portrait.png" />
  8. <!-- 获取用户头像 -->
  9. <open-data wx:if="{{isLogin}}" class="head_portrait" type="userAvatarUrl"></open-data>
  10. <view class="head_text" wx:if="{{isLogin}}">{{phone.toHide(mobileTop)}}</view>
  11. <button class="sigin-isLogin" wx:if="{{!isLogin}}" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">登录</button>
  12. </view>
  13. <!-- 中部说明 -->
  14. <view class="explain flex-row">
  15. <view class="explain-left flex-column" catchtap="{{isLogin?'getProfile':''}}">
  16. <view class="explain-text">{{couponNum}}</view>
  17. <view class="explain-discount">优惠券</view>
  18. <view class="{{noCoupon?'explain-column':'explain-columnNo'}}"></view>
  19. </view>
  20. <view class="explain-right flex-column" catchtap="{{isLogin?'getPrize':''}}">
  21. <view class="explain-text">{{thirdPrizeNum}}</view>
  22. <view class="explain-utility">奖品</view>
  23. <view class="{{noPrize?'explain-column':'explain-columnNo'}}"></view>
  24. </view>
  25. </view>
  26. <!-- 主要内容 -->
  27. <view class="check-in-content flex-column">
  28. <!-- 优惠券内容 -->
  29. <view hidden="{{hidden1}}">
  30. <view wx:for="{{goodsItemList}}" wx:key="index" data-id="{{item.id}}" class="{{item.couponType == 'C'?'coupon flex-row':'coupon2 flex-row'}}">
  31. <view class="coupon-left flex-row">
  32. <!-- 代金券 -->
  33. <view class="coupon-left-symbol" wx:if="{{item.couponType == 'C'}}">¥</view>
  34. <view class="{{item.formatReduceCost.length > 3 ?'coupon-left-numSmall':'coupon-left-num'}}" wx:if="{{item.couponType == 'C'}}">{{item.formatReduceCost ?item.formatReduceCost:0}}</view>
  35. <!-- 折扣券 -->
  36. <view class="{{item.formatDiscount.length > 3 ?'coupon-left-numSmall':'coupon-left-num'}}" wx:if="{{item.couponType == 'D'}}">{{item.formatDiscount ?item.formatDiscount:0}}</view>
  37. <view class="coupon-left-symbol" wx:if="{{item.couponType == 'D'}}" style="font-size: 16px;">折</view>
  38. </view>
  39. <view class="coupon-center flex-column">
  40. <view class="coupon-center-upper over-ellipsis">{{item.couponTitle}}</view>
  41. <view class="coupon-center-bm flex-row">
  42. <view class="coupon-center-block1"></view>
  43. <view class="coupon-center-middle" wx:if="{{item.formatLeastCost == '0'}}">无门槛</view>
  44. <view class="coupon-center-middle" wx:if="{{item.formatLeastCost != '0'}}">满{{item.formatLeastCost}}使用</view>
  45. <view class="coupon-center-block2"></view>
  46. </view>
  47. <view class="coupon-center-lower">{{item.couponBeginTimestamp}}-{{item.couponEndTimestamp}}</view>
  48. </view>
  49. <view class="coupon-right">
  50. <view class="{{item.couponType == 'C'?'coupon-right-usenow flex-row':'coupon-right-usenow2 flex-row'}}">
  51. <navigator class="btn_exchange" target="miniProgram" app-id="wxd92a2d29f8022f40" path="pages/index/index" open-type='navigate'>
  52. </navigator>
  53. </view>
  54. </view>
  55. </view>
  56. <view class="no_result" wx:if="{{noResult}}">———— 抱歉,您暂无可用优惠券 ————</view>
  57. <view class="no_result" wx:if="{{noMore}}">———— 更多优惠券 | 敬请期待 ————</view>
  58. </view>
  59. <!-- 奖品 -->
  60. <view hidden="{{hidden2}}">
  61. <view class="prize-content flex-row" wx:for="{{goodsItemList}}" wx:key="index" data-id="{{item.id}}">
  62. <view class="prize-img flex-column">
  63. <image class="prize-img-small" src="{{item.fullGoodsSmallImage}}" />
  64. </view>
  65. <view class="prize-text">
  66. <view class="prize-text-top over-ellipsis">{{item.goodsName}}</view>
  67. <view class="prize-text-buttom over-ellipsis-two">{{item.hitDesc}}</view>
  68. </view>
  69. <view class="prize-jump flex-row">
  70. <view class="btn_exchange" data-src="{{item.fullGoodsBigImage}}" catchtap="toLookHitPhoto">
  71. </view>
  72. </view>
  73. </view>
  74. <view class="no_result" wx:if="{{noResult}}">———— 抱歉,您暂无可领取奖品 ————</view>
  75. <view class="no_result" wx:if="{{noMore}}">———— 更多奖品 | 敬请期待 ————</view>
  76. </view>
  77. </view>
  78. </view>
  79. </custom-page>
  80. <!-- 使用wxs 手机号码中间四位显示为*号 -->
  81. <wxs module="phone">
  82. var toHide = function (array) {
  83. var mphone = array.substring(0, 3) + '****' + array.substring(7);
  84. return mphone;
  85. }
  86. module.exports.toHide = toHide;
  87. </wxs>
  88. <!-- 底部导航 -->
  89. <!-- <tab-bar /> -->
  90. <custom-preview-image wx:if="{{showCustomPreview}}" src="{{previewImgSrc}}" bind:closeCallback="closePreviewImage"/>