teamProfit.vue 4.6 KB

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