<script setup>
	import {
		onLaunch,
		onShow,
		onHide,
		onUnload
	} from '@dcloudio/uni-app'
	import {
		inject
	} from "vue"
	// 引入水印
	// import watermark from '@/utils/watermark.js'

	let timer = null
	let isRefresh = false

	const handleStartRefresh = () => {
		timer = setInterval(() => {
			let maxTime = 1000 * 60 * 30 // 最高限度时间, 大于时进行刷新

			if (isRefresh) return
		}, 1000 * 30)
	}

	onLaunch(() => {
		// #ifdef APP
		const utils = inject('utils')
		console.log(utils);
		utils.inittts()
		utils.setting()

		// #endif
		console.log('onLaunch');
		// watermark.set('/static/water.png')
	})

	onShow(() => {
		console.log('AppShow');

	})

	onHide(() => {
		console.log('AppHide')

		timer && clearInterval(timer)
	})

	onUnload(() => {
		console.log('AppUnload')
	})
</script>

<style lang="scss">
	@import '@/uni_modules/fant-mini-plus/libs/iconfont/iconfont.css';
	@import "@/uni_modules/uview-plus/index.scss";
	@import url('@/utils/style/common.scss');

	input {
		font-size: 28upx;
	}

	/*每个页面公共css */
	// page{
	// 	// background-image: url('/static/bg.png');
	// 	background-repeat: no-repeat;
	// 	background-size: 100% 100%;
	// }
	page {
		background-color: #F5F5F6;
		// background-image: url('/static/bg.png');
		background-repeat: no-repeat;
		background-size: 100% 100%;
	}

	.golink {
		color: #0086F1 !important;
		text-decoration: underline;
	}

	:root {
		--subjectColor: #d3832a;
		--errColor: #f8544B;
		--primaryColor: #0086f1;
		font-size: 1rem;
	}

	/* #ifdef MP-WEIXIN */
	page {
		--subjectColor: #d3832a;
		--errColor: #f8544B;
		--primaryColor: #0086f1;
		font-size: 1rem;
	}

	.u-fade-enter-to {
		z-index: 10000;
	}

	/* #endif */

	.picker-view {
		height: 40vh;

		.item {
			display: flex;
			justify-content: center;
			align-items: center;
		}
	}
</style>