Authored by shuaiguo

feat(我的收入): 新增确认打款

... ... @@ -25,13 +25,30 @@
</template>
<script>
import {createNamespacedHelpers} from 'vuex';
const {mapActions, mapState} = createNamespacedHelpers('home/mine');
export default {
props: {
item: Object
},
data() {
return {
};
},
computed: {
},
methods: {
onConfirmApply() {
console.log('---------------------');
...mapActions(['applyCash']),
async onConfirmApply() {
const res = await this.applyCash(this.item.id);
this.$createToast({
txt: res.message,
type: 'txt',
}).show();
},
}
};
... ...
... ... @@ -413,6 +413,18 @@ export default function() {
return result;
},
async applyCash(_, id) {
const result = await this.$api.get('/api/ufo/mine/applyCash', {
tradeBillsId: id
});
const isOk = result.code === 200;
return {
isOk,
message: isOk ? '确认成功' : result.message || '确认失败'
};
},
async fetchWallet(
{ commit, state },
{ isRefresh, tradeType = 0, startTime = 0, endTime = 0 },
... ...
... ... @@ -26,6 +26,7 @@ export function parseAssetList(json) {
}
}
return {
id: item.id,
title: item.tradeTypeDesc + '(订单号:' + item.orderCode + ')',
price: price,
tradeCodeInfo: item.orderCode ? `订单号:${item.orderCode}` : '',
... ...
... ... @@ -31,6 +31,14 @@ module.exports = {
page: { type: Number },
},
},
'/api/ufo/mine/applyCash': {
ufo: true,
auth: true,
api: 'ufo.tradeBills.applyCash',
params: {
tradeBillsId: {type: Number}
},
},
'/api/ufo/mine/wallet': {
ufo: true,
auth: true,
... ...