import config from '../config.js';
export default {
	data() {
		return {
			share: {}
		}
	},
	onShareAppMessage(res) { //发送给朋友
		const that = this;
		return {
			title: that.$config.share.title,
			path: that.$config.share.path,
			imageUrl: that.$config.share.imageUrl,
			success(res) {
				uni.showToast({
					title: '分享成功'
				})
			},
			fail(res) {
				uni.showToast({
					title: '分享失败',
					icon: 'none'
				})
			}
		}
	},
	onShareTimeline(res) { //分享到朋友圈
		const that = this;
		return {
			title: that.$config.share.title,
			path: that.$config.share.path,
			imageUrl: that.$config.share.imageUrl,
			success(res) {
				uni.showToast({
					title: '分享成功'
				})
			},
			fail(res) {
				uni.showToast({
					title: '分享失败',
					icon: 'none'
				})
			}
		}
	},
}
