profile.wxml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <!--pages/luckDraw/profile.wxml-->
  2. <view class="personal">
  3. <!-- 个人中心视图 -->
  4. <view class="head-bg" catchtap="turnPrize">
  5. <image class="image_bg" src="/images/luck-draw/per_head.png" />
  6. <image class="image_portrait" src="/images/luck-draw/portrait.png" />
  7. <button class="luck-draw-isLogin" wx:if="{{!isLogin}}" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" >登录</button>
  8. <view class="luck-draw-pro-nickname" wx:if="{{isLogin}}">{{phone.toHide(mobileTop)}}</view>
  9. </view>
  10. <view class="luck-draw-pro-cp">
  11. <!-- 优惠券 -->
  12. <view class="luck-draw-coupon" catchtap="getProfile">
  13. <view class="luck-draw-cn">{{couponNum}}</view>
  14. <view class="luck-draw-cz">优惠券</view>
  15. <view wx:if="{{goodsType == 1}}" class="luck-draw-cjh"><view class="luck-draw-cj"></view></view>
  16. </view>
  17. <!-- 奖品 -->
  18. <view class="luck-draw-prize" catchtap="getPrize">
  19. <view class="luck-draw-pn">{{productNum}}</view>
  20. <view class="luck-draw-pz">奖品</view>
  21. <view wx:if="{{goodsType == 2}}" class="luck-draw-cjh"><view class="luck-draw-cj"></view></view>
  22. </view>
  23. </view>
  24. <view id="couponZD" class="luck-draw-theme" hidden="{{hidden1}}">
  25. <!-- 折扣券 -->
  26. <view class="luck-draw-content" wx:for="{{goodsItemList}}" wx:key="index" data-id="{{item.id}}" >
  27. <view class="luck-draw-words">
  28. <view class="luck-draw-discount1">
  29. <view class="{{item.formatDiscoun.length > 3?'luck-draw-zkz4c':'luck-draw-zkz4'}}" wx:if="{{item.couponType == 'D'}}">{{item.formatDiscount ?item.formatDiscount:0}}</view>
  30. <view class="{{item.formatDiscoun.length > 3?'luck-draw-zkz5c':'luck-draw-zkz5'}}" wx:if="{{item.couponType == 'D'}}">折</view>
  31. <view class="luck-draw-djz4" wx:if="{{item.couponType == 'C'}}">¥</view>
  32. <view class="{{item.formatReduceCost.length > 3 ?'luck-draw-djz5c':'luck-draw-djz5'}}" wx:if="{{item.couponType == 'C'}}">{{item.formatReduceCost ?item.formatReduceCost:0}}</view>
  33. </view>
  34. <view class="luck-draw-discount2">
  35. <view class="luck-draw-zkz1">{{item.goodsName}}</view>
  36. <view class="luck-draw-mj">
  37. <view class="luck-draw-zkz21"></view>
  38. <view class="luck-draw-zkz2" wx:if="{{item.formatLeastCost == '0'}}">无门槛</view>
  39. <view class="luck-draw-zkz2" wx:if="{{item.formatLeastCost != '0'}}">满{{item.formatLeastCost}}使用</view>
  40. <view class="luck-draw-zkz22"></view>
  41. </view>
  42. <view class="luck-draw-zkz3">{{item.couponBeginTimestamp}}-{{item.couponEndTimestamp}}</view>
  43. </view>
  44. </view>
  45. <image wx:if="{{item.couponType == 'D'}}" class="image_zk" src="/images/luck-draw/coupon1.png" />
  46. <image wx:if="{{item.couponType == 'D'}}" class="image_zk_un" src="/images/luck-draw/coupon_use_now.png" />
  47. <image wx:if="{{item.couponType == 'C'}}" class="image_zk" src="/images/luck-draw/cash_coupon.png" />
  48. <image wx:if="{{item.couponType == 'C'}}" class="image_zk_un" src="/images/luck-draw/cc_use_now.png" />
  49. <navigator class="_btn _exchange"
  50. target = "miniProgram"
  51. app-id="wxd92a2d29f8022f40"
  52. path="pages/index/index"
  53. extra-data="{foo: 'bar'}"
  54. open-type='navigate'>
  55. </navigator>
  56. </view>
  57. <!-- 代金券
  58. <view class="luck-draw-content" wx:for="{{goodsItemList}}" wx:key="index" data-id="{{item.id}}" wx:if="{{item.couponType == 'C' && item.goodsType == 1}}">
  59. <image class="image_zk" src="/images/luck-draw/cash_coupon.png" />
  60. <image class="image_zk_un" src="/images/luck-draw/cc_use_now.png" />
  61. <navigator class="_btn _exchange"
  62. target = "miniProgram"
  63. app-id="wxd92a2d29f8022f40"
  64. path="page/index/index"
  65. open-type='navigate'>
  66. </navigator>
  67. <view class="luck-draw-words">
  68. <view class="luck-draw-discount1">
  69. <view class="luck-draw-djz4">¥</view>
  70. <view class="luck-draw-djz5">{{item.formatReduceCost ?item.formatReduceCost:0}}</view>
  71. </view>
  72. <view class="luck-draw-discount2">
  73. <view class="luck-draw-zkz1">{{item.goodsName}}</view>
  74. <view class="luck-draw-mj">
  75. <view class="luck-draw-zkz21"></view>
  76. <view class="luck-draw-zkz2" wx:if="{{item.formatLeastCost == '0'}}">无门槛</view>
  77. <view class="luck-draw-zkz2" wx:if="{{item.formatLeastCost != '0'}}">满{{item.formatLeastCost}}使用</view>
  78. <view class="luck-draw-zkz22"></view>
  79. </view>
  80. <view class="luck-draw-zkz3">{{item.couponBeginTimestamp ?item.couponBeginTimestamp:0}}-{{item.couponEndTimestamp ?item.couponEndTimestamp:0}}</view>
  81. </view>
  82. </view>
  83. </view> -->
  84. <view class="no_result" wx:if="{{noResult}}">———— 抱歉,您暂无可用优惠券 ————</view>
  85. <view class="no_result" wx:if="{{noMore}}">———— 更多优惠券 | 敬请期待 ————</view>
  86. </view>
  87. <view id="prize" class="luck-draw-theme" hidden="{{hidden2}}">
  88. <!-- 奖品 -->
  89. <view class="luck-draw-content" wx:for="{{goodsItemList}}" wx:key="index" data-id="{{item.id}}" wx:if="{{item.goodsType == 2}}">
  90. <view class="luck-draw-wordsj">
  91. <view class="luck-draw-discount1j">
  92. <image class="luck-draw-zkzj" src="/images/luck-draw/prize.png" />
  93. </view>
  94. <view class="luck-draw-discount2">
  95. <view class="luck-draw-zkz1j">{{item.goodsName}}</view>
  96. <view class="luck-draw-zkz3j">奖品参数</view>
  97. </view>
  98. </view>
  99. <image class="image_zk_unj" src="/images/luck-draw/choice.png" />
  100. <navigator class="_btn _exchange"
  101. target = "miniProgram"
  102. app-id="wxd92a2d29f8022f40"
  103. path="pages/index/index"
  104. extra-data="{foo: 'bar'}"
  105. open-type='navigate'>
  106. </navigator>
  107. </view>
  108. <view class="no_result" wx:if="{{noResult}}">———— 抱歉,您暂无可领取奖品 ————</view>
  109. <view class="no_result" wx:if="{{noMore}}">———— 更多奖品 | 敬请期待 ————</view>
  110. </view>
  111. </view>
  112. <!-- 使用wxs 手机号码中间四位显示为*号 -->
  113. <wxs module="phone">
  114. var toHide = function(array) {
  115. var mphone = array.substring(0, 3) + '****' + array.substring(7);
  116. return mphone;
  117. }
  118. module.exports.toHide = toHide;
  119. </wxs>
  120. <!-- 底部导航 -->
  121. <tab-bar />