Fix:2630 【商城小程序】地标好物增加分享按钮,点击后弹出分享图片

This commit is contained in:
modendeveloper
2024-11-24 16:10:14 +08:00
parent a8bdcd5495
commit 862e624913
3 changed files with 176 additions and 2 deletions
+23 -2
View File
@@ -28,6 +28,7 @@
class="img-map"
/>
</view>
<view class="share-btn" @click="toShare"><u-icon name="share-square" color="#C52733"></u-icon>分享给好友</view>
</view>
</view>
</view>
@@ -71,6 +72,7 @@
v-else
:show-avatar="false"
/>
<shareImg ref="shareImg"></shareImg>
</view>
</template>
@@ -85,13 +87,15 @@ import { pageListenMixins } from '@/mixins/pageListenMixins'
import projects from './components/projects.vue'
import culture from "./components/culture.vue"
import information from "./components/information.vue"
import shareImg from "./components/shareImg.vue"
export default {
name: 'LandMarkPage',
components: {
goods,
projects,
culture,
information
information,
shareImg
},
mixins: [pageListenMixins],
data() {
@@ -112,7 +116,8 @@ export default {
mapData: null,
goods: [],
isCompleteLoadGood: false,
pageKeyId: Object.freeze('landmarkGoodsIndex')
pageKeyId: Object.freeze('landmarkGoodsIndex'),
posterImageStatus: false
}
},
computed: {
@@ -134,6 +139,9 @@ export default {
this.fetchGoods()
},
methods: {
toShare() {
this.$refs.shareImg.savePosterPath(this.landmarkDataId)
},
handleTab(value) {
this.actived = value
},
@@ -181,6 +189,19 @@ export default {
</script>
<style scoped lang="less">
.share-btn{
color: #C52733;
background: rgba(211,92,101,0.5);
font-size: 24rpx;
width: fit-content;
padding: 5rpx 10rpx;
border-radius: 20rpx 0 0 20rpx;
position: absolute;
right: 0;
top: 80%;
display: flex;
align-items: center;
}
.tabs-wrap{
display: flex;
justify-content: space-around;