<script>
	import {
		mapMutations
	} from 'vuex'
	const nativePlugin = uni.requireNativePlugin("UUMbsAgentPlugin-Test")
	export default {
		onLaunch: function() {
			console.log('App Launch')
			uni.getSystemInfo({ // 获取当前设备的具体信息
				success: (sysinfo) => {
					console.log('sysinfo', sysinfo);
					this.sysinfo = sysinfo;
					this.$uStore({
						name: 'sysinfo',
						value: sysinfo
					});
				}
			});
		},
		
		onShow: function() {
			// #ifdef APP-PLUS
		   setTimeout(function() { // 被唤醒获取参数 需异步一下
				const args = plus.runtime.arguments
				if (plus.runtime.arguments && typeof args === 'string') {
					const data = nativePlugin.handleOpenURL(args)   
				}
			}, 100);
		   // #endif
		},
		onHide: function() {
			// console.log('App Hide')
		},
		onTabItemTap(e) {
			console.log('onTabItemTap----', e)
		},
		data() {
			return {
				sysinfo: {}
			}
		},
		methods: {
			...mapMutations(['$uStore'])
		}
	}
</script>

<style lang="scss">
	@import "uview-ui/index.scss";

	/*每个页面公共css */
	/* #ifndef APP-NVUE */
	uni-page-body {
		height: 100%;
	}

	page {
		font-weight: 400;
		font-size: 24rpx;
		color: #333;
	}

	uni-view {
		box-sizing: border-box;
	}

	::v-deep .uni-scroll-view ::-webkit-scrollbar {
		display: none;
		width: 0;
		height: 0;
		color: transparent;
		background: transparent;
	}

	::v-deep ::-webkit-scrollbar {
		display: none;
		width: 0;
		height: 0;
		color: transparent;
		background: transparent;
	}

	uni-button:after {
		display: none;
	}

	.uni-input-placeholder {
		color: #DBDBDB;
	}

	image {
		display: inline-block;
	}

	view,
	text {
		box-sizing: border-box;
	}

	/* #endif */
</style>
