平板端快衣店
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

127 lines
2.9 KiB

<template>
<view>
<uni-card>
<view class="content-wrapper">
<view style="display: flex;">
<view class="content-balance">
<text class="balance-text">返佣余额(元)</text>
<view class="balance-number">
<text style="font-size: 48px;">{{balance}}</text>
</view>
</view>
<view class="content-balance">
<text class="balance-text">累计返佣(元)</text>
<view class="balance-number">
<text style="font-size: 48px;">50</text>
</view>
</view>
</view>
<view class="content-actions">
<u-button shape="circle" @click="goToDetail">提现记录</u-button>
<u-button type="primary" shape="circle" @click="goToWithdrawal">提现</u-button>
</view>
</view>
</uni-card>
<uni-card title="返佣记录">
<ul class="inventoryList">
<!-- <li v-for="(item ,index) in notYetCommissionList" :key="index"> -->
<li>
<uni-card :title="'返佣类型:邀请返佣'" :sub-title="'返佣日期:2023-10-15'" :extra="'返佣金额:50'" @tap="">
<view class="uni-body">返佣主体:平台</view>
<view class="uni-body">
<text class="cardText">对应订单:4165481316546</text>
</view>
<view class="uni-body">返佣后余额:200元</view>
</uni-card>
</li>
</ul>
</uni-card>
</view>
</template>
<script>
export default {
data() {
return {
notYetCommissionList: [],
commissionList: []
};
},
onLoad() {
this.getList()
this.getCommissionList()
},
computed: {
balance() {
let result = 0
this.commissionList.forEach(value => {
result += value.commission
})
return result
}
},
methods: {
onCardClick(e) {
},
getList() {
this.tui.request('/app/returnCommission/listWithReturned', 'get', {
shopId: '001'
}, false, false, true).then((res) => {
if (res.code !== 200) return
this.notYetCommissionList = res.result
})
},
getCommissionList() {
this.tui.request('/app/returnCommission/listWithNoReturn', 'get', {
shopId: '002'
}, false, false, true).then((res) => {
if (res.code !== 200) return
this.commissionList = res.result
})
},
goToDetail() {
uni.navigateTo({
url: `/pages/rebate/detail`
})
},
goToWithdrawal() {
uni.navigateTo({
url: `/pages/rebate/withdrawal?balance=${this.balance}`
})
}
}
}
</script>
<style lang="scss">
.content-balance {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
margin: 36upx;
flex: 1;
.balance-text {
font-size: 32upx;
margin-bottom: 86upx;
}
}
.content-actions {
display: flex;
padding-top: 50upx;
padding-bottom: 35upx;
.u-button {
flex-basis: 40%;
}
}
.inventoryList{
.uni-card{
margin: 0 !important;
padding: 0 !important;
}
}
</style>