version/0412
wangdong 6 months ago
parent 0c68b305f3
commit 8ab60a1bcc
  1. 49
      pages/shopList/shopPage.vue
  2. BIN
      static/share.png

@ -38,6 +38,10 @@
</view>
</view>
</view>
<button open-type="share" class="share-btn">
<image src="@/static/share.png" mode="aspectFill"></image>
分享
</button>
</view>
<view v-if="firstCate" class="shop-goods">
<view v-if="goodsCate.filter(v => v.category_id === firstCate)[0].children.length > 0" class="second-cate">
@ -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
}
}
}
};
</script>
@ -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;

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Loading…
Cancel
Save