From 5fd9b217ef34c244007283ed0ec1a20f94a3d357 Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Mon, 25 Aug 2025 15:26:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E4=BA=AB=E9=A1=B5=E9=9D=A2=E5=88=86?= =?UTF-8?q?=E4=BA=AB=E9=93=BE=E6=8E=A5=E7=82=B9=E5=87=BB=E5=A4=8D=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/agents/requestAgent.vue | 46 ++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/pages/agents/requestAgent.vue b/pages/agents/requestAgent.vue index 2b3d9ca..206b744 100644 --- a/pages/agents/requestAgent.vue +++ b/pages/agents/requestAgent.vue @@ -12,17 +12,16 @@ - - - - - + + - - - - - + + + + + @@ -31,6 +30,11 @@ import commonEnum from '../../enum/commonEnum' import UvQrcode from '../../uni_modules/uv-qrcode/components/uv-qrcode/uv-qrcode.vue' import { getLocalUserId } from '../../api/user/user.js' +import { onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app' + +onShareAppMessage(e => { + return {} +}) export default { name: 'AgentsPage', @@ -55,6 +59,26 @@ export default { this.initQrcodeValue() }, methods: { + // 复制二维码链接 + copyQrcodeValue() { + uni.setClipboardData({ + data: this.qrcodeValue, + success: () => { + uni.showToast({ + title: '链接已复制', + icon: 'success', + }) + console.log('复制成功:', this.qrcodeValue) + }, + fail: err => { + console.error('复制失败:', err) + uni.showToast({ + title: '复制失败', + icon: 'none', + }) + }, + }) + }, // 初始化二维码内容 initQrcodeValue() { const userId = getLocalUserId() @@ -142,7 +166,7 @@ export default { .action-button { flex: 1; max-width: 280rpx; - height: 100rpx; + height: 80rpx; background: white; border: 2rpx solid #ff6b35; border-radius: 50rpx;