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> </view>
</view> </view>
<button open-type="share" class="share-btn">
<image src="@/static/share.png" mode="aspectFill"></image>
分享
</button>
</view> </view>
<view v-if="firstCate" class="shop-goods"> <view v-if="firstCate" class="shop-goods">
<view v-if="goodsCate.filter(v => v.category_id === firstCate)[0].children.length > 0" class="second-cate"> <view v-if="goodsCate.filter(v => v.category_id === firstCate)[0].children.length > 0" class="second-cate">
@ -262,6 +266,32 @@
goodsId 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> </script>
@ -329,6 +359,7 @@
} }
.shop-info { .shop-info {
display: flex; display: flex;
align-items: center;
margin-top: 30rpx; margin-top: 30rpx;
padding: 0 24rpx; padding: 0 24rpx;
.logo { .logo {
@ -338,6 +369,7 @@
margin-right: 10rpx; margin-right: 10rpx;
} }
.info-box { .info-box {
flex: 1;
.name { .name {
font-size: 30rpx; font-size: 30rpx;
color: #fff; 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 { .shop-goods {
flex: 1; flex: 1;

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Loading…
Cancel
Save