<script>
	export default {
		onLaunch() {
			console.log('App Launch')
			const token = uni.getStorageSync('member_token')
			if (!token) return

			this.$api.user.getCurrentMember().then(res => {
				if (res.code === 200 && res.data) {
					uni.setStorageSync('memberInfo', res.data)
				}
			}).catch(() => {})
		},
		onShow() {
			console.log('App Show')
		},
		onHide() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	@import './common/styles.scss';

	page {
		background:
			radial-gradient(circle at top left, rgba(45, 180, 141, 0.12), transparent 32%),
			linear-gradient(180deg, #f8fbfa 0%, #f2f5f7 48%, #edf1f5 100%);
		font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica,
			'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
		font-size: 28rpx;
		color: #1D2129;
		line-height: 1.5;
		-webkit-font-smoothing: antialiased;
	}

	view, text {
		box-sizing: border-box;
	}

	image {
		display: block;
	}

	button,
	input,
	textarea {
		font-family: inherit;
		box-sizing: border-box;
	}
</style>
