X_coin.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <template>
  2. <view class="page">
  3. <view class="topBody">
  4. <view class="header">
  5. </view>
  6. <view style="padding-top: 20rpx;margin-left: 40rpx;" >
  7. <text style="color:#FFFFFF;font-size: 64rpx;">{{x_score}}</text>
  8. </view>
  9. <view style="padding-top: 20rpx;margin-left: 40rpx;display: flex;align-items: center;" >
  10. <text style="color:#999999;font-size: 28rpx;">{{$t('txt.可用余额')}}</text>
  11. <image style="margin-left: 10rpx;height: 36rpx;" src="../../static/me/icon_help.png" mode="heightFix" />
  12. </view>
  13. <view class="myinfo">
  14. <view class="mingxiList">
  15. <view class="left">
  16. <image class="icon" src="../../static/me/txt_blackDiamod.png" mode="widthFix" />
  17. </view>
  18. <view class="right">
  19. <image style="height: 234rpx;"class="icon" src="../../static/me/img_blackDiamond.png" mode="heightFix" />
  20. </view>
  21. </view>
  22. <text style="padding-top: 25srpx;padding-left: 50rpx;color: #999999; font-size: 24rpx;">{{$t('txt.升级后享平台最大权益')}}</text>
  23. <view class="numlist">
  24. <view class="left">
  25. <image style="height:40rpx"src="../../static/me/icon_equity.png" mode="heightFix" />
  26. <text style="margin-left: 5rpx;color:#FFFFFF;font-size: 28rpx;font-weight: bold;">{{$t('txt.我的特权')}}</text>
  27. <image style="margin-left: 5rpx; margin-top: 3rpx; height:36rpx;"src="../../static/me/arrow_right.png" mode="heightFix" />
  28. </view>
  29. <view class="right">
  30. <view class="buyBtn">
  31. <text>{{$t('txt.去开通')}}</text>
  32. </view>
  33. </view>
  34. </view>
  35. <!-- <view class="mingxiList">
  36. <view class="left">
  37. <text style="font-size: 28rpx;color: #999999;">{{$t('txt.明细类型')}}</text>
  38. <image class="icon" src="../../static/me/arrow_down_gray.png" mode="heightFix" />
  39. </view>
  40. <view class="right">
  41. <text style="font-size: 28rpx;color: #999999;">{{$t('txt.开始时间-结束时间')}}</text>
  42. <image class="icon" src="../../static/me/arrow_down_gray.png" mode="heightFix" />
  43. </view>
  44. </view> -->
  45. <!-- <view class="numlist2">
  46. <view class="item" v-for="(item, index) in historyInfo" :key="index">
  47. <view class="left">
  48. <view class="num">
  49. <text>{{ $t(item.reason) }}</text>
  50. <view class="data">{{item.data}}</view>
  51. </view>
  52. </view>
  53. <view class="right">
  54. <view v-if="item.value>0" class="num1">
  55. <text>+{{ item.value }}</text>
  56. </view>
  57. <view v-else class="num1 num2">
  58. <text>{{ item.value }}</text>
  59. </view>
  60. </view>
  61. </view>
  62. </view> -->
  63. </view>
  64. <view class="blankHeight"></view>
  65. </view>
  66. <!-- 提示框 -->
  67. <DialogBox ref="DialogBox"></DialogBox>
  68. </view>
  69. </template>
  70. <script>
  71. export default {
  72. components: {},
  73. data() {
  74. return {
  75. title: '',
  76. sel: 1,
  77. x_score:19991,
  78. M_coinInfo: {
  79. myMcoin: 0
  80. },
  81. historyInfo: {
  82. "0": {
  83. reason: "txt.M币充值",
  84. value: 100,
  85. data:"2023-1-12 15:00"
  86. },
  87. "1": {
  88. reason: "txt.M币充值",
  89. value: 200,
  90. data:"2023-1-12 13:00"
  91. },
  92. "2": {
  93. reason: "txt.M币充值",
  94. value: -100,
  95. data:"2023-1-12 11:00"
  96. }
  97. }
  98. }
  99. },
  100. onLoad() {
  101. // setTimeout(function() {
  102. // uni.setNavigationBarColor({
  103. // frontColor: '#ffffff',
  104. // backgroundColor: '#00000000',
  105. // animation: {
  106. // duration: 400,
  107. // timingFunc: 'easeIn'
  108. // }
  109. // })
  110. // }, 200);
  111. },
  112. onShow() {
  113. this.loadData();
  114. },
  115. methods: {
  116. onBack() {},
  117. chkSel() {
  118. if (this.sel == 1) {
  119. this.sel = 0;
  120. } else {
  121. this.sel = 1;
  122. }
  123. },
  124. loadData() {
  125. console.log("this.globalData", getApp().globalData);
  126. let obj2 = {
  127. is_first: 0
  128. }
  129. const postData = Object.assign({}, getApp().globalData.postHeader, obj2);
  130. console.log(postData);
  131. uni.request({
  132. url: this.$apiHost + '/Gushi/getmyinfo', //仅为示例,并非真实接口地址。
  133. data: postData,
  134. method: 'POST',
  135. header: {
  136. 'content-type': 'application/json', //自定义请求头信息
  137. 'Access-Control-Allow-Origin': '*'
  138. },
  139. success: (res) => {
  140. console.log('data:', res.data);
  141. this.myinfo = res.data;
  142. }
  143. });
  144. },
  145. }
  146. }
  147. </script>
  148. <style scoped lang="scss">
  149. @import 'X_coin.scss';
  150. </style>