home.wxml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <!--pages/home/home.wxml-->
  2. <import src="../../modal/dialogBrainLack.wxml" />
  3. <import src="../../modal/dialogNoRank.wxml" />
  4. <import src="../../modal/dialogGeneral.wxml" />
  5. <import src="../../modal/dialogRoom.wxml" />
  6. <import src="../../modal/dialogExclude.wxml" />
  7. <view style="background: #fff; padding:20rpx 0 13rpx;">
  8. <view class="head">
  9. <image class="head-img" src="{{wxuser.avatarUrl}}"></image>
  10. <view class="head-info">
  11. <text class="head-text">{{wxuser.nickName}}</text>
  12. <text class="head-rank">{{rankDanName}}</text>
  13. <text class="head-rule" bindtap="toRule">规则说明</text>
  14. <view class="head-rule-icon"></view>
  15. <view class="head-rank-logo">
  16. <image src="../../resource/bg_rank_logo.png"></image>
  17. <text>{{rankDanName}}</text>
  18. </view>
  19. </view>
  20. <view class="head-details head-details-pk">
  21. <image src="../../resource/ic_pk.png" class="icon"></image>
  22. <text>{{user.playGameC}}场</text>
  23. </view>
  24. <view class="head-details head-details-brain" bindtap="toAdd">
  25. <image src="../../resource/ic_brain.png" class="icon"></image>
  26. <text id="brainCount">{{tools.unit(user.cell)}}</text>
  27. <image src="../../resource/ic_add.png" class="btn" hidden="true"></image>
  28. </view>
  29. <view class="head-details head-details-balance" bindtap="toCash">
  30. <image src="../../resource/ic_package.png" class="icon"></image>
  31. <text>¥ {{user.withdrawalbleFee / 100}}</text>
  32. </view>
  33. </view>
  34. <view class="rank">
  35. <view class="rank-game">
  36. <image src="../../resource/bg_rank.png"></image>
  37. <text class="no">NO.{{rankNumber}}</text>
  38. <view class="season">
  39. <image src="{{rankInfo.logo}}"></image>
  40. <text><text class="red">{{rankInfo.title}}</text>赛季</text>
  41. </view>
  42. <form report-submit="true" bindsubmit="toRank">
  43. <button form-type="submit"></button>
  44. </form>
  45. </view>
  46. <view class="rank-game rank-game-one">
  47. <image src="../../resource/bg_rank_one.png"></image>
  48. <text class="no">NO.{{rankOneNumber}}</text>
  49. <view class="season">
  50. <image src="{{rankInfo.logo}}"></image>
  51. <text><text class="red">{{rankOneInfo.title}}</text>专场</text>
  52. </view>
  53. <form report-submit="true" bindsubmit="toRankOne">
  54. <button form-type="submit"></button>
  55. </form>
  56. </view>
  57. <view class="rank-friend">
  58. <image src="../../resource/bg_friend.png"></image>
  59. <button id="friend" open-type="share"></button>
  60. </view>
  61. <view class="rank-friend">
  62. <image src="../../resource/bg_exclude.png"></image>
  63. <button id="exclude" bindtap="showExcludeDialog"></button>
  64. </view>
  65. <view class="rank-add">
  66. <image src="../../resource/bg_brain_add.png"></image>
  67. <form report-submit="true" bindsubmit="getCurrentAddNum">
  68. <button form-type="submit"></button>
  69. </form>
  70. </view>
  71. </view>
  72. </view>
  73. <view class="room">
  74. <text class="room-title">休闲娱乐赛</text>
  75. <text class="room-sub-title">答得越快、答对越多,奖励越多</text>
  76. <view class="room-body">
  77. <view class="room-game" bindtap="toOpen" hidden="{{hideOpenRoomView}}">
  78. <image src="../../resource/bg_open_room.png" class="room-bg"></image>
  79. <text class="room-game-open-title">发起趣味</text>
  80. <text class="room-game-open-sub-title">奖励赛</text>
  81. </view>
  82. <block wx:for="{{room}}" wx:key="gameId" wx:for-index="i">
  83. <form report-submit="true" bindsubmit="toRoom">
  84. <view class="room-game" bindtap="" id="{{i}}">
  85. <image src="../../resource/bg_room.png" class="room-bg"></image>
  86. <image src="{{item.logo}}" class="room-logo"></image>
  87. <text class="room-game-name">{{item.title}}</text>
  88. <text class="room-game-money">{{item.awardFee / 100}}<text class="room-game-money-unit">元</text></text>
  89. <text class="room-game-down-time" wx:if="{{item.countDown > 0 && item.curUser < item.maxUser}}">倒计时{{item.countDown}}秒</text>
  90. <view class="room-game-now" wx:elif="{{item.countDown <= 0 || item.status == 3}}">
  91. <image src="../../resource/ic_hot.png"></image>
  92. <text>火热进行中</text>
  93. </view>
  94. <text class="room-game-fill" wx:else>已爆满</text>
  95. <input type='text' name="id" value="{{i}}" hidden="true" />
  96. <button form-type="submit"></button>
  97. </view>
  98. </form>
  99. </block>
  100. </view>
  101. </view>
  102. <view class="h-fiction" bindtap="toggleAdConstact" hidden="{{contactAd.sfrom == null}}">
  103. <button class="h-fiction-btn" hidden="{{contactAd.hidden}}" open-type="contact" send-message-title="{{contactAd.message[0]}}" session-from="{{contactAd.sfrom}}" send-message-img="{{contactAd.message[1]}}" send-message-path="{{contactAd.message[2]}}" show-message-card="{{contactAd.card}}">
  104. <text>{{contactAd.btn}}</text>
  105. </button>
  106. <image class="h-fiction-img" src="{{contactAd.img}}"></image>
  107. </view>
  108. <button class="h-service-btn" open-type="contact" session-from="{{contactDefault.sfrom}}" send-message-title="{{contactDefault.message[0]}}" send-message-img="{{contactDefault.message[1]}}" send-message-path="{{contactDefault.message[2]}}" show-message-card="{{contactDefault.card}}">
  109. <image class="h-service-img" src="../../resource/service.png"></image>
  110. </button>
  111. <ad unit-id="adunit-c728a02e252c1dc8"></ad>
  112. <template is="dialogGeneral" data="{{...dialogGeneral}}" />
  113. <template is="dialogBrainLack" data="{{...dialogBrainLack}}" />
  114. <template is="dialogNoRank" data="{{...dialogRank}}" />
  115. <template is="dialogRoom" data="{{...dialogRoom}}" />
  116. <template is="dialogExclude" data="{{...dialogExclude}}" />
  117. <view class="dialog" catchtouchmove="wxvoid" hidden="{{dialogLogin.hidden}}">
  118. <view class="dialog-main">
  119. <view class="dialog-body-login">
  120. <image src="../../resource/head_login.png"></image>
  121. <view>
  122. <text class="title">赢88888元奖金</text>
  123. <text class="sub-title">展示你的脑力冲击120亿脑力值
  124. 获得院士称号,赢高额奖金</text>
  125. <button open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">微信登录</button>
  126. </view>
  127. </view>
  128. </view>
  129. </view>
  130. <view class="dialog" catchtouchmove="wxvoid" hidden="{{dialogLogin.hidden}}">
  131. <view class="dialog-main">
  132. <view class="dialog-body-login">
  133. <image src="../../resource/head_login.png"></image>
  134. <view>
  135. <text class="title">赢88888元奖金</text>
  136. <text class="sub-title">展示你的脑力冲击120亿脑力值
  137. 获得院士称号,赢高额奖金</text>
  138. <button open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">微信登录</button>
  139. </view>
  140. </view>
  141. </view>
  142. </view>
  143. <wxs module="tools">
  144. var unit = function(cell) {
  145. if (cell >= 10000) {
  146. var result = (cell / 10000)
  147. result = result.toFixed(2)
  148. return result + '亿'
  149. }
  150. return cell + '万'
  151. }
  152. module.exports.unit = unit
  153. </wxs>