123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- <template>
- <view class="container">
- <view class="topImage">
- <image :src="type==1?'/static/img/img15.png':'/static/img/img16.png'" style="width: 119rpx;height: 119rpx;"></image>
- <view class="money">{{type==1?userInfo.USDT * 1:type==2?userInfo.NUSD*1 + userInfo.NUSD_OLY*1:userInfo.NICE * 1}}</view>
- </view>
- <view class="infoBox">
- <view class="title">{{$t("propDetails.交易记录")}}</view>
- <view class="listBox" v-if="list.length > 0">
- <view class="listTpl flex" v-for="item,index in list" :key="index">
- <view class="tplInfo flex_item">
- <image src="/static/img/img20.png" style="width: 39rpx;height: 43rpx;"></image>
- <view class="name">{{typeList[item.type]}}</view>
- <view class="time">{{item.createtime }}</view>
- </view>
- <view class="num add" v-if="item.pm == 1">+{{item.money * 1}}</view>
- <view class="num" v-else>-{{item.money * 1}}</view>
- </view>
- </view>
- <view class="noDate" v-else>
- <image src="../../static/img/noDate.png" style="width:500rpx;height: 500rpx;" mode="aspectFit"></image>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {getTokenLog} from "@/api/index.js";
- import {getUserInfo} from '@/api/login.js';
- import{ getTime } from '@/utils/rocessor.js';
- export default {
- data () {
- return {
- type:1,
- title:'',
- list:[],
- typeList:'',
- userInfo:''
- }
- },
- onLoad (option) {
- this.type = option.type;
- if (this.type == 1) {
- this.title = 'USDT'
- uni.setNavigationBarTitle({
- title: "USDT",
- });
- }else if(this.type == 2){
- this.title = 'NUSD'
- uni.setNavigationBarTitle({
- title: "NUSD",
- });
- }else if(this.type == 3){
- this.title = 'NICE'
- uni.setNavigationBarTitle({
- title: "NICE",
- });
- }else{
- this.title = 'NUSD_OLY'
- uni.setNavigationBarTitle({
- title: "XNUSD",
- });
- }
- this.getUserInfo()
- this.loadDate()
- },
- methods: {
- getUserInfo(){
- let obj = this
- getUserInfo({}).then(({data}) => {
- obj.userInfo = data
- }).catch(e => {
- console.log(e.msg);
- });
- },
- loadDate(){
- let obj = this
- getTokenLog({
- page:1,
- limit:100000,
- token:obj.title,
- pm:''
- }).then(function(res){
- res.data.list.forEach(item => {
- item.createtime = getTime(item.createtime)
- })
- obj.list = res.data.list
- obj.typeList = res.data.type
- })
- }
- },
- }
- </script>
- <style lang="scss">
- page {
- width: 100%;
- .container {
- width: 100%;
- padding-top: 50rpx;
- }
- }
- .topImage{
- text-align: center;
- padding-bottom: 50rpx;
- .money{
- padding-top: 25rpx;
- color: #fff;
- font-size: 32rpx;
- }
- }
- .noDate{
- text-align: center;
- padding-top: 25rpx;
- }
- .infoBox{
- padding: 0rpx 30rpx;
- .title{
- font-size: 30rpx;
- color: #FFFFFF;
- }
- .listBox{
- color: #fff;
- .listTpl{
- background: #1A1A17;
- margin-top: 30rpx;
- padding: 25rpx 25rpx;
- .tplInfo{
- .name{
- padding: 0rpx 15rpx;
- }
- .time{
- font-size: 24rpx;
- color: #999999;
- }
- }
- .num{
- font-weight: 400;
- font-size: 36rpx;
- color: #fff;
- }
- .add{
- color: #4C5D97;
- background: linear-gradient(258deg, #FFF0CF 0%, #CBA16B 30.0048828125%, #FCE9CF 67.67578125%, #C29963 100%);
- -webkit-background-clip: text;
- -webkit-text-fill-color: transparent;
- }
- }
- }
- }
- </style>
|