award-detail.wxml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <import src="../../lib/wxParse/wxParse.wxml"></import>
  2. <view class="award-detail">
  3. <view class="banner-wrapper">
  4. <swiper class="swiper" current="{{swiperIndex}}">
  5. <block wx:for="{{cover_images}}" wx:key="{{item}}">
  6. <swiper-item>
  7. <image src="{{item}}" class="slide-image" class='swiper-image' mode="scaleToFill" />
  8. </swiper-item>
  9. </block>
  10. </swiper>
  11. <view class="preview-list">
  12. <block wx:for="{{cover_images}}" wx:key='{{item}}'>
  13. <image class="preview-item" src="{{item}}" mode="scaleToFill" bind:tap="swipeTo" data-index="{{index}}"></image>
  14. </block>
  15. </view>
  16. <view class="wrapper-mid">
  17. <view class="left">
  18. <text class="award-title">{{title}} x {{winner_count}}</text>
  19. <text class="award-time">{{state === '2' ? '已结束' : draw_ts + '自动开奖'}}</text>
  20. </view>
  21. <button class="download" wx:if="{{download_url}}" bind:tap="download">下载</button>
  22. </view>
  23. <view class="wrapper-bottom">
  24. <view class="award-sponsor">抽奖发起人</view>
  25. <view class="sponsor">
  26. <image class="" src="{{host_avatar_url}}" mode="scaleToFill"></image>
  27. {{host_name}}
  28. </view>
  29. </view>
  30. </view>
  31. <view class="award-article {{isFold ? 'fold': ''}}">
  32. <template is="wxParse" data="{{wxParseData:article.nodes}}"></template>
  33. <button class="fold" bind:tap="toggleFold" wx:if="{{needFold}}">
  34. {{isFold ? '展开' : '收起'}}
  35. <i-icon type="unfold" color="#64a8d1" size="26" class="{{!isFold ?'hide' : ''}}"></i-icon>
  36. <i-icon type="packup" color="#64a8d1" size="26" class="{{isFold ? 'hide' : ''}}"></i-icon>
  37. </button>
  38. </view>
  39. <i-notice-bar loop>{{host_type === '1' ? '关注公众号"' + host_name + '"即可参与抽奖!' : ''}}邀请好友参与抽奖即可获得额外的抽奖码一枚,抽奖码数量越多中奖概率就越高哟!</i-notice-bar>
  40. <view class="public-platform">
  41. <image class="" src="{{host_avatar_url}}" mode="scaleToFill"></image>
  42. <view class="info">
  43. <view class="name">{{host_name}}</view>
  44. <view>{{host_detail}}</view>
  45. </view>
  46. <i-button size="small" type="primary" shape="scirle" inline="{{false}}" i-class='h30' open-type="contact" send-message-title="测试标题"
  47. send-message-card="true"
  48. send-message-path="{{'/pages/award-detail/award-detail?id=' + id}}" show-message-card="true">
  49. 关注
  50. </i-button>
  51. </view>
  52. <view class="steps">
  53. <i-steps current="{{state}}">
  54. <i-step >
  55. <view slot="title">准备中</view>
  56. <view slot="content">抽奖未开始</view>
  57. </i-step>
  58. <i-step >
  59. <view slot="title">进行中</view>
  60. <view slot="content">抽奖进行中</view>
  61. </i-step>
  62. <i-step >
  63. <view slot="title">已结束</view>
  64. <view slot="content">抽奖已结束</view>
  65. </i-step>
  66. </i-steps>
  67. </view>
  68. <view class="btn-wrapper" wx:if="{{state !== '0'}}">
  69. <form report-submit="true" bindsubmit="handleDrawLottery">
  70. <button class="btn-draw" wx:if="{{user_draw_state === 0 && state !== '2'}}" form-type="submit">点击抽奖
  71. </button>
  72. </form>
  73. <button class="btn-invite" wx:if="{{user_draw_state === 1 && state !== '2'}}" open-type="share">邀请好友
  74. </button>
  75. <view class="aniamte-ring {{user_draw_state === 1 ? 'invite' : 'draw'}}" wx:if="{{state !== '2'}}">
  76. </view>
  77. </view>
  78. <view class="my-code">
  79. <i-alert wx:if="{{user_lottery_codes.length !== 0}}">
  80. 我的抽奖码:
  81. <block wx:for="{{user_lottery_codes}}" wx:key="{{item}}">
  82. <view slot="desc" class="award-code">
  83. {{item.code}}
  84. <i-tag class="i-tags" type="dot" color="{{item.isWin ? 'green' : 'yellow'}}" wx:if="{{state === '2'}}">{{item.isWin ? '已' : '未'}}中奖</i-tag>
  85. </view>
  86. </block>
  87. </i-alert>
  88. </view>
  89. <view class="invited-users" wx:if="{{invited_user_avatars.length !== 0}}">
  90. <view class="title">
  91. 我的队友
  92. </view>
  93. <view class="invited-list">
  94. <block wx:for="{{invited_user_avatars}}" wx:key="{{item}}">
  95. <i-avatar src="{{item}}" size="large" shape="square" i-class="avatar"></i-avatar>
  96. </block>
  97. </view>
  98. </view>
  99. <view class="results" wx:if="{{winner_codes.length !== 0 && state === '2'}}">
  100. <!-- <view class="title">
  101. </view> -->
  102. <i-alert type="success" class="i-class" fixMargin="{{true}}">
  103. 本期中奖码:
  104. <block wx:for="{{winner_codes}}" wx:key="{{item}}">
  105. <view class="winner-code" slot="desc">{{item}}</view>
  106. </block>
  107. </i-alert>
  108. </view>
  109. <i-divider content="·"></i-divider>
  110. <view class="all-users">
  111. <view class="count">已经有{{lottery_user_count}}人参与 <text class="see-all" bind:tap="seeAll">查看全部 ></text></view>
  112. <view class="users-list">
  113. <block wx:for="{{lottery_user_avatars}}" wx:key="{{item}}">
  114. <i-avatar src="{{item}}" shape="square" i-class="avatar"></i-avatar>
  115. </block>
  116. </view>
  117. <view class="view-count">
  118. <view>
  119. 浏览数{{visit_count}}
  120. </view>
  121. <view bind:tap="showModal">
  122. 免责声明
  123. </view>
  124. </view>
  125. </view>
  126. <i-modal show-cancel="{{false}}" title="免责声明" visible="{{true}}" bind:ok="hideModal" visible="{{modalVisiable}}">
  127. {{notice}}
  128. </i-modal>
  129. <i-divider content="·"></i-divider>
  130. <recommend-award award="{{recommend_lottery}}"></recommend-award>
  131. <share-btns posterInfo="{{ shareInfo }}"></share-btns>
  132. </view>