profile.wxml 4.5 KB

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