连接了我的项目,我的抽成
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
import { baseUrl } from "../../../request";
|
||||
|
||||
// pages/personCenter/commissionSetting/commissionSetting.js
|
||||
Page({
|
||||
|
||||
@ -7,44 +9,28 @@ Page({
|
||||
data: {
|
||||
items_1: [null, null, null],
|
||||
items: [null, null],
|
||||
showPopup: false, // 控制弹窗显隐
|
||||
showCommissionRatePop: false,
|
||||
},
|
||||
// 显示弹窗
|
||||
showPopup() {
|
||||
this.setData({
|
||||
showPopup: true
|
||||
});
|
||||
},
|
||||
// 关闭弹窗
|
||||
closePopup() {
|
||||
this.setData({
|
||||
showPopup: false
|
||||
});
|
||||
},
|
||||
// 处理抽佣比例提交
|
||||
handleCommissionSubmit(e) {
|
||||
const { commissionRate } = e.detail;
|
||||
console.log(`设置的抽佣比例是:${commissionRate}%`);
|
||||
// 你可以在这里保存提交的数据,或者执行其他操作
|
||||
this.closePopup(); // 确认后关闭弹窗
|
||||
},
|
||||
// 点击“设价”按钮,显示弹窗
|
||||
showCommissionRatePop() {
|
||||
this.setData({ showCommissionRatePop: true });
|
||||
projectList: []
|
||||
},
|
||||
|
||||
// 关闭弹窗(包括遮罩点击和取消按钮)
|
||||
closeCommissionRatePop() {
|
||||
this.setData({ showCommissionRatePop: false });
|
||||
// 获取项目列表
|
||||
getProjectList() {
|
||||
wx.request({
|
||||
url: baseUrl + '/projectCommission/query/commission ',
|
||||
method: 'POST',
|
||||
header: {
|
||||
Authorization: wx.getStorageSync('token')
|
||||
},
|
||||
success: res => {
|
||||
console.log('项目列表-->',res.data);
|
||||
if (res.data.code === 1) {
|
||||
this.setData({
|
||||
projectList: res.data.data
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 确认按钮回调
|
||||
handleCommissionRateConfirm(e) {
|
||||
const { agentPrice, commissionRate, pricingMethod } = e.detail;
|
||||
console.log('设置数据:', agentPrice, commissionRate, pricingMethod);
|
||||
this.closeCommissionRatePop();
|
||||
},
|
||||
gotoSubCommission() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/personCenter/subCommissionSetting/subCommissionSetting',
|
||||
@ -54,7 +40,7 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
this.getProjectList()
|
||||
},
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user