|
|
@ -3,9 +3,32 @@ |
|
|
|
<navbar :title="title[status]" leftClick @leftClick="leftClick" /> |
|
|
|
|
|
|
|
<view class="tab-box"> |
|
|
|
<view class="tab-box1" v-if="agentFlow && agentFlow.total"> |
|
|
|
<uv-cell center border :title="item.title" v-for="(item, index) in agentFlow.records" |
|
|
|
:value="x[item.type] + item.balance" :label="item.createTime" /> |
|
|
|
<view class="tab-box1" |
|
|
|
v-if="total"> |
|
|
|
<uv-cell center border |
|
|
|
:key="item.id" |
|
|
|
:title="item.title" v-for="(item, index) in list" |
|
|
|
:label="item.createTime"> |
|
|
|
|
|
|
|
<template #value> |
|
|
|
<view class="info"> |
|
|
|
<view class="price"> |
|
|
|
{{ x[item.type] + item.balance }} |
|
|
|
</view> |
|
|
|
<view class="uni-color-btn" |
|
|
|
@click="requestMerchantTransfer(item)" |
|
|
|
v-if="status == 1 && item.status == 4" |
|
|
|
> |
|
|
|
领取 |
|
|
|
</view> |
|
|
|
<view class="status" |
|
|
|
v-else> |
|
|
|
{{ item.status_dictText }} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
</uv-cell> |
|
|
|
</view> |
|
|
|
<view style="padding: 100rpx 0;" v-else> |
|
|
|
<uv-empty mode="history" textSize="28rpx" iconSize="100rpx" /> |
|
|
@ -16,56 +39,60 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import mixinsList from '@/mixins/list.js' |
|
|
|
export default { |
|
|
|
mixins: [mixinsList], |
|
|
|
data() { |
|
|
|
return { |
|
|
|
title: ['余额记录', '提现记录', '佣金记录'], |
|
|
|
agentFlow: { |
|
|
|
total: 0, |
|
|
|
records: [ |
|
|
|
// { |
|
|
|
// type: 0, |
|
|
|
// money: 100, |
|
|
|
// createTime: '2024-04-02 20:00', |
|
|
|
// title: "佣金提现", |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// type: 0, |
|
|
|
// money: 100, |
|
|
|
// createTime: '2024-04-02 20:00', |
|
|
|
// title: "佣金提现", |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// type: 0, |
|
|
|
// money: 100, |
|
|
|
// createTime: '2024-04-02 20:00', |
|
|
|
// title: "佣金提现", |
|
|
|
// }, |
|
|
|
] |
|
|
|
}, |
|
|
|
mixinsListApi: 'withdrawalLog', |
|
|
|
x: ['+', '-', '+', '+'], |
|
|
|
status: 0, |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(e) { |
|
|
|
this.status = e.status |
|
|
|
this.queryParams.type = e.status |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
this.getAgentFlow() |
|
|
|
// this.getAgentFlow() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
leftClick() { //返回钱包 |
|
|
|
uni.navigateBack(-1) |
|
|
|
}, |
|
|
|
getAgentFlow() { //获取流水记录(余额记录 提现记录 佣金记录) |
|
|
|
let type = this.status; |
|
|
|
this.$api('withdrawalLog', { |
|
|
|
type |
|
|
|
}, res => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.agentFlow = res.result |
|
|
|
} |
|
|
|
}) |
|
|
|
// getAgentFlow() { //获取流水记录(余额记录 提现记录 佣金记录) |
|
|
|
// let type = this.status; |
|
|
|
// this.$api('withdrawalLog', { |
|
|
|
// type |
|
|
|
// }, res => { |
|
|
|
// if (res.code == 200) { |
|
|
|
// this.agentFlow = res.result |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// }, |
|
|
|
requestMerchantTransfer(item) { |
|
|
|
if (!wx.canIUse('requestMerchantTransfer')) { |
|
|
|
wx.showModal({ |
|
|
|
content: '你的微信版本过低,请更新至最新版本。', |
|
|
|
showCancel: false, |
|
|
|
}); |
|
|
|
return |
|
|
|
} |
|
|
|
wx.requestMerchantTransfer({ |
|
|
|
mchId: '1684424511', |
|
|
|
appId: wx.getAccountInfoSync().miniProgram.appId, |
|
|
|
package: item.packageInfo, |
|
|
|
success: (res) => { |
|
|
|
// res.err_msg将在页面展示成功后返回应用时返回ok,并不代表付款成功 |
|
|
|
console.log('success:', res); |
|
|
|
this.getData() |
|
|
|
}, |
|
|
|
fail: (res) => { |
|
|
|
console.log('fail:', res); |
|
|
|
this.getData() |
|
|
|
}, |
|
|
|
}); |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
@ -83,6 +110,23 @@ |
|
|
|
background-color: #fff; |
|
|
|
border-radius: 20rpx; |
|
|
|
overflow: hidden; |
|
|
|
.info{ |
|
|
|
text-align: right; |
|
|
|
.price{ |
|
|
|
font-size:28rpx; |
|
|
|
color: #555; |
|
|
|
} |
|
|
|
.status{ |
|
|
|
font-size: 22rpx; |
|
|
|
color: #888; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.uni-color-btn{ |
|
|
|
font-size: 24rpx; |
|
|
|
padding: 10rpx 20rpx; |
|
|
|
border-radius: 10rpx; |
|
|
|
margin: 10rpx 0 0 0; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |