<button class="mui-btn" @tap="sharebox=true">分享给朋友</button>
<div class="mui-fullscreen sharebox" v-if="sharebox" @tap="sharebox=false" style="background-image: url(img/ZC/share1.png);z-index: 33;"></div>
.sharebox{background-size:cover}
.fullscreen{position:fixed;}这样可以保证下拉上拉这个外面的遮罩层都可以覆盖,位置是不变的
js写:
data里面写sharebox:false
引入 import wxapi from '../common/wxapi'
然后在整个页面访问的接口里面写 wxapi.showMenuItems(db.project_name, list.length > 0 && list[0].posters, this.$route.params.id, localStorage.getItem('uid'), 5);这里面的内容就是你分享出去他显示的内容,最后一个
是名片的这个uid固定的。