<template>
	<view class="container">
		<view id="comFirmCode"></view>
		<p>请使用微信扫码识别二维码，确认采集信息</p>
	</view>
</template>

<script>
	export default {
			name:"confirmQrCode",
		data() {
			return {

			}
		},
		created: function() {

		},
		mounted: function() {
			let this_ = this;
			this.$nextTick(function() {
				setTimeout(function() {
					var qrCode = new QRCode(document.getElementById("comFirmCode"), {
						width: 201,
						height: 201
					})
					console.log(location.href)
					var myCode = location.href.split('mpwechat/confirmQrCode.html?');
					var url = `${myCode[0]}wechat/qr/qrreacquire?${myCode[1]}`;
					console.log('url = ' + url)
					qrCode.makeCode(url.replace("invitation", "main"));
					$("#comFirmCode").find('img').css({
						"width": "50vw",
						"height": "50vw",
						"padding": "3vw",
						"border": "4px solid #39ddb0"
					})
				}, 100)
			})
		},
		methods: {

		}
	}
</script>

<style scoped>
	body {
		margin: 0;
	}

	#comFirmCode {
		width: 50vw;
		height: 50vw;
		margin: 10vh 0 0 21vw;
	}

	img {
		width: 50vw;
		height: 50vw;
		padding: 3vw;
		border: 4px solid #39ddb0;
	}

	p {
		font-size: 14px;
		color: gray;
		margin-top: 50px;
		text-align: center;
	}
</style>
