profile.wxml 4.6 KB

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