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 0000000..2940bcd Binary files /dev/null and b/static/share.png differ