<script>
	export default {
		onLaunch: function(options) {
			console.log('App Launch', options)
			try { uni.setStorageSync('app_session_id', String(Date.now())) } catch (_) {}
			if (options && options.query && options.query.invite_code) {
				console.log('App Launch captured invite_code:', options.query.invite_code)
				try { uni.setStorageSync('inviter_code', options.query.invite_code) } catch (e) { console.error('Save invite code failed', e) }
			}
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
</style>
