From 8ab60a1bcc4f6597c8b9148714e6605b259b4106 Mon Sep 17 00:00:00 2001 From: wangdong <1551135706@qq.com> Date: Sat, 25 May 2024 17:22:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E4=BA=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/shopList/shopPage.vue | 49 ++++++++++++++++++++++++++++++++++++ static/share.png | Bin 0 -> 507 bytes 2 files changed, 49 insertions(+) create mode 100644 static/share.png diff --git a/pages/shopList/shopPage.vue b/pages/shopList/shopPage.vue index 601ec63..7ccff4e 100644 --- a/pages/shopList/shopPage.vue +++ b/pages/shopList/shopPage.vue @@ -38,6 +38,10 @@ + @@ -262,6 +266,32 @@ goodsId }) }, + /** + * 分享当前页面 + */ + onShareAppMessage() { + const app = this + // 构建页面参数 + const params = app.$getShareUrlParams({ id: app.id }); + return { + title: app.shopDetail.shop_name, + path: "/pages/shopList/shopPage?" + params + } + }, + + /** + * 分享到朋友圈 + * 本接口为 Beta 版本,暂只在 Android 平台支持,详见分享到朋友圈 (Beta) + */ + onShareTimeline() { + const app = this + // 构建页面参数 + const params = app.$getShareUrlParams({ id: app.id }); + return { + title: app.shopDetail.shop_name, + path: "/pages/shopList/shopPage?" + params + } + } } }; @@ -329,6 +359,7 @@ } .shop-info { display: flex; + align-items: center; margin-top: 30rpx; padding: 0 24rpx; .logo { @@ -338,6 +369,7 @@ margin-right: 10rpx; } .info-box { + flex: 1; .name { font-size: 30rpx; color: #fff; @@ -375,6 +407,23 @@ } } } + .share-btn { + width: 130rpx; + height: 60rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 20rpx; + color: #fff; + background: #F34A40; + border-radius: 30rpx; + padding: 0; + >image { + width: 26rpx; + height: 22rpx; + margin-right: 12rpx; + } + } } .shop-goods { flex: 1; diff --git a/static/share.png b/static/share.png new file mode 100644 index 0000000000000000000000000000000000000000..2940bcdcc5cc059a653c26bde1ee0d8c2397650a GIT binary patch literal 507 zcmVPx$wMj%lR7gv;mcL7tVHC$dU#zqoB6JEQkjUAkH3WY_Hn`>DAT+iHLVtikvqR0{ zq?0Hvu8M<*Aq^pdLKv17HE2WM?t%B_z1REx@b!A&ot|^f=XuWgKF@i@CC#>gHQ*SS zko2=iiU_)t*=`4Z0XKn973hehgS;eVL2-%zhJ67>C4J0-wE`6RX$aeH#3%K1%LXxWvvUajcjZe~##+}QMJ7s^90xfp5zU&6j1({u)PC30Qx0`N;0hpsMz4M x9gp6$q<49cL=5Fdx$PH{-WP!+pi)04{{X;EssHVi1rz`P002ovPDHLkV1kp~