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

211 lines
5.0 KiB

<template>
4 years ago
<view>
<view class="back-top"></view>
<uni-group mode="card" class="card">
<view class="box">
<text class="title">结算单号:</text>
<text>{{ orderDetail.orderNo }}</text>
</view>
<view class="box">
<text class="title">结算平台:</text>
4 years ago
<text>{{ setPlatform(orderDetail.platform) }}</text>
4 years ago
</view>
<view class="box">
<text class="title">应用:</text>
4 years ago
<text>{{ setAppType(orderDetail.appType) }}</text>
4 years ago
</view>
<view class="box">
<text class="title">收益类型:</text>
4 years ago
<text>{{ setType(orderDetail.type) }}</text>
4 years ago
</view>
<view class="box">
<text class="title">结算时间:</text>
<text>{{ orderDetail.createTime }}</text>
</view>
<view class="box">
<text class="title">结算收入:</text>
<text style="color: red">¥{{ orderDetail.profit }}</text>
</view>
<view class="box">
<text class="title">下载次数:</text>
<text>{{ orderDetail.downloadNum }}</text>
</view>
<view class="border"></view>
<view class="box">
<text class="title">确认类型:</text>
4 years ago
<text>{{ setConfirmType(orderDetail.confirmType) }}</text>
4 years ago
</view>
<view class="box">
<text class="title">确认时间:</text>
4 years ago
<text>{{ orderDetail.confirmTime || "待确认" }}</text>
4 years ago
</view>
<view class="box">
<text class="title">确认状态:</text>
4 years ago
<text>{{ orderDetail.confirmStatus == 0 ? "待确认" : "已确认" }}</text>
4 years ago
</view>
</uni-group>
</view>
</template>
<script>
4 years ago
import {
queryFrontInAmtDetails,
handleUpdateConfirmType,
} from "@/api/profit.js";
export default {
data() {
return {
orderDetail: {
id: 0,
orderNo: "",
platform: "",
appType: "",
type: "",
createTime: "",
profit: "",
downloadNum: 0,
confirmType: "",
confirmTime: "",
confirmStatus: "",
userInfo:{}
4 years ago
},
};
},
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')
}
},
4 years ago
onLoad: function (option) {
//option为object类型,会序列化上个页面传递的参数
this.orderDetail.id = option.id;
//console.log('this.id',this.id)
this.queryFrontInAmtDetails();
},
methods: {
// 查询指定艺术家已入账收益详情
async queryFrontInAmtDetails() {
let that = this;
const res = await queryFrontInAmtDetails(that.orderDetail.id);
4 years ago
//console.log('res', res)
if (res.data.code === 200) {
that.orderDetail = res.data.data;
4 years ago
} else {
uni.showModal({
content: "已入账收益详情数据加载失败!",
showCancel: false,
});
}
},
4 years ago
// 艺术家手动确认收益
handleUpdateConfirmType() {
let that = this;
4 years ago
const param = {
creatorId: that.orderDetail.creatorId,
id: that.orderDetail.id,
4 years ago
};
handleUpdateConfirmType(param).then((res) => {
console.log("res", res);
if (res.data.code === 200) {
uni.showToast({
title: "确认成功!",
duration: 1500,
icon: "success",
});
} else {
uni.showModal({
content: "确认失败!",
showCancel: false,
});
}
});
},
4 years ago
setConfirmType(data) {
if (data == "0") {
return "系统自动";
} else if (data == "1") {
return "艺术家手动";
} else {
return "待确认";
}
},
4 years ago
setPlatform(data) {
if (data == "0") {
return "抖音";
} else if (data == "1") {
return "快手";
} else if (data == "2") {
return "微信";
} else if (data == "3") {
return "uniapp";
}
},
setAppType(data) {
if (data == "0") {
return "节点壁纸";
4 years ago
}
},
setType(data) {
if (data == "0") {
return "广告浏览";
} else if (data == "1") {
return "邀请";
} else if (data == "2") {
return "会员";
}
},
4 years ago
},
};
</script>
<style>
4 years ago
.back-top {
width: 100%;
position: absolute;
height: 120px;
background: #416bdc;
}
.card {
width: 100%;
position: absolute;
}
.uni-group--card {
margin-top: 20px !important;
}
.title {
display: block;
width: 70px;
margin-right: 10px;
font-weight: bold;
}
.box {
display: flex;
margin-bottom: 20px;
}
.card view:first-child {
margin-top: 10px;
}
.border {
width: 100%;
height: 1px;
background: rgb(229, 229, 229);
margin-bottom: 20px;
}
4 years ago
</style>