完成资金明细

This commit is contained in:
TOP糯米 2023-04-06 23:58:20 +08:00
parent 897b40f9f9
commit cced601628
3 changed files with 36 additions and 32 deletions

View File

@ -84,7 +84,7 @@ const apis = {
} }
}, },
cash: { cash: {
withdrawLog: { log: {
url: "/user/workerinfo/drawmoneylog", url: "/user/workerinfo/drawmoneylog",
showLoading: true, showLoading: true,
auth: true, auth: true,

View File

@ -326,10 +326,10 @@ export default {
}); });
} }
}, },
withdrawLog(data) { cashLog(data) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
prototype.$request({ prototype.$request({
api: "user.cash.withdrawLog", api: "user.cash.log",
data: data, data: data,
}).then(response => { }).then(response => {
if (response.code == 1) { if (response.code == 1) {
@ -337,8 +337,9 @@ export default {
response.data.forEach(item => { response.data.forEach(item => {
list.push({ list.push({
id: item.id, id: item.id,
money: item.money, change: item.change,
state: item.status, balance: item.balance,
remark: item.remark,
createTime: item.times, createTime: item.times,
}); });
}); });

View File

@ -6,11 +6,10 @@
{{ item.createTime }} {{ item.createTime }}
</view> </view>
<view class="body"> <view class="body">
<text class="money">{{ item.money }}</text> <text class="money" :class="{ active: item.change > 0 }">{{ item.change }}</text>
<text class="state" :class="{ active: item.state > 0 }"> <text class="balance">余额{{ item.balance }}</text>
{{ item.state > 0 ? "已审核" : "待审核" }}
</text>
</view> </view>
<view class="remark"> 备注{{ item.remark }} </view>
</view> </view>
</view> </view>
<app-load-more :hasMore="more" @loadmore="loadList" /> <app-load-more :hasMore="more" @loadmore="loadList" />
@ -50,7 +49,7 @@ export default {
methods: { methods: {
loadList() { loadList() {
this.$models.user this.$models.user
.withdrawLog({ .cashLog({
page: this.page, page: this.page,
}) })
.then((list) => { .then((list) => {
@ -76,28 +75,32 @@ export default {
box-sizing: border-box; box-sizing: border-box;
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
.date { font-size: 28rpx;
color: #999999; }
font-size: 28rpx; .date {
line-height: 28rpx; color: #999999;
} font-size: 28rpx;
.body { line-height: 28rpx;
font-size: 28rpx; }
margin-top: 20rpx; .body {
display: flex; margin: 20rpx 0;
align-items: center; display: flex;
justify-content: space-between; align-items: center;
} justify-content: space-between;
.money { }
font-weight: bold; .money {
color: #666666; color: #08b500;
} }
.state { .money.active {
color: #a1a1a1; color: #ff0000;
} }
.state.avtive { .balance {
color: #8b9aeb; color: #333333;
} }
.remark {
color: #666666;
padding-top: 10rpx;
border-top: 2rpx solid #e0e0e0;
} }
} }
</style> </style>