xccg.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <template>
  2. <view class="content">
  3. <view class="wrap">
  4. <image src="../../static/img/xcbg.png" mode="" class="bg"></image>
  5. <view class="data-wrap">
  6. <image src="../../static/img/cg-bg-t.png" mode=""></image>
  7. <view class="cg-tit">
  8. 第{{current == 1 ? '一': (current == 2) ? '二': (current == 3? '三': '四')}}关
  9. </view>
  10. <view class="data">
  11. <image src="../../static/img/yuanhuan.png" mode=""></image>
  12. <view class="val" v-if="current == 1">
  13. {{pool.one_pool_sum || '0'}}
  14. </view>
  15. <view class="val" v-if="current == 2">
  16. {{pool.two_pool_sum || '0'}}
  17. </view>
  18. <view class="val" v-if="current == 3">
  19. {{pool.three_pool_sum || '0'}}
  20. </view>
  21. <view class="val" v-if="current == 4">
  22. {{pool.for_pool_sum || '0'}}
  23. </view>
  24. </view>
  25. <view class="data-tit" v-if="current == 1">
  26. 当前推荐人数共 <text
  27. style="color: #FF5F36;font-weight: bold;padding: 0 10rpx;">{{pool.one_pool_sum}}</text> 人
  28. </view>
  29. <view class="data-tit" v-if="current == 2">
  30. 排单号:<text class="num">{{pool.two_pool}}</text>,距离下一个出局需等待<text
  31. class="num">{{pool.two_pool - pool.two_pool_out -1}}</text>位
  32. </view>
  33. <view class="data-tit" v-if="current == 3">
  34. 排单号:<text class="num">{{pool.three_pool}}</text>,距离下一个出局需等待<text
  35. class="num">{{pool.three_pool - pool.three_pool_out -1}}</text>位
  36. </view>
  37. <view class="data-tit" v-if="current == 4">
  38. 排单号:<text class="num">{{pool.for_pool}}</text>,距离下一个出局需等待<text
  39. class="num">{{pool.for_pool - pool.for_pool_out -1}}</text>位
  40. </view>
  41. <view class="next" @click="goNest" v-if="current == 1 && pool.two_pool > 0">
  42. 下一关
  43. </view>
  44. <view class="next" @click="goNest" v-if="current == 2 && pool.three_pool > 0">
  45. 下一关
  46. </view>
  47. <view class="next" @click="goNest" v-if="current == 3 && pool.for_pool > 0">
  48. 下一关
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. </template>
  54. <script>
  55. import {
  56. mapState,
  57. mapMutations
  58. } from 'vuex';
  59. import {
  60. getUserInfo,
  61. userPool
  62. } from '@/api/user.js';
  63. export default {
  64. data() {
  65. return {
  66. current: 1,
  67. pool: {}
  68. }
  69. },
  70. onShow() {
  71. this.userPool()
  72. },
  73. computed: {
  74. ...mapState('user', ['userInfo'])
  75. },
  76. methods: {
  77. userPool() {
  78. userPool().then(res => {
  79. console.log(res);
  80. this.pool = res.data
  81. })
  82. },
  83. goNest() {
  84. ++this.current
  85. }
  86. }
  87. }
  88. </script>
  89. <style lang="scss" scoped>
  90. page {
  91. height: auto;
  92. min-height: 100%;
  93. // background-color: red;
  94. }
  95. .wrap {
  96. position: absolute;
  97. top: 0;
  98. left: 0;
  99. width: 100%;
  100. height: 100%;
  101. .bg {
  102. width: 100%;
  103. height: 100%;
  104. vertical-align: middle;
  105. }
  106. .data-wrap {
  107. width: 750rpx;
  108. height: 603rpx;
  109. position: absolute;
  110. bottom: 10%;
  111. image {
  112. width: 100%;
  113. height: 100%;
  114. }
  115. .cg-tit {
  116. width: 100%;
  117. font-size: 36rpx;
  118. font-family: Source Han Sans SC;
  119. font-weight: bold;
  120. color: #FFFFFF;
  121. line-height: 66rpx;
  122. text-align: center;
  123. position: absolute;
  124. top: 0;
  125. }
  126. .data {
  127. position: absolute;
  128. top: 126rpx;
  129. left: 0;
  130. right: 0;
  131. margin: auto;
  132. width: 222rpx;
  133. height: 222rpx;
  134. image {
  135. width: 100%;
  136. height: 100%;
  137. }
  138. .val {
  139. position: absolute;
  140. width: 222rpx;
  141. height: 222rpx;
  142. top: 0;
  143. left: 0;
  144. text-align: center;
  145. line-height: 222rpx;
  146. font-size: 48rpx;
  147. font-weight: bold;
  148. background-image: linear-gradient(to bottom, yellow, red, yellow, red);
  149. color: transparent;
  150. -webkit-background-clip: text;
  151. }
  152. }
  153. .data-tit {
  154. font-size: 32rpx;
  155. font-weight: 500;
  156. color: #333333;
  157. position: absolute;
  158. width: 100%;
  159. bottom: 194rpx;
  160. text-align: center;
  161. }
  162. .next {
  163. width: 372rpx;
  164. height: 83rpx;
  165. background: linear-gradient(0deg, #FF5138 0%, #FF9F2D 100%);
  166. border: 4px solid #eabb72;
  167. border-radius: 41rpx;
  168. font-size: 40rpx;
  169. font-weight: 800;
  170. color: #FFFFFF;
  171. text-align: center;
  172. margin: auto;
  173. }
  174. }
  175. }
  176. .num {
  177. color: #FF5F36;
  178. font-weight: bold;
  179. padding: 0 10rpx;
  180. }
  181. </style>