<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
			this.overShare()
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},

		methods: {
			overShare() {
				uni.onAppRoute((res) => {
					let pages = getCurrentPages()
					let view = pages[pages.length - 1]
					if (view) {
						uni.showShareMenu({
							menus: ['shareAppMessage', 'shareTimeline'], //设置分享好友功能 可加上shareTimeline分享到朋友圈
							success(res) {},
							fail(e) {}
						})
					}
				})
			},
		}
	}
</script>

<style lang="scss">
	@import "@/uview-ui/index.scss";
	/*每个页面公共css */
</style>