166 lines
5.5 KiB
Vue
Raw Normal View History

2025-06-06 03:08:19 +08:00
<template>
<view class="page">
2025-06-09 00:34:46 +08:00
<nav-bar :title="$t('wallet.title')" bgColor="#fff"></nav-bar>
2025-06-06 03:08:19 +08:00
<view class="wallet1">
2025-06-07 23:12:35 +08:00
<view class="txt">{{$t('wallet.text1')}}</view>
2025-06-06 03:08:19 +08:00
<view style="width: 500; font-size: 24px; color: #fff; line-height: 55px;">{{user.money.toFixed(4)}}</view>
<view style="width: 47%; float: left;">
2025-06-07 23:12:35 +08:00
<view class="txt">{{$t('wallet.text2')}}</view>
2025-06-06 03:08:19 +08:00
<view class="txt1">{{user.income_total.toFixed(4)}}</view>
</view>
<view style="width: 47%; float: left; margin-left: 6%;">
2025-06-07 23:12:35 +08:00
<view class="txt">{{$t('wallet.text3')}}</view>
2025-06-06 03:08:19 +08:00
<view class="txt1">{{user.withdrawl_total.toFixed(4)}}</view>
</view>
<view style="clear: both;"></view>
</view>
<view style="width: 90%; margin: 10px auto;">
<view style="width: 30%; float: left;">
<view class="w" @click="onTokenJump('/pages/wallet/recharge')">
<view style="text-align: center;">
<image style="width: 25px; height: 25px; margin: auto;" src="/static/images/w3.png" mode="cover"></image></view>
2025-06-07 23:12:35 +08:00
<view class="t">{{$t('recharge.title')}}</view>
2025-06-06 03:08:19 +08:00
</view>
</view>
<view style="width: 30%; float: left; margin-left: 5%;">
<view class="w" @click="onTokenJump('/pages/wallet/putforward')">
<view style="text-align: center;"><image style="width: 25px; height: 25px; margin: auto;" src="/static/images/w2.png" mode="cover"></image></view>
2025-06-07 23:12:35 +08:00
<view class="t">{{$t('putforward.title')}}</view>
2025-06-06 03:08:19 +08:00
</view>
</view>
<view style="width: 30%; float: left; margin-left: 5%;">
<view class="w" @click="onTokenJump('/pages/wallet/transfer')">
<view style="text-align: center;"><image style="width: 25px; height: 25px; margin: auto;" src="/static/images/w4.png" fit="cover"></image></view>
2025-06-07 23:12:35 +08:00
<view class="t">{{$t('transfer.title')}}</view>
2025-06-06 03:08:19 +08:00
</view>
</view>
2025-06-09 00:34:46 +08:00
<view style="clear: both;"></view>
2025-06-06 03:08:19 +08:00
</view>
<view style="width: 92%; margin: 10px auto;">
2025-06-09 00:34:46 +08:00
<view class="cell_list" style="padding: 30rpx 0rpx;border-bottom: none;">
2025-06-07 23:12:35 +08:00
<view style="color: #333; font-size: 18px; font-weight: 600;">{{$t('wallet.text4')}}</view>
<view class="cell_right arrow" @click="onTokenJump('/pages/wallet/fundrecords')">{{$t('wallet.text5')}}</view>
2025-06-06 03:08:19 +08:00
</view>
2025-06-09 00:34:46 +08:00
<view class="cell_list" style="padding: 30rpx 0rpx;border-bottom: 1px solid #ddd;" v-if="list.length > 0" v-for="item in list" :key="item.id">
2025-06-06 03:08:19 +08:00
<view class="t">{{item.type}}<view class="d1">{{item.created_at.slice(0, 19)}}</view></view>
<view class="u1 u">
<span>{{parseFloat(item.amount).toFixed(2)}} USDT</span>
<view class="d" style="text-align: right; color: #1D61E7;">After:{{parseFloat(item.after).toFixed(2)}}</view>
</view>
</view>
<view style="text-align: center; padding-bottom: 80px;" v-if="list.length == 0">
<view style="width: 360rpx; height: 360rpx; margin: 160rpx auto 0rpx auto;">
<image src="/static/images/w5.png" style="width: 360rpx; height: 360rpx; " mode="cover"></image>
</view>
2025-06-07 23:12:35 +08:00
<view style="color: #999; font-size: 14px; font-weight: 400;">{{$t('nodata')}}</view>
2025-06-06 03:08:19 +08:00
</view>
</view>
</view>
</template>
<script>
import zPrompt from '@/components/common/prompt';
import Popup from '@/components/common/popup';
import {
mapState,
mapMutations
} from 'vuex';
export default {
components: {
Popup,
zPrompt
},
data() {
return {
user:{
money: 0.0000,
income_total: 0.0000,
withdrawl_total: 0.0000,
},
list: []
};
},
computed: {
...mapState(['userInfo']),
...mapState(['init'])
},
//第一次加载
onLoad(e) {
this.getlist();
},
//页面显示
onShow() {
this.user.money = parseFloat(this.userInfo.money);
this.user.income_total = parseFloat(this.userInfo.income_total == null ? 0 : this.userInfo.income_total);
this.user.withdrawl_total = parseFloat(this.userInfo.withdrawl_total == null ? 0 : this.userInfo.withdrawl_total);
},
//方法
methods: {
getlist(){
let data = {
page: 1,
limit: 10,
currency: 'money'
};
this.$http.post('/api/balanceLog/list', data).then(res => {
if(res.code == 0){
this.list = res.data.data;
}
});
},
onTokenJump(url) {
this.judgeLogin(() => {
uni.navigateTo({
url: url
});
});
},
},
//页面隐藏
onHide() {},
//页面卸载
onUnload() {},
//页面下来刷新
onPullDownRefresh() {},
//页面上拉触底
onReachBottom() {},
//用户点击分享
onShareAppMessage(e) {
return this.wxShare();
}
};
</script>
<style lang="scss" scoped>
@import '@/style/mixin.scss';
body{background-color: #fff;}
.wallet1{
2025-06-09 00:34:46 +08:00
border-radius: 10px; padding: 20px 15px; width: 90%; margin: 10px auto;
background: url('/static/images/w1.png') #2B66F6;background-size: 25%; background-repeat: no-repeat; background-position: 92% 5px;
2025-06-06 03:08:19 +08:00
}
.wallet1 .txt{width: 400; font-size: 12px; color: #fff;}
.wallet1 .txt1{width: 400; font-size: 16px; color: #fff; line-height: 35px;}
2025-06-09 00:34:46 +08:00
.cell_list .cell_right.arrow::after{
height: 8px !important;
}
2025-06-06 03:08:19 +08:00
.cell_list .t{
color: #3d3d3d; font-size: 14px; font-weight: 400; line-height: 25px;
}
.cell_list .d{
color: #3d3d3d; font-size: 16px; font-weight: 400; line-height: 25px;
}
.cell_list .d1{
color: #999; font-size: 14px; font-weight: 400; line-height: 25px;
}
.cell_list .u{
color: #1D61E7; font-weight: 600;float: right; font-size: 16px;
}
.cell_list .u1{
color: #333; font-weight: 600;float: right;font-size: 16px;
}
.w{
background-color: #F8F8F8; border-radius: 10px; padding: 20rpx 10rpx;
}
.w .t{
text-align: center; margin-top: 10px; font-size: 14px;
}
</style>