| | |
| | | <script setup> |
| | | import { computed, onMounted, ref } from 'vue' |
| | | import { balanceChangeApi } from '../../../api/index.js' |
| | | import { balanceChangeApi,balanceStatisticsApi} from '../../../api/index.js' |
| | | //返回 |
| | | function navBackTo(){ |
| | | uni.navigateBack() |
| | |
| | | datePay.value = e.detail.value |
| | | await getBalanceList(datePay.value) |
| | | } |
| | | //获取用户资金变动统计 |
| | | const rechargeSta = ref() |
| | | const expendSta = ref() |
| | | async function getStatistics(val){ |
| | | await balanceStatisticsApi(val).then((res) =>{ |
| | | rechargeSta.value = res.data.rechargeAmount |
| | | expendSta.value = res.data.expenditureAmount |
| | | }) |
| | | } |
| | | |
| | | //获取余额变动列表 |
| | | const banlanceList = ref([]) |
| | |
| | | banlanceList.value = res.data |
| | | } |
| | | }) |
| | | await getStatistics(val) |
| | | } |
| | | //动态设置用户支出收入对应样式 |
| | | function setStyleMoney(val){ |
| | |
| | | onMounted(async() =>{ |
| | | getDate() |
| | | await getBalanceList(datePay.value) |
| | | // await getStatistics() |
| | | }) |
| | | </script> |
| | | <template> |
| | |
| | | <view class="picker"> |
| | | <picker mode="date" :value="datePay" :fields="'month'" @change="bindDateChange"> |
| | | <view class="date-text"> |
| | | <!-- <text>日期:</text> --> |
| | | <text class="uni-input">{{datePay}}</text> |
| | | <image src="../../../static/images/other/more.png" alt=''></image> |
| | | <image src="../../../static/images/other/expand.png" alt=''></image> |
| | | </view> |
| | | </picker> |
| | | </view> |
| | | <view class="date-money"> |
| | | <text>支出¥5341.05</text> |
| | | <text>充值¥941.59</text> |
| | | <text>支出¥{{expendSta}}</text> |
| | | <text>充值¥{{rechargeSta}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="main"> |
| | |
| | | text{ |
| | | font-weight: 300; |
| | | font-size: 32rpx; |
| | | color: #000000; |
| | | color: #5487f4; |
| | | margin-right:10rpx; |
| | | } |
| | | image{ |
| | | width: 28rpx; |
| | | width:32rpx; |
| | | height:32rpx; |
| | | transform: rotate(90deg); |
| | | // margin-top:10rpx; |
| | |
| | | } |
| | | .main{ |
| | | width:99%; |
| | | height: calc(100vh - 84rpx - 176rpx - 70rpx); |
| | | height:1200rpx; |
| | | background: #fff; |
| | | border-radius:20rpx; |
| | | margin: 0 auto; |