<script>
	import initApp from "@/util/router.js";
	export default {
		onLaunch: function() {
			console.log('App Launch');
			uni.downloadFile({
			    url: '/cffpUpdate/__UNI__65C4CDC.wgt',  
			    success: (downloadResult) => {  
			        if (downloadResult.statusCode === 200) {  
			            plus.runtime.install(downloadResult.tempFilePath, {  
			                force: true  
			            }, function() {  
			                console.log('install success...');  
			                plus.runtime.restart();  
			            }, function(e) {  
			                console.error('install fail...');  
			            });  
			        }
			    }  
			});  
			// uni.getSystemInfo({
			// 	success:(systemInfo)=> {
			// 		uni.request({
			// 		    url: '/api/appVersion/checkIsUpdate',  
			// 			method:'POST',
			// 		    data: {  
			// 		        appType: 1,  
			// 		        version: systemInfo.appVersion,
			// 				systemType:systemInfo.osName.toLowerCase() === 'ios' ? 2 : 1
			// 		    },  
			// 		    success: (result) => {  
			// 		        const data = result.data.data['appVersionInfo'];  
			// 		        if (data.isForceUpdate && data.wgtUrl) {  
			// 		            uni.downloadFile({  
			// 		                url: data.wgtUrl,  
			// 		                success: (downloadResult) => {  
			// 		                    if (downloadResult.statusCode === 200) {  
			// 		                        plus.runtime.install(downloadResult.tempFilePath, {  
			// 		                            force: true  
			// 		                        }, function() {  
			// 		                            console.log('install success...');  
			// 		                            plus.runtime.restart();  
			// 		                        }, function(e) {  
			// 		                            console.error('install fail...');  
			// 		                        });  
			// 		                    }  
			// 		                }  
			// 		            });  
			// 		        }  
			// 		    }  
			// 		}); 
			// 	}
			// })
			initApp()
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	@import "@/static/font/iconfont.css"; 
	/*每个页面公共css */
	page{
		height: 100%;
		padding-top: 10%;
	}
	@font-face {
		font-family: 'iconfont';
		src:url('data:application/x-font-woff2;charset=utf-8;base64,[encoded data, 13736 characters]')
	}
	.iconfont{
	    font-family:"iconfont" !important;
	    font-size:16px;
		font-style:normal;
	    -webkit-font-smoothing: antialiased;
	    -webkit-text-stroke-width: 0.2px;
	    -moz-osx-font-smoothing: grayscale;
	}
	image{
		width: 100%!important;
	}
	.container{
		background-color: #FBFBFB;
	}
	.uni-popup .uni-popup__wrapper{
		margin: 30rpx!important;
	}
	.richTextContent img{
		width: 100% !important;
	}
	.popupContainer .uni-popup .uni-popup__wrapper{
		width: 80%;
		border-radius: 20rpx;
	}
	.container uni-slider{
		margin: 0;
	}
	.container uni-slider .uni-slider-value{
		text-align: right;
	}
	.noListTip{
		text-align: center;
		margin-top: 10%;
		color: #999;
	}
	.container uni-slider .uni-slider-value{
		width: 5ch;
	}
	.btn{
		background: #3671F4;
		color: #fff;
		width: 60%;
		margin: 0 auto;
		height: 80rpx;
		line-height: 80rpx;
		text-align: center;
		border-radius: 40rpx;
		position: absolute;
		bottom: 0;
		left: 0;
		right: 0;
	}
	.uni-calendar-item--extra{
		white-space: nowrap !important;
	}
</style>
