| | |
| | | <script setup> |
| | | import { onMounted, ref } from 'vue' |
| | | import { rechargeChangeApi } from '../../../api/index.js' |
| | | import { rechargeChangeApi,balanceStatisticsApi} from '../../../api/index.js' |
| | | //返回 |
| | | function navBackTo(){ |
| | | uni.navigateBack() |
| | |
| | | //获取消费变动列表 |
| | | const banlanceList = ref([]) |
| | | async function getBalanceList(val){ |
| | | await rechargeChangeApi(val).then((res) =>{ |
| | | await rechargeChangeApi(val).then(async(res) =>{ |
| | | if(res.code == 200){ |
| | | banlanceList.value = res.data |
| | | } |
| | | await getStatistics(val) |
| | | }) |
| | | } |
| | | |
| | | //获取用户资金变动统计 |
| | | const rechargeSta = ref() |
| | | async function getStatistics(val){ |
| | | await balanceStatisticsApi(val).then((res) =>{ |
| | | rechargeSta.value = res.data.rechargeAmount |
| | | }) |
| | | } |
| | | onMounted(async() =>{ |
| | |
| | | <view class="picker"> |
| | | <picker mode="date" :value="datePay" :fields="'month'" @change="bindDateChange"> |
| | | <view class="date-text"> |
| | | <text class="uni-input">{{datePay}}</text> |
| | | <image src="../../../static/images/other/more.png" alt=''></image> |
| | | <text class="uni-input">日期:{{datePay}}</text> |
| | | <image src="../../../static/images/other/expand.png" alt=''></image> |
| | | </view> |
| | | </picker> |
| | | </view> |
| | | <view class="rechargeAll">充值:{{rechargeSta}}元</view> |
| | | </view> |
| | | <view class="main"> |
| | | <view class="main" v-if="banlanceList.length > 0"> |
| | | <block v-for="(item,index) in banlanceList"> |
| | | <view class="item"> |
| | | <view class="item-left"> |
| | |
| | | </view> |
| | | </view> |
| | | </block> |
| | | </view> |
| | | <view v-else class="nodata"> |
| | | <image src="../../../static/images/other/nodata.png" alt=""></image> |
| | | <text>该月暂无记录</text> |
| | | </view> |
| | | </view> |
| | | </template> |
| | |
| | | display: flex; |
| | | padding: 0 36rpx; |
| | | box-sizing: border-box; |
| | | justify-content:flex-start; |
| | | justify-content:space-between; |
| | | align-items: center; |
| | | .picker{ |
| | | .date-text{ |
| | |
| | | text{ |
| | | font-weight: 300; |
| | | font-size: 32rpx; |
| | | color: #000000; |
| | | color: #5487f4; |
| | | margin-right:10rpx; |
| | | } |
| | | image{ |
| | |
| | | // margin-top:10rpx; |
| | | } |
| | | } |
| | | } |
| | | .rechargeAll{ |
| | | font-weight: 300; |
| | | font-size: 26rpx; |
| | | color: #3368bd; |
| | | } |
| | | } |
| | | .main{ |
| | |
| | | } |
| | | } |
| | | } |
| | | .nodata{ |
| | | width:100%; |
| | | height:1200rpx; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | padding-bottom:400rpx; |
| | | box-sizing: border-box; |
| | | flex-direction: column; |
| | | image{ |
| | | width:496rpx; |
| | | height:488rpx; |
| | | } |
| | | text{ |
| | | color:#bed2fd; |
| | | } |
| | | } |
| | | } |
| | | </style> |