<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
			
			// TODO: 测试用 - 临时设置 token，测试完成后删除此代码
			// #ifdef VUE3
			// 如果还没有 token，则设置一个测试 token
			const token = uni.getStorageSync('token')
			if (!token) {
				const testToken = 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImUzMDY4YzNjLThiOTMtNGExNy1hNmFlLWY1NDg5ZTJjYmYyOSJ9.k1cspIDAA_Z357hbRC0PY3PPwRLjTlvezrq37rgVVSYL_T11nDjF3IOWw7QZoEK1uZKYKNn_rAhuqKGOoopvWw'
				uni.setStorageSync('token', testToken)
				console.log('已设置测试 token:', testToken)
			}
			// #endif
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
@import '@climblee/uv-ui/index.scss';
</style>