<script>
	export default {
		globalData: {
			isLogin: false,
			userInfo: null,
			applyInfo:null
		},
		methods: {
			checkLogin() {
				return new Promise((resolve) => {
					if (this.globalData.isLogin) {
						resolve(true);
					} else {
						// 检查本地存储的 token
						const token = uni.getStorageSync('token');
						if (token) {
							this.globalData.isLogin = true;
							resolve(true);
						} else {
							resolve(false);
						}
					}
				});
			}
		},
		onLaunch: function() {
			console.log('App Launch')
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	/* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
	@import "uview-ui/index.scss";
</style>