X_coin.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  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: 18rpx;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="numlist2">
  36. <view class="item" v-for="(item, index) in historyInfo" :key="index">
  37. <view class="left">
  38. <view class="num">
  39. <text>{{ $t(item.reason) }}</text>
  40. <view class="data">{{item.data}}</view>
  41. </view>
  42. </view>
  43. <view class="right">
  44. <view v-if="item.value>0" class="num1">
  45. <text>+{{ item.value }}</text>
  46. </view>
  47. <view v-else class="num1 num2">
  48. <text>{{ item.value }}</text>
  49. </view>
  50. </view>
  51. </view>
  52. </view> -->
  53. </view>
  54. <view class="itemlist">
  55. <view class="item">
  56. <view class="left">
  57. <image style="height:36rpx" class="arrow" src="../../static/me/icon_wallet.png" mode="widthFix" />
  58. <text style="margin-left: 20rpx; font-size: 28rpx;color: #FFFFFF;">{{$t('txt.钱包')}}</text>
  59. </view>
  60. <image class="arrow" src="../../static/me/arrow_right_gray.png" mode="widthFix" />
  61. </view>
  62. <view class="item">
  63. <view class="left">
  64. <image style="height:36rpx" class="arrow" src="../../static/me/icon_store.png" mode="widthFix" />
  65. <text style="margin-left: 20rpx; font-size: 28rpx;color: #FFFFFF;">{{$t('txt.兑换商城')}}</text>
  66. <!-- <image class="icon" src="../../static/me/arrow_down_gray.png" mode="heightFix" /> -->
  67. </view>
  68. <image class="arrow" src="../../static/me/arrow_right_gray.png" mode="widthFix" />
  69. </view>
  70. </view>
  71. <view class="friendList">
  72. <view class="title">
  73. <view class="left">
  74. <text style="font-size: 28rpx;color: #FFFFFF;">{{$t('txt.免费获取')}}</text>
  75. <text style="font-size: 28rpx;color: #C7A58A;">{{$t('txt.X币')}}</text>
  76. </view>
  77. </view>
  78. <view class="numlist2"
  79. :style="{ backgroundSize: '100% ' + (task_list_len * 140) + 'rpx', backgroundPosition: 'bottom' }">
  80. <view v-if="task_list_len<=0" class="empty">
  81. <view class="bg"></view>
  82. <text style="margin-top: 40rpx;font-size: 24rpx;color: #999999;">{{$t('txt.暂无数据')}}</text>
  83. </view>
  84. <view v-else class="item" v-for="(item, index) in task_list" :key="index">
  85. <view class="info">
  86. <view class="left">
  87. <view class = "icon">
  88. <image class="img" src="http://c.yujianmate.com/images/v1/w3_1.png" mode="widthFix" />
  89. </view>
  90. <view class="nameList">
  91. <view class="num">
  92. <view class="name">
  93. <text>{{$t('txt.'+item.nickname)}}</text>
  94. <image v-if="item.is_vip===2" class="icon"
  95. src="http://c.yujianmate.com/images/v1/w3_black_vip.png" mode="heightFix" />
  96. <image v-else-if="item.is_vip===1" class="icon"
  97. src="http://c.yujianmate.com/images/v1/w3_vip.png" mode="heightFix" />
  98. </view>
  99. <view class="data">{{$t('txt.'+item.login_time)}}</view>
  100. </view>
  101. </view>
  102. </view>
  103. <view class="right">
  104. <view class="txt">
  105. <text>{{$t('txt.'+item.mobile)}}</text>
  106. </view>
  107. </view>
  108. </view>
  109. <view class="line">
  110. </view>
  111. </view>
  112. </view>
  113. </view>
  114. <view class="blankHeight"></view>
  115. </view>
  116. <!-- 提示框 -->
  117. <DialogBox ref="DialogBox"></DialogBox>
  118. </view>
  119. </template>
  120. <script>
  121. export default {
  122. components: {},
  123. data() {
  124. return {
  125. title: '',
  126. sel: 1,
  127. x_score:19991,
  128. M_coinInfo: {
  129. myMcoin: 0
  130. },
  131. historyInfo: {
  132. "0": {
  133. reason: "txt.M币充值",
  134. value: 100,
  135. data:"2023-1-12 15:00"
  136. },
  137. "1": {
  138. reason: "txt.M币充值",
  139. value: 200,
  140. data:"2023-1-12 13:00"
  141. },
  142. "2": {
  143. reason: "txt.M币充值",
  144. value: -100,
  145. data:"2023-1-12 11:00"
  146. }
  147. },
  148. task_list_len : 2,
  149. task_list: [
  150. {
  151. nickname: "签到领取",
  152. is_vip: 0,
  153. is_idcheck: 0,
  154. value: 100,
  155. mobile: "去开通",
  156. login_time: "奖励100X/次"
  157. },
  158. {
  159. nickname: "签到领取",
  160. is_vip: 0,
  161. is_idcheck: 0,
  162. value: 100,
  163. mobile: "去开通",
  164. login_time: "奖励100X/次"
  165. }
  166. ]
  167. }
  168. },
  169. onLoad() {
  170. // setTimeout(function() {
  171. // uni.setNavigationBarColor({
  172. // frontColor: '#ffffff',
  173. // backgroundColor: '#00000000',
  174. // animation: {
  175. // duration: 400,
  176. // timingFunc: 'easeIn'
  177. // }
  178. // })
  179. // }, 200);
  180. },
  181. onShow() {
  182. this.loadData();
  183. },
  184. methods: {
  185. onBack() {},
  186. chkSel() {
  187. if (this.sel == 1) {
  188. this.sel = 0;
  189. } else {
  190. this.sel = 1;
  191. }
  192. },
  193. loadData() {
  194. console.log("this.globalData", getApp().globalData);
  195. let obj2 = {
  196. is_first: 0
  197. }
  198. const postData = Object.assign({}, getApp().globalData.postHeader, obj2);
  199. console.log(postData);
  200. uni.request({
  201. url: this.$apiHost + '/Gushi/getmyinfo', //仅为示例,并非真实接口地址。
  202. data: postData,
  203. method: 'POST',
  204. header: {
  205. 'content-type': 'application/json', //自定义请求头信息
  206. 'Access-Control-Allow-Origin': '*'
  207. },
  208. success: (res) => {
  209. console.log('data:', res.data);
  210. this.myinfo = res.data;
  211. }
  212. });
  213. },
  214. }
  215. }
  216. </script>
  217. <style scoped lang="scss">
  218. @import 'X_coin.scss';
  219. </style>