From 7c25420c30a5f3c899d3cf89ba56a528818697e9 Mon Sep 17 00:00:00 2001 From: Agent Date: Sun, 29 Mar 2026 07:10:17 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AE=A2=E5=8D=95=E5=88=86=E4=BA=AB?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=EF=BC=8C=E5=85=AC=E5=BC=80=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages.json | 6 + src/pages/order/detail.vue | 23 +-- src/pages/share/order.vue | 310 +++++++++++++++++++++++++++++++++++++ 3 files changed, 324 insertions(+), 15 deletions(-) create mode 100644 src/pages/share/order.vue diff --git a/src/pages.json b/src/pages.json index 91f7d32..57f2eae 100644 --- a/src/pages.json +++ b/src/pages.json @@ -101,6 +101,12 @@ "style": { "navigationBarTitleText": "种类管理" } + }, + { + "path": "pages/share/order", + "style": { + "navigationBarTitleText": "订单详情" + } } ], "globalStyle": { diff --git a/src/pages/order/detail.vue b/src/pages/order/detail.vue index 1c72b74..1639d20 100644 --- a/src/pages/order/detail.vue +++ b/src/pages/order/detail.vue @@ -216,30 +216,23 @@ export default { uni.showToast({ title: '打印功能开发中', icon: 'none' }) }, 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` - }) + // 构建分享链接 + const baseUrl = getApp().globalData.h5BaseUrl || 'https://你的域名' + const shareUrl = `${baseUrl}/#/pages/share/order?orderNo=${this.order.orderNo}` - // 复制到剪贴板分享 + // 复制链接到剪贴板 uni.setClipboardData({ - data: content, + data: shareUrl, success: () => { uni.showModal({ - title: '订单已复制', - content: '订单信息已复制到剪贴板,可以粘贴分享给客户', + title: '分享链接已复制', + content: '订单分享链接已复制,可粘贴发送给客户', showCancel: false, confirmText: '知道了' }) } }) - } + }, } } diff --git a/src/pages/share/order.vue b/src/pages/share/order.vue new file mode 100644 index 0000000..f140d7d --- /dev/null +++ b/src/pages/share/order.vue @@ -0,0 +1,310 @@ + + + + + \ No newline at end of file