Rank.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425
  1. <template>
  2. <div class="rank">
  3. <Headside></Headside>
  4. <div class="rankContainer">
  5. <div class="lt">
  6. <h5>本周场馆卡路里总消耗</h5>
  7. <div class="sum">
  8. <span class="sumBg"></span>
  9. <em>{{sum}}</em>
  10. <s>千卡</s>
  11. </div>
  12. <div class="bottom">
  13. <div class="topOne" v-if="false">
  14. <h5>单次CK值(新个人记录)</h5>
  15. <ul>
  16. <li>
  17. <div class="dgCenter">
  18. <div class="dghead">
  19. <!-- <img src="../static/img/head.png" height="147" width="147"/>-->
  20. <img :src="topMsg.head" height="147" width="147"/>
  21. <s>{{ topMsg.name }}</s>
  22. </div>
  23. <div class="score">
  24. <em>{{ topMsg.ck }}</em>
  25. <span>
  26. 打破了历史记录{{ topMsg.topCk }}
  27. </span>
  28. </div>
  29. </div>
  30. </li>
  31. </ul>
  32. </div>
  33. <div class="heros" v-else>
  34. <h5>本周卡路里消耗英雄榜</h5>
  35. <ul>
  36. <li v-for="hero in 3">
  37. <img :src="topMsg.head" height="147" width="147"/>
  38. <em>No.1</em>{{ topMsg.name }}
  39. <span>{{ topMsg.topCk }}千卡</span>
  40. </li>
  41. </ul>
  42. </div>
  43. </div>
  44. </div>
  45. <div class="rt">
  46. <h5>月度CK值排行</h5>
  47. <ul>
  48. <li v-for="s in students">
  49. <img src="../static/img/head.png" height="147" width="147"/>
  50. <em>刘伟峰</em>
  51. <s>125.0</s>
  52. </li>
  53. </ul>
  54. </div>
  55. </div>
  56. </div>
  57. </template>
  58. <script>
  59. import Headside from '@/components/Headside'
  60. import {getUserList} from '@/api/getApiRes'
  61. let qs = require('qs');
  62. export default {
  63. data() {
  64. return {
  65. sum: '29177',
  66. unite:'卡路里',
  67. topMsg: '',
  68. students: [],
  69. }
  70. },
  71. mounted() {
  72. this.GetgetUserList()
  73. },
  74. methods: {
  75. GetgetUserList() {
  76. let that = this;
  77. let param = {
  78. token: localStorage.token,
  79. };
  80. let postdata = qs.stringify(param);
  81. getUserList(postdata).then(res => {
  82. let json = res;
  83. if (json.Code == 0) {
  84. that.topMsg = json.Rs[0];
  85. that.students = json.Rs;
  86. } else {
  87. that.$message.error(json.Memo);
  88. }
  89. })
  90. },
  91. },
  92. components: {
  93. Headside
  94. }
  95. }
  96. </script>
  97. <style scoped>
  98. .rank {
  99. position: absolute;
  100. top: 0;
  101. left: 0;
  102. right: 0;
  103. bottom: 0;
  104. width: 100%;
  105. overflow: hidden;
  106. display: block;
  107. margin: 0 auto;
  108. background: url("../static/img/rankBg.png");
  109. background-size: 100%;
  110. background-repeat: no-repeat;
  111. }
  112. .rankContainer {
  113. width: 90%;
  114. height: 100%;
  115. overflow: hidden;
  116. display: block;
  117. margin: 0 auto;
  118. }
  119. .rankContainer .lt {
  120. width: 60%;
  121. height: 100%;
  122. float: left;
  123. }
  124. .rankContainer .rt {
  125. width: 40%;
  126. float: right;
  127. }
  128. .rankContainer .lt > h5 {
  129. font-family: Roboto;
  130. font-weight: normal;
  131. font-size: 44px;
  132. text-align: left;
  133. color: #fff;
  134. margin: 5% auto;
  135. }
  136. .rankContainer .sum {
  137. position: relative;
  138. bottom: 300px;
  139. width: 100%;
  140. height: 35%;
  141. overflow: visible;
  142. display: block;
  143. margin: 0 auto;
  144. text-align: center;
  145. z-index: 666;
  146. }
  147. .sumBg {
  148. position: relative;
  149. bottom: -450px;
  150. width: 100%;
  151. height: 300px;
  152. overflow: hidden;
  153. display: block;
  154. margin: 0 auto;
  155. background: url("../static/img/circle.png") bottom center;
  156. background-size: 100%;
  157. background-repeat: no-repeat;
  158. z-index: 222;
  159. }
  160. .sum em {
  161. font-family: Roboto;
  162. font-weight: 900;
  163. font-size: 250px;
  164. text-align: center;
  165. color: #fff;
  166. font-family: Roboto;
  167. font-weight: 900;
  168. font-size: 250px;
  169. text-align: center;
  170. color: #fff;
  171. text-shadow: 0px 0px 50px rgba(0, 0, 0, 0.52);
  172. font-style: normal;
  173. text-shadow: #E85297 5px 0 0, #E85297 0 5px 0, #E85297 -5px 0 0, #E85297 0 -5px 0;
  174. }
  175. .sum s {
  176. font-style: normal;
  177. font-family: Roboto;
  178. font-weight: normal;
  179. font-size: 44px;
  180. text-align: center;
  181. color: #fff;
  182. text-decoration: none;
  183. }
  184. .topOne {
  185. width: 100%;
  186. overflow: hidden;
  187. display: block;
  188. margin: 0 auto;
  189. }
  190. .topOne h5 {
  191. font-family: Roboto;
  192. font-weight: normal;
  193. font-size: 36px;
  194. text-align: left;
  195. color: #fff;
  196. margin: 1% 0;
  197. }
  198. ul, li {
  199. list-style: none;
  200. margin: 0;
  201. padding: 0;
  202. }
  203. .topOne ul {
  204. width: 100%;
  205. overflow: hidden;
  206. display: block;
  207. margin: 0 auto;
  208. padding-left: 3px;
  209. padding-top: 6px;
  210. padding-bottom: 6px;
  211. }
  212. .topOne li {
  213. width: 44%;
  214. float: left;
  215. border-radius: 5px;
  216. background: rgba(0.0 .0 .0 .1);
  217. box-shadow: 0px 0px 6px rgba(255, 255, 255, 0.3);
  218. padding-top: 23px;
  219. padding-bottom: 20px;
  220. }
  221. .topOne .dgCenter {
  222. width: 96%;
  223. overflow: hidden;
  224. display: block;
  225. margin: 0 auto;
  226. }
  227. .dgCenter .dghead {
  228. width: 40%;
  229. float: left;
  230. }
  231. .dghead img {
  232. width: 120px;
  233. height: 120px;
  234. overflow: hidden;
  235. display: block;
  236. margin: 0 auto;
  237. padding: 3px;
  238. border-radius: 250px;
  239. border: 2px solid #fff;
  240. }
  241. .dghead s {
  242. font-family: Roboto;
  243. font-weight: normal;
  244. font-size: 30px;
  245. text-align: center;
  246. color: #fff;
  247. font-style: normal;
  248. text-decoration: none;
  249. margin-top: 10px;
  250. }
  251. .score {
  252. width: 60%;
  253. float: right;
  254. }
  255. .score em {
  256. width: 100%;
  257. overflow: hidden;
  258. display: block;
  259. margin: 0 auto;
  260. font-family: Roboto;
  261. font-weight: bold;
  262. font-size: 90px;
  263. text-align: center;
  264. color: #fff;
  265. font-style: normal;
  266. height: 140px;
  267. line-height: 140px;
  268. }
  269. .score span {
  270. width: 100%;
  271. overflow: hidden;
  272. display: block;
  273. margin: 0 auto;
  274. font-family: Roboto;
  275. font-weight: normal;
  276. font-size: 24px;
  277. color: #fff;
  278. text-align: center;
  279. }
  280. .rt > h5 {
  281. font-family: Roboto;
  282. font-weight: normal;
  283. font-size: 36px;
  284. text-align: center;
  285. color: #fff;
  286. margin: 0;
  287. margin-bottom: 3%;
  288. }
  289. .rt ul {
  290. width: 80%;
  291. overflow: hidden;
  292. display: block;
  293. margin: 0 auto;
  294. padding-top: 3px;
  295. padding-bottom: 3px;
  296. }
  297. .rt li {
  298. width: 80%;
  299. overflow: hidden;
  300. display: block;
  301. margin: 0 auto;
  302. margin-bottom: 20px;
  303. padding: 10px 4%;
  304. background: rgba(0, 0, 0, 0.1);
  305. border-radius: 5px;
  306. box-shadow: 0px 0px 6px rgba(255, 255, 255, 0.3);
  307. }
  308. .rt li img {
  309. width: 70px;
  310. height: 70px;
  311. filter: drop-shadow(0px 0px 6px #bf00ff);
  312. border: 2px solid #fff;
  313. float: left;
  314. border-radius: 250px;
  315. margin-right: 3%;
  316. }
  317. .rt li em {
  318. font-family: Roboto;
  319. font-weight: normal;
  320. font-size: 30px;
  321. text-align: center;
  322. color: #fff;
  323. font-style: normal;
  324. float: left;
  325. line-height: 80px;
  326. }
  327. .rt li s {
  328. font-family: Roboto;
  329. font-weight: normal;
  330. font-size: 30px;
  331. text-align: right;
  332. color: #fff;
  333. text-decoration: none;
  334. line-height: 80px;
  335. float: right;
  336. }
  337. .heros>h5 {
  338. font-family: Roboto;
  339. font-weight: normal;
  340. font-size: 36px;
  341. text-align: left;
  342. color: #fff;
  343. margin: 1% 0;
  344. }
  345. .heros ul {
  346. width: 100%;
  347. overflow: hidden;
  348. display: block;
  349. margin: 0 auto;
  350. padding-left: 3px;
  351. padding-top: 6px;
  352. padding-bottom: 6px;
  353. }
  354. .heros li {
  355. width: 220px;
  356. float: left;
  357. border-radius: 5px;
  358. background: rgba(0.0 .0 .0 .1);
  359. box-shadow: 0px 0px 6px rgba(255, 255, 255, 0.3);
  360. padding-top: 6px;
  361. padding-bottom: 8px;
  362. color: #fff;
  363. font-size: 30px;
  364. text-align: center;
  365. margin-right: 5%;
  366. }
  367. .heros li img {
  368. width: 120px;
  369. height: 120px;
  370. overflow: hidden;
  371. display: block;
  372. margin: 0 auto;
  373. padding: 3px;
  374. border-radius: 250px;
  375. border: 2px solid #fff;
  376. }
  377. .heros li em {
  378. font-family: Roboto;
  379. font-weight: bold;
  380. font-size: 30px;
  381. text-align: center;
  382. color: #FA5114;
  383. font-style: normal;
  384. }
  385. .heros li span {
  386. width: 100%;
  387. overflow: hidden;
  388. display: block;
  389. margin: 0 auto;
  390. }
  391. .bottom {
  392. position: relative;
  393. width: 100%;
  394. bottom: 0%;
  395. }
  396. </style>