创作者微信小程序端
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.

175 lines
4.1 KiB

<template>
<view class="container">
<view class="back-top"></view>
<uni-group mode="card" class="card">
<view class="box">
<text class="title">订单号:</text>
<text>{{ withdrawDetailInfo.orderId || '' }}</text>
</view>
<view class="box">
<text class="title">收款账号:</text>
<text>{{withdrawDetailInfo.accountNo || ''}}</text>
</view>
<view class="box">
<text class="title">提现金额:</text>
<MoneyView :character="'¥'" :size="26" :value="withdrawDetailInfo.amt || 0" :color="'#0b6375'"/>
</view>
<view class="box">
<text class="title">渠道:</text>
<text>{{ setChannel(withdrawDetailInfo.channel) || ''}}</text>
</view>
<view class="box">
<text class="title">状态:</text>
<text>{{ setStatus(withdrawDetailInfo.status) || ''}}</text>
</view>
<view class="border"></view>
<view class="box">
<text class="title">提现时间:</text>
<text>{{withdrawDetailInfo.createTime || ''}}</text>
</view>
<view class="box">
<text class="title">审核理由:</text>
<text>{{withdrawDetailInfo.reason || ''}}</text>
</view>
<view class="box">
<text class="title">到账时间:</text>
<text>{{withdrawDetailInfo.achieveTime || "待确认"}}</text>
</view>
</uni-group>
</view>
</template>
<script>
import {
getWithdrawDetails
} from '@/api/userInfo.js'
import MoneyView from "@/components/money-view/money-view.vue"
export default {
components: {
MoneyView
},
data() {
return {
withdrawDetailInfo: {
orderId: '',
amt: 0,
channel: '',
status: '',
createTime: '',
reason: '',
achieveTime: '',
userInfo:{}
}
}
},
created() {
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//没有缓存则跳转登录页面
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
}
},
onLoad: function(option) { //option为object类型,会序列化上个页面传递的参数
console.log(option)
this.withdrawDetailInfo.orderId = option.orderId
this.getWithdrawDetails();
},
methods: {
// 查询提现记录明细
async getWithdrawDetails() {
let that = this;
const res = await getWithdrawDetails({
orderId: that.withdrawDetailInfo.orderId
})
console.log('res', res)
if (res.data.code === 200) {
that.withdrawDetailInfo = res.data.data
} else {
uni.showModal({
content: '提现记录详情数据加载失败!',
showCancel: false
});
}
},
setChannel(data){
if (data == "0") {
return "微信";
} else if (data == "1") {
return "银行卡";
} else if (data == "2") {
return "支付宝";
}
},
setStatus(data){
if (data == "0") {
return "待审核";
} else if (data == "1") {
return "提现中";
} else if (data == "2") {
return "提现成功";
} else if(data == "3"){
return "提现失败";
}else if(data == "4"){
return "审核拒绝";
}
},
}
}
</script>
<style lang="scss" scoped>
.container {
.back-top {
width: 100%;
position: absolute;
height: 240rpx;
background: $uni-primary;
}
.card {
width: 100%;
position: absolute;
}
::v-deep .uni-group--card {
margin: 40rpx !important;
background: $uni-bg-base-color !important;
padding-top: 40rpx;
border-radius: 20rpx !important;
}
.title {
color: $uni-white;
display: block;
width: 140rpx;
margin-right: 20rpx;
font-size: 26rpx;
font-weight: 600;
}
.box {
display: flex;
font-size: 24rpx;
margin-bottom: 40rpx;
color: $uni-secondary-color;
line-height: 26rpx;
}
.border {
width: 100%;
height: 2rpx;
background: $uni-secondary-color;
margin-bottom: 40rpx;
}
}
</style>