export default {
	onShow(){
		let pages = getCurrentPages();
		let curPage = pages[pages.length-1];
		let route = '/'+curPage.route;
		let options = curPage.options;
		if(JSON.stringify(options)!='{}'){
			let i = 0;
			for (let o in options) {
				route+=(i==0?'?':'&')+o+'='+options[o];
				i++;
			}
		}
		this.$path = route;
	},
	/* 用户点击右上角分享 */
	onShareAppMessage: function () {
		return {
			title: '酒店民宿商家端',
			path: this.$path
		}
	},
	/* 分享到朋友圈 */
	onShareTimeline: function () {
		return {
			title: '酒店民宿商家端',
			path: this.$path
		}
	}
}