home.wxml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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. <view style="background: #fff; padding:20rpx 0 13rpx;">
  7. <view class="head">
  8. <image class="head-img" src="{{wxuser.avatarUrl}}"></image>
  9. <view class="head-info">
  10. <text class="head-text">{{wxuser.nickName}}</text>
  11. <text class="head-rank">{{rankDanName}}</text>
  12. <text class="head-rule" bindtap="toRule">规则说明</text>
  13. <view class="head-rule-icon"></view>
  14. <view class="head-rank-logo">
  15. <image src="../../resource/bg_rank_logo.png"></image>
  16. <text>{{rankDanName}}</text>
  17. </view>
  18. </view>
  19. <view class="head-details head-details-pk">
  20. <image src="../../resource/ic_pk.png" class="icon"></image>
  21. <text>{{user.playGameC}}场</text>
  22. </view>
  23. <view class="head-details head-details-brain" bindtap="toAdd">
  24. <image src="../../resource/ic_brain.png" class="icon"></image>
  25. <text id="brainCount">{{tools.unit(user.cell)}}</text>
  26. <image src="../../resource/ic_add.png" class="btn" hidden="true"></image>
  27. </view>
  28. <view class="head-details head-details-balance" bindtap="toCash">
  29. <image src="../../resource/ic_package.png" class="icon"></image>
  30. <text>¥ {{user.withdrawalbleFee / 100}}</text>
  31. </view>
  32. </view>
  33. <view class="rank">
  34. <view class="rank-game" bindtap="toRank">
  35. <image src="../../resource/bg_rank.png"></image>
  36. <text class="no">NO.{{rankNumber}}</text>
  37. <view class="season">
  38. <image src="{{rankInfo.logo}}"></image>
  39. <text><text class="red">{{rankInfo.title}}</text>赛季</text>
  40. </view>
  41. </view>
  42. <view class="rank-friend">
  43. <image src="../../resource/bg_friend.png"></image>
  44. <button id="friend" open-type="share"></button>
  45. </view>
  46. <view class="rank-add">
  47. <image src="../../resource/bg_brain_add.png"></image>
  48. <image src="../../resource/ic_brain_coin.png" animation="{{goldCoinAnim1}}" class="add-img"></image>
  49. <image src="../../resource/ic_brain_coin.png" animation="{{goldCoinAnim2}}" class="add-img"></image>
  50. <image src="../../resource/ic_brain_coin.png" animation="{{goldCoinAnim3}}" class="add-img"></image>
  51. <image src="../../resource/ic_brain_coin.png" animation="{{goldCoinAnim4}}" class="add-img"></image>
  52. <image src="../../resource/ic_brain_coin.png" animation="{{goldCoinAnim5}}" class="add-img"></image>
  53. <image src="../../resource/ic_brain_coin.png" animation="{{goldCoinAnim6}}" class="add-img"></image>
  54. <image src="../../resource/ic_brain_coin.png" class="add-img"></image>
  55. <text class="plan">{{addNum}}/{{maxAddNum}}万</text>
  56. <text class="time">{{addTimeShow}}</text>
  57. <view class="dis" animation="{{brainFillAnim}}"></view>
  58. <form report-submit="true" bindsubmit="getCurrentAddNum">
  59. <button form-type="submit"></button>
  60. </form>
  61. </view>
  62. </view>
  63. </view>
  64. <view class="room">
  65. <text class="room-title">休闲娱乐赛</text>
  66. <text class="room-sub-title">答得越快、答对越多,奖励越多</text>
  67. <view class="room-body">
  68. <view class="room-game" bindtap="toOpen" hidden="{{hideOpenRoomView}}">
  69. <image src="../../resource/bg_open_room.png" class="room-bg"></image>
  70. <text class="room-game-open-title">发起趣味</text>
  71. <text class="room-game-open-sub-title">奖励赛</text>
  72. </view>
  73. <block wx:for="{{room}}" wx:key="gameId" wx:for-index="i">
  74. <view class="room-game" bindtap="toRoom" id="{{i}}">
  75. <image src="../../resource/bg_room.png" class="room-bg"></image>
  76. <image src="{{item.logo}}" class="room-logo"></image>
  77. <text class="room-game-name">{{item.title}}</text>
  78. <text class="room-game-money">{{item.awardFee / 100}}<text class="room-game-money-unit">元</text></text>
  79. <text class="room-game-down-time" wx:if="{{item.countDown > 0 && item.curUser < item.maxUser}}">倒计时{{item.countDown}}秒</text>
  80. <view class="room-game-now" wx:elif="{{item.countDown <= 0 || item.status == 3}}">
  81. <image src="../../resource/ic_hot.png"></image>
  82. <text>火热进行中</text>
  83. </view>
  84. <text class="room-game-fill" wx:else>已爆满</text>
  85. </view>
  86. </block>
  87. </view>
  88. </view>
  89. <button class="h-service-btn" open-type="contact">
  90. <image class="h-service-img" src="../../resource/service.png"></image>
  91. </button>
  92. <template is="dialogGeneral" data="{{...dialogGeneral}}" />
  93. <template is="dialogBrainLack" data="{{...dialogBrainLack}}" />
  94. <template is="dialogNoRank" data="{{...dialogRank}}" />
  95. <template is="dialogRoom" data="{{...dialogRoom}}" />
  96. <view class="dialog" catchtouchmove="wxvoid" hidden="{{dialogLogin.hidden}}">
  97. <view class="dialog-main">
  98. <view class="dialog-body-login">
  99. <image src="../../resource/head_login.png"></image>
  100. <view>
  101. <text class="title">赢88888元奖金</text>
  102. <text class="sub-title">展示你的脑力冲击120亿脑力值
  103. 获得院士称号,赢高额奖金</text>
  104. <button open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">微信登录</button>
  105. </view>
  106. </view>
  107. </view>
  108. </view>
  109. <wxs module="tools">
  110. var unit = function(cell) {
  111. if (cell >= 10000) {
  112. var result = (cell / 10000)
  113. result = result.toFixed(2)
  114. return result + '亿'
  115. }
  116. return cell + '万'
  117. }
  118. module.exports.unit = unit
  119. </wxs>