<script>
	import {
		createRequestPermissionListener,
		stopRequestPermissionListener
	} from '@/uni_modules/colorful-uni-perm';

	export default {
		onLaunch: function() {
			// #ifdef APP-PLUS
			if (plus.runtime.channel === 'huawei') {
				// 创建权限申请监听
				createRequestPermissionListener();
			}
			// #endif
			console.log('App Launch')
			let token = uni.getStorageSync("token")
			if (token) {
				plus.navigator.closeSplashscreen();
				return
			}
			uni.reLaunch({
				url: "/pages/login/login",
				success() {
					plus.navigator.closeSplashscreen();
				}
			})
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
		onExit() {
			// #ifdef APP-PLUS
			if (plus.runtime.channel === 'huawei') {
				// 清除权限申请监听
				stopRequestPermissionListener();
			}
			// #endif
		},
	}
</script>

<style lang="scss">
	@import "./uni_modules/vk-uview-ui/index.scss";
	// @import "./static/fontsFamily/ht.css";
	// @import "./static/fontsFamily/fs.css";
	// @import "./static/fontsFamily/kt.css";
	// @import "./static/fontsFamily/bkt.css";
	// @import "./static/fontsFamily/hwfs.css";
	// @import "./static/fontsFamily/hwkt.css";
	// @import "./static/fontsFamily/st.css";
	// @import "./static/fontsFamily/wryh.css";
</style>