<script>
	export default {
		onLaunch: function() {
			console.log('App Launch');
			var lan = 'zh'
			 try {
				const res = uni.getSystemInfoSync();
				lan = res.language
			} catch (e) {
				console.log('error='+e)
			}
			console.log('lan='+lan); 
			 if(lan == 'en') {
				 this._i18n.locale = 'en-US'
			 }
			 if(lan == 'zh-Hans-CN' || lan=='zh') {
				 this._i18n.locale = 'zh-CN'
			 }
			 uni.setTabBarItem({ index: 0,text: this.$t('tabs.tab1')});
			 uni.setTabBarItem({ index: 1,text: this.$t('tabs.tab2')});
			 uni.setTabBarItem({ index: 2,text: this.$t('tabs.tab3')});
			 uni.setTabBarItem({ index: 3,text: this.$t('tabs.tab4')});
			 uni.setTabBarItem({ index: 4,text: this.$t('tabs.tab5')});
		},
		// onShow: function() {
		// 	console.log('App Show');
		// },
		// onHide: function() {
		// 	console.log('App Hide');
		// }
	}
</script>
<style>
	/*每个页面公共css */
	/* uni.css - 通用组件、模板样式库，可以当作一套ui库应用 */
	@import './common/uni.css';
	/* icon图标 */
	@font-face {
	  font-family: 'iconfont';  /* project id 1095188 */
	  src: url('https://at.alicdn.com/t/font_1095188_lvwtknkk16s.eot');
	  src: url('https://at.alicdn.com/t/font_1095188_lvwtknkk16s.eot?#iefix') format('embedded-opentype'),
	  url('https://at.alicdn.com/t/font_1095188_lvwtknkk16s.woff2') format('woff2'),
	  url('https://at.alicdn.com/t/font_1095188_lvwtknkk16s.woff') format('woff'),
	  url('https://at.alicdn.com/t/font_1095188_lvwtknkk16s.ttf') format('truetype'),
	  url('https://at.alicdn.com/t/font_1095188_lvwtknkk16s.svg#iconfont') format('svg');
	}
	.icon {
	  font-size: 24upx;
	  color: #000000;
	  font-family: iconfont;
	}
	.icon-warning:before { 
		content: '\e604';
		font-size: 48upx;
	}
</style>
