<script>
	// import uniChat from "./common/request/uniChat";
	// #ifdef APP-PLUS
	// import permissionObject from "./js_sdk/permission.js"
	// #endif
	import { useI18n } from 'vue-i18n'
	export default {
		onLaunch: function() {
			console.log('App Launch')
			// #ifdef APP-NVUE
			domModule.addRule('fontFace', {
				'fontFamily': "Regular",
				'src': "url('https://dushuba.oss-cn-guangzhou.aliyuncs.com/fonts/MiSans-Regular.ttf')"
			});
			domModule.addRule('fontFace', {
				'fontFamily': "Medium",
				'src': "url('https://dushuba.oss-cn-guangzhou.aliyuncs.com/fonts/MiSans-Medium.ttf')"
			});
			domModule.addRule('fontFace', {
				'fontFamily': "Bold",
				'src': "url('https://dushuba.oss-cn-guangzhou.aliyuncs.com/fonts/MiSans-Demibold.ttf')"
			});
			domModule.addRule('fontFace', {
				'fontFamily': "DOUYU",
				'src': "url('https://dushuba.oss-cn-guangzhou.aliyuncs.com/fonts/douyuFont.otf')"
			});
			domModule.addRule('fontFace', {
				'fontFamily': "Bebas",
				'src': "url('https://dushuba.oss-cn-guangzhou.aliyuncs.com/fonts/BEBAS.ttf')"
			});

			// #endif
		},
		onShow: function() {
			const getI18n = useI18n()
			const { t, locale } = getI18n
			if(!uni.getStorageSync('locale')){
				locale.value = 'en'
				uni.setStorageSync('locale', locale.value)
			} else {
				locale.value = uni.getStorageSync('locale')
			}
		},
		onHide: function() {
			console.log('App Hide')
			// uni.offPushMessage();
		},
		methods: {
			
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import "@/uni_modules/uview-plus/index.scss";
	@import '@/static/css/main.scss';
	/* #ifndef APP-NVUE */
	@import '@/static/css/vue.scss';
	/* #endif */
	@import '@/static/css/animista.scss';

	:deep(.uni-tabbar-bottom) {
		z-index: 0 !important;
	}
</style>