From 4cb75523ca70ed6721ab43e4b00430784772125b Mon Sep 17 00:00:00 2001 From: shuxiaoquan <853623962@qq.com> Date: Mon, 15 Apr 2024 10:58:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E5=88=86=E4=BA=AB?= =?UTF-8?q?=E5=8A=9F=E8=83=BD+=E9=A6=96=E9=A1=B5=E5=88=86=E4=BA=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/goods/detail.vue | 9 +++++++-- pages/index/index.vue | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/pages/goods/detail.vue b/pages/goods/detail.vue index 563c10a..ce3c4c5 100644 --- a/pages/goods/detail.vue +++ b/pages/goods/detail.vue @@ -395,7 +395,7 @@ - + @@ -1042,8 +1042,13 @@ toHaibao(index) { this.shareCancel(); if (index == 2) { + let str = `${this.goods.goods_name}\n + 前台价:¥${this.goods.goods_price_max}元\n + 推广价:¥${this.goods.goods_price_min}元\n + SKU:${this.goods.goods_no} + ` uni.setClipboardData({ - data: this.goods.goods_name, // 这里是个坑接受字符串类型 value转化为字符串 + data: str, // 这里是个坑接受字符串类型 value转化为字符串 success: function() { //调用方法成功 uni.showToast({ diff --git a/pages/index/index.vue b/pages/index/index.vue index ec0d808..2e6790f 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1077,6 +1077,25 @@ this.isTop = true } }, + /** + * 分享当前页面 + */ + onShareAppMessage() { + return { + + } + }, + + /** + * 分享到朋友圈 + * 本接口为 Beta 版本,暂只在 Android 平台支持,详见分享到朋友圈 (Beta) + * https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share-timeline.html + */ + onShareTimeline() { + return { + + } + } }