xccg.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461
  1. <template>
  2. <view class="content">
  3. <swiper style="position: absolute;width: 100%;height: 100%;" :current="current" @change="changee">
  4. <swiper-item>
  5. <view class="tab1" >
  6. <view class="cg-wrap1">
  7. <view class="tit">
  8. 第一关
  9. </view>
  10. <view class="status">
  11. {{pool.one_pool_sum | showPool}}
  12. </view>
  13. </view>
  14. </view>
  15. </swiper-item>
  16. <swiper-item >
  17. <view class="tab1 " >
  18. <view class="cg-wrap1">
  19. <view class="tit">
  20. 第二关
  21. </view>
  22. <view class="status" >
  23. {{pool.two_pool_sum | showPool}}
  24. </view>
  25. </view>
  26. </view>
  27. </swiper-item>
  28. <swiper-item >
  29. <view class="tab1 " >
  30. <!-- <view class="tip">
  31. {{pool.three_pool_my && pool.three_pool_my.length > 0 ? '恭喜进入': '未进入'}}
  32. </view> -->
  33. <view class="cg-wrap1">
  34. <view class="tit">
  35. 第三关
  36. </view>
  37. <view class="status" >
  38. {{pool.three_pool_sum | showPool}}
  39. </view>
  40. </view>
  41. </view>
  42. </swiper-item>
  43. <swiper-item >
  44. <view class="tab1 " >
  45. <view class="cg-wrap1">
  46. <view class="tit">
  47. 第四关
  48. </view>
  49. <view class="status" >
  50. {{pool.for_pool_sum | showPool}}
  51. </view>
  52. </view>
  53. </view>
  54. </swiper-item>
  55. <swiper-item >
  56. <view class="tab1 " >
  57. <view class="cg-wrap1">
  58. <view class="tit">
  59. 第五关
  60. </view>
  61. <view class="status" >
  62. {{pool.Five_pool_sum | showPool}}
  63. </view>
  64. </view>
  65. </view>
  66. </swiper-item>
  67. <swiper-item >
  68. <view class="tab1 " >
  69. <view class="cg-wrap1">
  70. <view class="tit">
  71. 第六关
  72. </view>
  73. <view class="status" >
  74. {{pool.Six_pool_sum | showPool}}
  75. </view>
  76. </view>
  77. </view>
  78. </swiper-item>
  79. <swiper-item >
  80. <view class="tab1 " >
  81. <view class="cg-wrap1">
  82. <view class="tit">
  83. 第七关
  84. </view>
  85. <view class="status" >
  86. {{pool.Seven_pool_sum | showPool}}
  87. </view>
  88. </view>
  89. </view>
  90. </swiper-item>
  91. <swiper-item >
  92. <view class="tab1 " >
  93. <view class="cg-wrap1">
  94. <view class="tit">
  95. 第八关
  96. </view>
  97. <view class="status" >
  98. {{pool.Eight_pool_sum | showPool}}
  99. </view>
  100. </view>
  101. </view>
  102. </swiper-item>
  103. <swiper-item >
  104. <view class="tab1 " >
  105. <view class="cg-wrap1">
  106. <view class="tit">
  107. 第九关
  108. </view>
  109. <view class="status" >
  110. {{pool.Nine_pool_sum | showPool}}
  111. </view>
  112. </view>
  113. </view>
  114. </swiper-item>
  115. <swiper-item >
  116. <view class="tab1 " >
  117. <view class="cg-wrap1">
  118. <view class="tit">
  119. 第十关
  120. </view>
  121. <view class="status" >
  122. {{pool.Ten_pool_sum | showPool}}
  123. </view>
  124. </view>
  125. </view>
  126. </swiper-item>
  127. <swiper-item >
  128. <view class="tab1 " >
  129. <view class="cg-wrap1">
  130. <view class="tit">
  131. 第十一关
  132. </view>
  133. <view class="status" >
  134. {{pool.Eleven_pool_sum | showPool}}
  135. </view>
  136. </view>
  137. </view>
  138. </swiper-item>
  139. <swiper-item >
  140. <view class="tab1 " >
  141. <view class="cg-wrap1">
  142. <view class="tit">
  143. 第十二关
  144. </view>
  145. <view class="status" >
  146. {{pool.Twelve_pool_sum | showPool}}
  147. </view>
  148. </view>
  149. </view>
  150. </swiper-item>
  151. </swiper>
  152. </view>
  153. </template>
  154. <script>
  155. import {
  156. mapState,
  157. mapMutations
  158. } from 'vuex';
  159. import {
  160. getUserInfo,
  161. userPool,
  162. myspread
  163. } from '@/api/user.js';
  164. export default {
  165. data() {
  166. return {
  167. current: 0,
  168. pool: {},
  169. spread:0,
  170. }
  171. },
  172. onShow() {
  173. this.userPool()
  174. },
  175. computed: {
  176. ...mapState('user', ['userInfo'])
  177. },
  178. filters: {
  179. showPool(val) {
  180. let str = '未激活';
  181. if(val) {
  182. if(val == 1) {
  183. str = '进行中'
  184. }
  185. if(val == 2) {
  186. str = '已晋级'
  187. }
  188. }
  189. return str
  190. }
  191. },
  192. methods: {
  193. myspread() {
  194. myspread().then(res => {
  195. console.log(res)
  196. this.spread = res.data.total + res.data.totalLevel
  197. })
  198. },
  199. changee(res) {
  200. console.log(res);
  201. this.current = res.detail.current
  202. },
  203. userPool() {
  204. userPool().then(res => {
  205. console.log(res);
  206. this.myspread()
  207. this.pool = res.data
  208. })
  209. },
  210. goNest() {
  211. ++this.current
  212. }
  213. }
  214. }
  215. </script>
  216. <style lang="scss" scoped>
  217. page {
  218. height: auto;
  219. min-height: 100%;
  220. }
  221. .wrap {
  222. position: absolute;
  223. top: 0;
  224. left: 0;
  225. width: 100%;
  226. height: 100%;
  227. .bg {
  228. width: 100%;
  229. height: 100%;
  230. vertical-align: middle;
  231. }
  232. .data-wrap {
  233. width: 750rpx;
  234. height: 603rpx;
  235. position: absolute;
  236. bottom: 10%;
  237. image {
  238. width: 100%;
  239. height: 100%;
  240. }
  241. .cg-tit {
  242. width: 100%;
  243. font-size: 36rpx;
  244. font-family: Source Han Sans SC;
  245. font-weight: bold;
  246. color: #FFFFFF;
  247. line-height: 66rpx;
  248. text-align: center;
  249. position: absolute;
  250. top: 0;
  251. }
  252. .data {
  253. position: absolute;
  254. top: 126rpx;
  255. left: 0;
  256. right: 0;
  257. margin: auto;
  258. width: 222rpx;
  259. height: 222rpx;
  260. image {
  261. width: 100%;
  262. height: 100%;
  263. }
  264. .val {
  265. position: absolute;
  266. width: 222rpx;
  267. height: 222rpx;
  268. top: 0;
  269. left: 0;
  270. text-align: center;
  271. line-height: 222rpx;
  272. font-size: 48rpx;
  273. font-weight: bold;
  274. background-image: linear-gradient(to bottom, yellow, red, yellow, red);
  275. color: transparent;
  276. -webkit-background-clip: text;
  277. }
  278. }
  279. .data-tit {
  280. font-size: 32rpx;
  281. font-weight: 500;
  282. color: #333333;
  283. position: absolute;
  284. width: 100%;
  285. bottom: 194rpx;
  286. text-align: center;
  287. }
  288. .next {
  289. width: 372rpx;
  290. height: 83rpx;
  291. background: linear-gradient(0deg, #FF5138 0%, #FF9F2D 100%);
  292. border: 4px solid #eabb72;
  293. border-radius: 41rpx;
  294. font-size: 40rpx;
  295. font-weight: 800;
  296. color: #FFFFFF;
  297. text-align: center;
  298. margin: auto;
  299. }
  300. }
  301. }
  302. .num {
  303. color: #FF5F36;
  304. font-weight: bold;
  305. padding: 0 10rpx;
  306. }
  307. .tab1 {
  308. background-color:#ffce73;
  309. // position: absolute;
  310. background-image: url('../../static/img/xccg.png');
  311. background-size: 100%;
  312. background-repeat: no-repeat;
  313. width: 100%;
  314. height: 100%;
  315. color: #ffce73;
  316. text-align: center;
  317. align-items: center;
  318. padding-top: 1rpx;
  319. .cg-wrap {
  320. margin-top: 349rpx;
  321. background-image: url('../../static/img/cg-wrap.png');
  322. background-size: 100%;
  323. background-repeat: no-repeat;
  324. width: 750rpx;
  325. height: 1113rpx;
  326. padding-top: 180rpx;
  327. }
  328. .cg-wrap1 {
  329. margin-top: 349rpx;
  330. background-image: url('../../static/img/xcbg1.png');
  331. background-size: 100%;
  332. background-repeat: no-repeat;
  333. width: 750rpx;
  334. height: 721rpx;
  335. padding-top: 180rpx;
  336. }
  337. .tit {
  338. font-size: 124rpx;
  339. font-weight: bold;
  340. letter-spacing:20rpx;
  341. line-height: 1;
  342. background-image: linear-gradient(to bottom, #ff9900, rgb(255, 40, 34));
  343. background-clip: text;
  344. -webkit-background-clip: text;
  345. -webkit-text-fill-color: transparent;
  346. }
  347. .status {
  348. display: inline-block;
  349. margin: auto;
  350. padding-top: 69rpx;
  351. font-size: 66rpx;
  352. padding-bottom: 30rpx;
  353. border-bottom: 2px solid #fff;
  354. }
  355. .val-wrap {
  356. width: 290rpx;
  357. height: 290rpx;
  358. border-radius: 50%;
  359. border: 5px solid #ff7100;
  360. font-size: 96rpx;
  361. line-height: 290rpx;
  362. margin:92rpx auto 0;
  363. background-image: linear-gradient(to bottom, #ff9900, rgb(255, 40, 34));
  364. background-clip: text;
  365. -webkit-background-clip: text;
  366. -webkit-text-fill-color: transparent;
  367. text {
  368. font-size: 52rpx;
  369. }
  370. }
  371. .val {
  372. // color: #030e8a;
  373. padding-top: 50rpx;
  374. }
  375. }
  376. .tab2 {
  377. background-color: #ede1a7;
  378. color: #2543c7;
  379. .tip {
  380. font-size: 64rpx;
  381. padding: 90rpx 0 110rpx;
  382. }
  383. .tit {
  384. padding-top: 0;
  385. }
  386. .btn-list {
  387. padding-top: 100rpx;
  388. padding-bottom: 110rpx;
  389. .btn {
  390. width: 120rpx;
  391. height: 120rpx;
  392. border-radius: 50%;
  393. border: 2px solid #2543c7;
  394. line-height: 120rpx;
  395. font-size: 62rpx;
  396. font-weight: bold;
  397. margin:0 auto 15rpx;
  398. }
  399. }
  400. .val {
  401. font-size: 40rpx;
  402. color: #333333;
  403. text {
  404. color: #2543c7;
  405. }
  406. }
  407. }
  408. .tab3 {
  409. background-color: #030e8a;
  410. color: #dbe045;
  411. .btn-list {
  412. .btn {
  413. border-color: #dbe045;
  414. }
  415. }
  416. .val {
  417. font-size: 40rpx;
  418. color: #fff;
  419. text {
  420. color: #dbe045;
  421. }
  422. }
  423. }
  424. .tab4 {
  425. background-color:#ff310e;
  426. color: #fff;
  427. .btn-list {
  428. .btn {
  429. border-color: #fff;
  430. }
  431. }
  432. .val {
  433. font-size: 40rpx;
  434. color: #fff;
  435. text {
  436. color: #fff;
  437. }
  438. }
  439. }
  440. </style>