完成小程序端接单模块的前端部分
This commit is contained in:
@ -1,5 +1,3 @@
|
||||
import { baseUrl } from "../../../request";
|
||||
|
||||
// pages/personCenter/commissionSetting/commissionSetting.js
|
||||
Page({
|
||||
|
||||
@ -9,28 +7,44 @@ Page({
|
||||
data: {
|
||||
items_1: [null, null, null],
|
||||
items: [null, null],
|
||||
projectList: []
|
||||
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 });
|
||||
},
|
||||
|
||||
// 获取项目列表
|
||||
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
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
// 关闭弹窗(包括遮罩点击和取消按钮)
|
||||
closeCommissionRatePop() {
|
||||
this.setData({ showCommissionRatePop: false });
|
||||
},
|
||||
|
||||
// 确认按钮回调
|
||||
handleCommissionRateConfirm(e) {
|
||||
const { agentPrice, commissionRate, pricingMethod } = e.detail;
|
||||
console.log('设置数据:', agentPrice, commissionRate, pricingMethod);
|
||||
this.closeCommissionRatePop();
|
||||
},
|
||||
gotoSubCommission() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/personCenter/subCommissionSetting/subCommissionSetting',
|
||||
@ -40,7 +54,7 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
this.getProjectList()
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -1,3 +1,6 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
"usingComponents": {
|
||||
"commissionPop": "/pages/personCenter/component/commissionPop/commissionPop",
|
||||
"commissionRatePop": "/pages/personCenter/component/commissionRatePop/commissionRatePop"
|
||||
}
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
<view class="flex-row items-center">
|
||||
<image
|
||||
class="shrink-0 image"
|
||||
src="https://ide.code.fun/api/image?token=68368d354ae84d001230f4d1&name=45456da4cda2cfc790fd25988b784619.png"
|
||||
src="./images/tz.png"
|
||||
/>
|
||||
<view class="group ml-5">
|
||||
<text class="font text">一键设置下级抽成比例:</text>
|
||||
@ -12,28 +12,28 @@
|
||||
</view>
|
||||
<image
|
||||
class="image_2"
|
||||
src="./images/rightBlack.png"
|
||||
src="./images/yjt1.png"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex-col mt-19">
|
||||
<view class="flex-col list-item mt-20" wx:for="{{projectList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
|
||||
<view class="flex-col list-item mt-20" wx:for="{{items}}" wx:for-item="item" wx:for-index="index" wx:key="index">
|
||||
<view class="flex-row group_2">
|
||||
<view class="flex-row flex-1 self-center">
|
||||
<image
|
||||
class="shrink-0 image_3"
|
||||
src="{{ item.projectImage }}"
|
||||
src="./images/xmtp.png"
|
||||
/>
|
||||
<view class="flex-col items-start flex-1 group_3 ml-13">
|
||||
<text class="font">{{ item.projectName }}</text>
|
||||
<text class="font">美团神券包-春季活动</text>
|
||||
<view class="flex-col justify-start items-center text-wrapper mt-14">
|
||||
<text class="font_3 text_4">结算T+{{ item.projectSettlementCycle }}</text>
|
||||
<text class="font_3 text_4">结算T+2</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-row shrink-0 self-start section_2 ml-21" bind:tap="gotoSubCommission">
|
||||
<image
|
||||
class="image_4 image_5"
|
||||
src="./images/right.png"
|
||||
src="./images/yjt2.png"
|
||||
/>
|
||||
<text class="font_2 text_3">下级单价</text>
|
||||
</view>
|
||||
@ -47,17 +47,17 @@
|
||||
<view class="flex-col mt-16">
|
||||
<view
|
||||
class="flex-row justify-center items-center relative list-item_2 mt-14"
|
||||
wx:for="{{item.projectDetailCommissionVOList}}"
|
||||
wx:for-item="commission"
|
||||
wx:for="{{items_1}}"
|
||||
wx:for-item="item"
|
||||
wx:for-index="index"
|
||||
wx:key="index"
|
||||
>
|
||||
<text class="font_6 text_6 pos">{{ commission.projectDetailName }}</text>
|
||||
<text class="font_7 text_9">{{ commission.myUnitPrice }}/{{ commission.agentUnitPrice }}/{{ commission.currentCommissionRate }}%</text>
|
||||
<text class="font_6 text_6 pos">3.6元购买</text>
|
||||
<text class="font_7 text_9">0.30/0.30/0.00%</text>
|
||||
<view class="flex-row group_5 pos_2" bindtap="showCommissionRatePop">
|
||||
<image
|
||||
class="image_4 image_6"
|
||||
src="https://ide.code.fun/api/image?token=68368d354ae84d001230f4d1&name=2994ec01c6859d93ce653a6cb3d50301.png"
|
||||
src="./images/yjt3.png"
|
||||
/>
|
||||
<text class="font_8 text_8">设价</text>
|
||||
</view>
|
||||
|
BIN
pages/personCenter/commissionSetting/images/tz.png
Normal file
BIN
pages/personCenter/commissionSetting/images/tz.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 804 B |
BIN
pages/personCenter/commissionSetting/images/xmtp.png
Normal file
BIN
pages/personCenter/commissionSetting/images/xmtp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
BIN
pages/personCenter/commissionSetting/images/yjt1.png
Normal file
BIN
pages/personCenter/commissionSetting/images/yjt1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 603 B |
BIN
pages/personCenter/commissionSetting/images/yjt2.png
Normal file
BIN
pages/personCenter/commissionSetting/images/yjt2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 182 B |
BIN
pages/personCenter/commissionSetting/images/yjt3.png
Normal file
BIN
pages/personCenter/commissionSetting/images/yjt3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 290 B |
Reference in New Issue
Block a user