<script>
// const VConsole = require('./static/js/vconsole.min.js');
import store from 'store/store';
import * as types from 'store/mutations-types'

export default {
	onLaunch() {
		//#ifdef APP-PLUS
		uni.setStorageSync('isShowVersion', 1)
		plus.runtime.getProperty( plus.runtime.appid, function ( wgtinfo ) {                
				//  获取 app的version
				let appversion = wgtinfo.version;
				let versionCode = wgtinfo.versionCode
				// 存缓存 版本号
				try {
					uni.setStorageSync('appversion', appversion);
					uni.setStorageSync('versionCode', versionCode);
				} catch (e) {}
				console.log( "appversion:" + appversion );
			} );
		//#endif
	},
	onShow() {
		// console.log('app show');
		//检查登录
		// if (!store.getters.userToken()) {
		// 	store.dispatch(types.SHOW_ALERT, {
		// 		msg: '用户已登出，请重新登陆',
		// 		onHide: () => {
		// 			uni.reLaunch({
		// 				url: '/pages/login/login'
		// 			});
		// 		}
		// 	})
		// }
	},
	onHide() {},
	mounted() {
		// const vconsole = new VConsole();
	}
};
</script>

<style lang="scss">
/* 引入color-ui样式库 */
@import 'colorui/main.css';
@import 'colorui/icon.css';

@import './style/style.scss';

/* 解决头条小程序组件内引入字体不生效的问题 */
/* #ifdef MP-TOUTIAO */
@font-face {
	font-family: uniicons;
	src: url('./static/uni.ttf');
}
/* #endif */

	uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked{
		background-color:#007aff !important;
	}
</style>
