<script>
export default {
	onLaunch: function () {
		//#ifdef APP-PLUS
		//获取已保存在本地的用户信息，该内容在登录页面登录成功之后，才保存到本地的
		const userInfo = uni.getStorageSync('token');
		if (userInfo) {
			uni.reLaunch({
				url: '/pages/index/index'
			});
		} else {
			uni.navigateTo({
				url: '/pages/login/login'
			});
		}
		//#endif
	},
	onShow: function () {
		//this.getAuth();
	},
	onHide: function () {},
	methods: {}
};
</script>

<style lang="scss">
/*每个页面公共css */
@import '@/common/style.scss';
/* uView基础样式 */
@import 'uview-ui/index.scss';
@import '@/common/animate.min.css';

//全局页面背景色
page {
	background-color: white;
}
//底部安全距离
.bottom-safety {
	padding-bottom: constant(safe-area-inset-bottom);
	padding-bottom: env(safe-area-inset-bottom);
}
/**uniapp中uni.showModal H5中被挡住的解决方案*/
uni-modal {
	z-index: 19999 !important;
}
/**去掉官方button边框线*/
button::after {
	border: none;
}
/**挂载iconfont字体图标*/
@font-face {
	font-family: 'iconfont';
	src: url('https://at.alicdn.com/t/c/font_4191999_c41m8qip7hc.ttf?t=1690883017178') format('truetype');
	/* src: url('~@/static/font/iconfont.ttf') format('truetype'); */
}
.icon {
	font-family: iconfont;
}
</style>
