X_bank.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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="list_info">
  11. <view style="margin-top: 24rpx;" class="numlist">
  12. <view class="left">
  13. <image class="icon" mode="heightFix" src="http://c.yujianmate.com/images/v1/w3/w3_x.png"></image>
  14. <view class="num">
  15. <text>{{myinfo.num_gmb}}</text>
  16. <view class="name">可用数量</view>
  17. </view>
  18. </view>
  19. </view>
  20. <view style="margin-top: 72rpx;margin-left: 40rpx;">
  21. <text style="color:#FFFFFF;font-size: 32rpx;">暗物质明细</text>
  22. </view>
  23. <view class="mingxiList" v-if="false">
  24. <view class="left">
  25. <text style="font-size: 28rpx;color: #FFFFFF;">{{$t('txt.明细类型')}}</text>
  26. <image class="icon" src="http://c.yujianmate.com/images/v1/me/arrow_down_gray.png"
  27. mode="heightFix" />
  28. </view>
  29. <view class="right">
  30. <text style="font-size: 28rpx;color: #FFFFFF;">{{$t('txt.开始时间-结束时间')}}</text>
  31. <image class="icon" src="http://c.yujianmate.com/images/v1/me/arrow_down_gray.png"
  32. mode="heightFix" />
  33. </view>
  34. </view>
  35. <view class="empty" v-if="nodata">
  36. <view class="bg"></view>
  37. <text style="margin-top: 0rpx;font-size: 24rpx;color: #999999;">暂无数据</text>
  38. </view>
  39. <view class="item" v-for="(item,index) in list">
  40. <view class="left">
  41. <view class="name">{{item.name}}</view>
  42. <view class="desc">{{item.create_time}}</view>
  43. </view>
  44. <text class="right">
  45. <view v-if="item.value>0" class="num1">
  46. <text>+{{ item.value }}</text>
  47. </view>
  48. <view v-else class="num1 num2">
  49. <text>{{item.type}}{{ item.num }}</text>
  50. </view>
  51. </text>
  52. </view>
  53. <view class="blankHeight"></view>
  54. </view>
  55. <DialogBox ref="DialogBox"></DialogBox>
  56. </view>
  57. </template>
  58. <script>
  59. import uniNavBar from '../../components/uni-ui/uni-nav-bar/uni-nav-bar.vue'
  60. export default {
  61. components: {uniNavBar},
  62. data() {
  63. return {
  64. tab: 1,
  65. scrollTop: 0,
  66. myinfo: {},
  67. nodata: true,
  68. list: [],
  69. old: {
  70. scrollTop: 0
  71. },
  72. historyInfo: [{
  73. reason: "探索奖励",
  74. value: 1100,
  75. },
  76. {
  77. reason: "传送转出",
  78. value: -100,
  79. },
  80. {
  81. reason: "传送转入",
  82. value: 200,
  83. },
  84. ]
  85. }
  86. },
  87. onLoad() {
  88. // setTimeout(function() {
  89. // uni.setNavigationBarColor({
  90. // frontColor: '#ffffff',
  91. // backgroundColor: '#00000000',
  92. // animation: {
  93. // duration: 400,
  94. // timingFunc: 'easeIn'
  95. // }
  96. // })
  97. // }, 200);
  98. this.loadInfo();
  99. this.loadData();
  100. },
  101. onShow() {},
  102. methods: {
  103. navigateBack(){
  104. uni.navigateBack(1)
  105. },
  106. onBack() {},
  107. checkTab(tab) {
  108. this.tab = tab;
  109. // this.loadData();
  110. },
  111. loadInfo() {
  112. console.log({
  113. uuid: getApp().globalData.uuid,
  114. skey: getApp().globalData.skey
  115. });
  116. uni.request({
  117. url: this.$apiHost + '/Web/getinfo',
  118. data: {
  119. uuid: getApp().globalData.uuid,
  120. type: 'tuan'
  121. },
  122. header: {
  123. "content-type": "application/json",
  124. 'sign': getApp().globalData.headerSign
  125. },
  126. success: (res) => {
  127. console.log("----:", res.data);
  128. this.myinfo = res.data;
  129. },
  130. complete: (com) => {
  131. // uni.hideLoading();
  132. },
  133. fail: (e) => {
  134. console.log("----e:", e);
  135. }
  136. });
  137. },
  138. scroll: function(e) {
  139. console.log(e)
  140. this.old.scrollTop = e.detail.scrollTop
  141. },
  142. loadData() {
  143. console.log({
  144. uuid: getApp().globalData.uuid,
  145. skey: getApp().globalData.skey
  146. });
  147. uni.request({
  148. url: this.$apiHost + '/My/recordlist',
  149. data: {
  150. uuid: getApp().globalData.uuid,
  151. type: 'GMB',
  152. stype: this.stype
  153. },
  154. header: {
  155. "content-type": "application/json",
  156. 'sign': getApp().globalData.headerSign
  157. },
  158. success: (res) => {
  159. console.log("----:", res.data);
  160. this.list = res.data.list;
  161. if (this.list != null && this.list != undefined) {
  162. this.nodata = false;
  163. }
  164. },
  165. complete: (com) => {
  166. // uni.hideLoading();
  167. },
  168. fail: (e) => {
  169. console.log("----e:", e);
  170. }
  171. });
  172. },
  173. }
  174. }
  175. </script>
  176. <style scoped lang="scss">
  177. @import 'X_bank.scss';
  178. </style>