From eb2b16f84f34b2d59d78fd692ead8670499bebc2 Mon Sep 17 00:00:00 2001 From: Agent Date: Sun, 29 Mar 2026 07:05:24 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=9D=9E=E5=8F=96=E6=B6=88=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E5=A2=9E=E5=8A=A0=E5=88=86=E4=BA=AB=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=8C=E5=A4=8D=E5=88=B6=E8=AE=A2=E5=8D=95=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=88=B0=E5=89=AA=E8=B4=B4=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/order/detail.vue | 40 +++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/src/pages/order/detail.vue b/src/pages/order/detail.vue index 220e53e..1c72b74 100644 --- a/src/pages/order/detail.vue +++ b/src/pages/order/detail.vue @@ -94,6 +94,9 @@ + @@ -211,7 +214,31 @@ export default { }, printOrder() { uni.showToast({ title: '打印功能开发中', icon: 'none' }) - // TODO: 实现打印功能 + }, + shareOrder() { + // 构建分享内容 + let content = `【订单信息】\n` + content += `订单号: ${this.order.orderNo}\n` + content += `客户: ${this.order.customerName || '散客'}\n` + content += `实付金额: ¥${this.order.actualAmount}\n` + content += `支付方式: ${this.getPaymentMethod(this.order.paymentMethod)}\n` + content += `\n【商品明细】\n` + this.orderItems.forEach(item => { + content += `${item.productName} x${item.quantity} ¥${item.price}\n` + }) + + // 复制到剪贴板分享 + uni.setClipboardData({ + data: content, + success: () => { + uni.showModal({ + title: '订单已复制', + content: '订单信息已复制到剪贴板,可以粘贴分享给客户', + showCancel: false, + confirmText: '知道了' + }) + } + }) } } } @@ -377,6 +404,17 @@ export default { font-size: 28rpx; } +.share-btn { + flex: 1; + height: 88rpx; + line-height: 88rpx; + background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%); + color: #fff; + border: none; + border-radius: 44rpx; + font-size: 28rpx; +} + .action-btn { flex: 1; height: 88rpx;