commission--yt-commit
This commit is contained in:
@ -8,10 +8,18 @@ Page({
|
||||
*/
|
||||
data: {
|
||||
pid: 0, // 项目id
|
||||
pname: '', // 项目名称
|
||||
picurl: '', // 项目图片
|
||||
projectSettlementList: [], // 项目结算列表
|
||||
projectDetailName: '', // 项目明细名称
|
||||
settlementQuantity: 0, // 结算数量
|
||||
settlementRevenue: 0, // 结算收益
|
||||
workTime: '', // 作业收益
|
||||
settlementTime: '', // 结算时间
|
||||
revenueSource: false, // 收益来源(true抽成,false为推广码)
|
||||
},
|
||||
|
||||
// 获取项目明细列表
|
||||
// 获取项目结算明细列表
|
||||
getProjectSettlementList() {
|
||||
const pid = this.data.pid
|
||||
wx.request({
|
||||
@ -26,7 +34,13 @@ Page({
|
||||
success: res =>{
|
||||
console.log('---->',res.data);
|
||||
if (res.data.code === 1) {
|
||||
|
||||
this.setData({
|
||||
projectSettlementList: res.data.data
|
||||
})
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: '服务错误',
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -36,32 +50,11 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
this.setData({ pid: options.id })
|
||||
this.setData({ pid: options.id });
|
||||
this.setData({ pname: options.name })
|
||||
this.setData({ picurl: options.picurl })
|
||||
console.log('项目id--->',options.id);
|
||||
this.getProjectSettlementList()
|
||||
// 模拟后端响应数据
|
||||
const response = {
|
||||
code: 0,
|
||||
data: [
|
||||
{
|
||||
id: 1,
|
||||
projectDetailName: "新用户完成首单",
|
||||
settlementQuantity: 2,
|
||||
settlementRevenue: 2.34,
|
||||
workTime: "2025-05-20", // 示例作业时间
|
||||
settlementTime: "2025-05-22", // 示例结算时间
|
||||
revenueSource: false
|
||||
}
|
||||
],
|
||||
message: ""
|
||||
};
|
||||
|
||||
if (response.code === 0) {
|
||||
// 将后端返回的数据赋值给 projectSettlementList
|
||||
this.setData({
|
||||
projectSettlementList: response.data
|
||||
});
|
||||
}
|
||||
this.getProjectSettlementList();
|
||||
},
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user