2025-06-06 03:08:19 +08:00
|
|
|
<template>
|
|
|
|
<view class="page">
|
2025-06-10 00:51:49 +08:00
|
|
|
<uni-nav-bar @clickLeft="goto(1, 1)" left-icon="back" :border="false" :shadow="false" :fixed="true"
|
2025-06-10 17:10:40 +08:00
|
|
|
:title="$t('wallet.title')" backgroundColor="#fff" :statusBar="true"></uni-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-10 00:51:49 +08:00
|
|
|
<view style="width: 500; font-size: 48rpx; color: #fff; line-height: 110rpx;">{{user.money.toFixed(4)}}</view>
|
2025-06-06 03:08:19 +08:00
|
|
|
<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>
|
2025-06-10 00:51:49 +08:00
|
|
|
<view style="width: 90%; margin: 20rpx auto;">
|
2025-06-06 03:08:19 +08:00
|
|
|
<view style="width: 30%; float: left;">
|
|
|
|
<view class="w" @click="onTokenJump('/pages/wallet/recharge')">
|
|
|
|
<view style="text-align: center;">
|
2025-06-10 00:51:49 +08:00
|
|
|
<image style="width: 50rpx; height: 50rpx; 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')">
|
2025-06-10 00:51:49 +08:00
|
|
|
<view style="text-align: center;"><image style="width: 50rpx; height: 50rpx; 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')">
|
2025-06-10 00:51:49 +08:00
|
|
|
<view style="text-align: center;"><image style="width: 50rpx; height: 50rpx; 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>
|
2025-06-10 00:51:49 +08:00
|
|
|
<view style="width: 92%; margin: 20rpx auto;">
|
2025-06-09 00:34:46 +08:00
|
|
|
<view class="cell_list" style="padding: 30rpx 0rpx;border-bottom: none;">
|
2025-06-10 00:51:49 +08:00
|
|
|
<view style="color: #333; font-size: 36rpx; font-weight: 600;">{{$t('wallet.text4')}}</view>
|
2025-06-07 23:12:35 +08:00
|
|
|
<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-10 00:51:49 +08:00
|
|
|
<view class="cell_list" style="padding: 30rpx 0rpx;border-bottom: 2rpx 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>
|
2025-06-15 22:12:30 +08:00
|
|
|
<view class="u1 u" style="text-align: right;">
|
2025-06-06 03:08:19 +08:00
|
|
|
<span>{{parseFloat(item.amount).toFixed(2)}} USDT</span>
|
2025-06-15 22:12:30 +08:00
|
|
|
<view class="d" style="text-align: right; color: #1D61E7;">{{$t('wallet.text6')}}:{{parseFloat(item.after).toFixed(4)}}</view>
|
2025-06-06 03:08:19 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
2025-06-10 00:51:49 +08:00
|
|
|
<view style="text-align: center; padding-bottom: 160rpx;" v-if="list.length == 0">
|
2025-06-06 03:08:19 +08:00
|
|
|
<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-10 00:51:49 +08:00
|
|
|
<view style="color: #999; font-size: 28rpx; font-weight: 400;">{{$t('nodata')}}</view>
|
2025-06-06 03:08:19 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2025-06-10 17:10:40 +08:00
|
|
|
import { getUserInfo } from '@/config/utils';
|
2025-06-06 03:08:19 +08:00
|
|
|
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() {
|
2025-06-10 17:10:40 +08:00
|
|
|
getUserInfo(this.$i18n.locale).then(res => {
|
|
|
|
this.user.money = parseFloat(res.money);
|
|
|
|
this.user.income_total = parseFloat(res.income_total == null ? 0 : res.income_total);
|
|
|
|
this.user.withdrawl_total = parseFloat(res.withdrawl_total == null ? 0 : res.withdrawl_total);
|
|
|
|
});
|
|
|
|
|
2025-06-06 03:08:19 +08:00
|
|
|
},
|
|
|
|
//方法
|
|
|
|
methods: {
|
|
|
|
getlist(){
|
|
|
|
let data = {
|
|
|
|
page: 1,
|
|
|
|
limit: 10,
|
2025-06-10 03:13:47 +08:00
|
|
|
currency: 'money',
|
|
|
|
lang: this.$i18n.locale
|
2025-06-06 03:08:19 +08:00
|
|
|
};
|
|
|
|
this.$http.post('/api/balanceLog/list', data).then(res => {
|
|
|
|
if(res.code == 0){
|
|
|
|
this.list = res.data.data;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
2025-06-10 00:51:49 +08:00
|
|
|
goto(url, type) {
|
|
|
|
if (type == 2) {
|
|
|
|
return uni.switchTab({ url: url })
|
|
|
|
}
|
|
|
|
if (type == 1) {
|
|
|
|
return uni.navigateBack({ delta: url });
|
|
|
|
}
|
|
|
|
uni.navigateTo({
|
|
|
|
url: url
|
|
|
|
})
|
|
|
|
},
|
2025-06-06 03:08:19 +08:00
|
|
|
onTokenJump(url) {
|
2025-06-10 17:10:40 +08:00
|
|
|
if(this.userInfo.token === typeof(undefined) || this.userInfo.token === undefined){
|
|
|
|
uni.showModal({
|
|
|
|
title: this.$t('gotoLogin.title'),
|
|
|
|
content: this.$t('gotoLogin.content'),
|
|
|
|
confirmText: this.$t('gotoLogin.login'),
|
|
|
|
cancelText: this.$t('gotoLogin.cancel'),
|
|
|
|
success: (res) => {
|
|
|
|
if (res.confirm) {
|
|
|
|
uni.navigateTo({
|
|
|
|
url: "/pages/mine/login"
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}else{
|
2025-06-06 03:08:19 +08:00
|
|
|
uni.navigateTo({
|
|
|
|
url: url
|
|
|
|
});
|
2025-06-10 17:10:40 +08:00
|
|
|
}
|
2025-06-06 03:08:19 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
//页面隐藏
|
|
|
|
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-10 00:51:49 +08:00
|
|
|
border-radius: 20rpx; padding: 40rpx 30rpx; width: 90%; margin: 20rpx auto;
|
|
|
|
background: url('/static/images/w1.png') #2B66F6;background-size: 25%; background-repeat: no-repeat; background-position: 92% 10rpx;
|
2025-06-06 03:08:19 +08:00
|
|
|
}
|
2025-06-10 00:51:49 +08:00
|
|
|
.wallet1 .txt{width: 400; font-size: 24rpx; color: #fff;}
|
|
|
|
.wallet1 .txt1{width: 400; font-size: 32rpx; color: #fff; line-height: 70rpx;}
|
2025-06-09 00:34:46 +08:00
|
|
|
.cell_list .cell_right.arrow::after{
|
2025-06-10 00:51:49 +08:00
|
|
|
height: 16rpx !important;
|
2025-06-09 00:34:46 +08:00
|
|
|
}
|
2025-06-06 03:08:19 +08:00
|
|
|
.cell_list .t{
|
2025-06-10 00:51:49 +08:00
|
|
|
color: #3d3d3d; font-size: 28rpx; font-weight: 400; line-height: 50rpx;
|
2025-06-06 03:08:19 +08:00
|
|
|
}
|
|
|
|
.cell_list .d{
|
2025-06-10 00:51:49 +08:00
|
|
|
color: #3d3d3d; font-size: 32rpx; font-weight: 400; line-height: 50rpx;
|
2025-06-06 03:08:19 +08:00
|
|
|
}
|
|
|
|
.cell_list .d1{
|
2025-06-10 00:51:49 +08:00
|
|
|
color: #999; font-size: 28rpx; font-weight: 400; line-height: 50rpx;
|
2025-06-06 03:08:19 +08:00
|
|
|
}
|
|
|
|
.cell_list .u{
|
2025-06-10 00:51:49 +08:00
|
|
|
color: #1D61E7; font-weight: 600;float: right; font-size: 32rpx;
|
2025-06-06 03:08:19 +08:00
|
|
|
}
|
|
|
|
.cell_list .u1{
|
2025-06-10 00:51:49 +08:00
|
|
|
color: #333; font-weight: 600;float: right;font-size: 32rpx;
|
2025-06-06 03:08:19 +08:00
|
|
|
}
|
|
|
|
.w{
|
2025-06-10 00:51:49 +08:00
|
|
|
background-color: #F8F8F8; border-radius: 20rpx; padding: 20rpx 10rpx;
|
2025-06-06 03:08:19 +08:00
|
|
|
}
|
|
|
|
.w .t{
|
2025-06-10 00:51:49 +08:00
|
|
|
text-align: center; margin-top: 20rpx; font-size: 28rpx;
|
2025-06-06 03:08:19 +08:00
|
|
|
}
|
|
|
|
</style>
|