propDetails.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <template>
  2. <view class="container">
  3. <view class="topImage">
  4. <image :src="type==1?'/static/img/img15.png':'/static/img/img16.png'" style="width: 119rpx;height: 119rpx;"></image>
  5. <view class="money">{{type==1?userInfo.USDT * 1:type==2?userInfo.NUSD*1 + userInfo.NUSD_OLY*1:userInfo.NICE * 1}}</view>
  6. </view>
  7. <view class="infoBox">
  8. <view class="title">{{$t("propDetails.交易记录")}}</view>
  9. <view class="listBox" v-if="list.length > 0">
  10. <view class="listTpl flex" v-for="item,index in list" :key="index">
  11. <view class="tplInfo flex_item">
  12. <image src="/static/img/img20.png" style="width: 39rpx;height: 43rpx;"></image>
  13. <view class="name">{{typeList[item.type]}}</view>
  14. <view class="time">{{item.createtime }}</view>
  15. </view>
  16. <view class="num add" v-if="item.pm == 1">+{{item.money * 1}}</view>
  17. <view class="num" v-else>-{{item.money * 1}}</view>
  18. </view>
  19. </view>
  20. <view class="noDate" v-else>
  21. <image src="../../static/img/noDate.png" style="width:500rpx;height: 500rpx;" mode="aspectFit"></image>
  22. </view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. import {getTokenLog} from "@/api/index.js";
  28. import {getUserInfo} from '@/api/login.js';
  29. import{ getTime } from '@/utils/rocessor.js';
  30. export default {
  31. data () {
  32. return {
  33. type:1,
  34. title:'',
  35. list:[],
  36. typeList:'',
  37. userInfo:''
  38. }
  39. },
  40. onLoad (option) {
  41. this.type = option.type;
  42. if (this.type == 1) {
  43. this.title = 'USDT'
  44. uni.setNavigationBarTitle({
  45. title: "USDT",
  46. });
  47. }else if(this.type == 2){
  48. this.title = 'NUSD'
  49. uni.setNavigationBarTitle({
  50. title: "NUSD",
  51. });
  52. }else if(this.type == 3){
  53. this.title = 'NICE'
  54. uni.setNavigationBarTitle({
  55. title: "NICE",
  56. });
  57. }else{
  58. this.title = 'NUSD_OLY'
  59. uni.setNavigationBarTitle({
  60. title: "XNUSD",
  61. });
  62. }
  63. this.getUserInfo()
  64. this.loadDate()
  65. },
  66. methods: {
  67. getUserInfo(){
  68. let obj = this
  69. getUserInfo({}).then(({data}) => {
  70. obj.userInfo = data
  71. }).catch(e => {
  72. console.log(e.msg);
  73. });
  74. },
  75. loadDate(){
  76. let obj = this
  77. getTokenLog({
  78. page:1,
  79. limit:100000,
  80. token:obj.title,
  81. pm:''
  82. }).then(function(res){
  83. res.data.list.forEach(item => {
  84. item.createtime = getTime(item.createtime)
  85. })
  86. obj.list = res.data.list
  87. obj.typeList = res.data.type
  88. })
  89. }
  90. },
  91. }
  92. </script>
  93. <style lang="scss">
  94. page {
  95. width: 100%;
  96. .container {
  97. width: 100%;
  98. padding-top: 50rpx;
  99. }
  100. }
  101. .topImage{
  102. text-align: center;
  103. padding-bottom: 50rpx;
  104. .money{
  105. padding-top: 25rpx;
  106. color: #fff;
  107. font-size: 32rpx;
  108. }
  109. }
  110. .noDate{
  111. text-align: center;
  112. padding-top: 25rpx;
  113. }
  114. .infoBox{
  115. padding: 0rpx 30rpx;
  116. .title{
  117. font-size: 30rpx;
  118. color: #FFFFFF;
  119. }
  120. .listBox{
  121. color: #fff;
  122. .listTpl{
  123. background: #1A1A17;
  124. margin-top: 30rpx;
  125. padding: 25rpx 25rpx;
  126. .tplInfo{
  127. .name{
  128. padding: 0rpx 15rpx;
  129. }
  130. .time{
  131. font-size: 24rpx;
  132. color: #999999;
  133. }
  134. }
  135. .num{
  136. font-weight: 400;
  137. font-size: 36rpx;
  138. color: #fff;
  139. }
  140. .add{
  141. color: #4C5D97;
  142. background: linear-gradient(258deg, #FFF0CF 0%, #CBA16B 30.0048828125%, #FCE9CF 67.67578125%, #C29963 100%);
  143. -webkit-background-clip: text;
  144. -webkit-text-fill-color: transparent;
  145. }
  146. }
  147. }
  148. }
  149. </style>