一、设置分享功能之前的样子

二、在代码中开启分享转发按钮
<script>
	export default {
		data() {
			return {
			}
		},
		methods: {
		},
		onLoad() {
			wx.showShareMenu({
				withShareTicket: true,
				menus: ['shareAppMessage', 'shareTimeline']
			});
		},
		onShareAppMessage(res) { //发送给朋友
			return {
				title: '我是【发送给朋友】的标题',
				imageUrl: 'https://img2.baidu.com/it/u=803085012,1104738458&fm=253&fmt=auto&app=120&f=JPEG?w=1280&h=800',
			}
		},
		onShareTimeline(res) { //分享到朋友圈
			return {
				title: '我是【分享到朋友圈】的标题',
				imageUrl: 'https://img2.baidu.com/it/u=803085012,1104738458&fm=253&fmt=auto&app=120&f=JPEG?w=1280&h=800',
			}
		},
	}
</script>
三、效果

 
 



















