<script>
	import { getWxJsdk } from '@/apis/interfaces/public.js'
	export default {
		onLaunch() {
			getWxJsdk({
				url: window.location.href
			}).then(res => {
				let wxconfig = JSON.parse(res)
				this.$wx.config({
					appId	 	: wxconfig.appId,
					debug	 	: false,
					jsApiList	: ['chooseWXPay', 'chooseImage', 'previewImage'],
					signature	: wxconfig.signature,
					nonceStr 	: wxconfig.nonceStr,
					timestamp	: wxconfig.timestamp,
					openTagList	: ['wx-open-launch-weapp']
				})
			}).catch(err => {
				uni.showToast({
					title: err.message,
					icon : 'none'
				})
			})
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
	}
</script>

<style>
    /* 水平居中 */
    .pack-center {
    	display: -webkit-box;
    	-webkit-box-orient: vertical;
    	-webkit-box-pack: center;
    	position: absolute;
    	left: 0;
    	right: 0;
    	top: 0;
    	bottom: 0;
    }
    
    /* 下拉刷新 */
    .refresh{
        height: 90rpx;
        line-height: 90rpx;
        text-align: center;
        font-size: 28rpx;
        color: #999;
    }
    
    .refresh-icon{
        width: 32rpx;
        vertical-align: middle;
        margin-bottom: 4rpx;
    }
    
    /* 页面信息提醒 */
     .pages-hint,
     .pages-loding{
    	text-align: center;
    	color: #747788;
    	font-size: 28rpx;
    	background: white;
     }
     
    .pages-hint image {
    	width: 188rpx;
    	height: 188rpx;
    }
     
    .pages-loding image {
    	width: 38rpx;
    	height: 38rpx;
    }
	 
	.pages-hint-text {
		margin: 30rpx 0;
	}
     
    /* 上拉加载 */
    .pagesLoding {
     	text-align: center;
     	color: gray;
     	line-height: 90rpx;
     	font-size: 26rpx;
    }
     
    .pagesLodingIcon {
     	width: 32rpx;
     	height: 32rpx;
     	vertical-align: middle;
     	margin-right: 10rpx;
     	margin-bottom: 6rpx;
    }
    
	/* 文字截取 */
	.nowrap {
		max-width: 100%;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
	}
	
    .nowrap-multi {
    	display: -webkit-box;
    	overflow: hidden;
    	text-overflow: ellipsis;
    	-webkit-box-orient: vertical;
    	-webkit-line-clamp: 2;
    }
	
	/* 全选样式 */
	checkbox.allCheckbox .uni-checkbox-input {
		border-radius: 100upx;
		height: 32rpx;
		width: 32rpx;
	}
	
	checkbox.allCheckbox.checked .uni-checkbox-input {
		background-color: #446EFE !important;
		border-color: #446EFE !important;
		color: #ffffff !important;
	}
	checkbox.allCheckbox .uni-checkbox-input.uni-checkbox-input-checked:before {
		color: #446EFE !important;
		transform: translate(-50%,-48%) scale(.5);
		-webkit-transform: translate(-50%,-48%) scale(.5);
	}
	
	
	/* 单选样式 */
	checkbox.singleCheckbox .uni-checkbox-input {
		border-radius: 100upx;
		height: 32rpx;
		width: 32rpx;
	}
	
	checkbox.singleCheckbox.checked .uni-checkbox-input {
		background-color: #446EFE !important;
		border-color: #446EFE !important;
		color: #ffffff !important;
	}
	checkbox.singleCheckbox .uni-checkbox-input.uni-checkbox-input-checked:before {
		color: #446EFE !important;
		transform: translate(-50%,-48%) scale(.5);
		-webkit-transform: translate(-50%,-48%) scale(.5);
	}
	
</style>
