index.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <template>
  2. <view>
  3. <view class="header-box"></view>
  4. <view class="header-title">
  5. <text style="margin-top: 4%;">累计积分</text>
  6. <text style="margin-top: 2%;font-size: 36rpx;">66261</text>
  7. </view>
  8. <view class="count-deatil-box">
  9. <view class="count-detail-title">
  10. 积分明细
  11. </view>
  12. <view class="leader-info" v-for="item in teamList" :key='item.id'>
  13. <image src="/static/bed2-bg.png"></image>
  14. <view class="leader-column">
  15. <view>
  16. <text>{{item.name}}</text>
  17. <text style="visibility: hidden;">A</text>
  18. <text>购买了产品</text>
  19. </view>
  20. <view>
  21. <text style="color:#ccc;font-size: 28rpx;">{{item.time}}</text>
  22. </view>
  23. </view>
  24. <view class="count-sum">
  25. {{item.count}}
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. var md5 = require('../../../common/md5.js')
  33. export default {
  34. data() {
  35. return {
  36. title: 'selfCenter',
  37. teamList: [
  38. {
  39. name: '晚霞',
  40. count: '+12999',
  41. time: '2019-02-14 00:00',
  42. id: 1
  43. },
  44. {
  45. name: '午霞',
  46. count: '+5112',
  47. time: '2019-02-15 00:00',
  48. id: 2
  49. },
  50. {
  51. name: '午霞A',
  52. count: '+8999',
  53. time: '2019-02-15 01:00',
  54. id:3
  55. },
  56. {
  57. name: '午霞2',
  58. count: '+13999',
  59. time: '2019-02-16 00:00',
  60. id: 4
  61. }
  62. ]
  63. };
  64. },
  65. onLoad() {
  66. this.getScoreList();
  67. },
  68. methods: {
  69. getScoreList(){
  70. uni.request({
  71. url: getApp().globalData.shareUrl, //需要设置为全局
  72. method: 'POST',
  73. header: {
  74. 'content-type': 'application/x-www-form-urlencoded'
  75. },
  76. data: {
  77. method: 'getScoreList',
  78. timestamp: getApp().globalData.globalTimestamp, //Date.now()
  79. page: '',
  80. pageSize:'',
  81. uid:'1',
  82. sign: md5('getScoreList' + getApp().globalData.globalTimestamp)
  83. },
  84. success: res => {
  85. if (res.data.code === 200) {
  86. console.log(res.data.msg)
  87. }
  88. }
  89. });
  90. }
  91. }
  92. };
  93. </script>
  94. <style>
  95. .header-box {
  96. width: 100%;
  97. height: 180rpx;
  98. background: #1a9ed3;
  99. }
  100. .header-title {
  101. width: 93%;
  102. height: 150rpx;
  103. display: flex;
  104. flex-direction: column;
  105. align-items: center;
  106. background: #fff;
  107. z-index: 99;
  108. border-radius: 10rpx;
  109. font-size: 30rpx;
  110. margin: -13% auto;
  111. margin-bottom: 3%;
  112. }
  113. .count-sum {
  114. color: red;
  115. font-size: 32rpx;
  116. }
  117. .count-deatil-box {
  118. width: 93%;
  119. border-radius: 10rpx;
  120. display: flex;
  121. flex-direction: column;
  122. align-items: center;
  123. background: #fff;
  124. margin: 0 auto;
  125. }
  126. .count-detail-title {
  127. width: 89%;
  128. border-bottom: 1px solid #dbdbdb;
  129. padding: 10px;
  130. font-size: 32rpx;
  131. }
  132. .leader-info {
  133. width: 90%;
  134. display: flex;
  135. align-items: center;
  136. background: #fff;
  137. padding: 20rpx;
  138. border-bottom: 1px solid #ccc;
  139. }
  140. .leader-column {
  141. display: flex;
  142. flex-direction: column;
  143. justify-content: space-between;
  144. height: 90rpx;
  145. font-size: 28rpx;
  146. margin-right: 2%;
  147. width: 400rpx;
  148. }
  149. .leader-info image {
  150. height: 75rpx;
  151. width: 75rpx;
  152. border-radius: 50%;
  153. border: 1px solid #eee;
  154. margin-right: 3%;
  155. }
  156. </style>