活动分享字段更新

This commit is contained in:
lyp 2025-08-26 16:02:26 +08:00
parent f91be39bc1
commit 89f84003c0
2 changed files with 10 additions and 3 deletions

View File

@ -7,8 +7,9 @@ VITE_AI_SHOP_BASE_URL=http://192.168.0.115:8081
VITE_WEBSOCKET_BASE_URL=ws://${VITE_HOST}:7025/copyright
# 18634604067
VITE_USERID=80d3365e-0597-4988-979e-18ef1c3ec671
# 15042810561
# VITE_USERID=e3e40f95-7a3f-4b53-a1a0-51dd4e881d74
# VITE_USERID=5cc90b84-905e-4027-9f6c-ab47e9c320a1
# VITE_USERID=4de9d560-474b-4971-a78b-6145492e8718
# VITE_CURRENT_THEME=fzkj
# VITE_CURRENT_THEME=mzw
# VITE_HOST=121.36.71.250:58038

View File

@ -116,6 +116,9 @@ export default function Index() {
const [activityCycle, setActivityCycle] = useState(0)
// 活动邀请码
const [activityCode, setActivityCode] = useState('')
// 活动邀请码后面内容
const [activityMessage, setActivityMessage] = useState('')
// 活动钱数
const [activityMoney, setActivityMoney] = useState(0)
// 是否选中近期不在提示
@ -148,6 +151,7 @@ export default function Index() {
setActivityCycle(res.cycle)
setActivityMoney(res.money)
setActivityCode(res.code)
setActivityMessage(res.message)
} catch (error: any) {
if (error.response) {
@ -4856,7 +4860,9 @@ export default function Index() {
// 优先使用 Clipboard API
if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText(
'https://www.aimzhu.com/Register.html?code=' + activityCode
'https://www.aimzhu.com/Register.html?code=' + activityCode + ' ' + activityMessage
).then(() => {
messageApi.success('链接已复制到剪贴板');
}).catch(() => {
@ -4865,7 +4871,7 @@ export default function Index() {
} else {
// 兼容旧浏览器
const input = document.createElement('input');
input.value = 'https://www.aimzhu.com/Register.html?code=' + activityCode;
input.value = 'https://www.aimzhu.com/Register.html?code=' + activityCode + ' ' + activityMessage;
document.body.appendChild(input);
input.select();
try {