<script>
	export default {
		onLaunch: function() {
			// console.log("App Launch");
			// this.checkArguments(); // 检测启动参数
			// if (uni.getSystemInfoSync().platform == 'android') {
			// 	// 重点是以下： 一定要监听后台恢复 ！一定要
			// 	plus.globalEvent.addEventListener('newintent', e => {
			// 		this.checkArguments(); // 检测启动参数
			// 	});
			// }
		},
		onShow: function() {
			// console.log("App Show");
		},
		onHide: function() {
			// console.log("App Hide");
		},
		methods: {
			// 监测是否传参数
			checkArguments() {
				try {
					if (uni.getSystemInfoSync().platform === 'android') {
						// 接收第三方app传递的参数 extra；
						if (plus.runtime.arguments) {
              // patParams: 院区，病区， 床号
              const { patParams } = JSON.parse(plus.runtime.arguments);
              uni.setStorageSync('patParams', patParams);
						}
					}
				} catch (e) {}
			}
		}
	};
</script>

<style lang="less">
	/*每个页面公共css */

	body,
	uni-app,
	uni-page,
	uni-page-wrapper,
	uni-page-body {
		height: 100%;
		font-size: 12.5rpx;
		line-height: 18.75rpx;
	}

	body,
	uni-app,
	uni-page {
		background-color: #F5F6FA;
	}

	view,
	label,
	scroll-view {
		box-sizing: border-box;
	}

	// 底部固定的按钮
	.fixed-buttom-btn {
		position: fixed;
		left: 0;
		bottom: 0;
		display: flex;
		justify-content: center;
		align-items: center;
		margin-top: 12.5rpx;
		width: 100%;
		height: 75rpx;
		background-color: #3377FF;

		.btn-text {
			flex: 1;
			font-size: 22.5rpx;
			color: #fff;
			text-align: center;
		}

		.btn-text.cancle {
			line-height: 76.25rpx;
			background-color: #FFFFFF;
			color: #3377FF;
		}
	}
</style>
