fix(modal): restrict confirmText length to 4 chars and safeguard banner null access
这个提交包含在:
@@ -756,12 +756,28 @@ const showInvitePoster = () => {
|
||||
const firstRate = finRules.firstReferralPercent != null ? finRules.firstReferralPercent : 5.0;
|
||||
const secondRate = finRules.secondReferralPercent != null ? finRules.secondReferralPercent : 2.0;
|
||||
const totalRate = (Number(firstRate) + Number(secondRate)).toFixed(1);
|
||||
const inviteCode = `PW${user.value.id || 1001}`;
|
||||
|
||||
uni.showModal({
|
||||
title: '二级分销推广',
|
||||
content: `您的专属邀请码为:PW${user.value.id}\n已成功邀请 ${user.value.invitedCount} 位好友!\n好友下单享受直推 ${firstRate}% + 间推 ${secondRate}%,全网自动分润最高达 ${totalRate}%!`,
|
||||
showCancel: false,
|
||||
confirmText: '保存推广码'
|
||||
content: `您的专属邀请码为:${inviteCode}\n已成功邀请 ${user.value.invitedCount || 0} 位好友!\n好友下单享受直推 ${firstRate}% + 间推 ${secondRate}%,全网自动分润最高达 ${totalRate}%!`,
|
||||
showCancel: true,
|
||||
cancelText: '我知道了',
|
||||
confirmText: '一键复制',
|
||||
confirmColor: '#6366F1',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.setClipboardData({
|
||||
data: inviteCode,
|
||||
success: () => {
|
||||
uni.showToast({
|
||||
title: '邀请码已复制',
|
||||
icon: 'success'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户