myriad.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <template>
  2. <view class="center">
  3. <view class="bg"><image src="https://cgst.liuniu946.com/image/powan-bg.png" mode=""></image></view>
  4. <view class="main">
  5. <view class="main-box" v-if="list.length != 0">
  6. <view class="main-title">
  7. <view class="main-title-bg"><image src="../../static/img/powan-title.png" mode=""></image></view>
  8. <view class="main-title-font">破万员工销售业绩榜</view>
  9. </view>
  10. <view class="main-top flex">
  11. <view class="main-top-item">
  12. <image class="avatar" src="../../static/error/missing-face.png" mode=""></image>
  13. <view class="main-top-name">李小图</view>
  14. <view class="main-top-price">78.5W</view>
  15. </view>
  16. <view class="main-top-item">
  17. <image class="avatar-first" src="../../static/error/missing-face.png" mode=""></image>
  18. <view class="main-top-name">李小黑</view>
  19. <view class="main-top-price">86.4W</view>
  20. </view>
  21. <view class="main-top-item">
  22. <image class="avatar" src="../../static/error/missing-face.png" mode=""></image>
  23. <view class="main-top-name">李小蓝</view>
  24. <view class="main-top-price">76.4W</view>
  25. </view>
  26. </view>
  27. <view class="main-list">
  28. <view class="main-list-title flex">
  29. <view class="main-list-title-item">排名</view>
  30. <view class="main-list-title-item">姓名</view>
  31. <view class="main-list-title-item">销售额</view>
  32. </view>
  33. <view class="main-list-item flex" v-for="(item, index) in list" :key="index">
  34. <view class="main-list-pm">TOP{{ index + 1 }}</view>
  35. <view class="main-list-name">李小黑</view>
  36. <view class="main-list-price">86.4W</view>
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </template>
  43. <script>
  44. import { mapState, mapMutations } from 'vuex';
  45. import { over10000 } from '@/api/info.js';
  46. export default {
  47. data() {
  48. return {
  49. list: [],
  50. pages: 1,
  51. limit: 1000,
  52. loadType: 'more',
  53. store_id: ''
  54. };
  55. },
  56. onLoad(option) {
  57. if (option.id) {
  58. this.store_id = option.id;
  59. } else {
  60. this.store_id = this.userInfo.store_id;
  61. }
  62. this.loadData();
  63. },
  64. computed: {
  65. ...mapState(['userInfo'])
  66. },
  67. methods: {
  68. loadData() {
  69. const obj = this;
  70. if (obj.loadType == 'nomore' || obj.loadType == 'loading') {
  71. return;
  72. }
  73. obj.loadType = 'loading';
  74. over10000({
  75. pages: 1,
  76. limit: 100,
  77. store_id: obj.store_id
  78. }).then(({ data }) => {
  79. console.log(data);
  80. this.list = this.list.concat(data.list);
  81. if (data.list.length == obj.limit) {
  82. obj.loadType = 'more';
  83. } else {
  84. obj.loadType = 'nomore';
  85. }
  86. });
  87. }
  88. }
  89. };
  90. </script>
  91. <style lang="scss">
  92. .center,
  93. page {
  94. background: #fff;
  95. min-height: 100%;
  96. height: auto;
  97. padding-top: 340rpx;
  98. }
  99. .bg {
  100. position: absolute;
  101. top: 0;
  102. left: 0;
  103. right: 0;
  104. width: 750rpx;
  105. height: 1940rpx;
  106. image {
  107. width: 100%;
  108. height: 100%;
  109. }
  110. }
  111. .main {
  112. margin: 0 auto;
  113. width: 700rpx;
  114. background: #fcfbf9;
  115. border-radius: 14rpx;
  116. position: relative;
  117. z-index: 2;
  118. padding: 20rpx;
  119. .main-title {
  120. width: 498rpx;
  121. height: 82rpx;
  122. margin: 0 auto;
  123. position: relative;
  124. top: -62rpx;
  125. .main-title-bg {
  126. position: absolute;
  127. top: 0;
  128. right: 0;
  129. left: 0;
  130. width: 498rpx;
  131. height: 82rpx;
  132. image {
  133. width: 100%;
  134. height: 100%;
  135. }
  136. }
  137. .main-title-font {
  138. font-size: 36rpx;
  139. font-family: zihun35hao-jindianyahei;
  140. font-weight: 400;
  141. color: #ffc171;
  142. line-height: 82rpx;
  143. text-align: center;
  144. position: relative;
  145. z-index: 3;
  146. }
  147. }
  148. .main-box {
  149. width: 666rpx;
  150. background: #f6e7e4;
  151. border: 3px solid #a30f0e;
  152. border-radius: 14rpx;
  153. }
  154. .main-top {
  155. margin-top: 28rpx;
  156. align-items: flex-end;
  157. .main-top-item {
  158. width: 33%;
  159. display: flex;
  160. flex-direction: column;
  161. align-items: center;
  162. line-height: 1;
  163. .avatar {
  164. width: 140rpx;
  165. height: 140rpx;
  166. }
  167. .avatar-first {
  168. width: 200rpx;
  169. height: 200rpx;
  170. }
  171. .main-top-name {
  172. margin-top: 16rpx;
  173. font-size: 25rpx;
  174. font-family: PingFang SC;
  175. font-weight: bold;
  176. color: #a30f0e;
  177. }
  178. .main-top-price {
  179. margin-top: 12rpx;
  180. font-size: 22rpx;
  181. font-family: PingFang SC;
  182. font-weight: bold;
  183. color: #171717;
  184. }
  185. }
  186. }
  187. .main-list {
  188. margin-top: 24rpx;
  189. border-top: 2px solid #fac87a;
  190. .main-list-title {
  191. background: #fff;
  192. padding: 16rpx;
  193. border-bottom: 1px solid #fac87a;
  194. .main-list-title-item {
  195. text-align: center;
  196. width: 33%;
  197. font-size: 25rpx;
  198. font-family: PingFang SC;
  199. font-weight: bold;
  200. color: #171717;
  201. }
  202. }
  203. .main-list-item {
  204. padding: 16rpx;
  205. border-bottom: 1px solid #fac87a;
  206. .main-list-pm {
  207. width: 33%;
  208. text-align: center;
  209. font-size: 25rpx;
  210. font-family: PingFang SC;
  211. font-weight: 500;
  212. color: #900408;
  213. }
  214. .main-list-name {
  215. width: 33%;
  216. text-align: center;
  217. font-size: 25rpx;
  218. font-family: PingFang SC;
  219. font-weight: 500;
  220. color: #686868;
  221. }
  222. .main-list-price {
  223. width: 33%;
  224. text-align: center;
  225. font-size: 25rpx;
  226. font-family: PingFang SC;
  227. font-weight: 500;
  228. color: #686868;
  229. }
  230. }
  231. }
  232. }
  233. </style>