酒店桌布为微信小程序
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.
 
 
 

132 lines
2.8 KiB

<template>
<view class="running-water">
<navbar :title="title[status]" leftClick @leftClick="leftClick" />
<view class="tab-box">
<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" />
</view>
</view>
</view>
</template>
<script>
import mixinsList from '@/mixins/list.js'
export default {
mixins: [mixinsList],
data() {
return {
title: ['余额记录', '提现记录', '佣金记录'],
mixinsListApi: 'withdrawalLog',
x: ['+', '-', '+', '+'],
status: 0,
}
},
onLoad(e) {
this.status = e.status
this.queryParams.type = e.status
},
onShow() {
// 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
// }
// })
// },
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()
},
});
},
}
}
</script>
<style lang="scss" scoped>
.running-water {
width: 750rpx;
background: #F5F5F5;
margin: 0 auto;
min-height: 100vh;
.tab-box {
margin: 20rpx;
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>