feat(commission): 支持计奖商品参与设置、独立分成与多规格规则,完善团队中心与微信快捷登录

这个提交包含在:
chen
2026-09-17 19:27:17 +08:00
父节点 3c7df9688b
当前提交 829e88cfa9
共有 54 个文件被更改,包括 3536 次插入 和 666 次删除

查看文件

@@ -22,6 +22,25 @@
<text class="referrer-name">{{ userInfo.parent_user.nickname }}</text>
</view>
<!-- 专属邀请码与拓展卡片 -->
<view class="invite-action-card ss-flex ss-row-between ss-col-center">
<view class="invite-code-wrap ss-flex ss-col-center">
<text class="invite-label">专属邀请码:</text>
<text class="invite-code">HL{{ userInfo.id || '---' }}</text>
<button class="ss-reset-button copy-code-btn ss-m-l-10" @tap="onCopyInviteCode">复制</button>
</view>
<view class="invite-btn-group ss-flex ss-col-center">
<button class="ss-reset-button invite-btn-poster ss-flex ss-col-center" @tap="onOpenShareModal">
<uni-icons type="image" size="14" color="#ffffff"></uni-icons>
<text class="ss-m-l-6">邀请海报</text>
</button>
<button class="ss-reset-button invite-btn-link ss-m-l-12 ss-flex ss-col-center" @tap="onCopyShareLink">
<uni-icons type="link" size="14" color="#ff6000"></uni-icons>
<text class="ss-m-l-6">复制链接</text>
</button>
</view>
</view>
<!-- 团队核心数据总览卡片 -->
<view class="team-data-box ss-flex ss-col-center ss-row-between">
<!-- 团队总人数卡片 -->
@@ -85,6 +104,20 @@
</view>
</view>
<!-- 团队收益与业绩统计大盘 -->
<view class="team-wealth-box ss-flex ss-col-center ss-row-between">
<view class="wealth-card ss-flex-1 ss-m-r-16">
<view class="wealth-title">团队贡献总收益(元)</view>
<view class="wealth-num text-orange">¥{{ state.summary.team_total_reward || '0.00' }}</view>
<view class="wealth-sub">本月贡献: ¥{{ state.summary.team_month_reward || '0.00' }}</view>
</view>
<view class="wealth-card ss-flex-1">
<view class="wealth-title">团队自购总业绩(元)</view>
<view class="wealth-num text-gold">¥{{ state.summary.team_total_consume || '0.00' }}</view>
<view class="wealth-sub">团队累计订单: {{ state.summary.team_order_count || 0 }} 笔</view>
</view>
</view>
<!-- 30天自购保活健康度胶囊条 -->
<view class="health-bar ss-flex ss-row-between ss-col-center">
<view class="health-title">保活健康度:</view>
@@ -206,6 +239,10 @@
{{ item.team_level === 1 ? '一级直推' : '二级间推' }}
</text>
</view>
<view class="member-sub-info ss-flex ss-col-center ss-m-t-4" v-if="item.mobile_hide || item.id">
<text class="member-phone" v-if="item.mobile_hide">{{ item.mobile_hide }}</text>
<text class="member-id-tag ss-m-l-8">ID: {{ item.id }}</text>
</view>
<view class="member-meta-row ss-flex ss-col-center ss-m-t-8">
<!-- 身份徽章 -->
<view v-if="memberLevelName(item)" class="tag-box ss-flex ss-col-center">
@@ -310,13 +347,20 @@
<text class="ss-m-l-6">拨打</text>
</button>
<button
v-if="item.mobile_raw"
v-if="item.mobile_raw || item.mobile_hide"
class="ss-reset-button action-btn btn-copy ss-m-l-12"
@tap.stop="onCopyText(item.mobile_raw, '手机号已复制')"
@tap.stop="onCopyText(item.mobile_raw || item.mobile_hide, '手机号已复制')"
>
<uni-icons type="paperclip" size="14" color="#666666"></uni-icons>
<text class="ss-m-l-6">复制手机</text>
</button>
<button
class="ss-reset-button action-btn btn-reward ss-m-l-12"
@tap.stop="onJumpRewards(item.id, item.nickname)"
>
<uni-icons type="wallet" size="14" color="#ff6000"></uni-icons>
<text class="ss-m-l-6">收益</text>
</button>
<button
class="ss-reset-button action-btn btn-detail ss-m-l-12"
@tap.stop="onOpenMemberDetail(item)"
@@ -387,6 +431,8 @@
<view class="drawer-sub ss-flex ss-col-center ss-m-t-8">
<text class="user-id">ID: {{ state.currentMember.id }}</text>
<text class="dot-split">·</text>
<text class="user-phone">手机: {{ state.currentMember.mobile_hide || '未绑定' }}</text>
<text class="dot-split">·</text>
<text class="join-time">{{ formatTime(state.currentMember.createtime) }} 加入</text>
</view>
</view>
@@ -496,16 +542,16 @@
<text class="ss-m-l-8">呼叫成员</text>
</button>
<button
v-if="state.currentMember.mobile_raw"
v-if="state.currentMember.mobile_raw || state.currentMember.mobile_hide"
class="ss-reset-button drawer-btn drawer-btn-sub ss-flex-1 ss-m-r-16"
@tap="onCopyText(state.currentMember.mobile_raw, '手机号已复制')"
@tap="onCopyText(state.currentMember.mobile_raw || state.currentMember.mobile_hide, '手机号已复制')"
>
<uni-icons type="paperclip" size="16" color="#ff6000"></uni-icons>
<text class="ss-m-l-8">复制电话</text>
</button>
<button
class="ss-reset-button drawer-btn drawer-btn-outline ss-flex-1"
@tap="onJumpRewards(state.currentMember.id)"
@tap="onJumpRewards(state.currentMember.id, state.currentMember.nickname)"
>
<uni-icons type="list" size="16" color="#666666"></uni-icons>
<text class="ss-m-l-8">查收益流水</text>
@@ -577,6 +623,10 @@
expiring_count: 0,
inactive_count: 0,
partner_count: 0,
team_total_consume: '0.00',
team_total_reward: '0.00',
team_month_reward: '0.00',
team_order_count: 0,
},
pagination: {
data: [],
@@ -728,9 +778,32 @@
state.showDetail = true;
}
function onJumpRewards(buyerId) {
function onJumpRewards(buyerId, buyerName = '') {
state.showDetail = false;
sheep.$router.go(`/pages/commission/rewards?buyer_id=${buyerId}`);
const nameParam = buyerName ? `&buyer_name=${encodeURIComponent(buyerName)}` : '';
sheep.$router.go(`/pages/commission/rewards?buyer_id=${buyerId}${nameParam}`);
}
function onCopyInviteCode() {
if (!userInfo.value?.id) {
sheep.$helper.toast('请先登录');
return;
}
const code = `HL${userInfo.value.id}`;
sheep.$helper.copyText(code, '专属邀请码已复制');
}
function onCopyShareLink() {
if (!userInfo.value?.id) {
sheep.$helper.toast('请先登录');
return;
}
const shareQuery = sheep.$platform.share.buildSpmQuery({
page: '1',
query: '0',
});
const shareUrl = sheep.$platform.share.buildSpmPath(shareQuery);
sheep.$helper.copyText(shareUrl, '专属推广链接已复制');
}
function onOpenShareModal() {
@@ -825,6 +898,59 @@
}
}
// 专属邀请码卡片
.invite-action-card {
background: rgba(255, 255, 255, 0.2);
backdrop-filter: blur(10px);
border-radius: 16rpx;
padding: 12rpx 20rpx;
margin-bottom: 20rpx;
.invite-code-wrap {
.invite-label {
font-size: 24rpx;
color: #ffffff;
font-weight: 500;
}
.invite-code {
font-size: 28rpx;
font-weight: bold;
color: #ffffff;
font-family: OPPOSANS;
letter-spacing: 1rpx;
}
.copy-code-btn {
font-size: 20rpx;
padding: 4rpx 14rpx;
border-radius: 16rpx;
background: #ffffff;
color: #ff6000;
font-weight: 500;
}
}
.invite-btn-group {
.invite-btn-poster {
height: 48rpx;
padding: 0 16rpx;
border-radius: 24rpx;
background: #ff6000;
color: #ffffff;
font-size: 22rpx;
font-weight: 500;
}
.invite-btn-link {
height: 48rpx;
padding: 0 16rpx;
border-radius: 24rpx;
background: #ffffff;
color: #ff6000;
font-size: 22rpx;
font-weight: 500;
}
}
}
// 团队信息总览
.team-data-box {
.data-card {
@@ -893,6 +1019,41 @@
color: #333333;
font-family: OPPOSANS;
}
// 团队收益与业绩看板
.team-wealth-box {
margin-top: 20rpx;
.wealth-card {
background: #ffffff;
border-radius: 20rpx;
padding: 18rpx 20rpx;
box-sizing: border-box;
.wealth-title {
font-size: 22rpx;
color: #999999;
line-height: 28rpx;
margin-bottom: 6rpx;
}
.wealth-num {
font-size: 32rpx;
font-weight: bold;
font-family: OPPOSANS;
line-height: 38rpx;
margin-bottom: 6rpx;
&.text-orange {
color: #ff6000;
}
&.text-gold {
color: #c48a3a;
}
}
.wealth-sub {
font-size: 20rpx;
color: #888888;
line-height: 24rpx;
}
}
}
@@ -1127,6 +1288,24 @@
}
}
.member-sub-info {
font-size: 20rpx;
color: #999999;
font-family: OPPOSANS;
.member-phone {
color: #666666;
font-size: 22rpx;
}
.member-id-tag {
background: #f3f4f6;
color: #9ca3af;
padding: 2rpx 8rpx;
border-radius: 6rpx;
font-size: 18rpx;
}
}
.member-meta-row {
gap: 8rpx;
}
@@ -1240,6 +1419,10 @@
background: #f3f4f6;
color: #4b5563;
}
&.btn-reward {
background: #fff7ed;
color: #ea580c;
}
&.btn-detail {
background: #ffffff;
color: #666666;