// uniapp路由二次封装
export const goBack = (url) => {
	const oldPath = uni.getStorageSync("oldPath");
	const tabbarList = ['/pages/tabbar/tabbarPanel', '/pages/tabbar/personCenter', '/pages/tabbar/homePage']
	if (url) {
		console.log(url);
		uni.navigateTo({
			url
		})
		return;
	}
	if (oldPath && tabbarList.includes(oldPath) != true) {
		uni.navigateTo({
			url: oldPath
		})
	} else {
		uni.switchTab({
			url: "/pages/tabbar/tabbarPanel"
		})
	}
}

export const goHome = () => {
	uni.switchTab({
		url: "/pages/tabbar/tabbarPanel"
	})
}