xccg.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  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. <swiper style="position: absolute;width: 100%;height: 100%;" :current="current" @change="changee">
  53. <swiper-item>
  54. <view class="tab1" >
  55. <view class="tit">
  56. 第一关
  57. </view>
  58. <view class="status">
  59. {{pool.one_pool_order_sum >= 4 ? '已激活': '未激活'}}
  60. </view>
  61. <view class="val-wrap">
  62. {{pool.one_pool_order_sum || '0'}}<text>单</text>
  63. </view>
  64. </view>
  65. </swiper-item>
  66. <swiper-item >
  67. <view class="tab1 tab2" >
  68. <view class="tip">
  69. {{pool.two_pool_my && pool.two_pool_my.length > 0 ? '恭喜进入': '未进入'}}
  70. </view>
  71. <view class="tit">
  72. 第二关
  73. </view>
  74. <view class="btn-list">
  75. <view class="btn" v-if="pool.two_pool_my && pool.two_pool_my.length > 0">
  76. {{pool.two_pool_my[0].no}}
  77. </view>
  78. </view>
  79. <view class="val" v-if="pool.two_pool_my && pool.two_pool_my.length > 0">
  80. 当前排队共<text class="num">{{pool.two_pool_all.totel_count}}</text>组,前方等待出局<text
  81. class="num">{{pool.two_pool_my_out}}</text>组
  82. </view>
  83. <view class="val" v-else>
  84. 当前暂未进入第二关
  85. </view>
  86. </view>
  87. </swiper-item>
  88. <swiper-item >
  89. <view class="tab1 tab2 tab3" >
  90. <view class="tip">
  91. {{pool.three_pool_my && pool.three_pool_my.length > 0 ? '恭喜进入': '未进入'}}
  92. </view>
  93. <view class="tit">
  94. 第三关
  95. </view>
  96. <view class="btn-list">
  97. <view class="btn" v-if="pool.three_pool_my && pool.three_pool_my.length > 0">
  98. {{pool.three_pool_my[0].no}}
  99. </view>
  100. </view>
  101. <view class="val" v-if="pool.three_pool> 0">
  102. 当前排队共<text class="num">{{pool.three_pool_all.totel_count}}</text>组,前方等待出局<text
  103. class="num">{{pool.three_pool_my_out}}</text>组
  104. </view>
  105. <view class="val" v-else>
  106. 当前暂未进入第二关
  107. </view>
  108. </view>
  109. </swiper-item>
  110. <swiper-item >
  111. <view class="tab1 tab2 tab4" >
  112. <view class="tip">
  113. {{pool.for_pool_my && pool.for_pool_my.length > 0 ? '恭喜进入': '未进入'}}
  114. </view>
  115. <view class="tit">
  116. 第四关
  117. </view>
  118. <view class="btn-list">
  119. <view class="btn" v-if="pool.for_pool_my && pool.for_pool_my.length > 0">
  120. {{pool.for_pool_my[0].no}}
  121. </view>
  122. </view>
  123. <view class="val" v-if="pool.for_pool_my && pool.for_pool_my.length > 0">
  124. 当前排队共<text class="num">{{pool.for_pool_all.totel_count}}</text>组,前方等待出局<text
  125. class="num">{{pool.for_pool_my_out}}</text>组
  126. </view>
  127. <view class="val" v-else>
  128. 当前暂未进入第四关
  129. </view>
  130. </view>
  131. </swiper-item>
  132. </swiper>
  133. </view>
  134. </template>
  135. <script>
  136. import {
  137. mapState,
  138. mapMutations
  139. } from 'vuex';
  140. import {
  141. getUserInfo,
  142. userPool
  143. } from '@/api/user.js';
  144. export default {
  145. data() {
  146. return {
  147. current: 0,
  148. pool: {}
  149. }
  150. },
  151. onShow() {
  152. this.userPool()
  153. },
  154. computed: {
  155. ...mapState('user', ['userInfo'])
  156. },
  157. methods: {
  158. changee(res) {
  159. console.log(res);
  160. this.current = res.detail.current
  161. },
  162. userPool() {
  163. userPool().then(res => {
  164. console.log(res);
  165. this.pool = res.data
  166. })
  167. },
  168. goNest() {
  169. ++this.current
  170. }
  171. }
  172. }
  173. </script>
  174. <style lang="scss" scoped>
  175. page {
  176. height: auto;
  177. min-height: 100%;
  178. }
  179. .wrap {
  180. position: absolute;
  181. top: 0;
  182. left: 0;
  183. width: 100%;
  184. height: 100%;
  185. .bg {
  186. width: 100%;
  187. height: 100%;
  188. vertical-align: middle;
  189. }
  190. .data-wrap {
  191. width: 750rpx;
  192. height: 603rpx;
  193. position: absolute;
  194. bottom: 10%;
  195. image {
  196. width: 100%;
  197. height: 100%;
  198. }
  199. .cg-tit {
  200. width: 100%;
  201. font-size: 36rpx;
  202. font-family: Source Han Sans SC;
  203. font-weight: bold;
  204. color: #FFFFFF;
  205. line-height: 66rpx;
  206. text-align: center;
  207. position: absolute;
  208. top: 0;
  209. }
  210. .data {
  211. position: absolute;
  212. top: 126rpx;
  213. left: 0;
  214. right: 0;
  215. margin: auto;
  216. width: 222rpx;
  217. height: 222rpx;
  218. image {
  219. width: 100%;
  220. height: 100%;
  221. }
  222. .val {
  223. position: absolute;
  224. width: 222rpx;
  225. height: 222rpx;
  226. top: 0;
  227. left: 0;
  228. text-align: center;
  229. line-height: 222rpx;
  230. font-size: 48rpx;
  231. font-weight: bold;
  232. background-image: linear-gradient(to bottom, yellow, red, yellow, red);
  233. color: transparent;
  234. -webkit-background-clip: text;
  235. }
  236. }
  237. .data-tit {
  238. font-size: 32rpx;
  239. font-weight: 500;
  240. color: #333333;
  241. position: absolute;
  242. width: 100%;
  243. bottom: 194rpx;
  244. text-align: center;
  245. }
  246. .next {
  247. width: 372rpx;
  248. height: 83rpx;
  249. background: linear-gradient(0deg, #FF5138 0%, #FF9F2D 100%);
  250. border: 4px solid #eabb72;
  251. border-radius: 41rpx;
  252. font-size: 40rpx;
  253. font-weight: 800;
  254. color: #FFFFFF;
  255. text-align: center;
  256. margin: auto;
  257. }
  258. }
  259. }
  260. .num {
  261. color: #FF5F36;
  262. font-weight: bold;
  263. padding: 0 10rpx;
  264. }
  265. .tab1 {
  266. background-color: #f36c34;
  267. // position: absolute;
  268. width: 100%;
  269. height: 100%;
  270. color: #fff;
  271. text-align: center;
  272. align-items: center;
  273. .tit {
  274. padding-top: 189rpx;
  275. font-size: 124rpx;
  276. font-weight: bold;
  277. letter-spacing:20rpx;
  278. }
  279. .status {
  280. display: inline-block;
  281. margin: auto;
  282. padding-top: 69rpx;
  283. font-size: 66rpx;
  284. padding-bottom: 30rpx;
  285. border-bottom: 2px solid #fff;
  286. }
  287. .val-wrap {
  288. width: 290rpx;
  289. height: 290rpx;
  290. border-radius: 50%;
  291. border: 5px solid #fff;
  292. font-size: 96rpx;
  293. line-height: 290rpx;
  294. margin:92rpx auto 0;
  295. text {
  296. font-size: 52rpx;
  297. }
  298. }
  299. }
  300. .tab2 {
  301. background-color: #ede1a7;
  302. color: #2543c7;
  303. .tip {
  304. font-size: 64rpx;
  305. padding: 90rpx 0 110rpx;
  306. }
  307. .tit {
  308. padding-top: 0;
  309. }
  310. .btn-list {
  311. padding-top: 100rpx;
  312. padding-bottom: 110rpx;
  313. .btn {
  314. width: 120rpx;
  315. height: 120rpx;
  316. border-radius: 50%;
  317. border: 2px solid #2543c7;
  318. line-height: 120rpx;
  319. font-size: 62rpx;
  320. font-weight: bold;
  321. margin:0 auto 15rpx;
  322. }
  323. }
  324. .val {
  325. font-size: 40rpx;
  326. color: #333333;
  327. text {
  328. color: #2543c7;
  329. }
  330. }
  331. }
  332. .tab3 {
  333. background-color: #030e8a;
  334. color: #dbe045;
  335. .btn-list {
  336. .btn {
  337. border-color: #dbe045;
  338. }
  339. }
  340. .val {
  341. font-size: 40rpx;
  342. color: #fff;
  343. text {
  344. color: #dbe045;
  345. }
  346. }
  347. }
  348. .tab4 {
  349. background-color:#ff310e;
  350. color: #fff;
  351. .btn-list {
  352. .btn {
  353. border-color: #fff;
  354. }
  355. }
  356. .val {
  357. font-size: 40rpx;
  358. color: #fff;
  359. text {
  360. color: #fff;
  361. }
  362. }
  363. }
  364. </style>