teamProfit.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <template>
  2. <view class="page">
  3. <view class="topBody">
  4. <view class="header">
  5. </view>
  6. <view class="myinfo">
  7. <view style="margin-top: 24rpx;" class="numlist">
  8. <view class="left">
  9. <view class="num">
  10. <text>{{myinfo.num_gmb_today}}</text>
  11. <view class="name">今日获得暗物质</view>
  12. </view>
  13. </view>
  14. <view class="left right">
  15. <view class="num">
  16. <text>{{myinfo.num_gmb_all}}</text>
  17. <view class="name">累计获得暗物质</view>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="friendList">
  22. <view class="title">
  23. <view class="left">
  24. <text style="font-size: 28rpx;color: #FFFFFF;">日期</text>
  25. </view>
  26. <view class="right">
  27. <text style="font-size: 28rpx;color: #FFFFFF;">暗物质</text>
  28. </view>
  29. </view>
  30. <view class="numlist2">
  31. <view v-if="nodata" class="empty">
  32. <view class="bg"></view>
  33. <text style="margin-top: 40rpx;font-size: 24rpx;color: #999999;">暂无数据</text>
  34. </view>
  35. <view v-else class="item" v-for="(item, index) in list" :key="index"
  36. :style="{ backgroundImage: index % 2 === 1 ? 'url(../../static/w3/listBG1.png)' : 'url(../../static/w3/listBG2.png)' }">
  37. <view class="info">
  38. <view class="left">
  39. <view class="nameList">
  40. <view class="num">
  41. <view class="data">{{item.name}}</view>
  42. </view>
  43. </view>
  44. </view>
  45. <view class="right">
  46. <view class="txt">
  47. <text>{{item.type}}{{item.num}}</text>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. <view class="blankHeight"></view>
  56. </view>
  57. <!-- 提示框 -->
  58. <DialogBox ref="DialogBox"></DialogBox>
  59. </view>
  60. </template>
  61. <script>
  62. export default {
  63. components: {},
  64. data() {
  65. return {
  66. title: '',
  67. sel: 1,
  68. nodata: true,
  69. myinfo: {},
  70. list: [],
  71. X_Info: {
  72. todayGet: 10,
  73. historyGet: 199999,
  74. },
  75. friendsInfo: [{
  76. value: 100,
  77. data: "2023-1-12"
  78. },
  79. {
  80. value: 200,
  81. data: "2023-1-12"
  82. },
  83. {
  84. value: 100,
  85. data: "2023-1-12"
  86. },
  87. {
  88. value: 100,
  89. data: "2023-1-12"
  90. }
  91. ]
  92. }
  93. },
  94. onLoad() {
  95. // setTimeout(function() {
  96. // uni.setNavigationBarColor({
  97. // frontColor: '#ffffff',
  98. // backgroundColor: '#00000000',
  99. // animation: {
  100. // duration: 400,
  101. // timingFunc: 'easeIn'
  102. // }
  103. // })
  104. // }, 200);
  105. this.loadInfo();
  106. this.loadData();
  107. },
  108. onShow() {},
  109. methods: {
  110. onBack() {},
  111. chkSel() {
  112. if (this.sel == 1) {
  113. this.sel = 0;
  114. } else {
  115. this.sel = 1;
  116. }
  117. },
  118. loadInfo() {
  119. console.log({
  120. uuid: getApp().globalData.uuid,
  121. skey: getApp().globalData.skey
  122. });
  123. uni.request({
  124. url: this.$apiHost + '/Web/getinfo',
  125. data: {
  126. uuid: getApp().globalData.uuid,
  127. type: 'tuan'
  128. },
  129. header: {
  130. "content-type": "application/json", //自定义请求头信息
  131. },
  132. success: (res) => {
  133. console.log("----:", res.data);
  134. this.myinfo = res.data;
  135. },
  136. complete: (com) => {
  137. // uni.hideLoading();
  138. },
  139. fail: (e) => {
  140. console.log("----e:", e);
  141. }
  142. });
  143. },
  144. loadData() {
  145. console.log({
  146. uuid: getApp().globalData.uuid,
  147. skey: getApp().globalData.skey
  148. });
  149. uni.request({
  150. url: this.$apiHost + '/My/recordlist',
  151. data: {
  152. uuid: getApp().globalData.uuid,
  153. type: 'GMB',
  154. stype: "tuan"
  155. },
  156. header: {
  157. "content-type": "application/json", //自定义请求头信息
  158. },
  159. success: (res) => {
  160. console.log("----:", res.data);
  161. this.list = res.data.list;
  162. if (this.list != null && this.list != undefined) {
  163. this.nodata = false;
  164. }
  165. },
  166. complete: (com) => {
  167. // uni.hideLoading();
  168. },
  169. fail: (e) => {
  170. console.log("----e:", e);
  171. }
  172. });
  173. },
  174. }
  175. }
  176. </script>
  177. <style scoped lang="scss">
  178. @import 'teamProfit.scss';
  179. </style>