<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1">
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
	<meta http-equiv="expires" content="0">
	<c:set var="ctx" value="${pageContext.request.contextPath}"  scope="request"/>
	<c:set var="resourcePath" value="${ctx}/resources"  scope="request"/>
	<script type="text/javascript">
		var ctx = "${ctx}"; //上下文路径
		var resourcePath = "${resourcePath}";
		document.writeln('<script type="text/javascript" src="'+resourcePath+'/js/global.js?d=' + new Date().getTime() + '" ><\/script>');
	</script>
<%--	<script src="http://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>--%>
    <title>海报</title>
	<style>
		#Rootloading {
			display: inline-block;
			width: 12.8%;
			max-width: 80px;
			position: absolute;
			left: 50%;
			top: 50%;
			transform: translate(-50%, -50%);
		}
	</style>
	<link href="${resourcePath}/css/act-common.css" rel="stylesheet">
	<style id="__WXWORK_INNER_SCROLLBAR_CSS">
		::-webkit-scrollbar {
			width: 12px !important;
			height: 12px !important;
		}

		::-webkit-scrollbar-track:vertical {}

		::-webkit-scrollbar-thumb:vertical {
			background-color: rgba(136, 141, 152, 0.5) !important;
			border-radius: 10px !important;
			background-clip: content-box !important;
			border: 2px solid transparent !important;
		}

		::-webkit-scrollbar-track:horizontal {}

		::-webkit-scrollbar-thumb:horizontal {
			background-color: rgba(136, 141, 152, 0.5) !important;
			border-radius: 10px !important;
			background-clip: content-box !important;
			border: 2px solid transparent !important;
		}

		::-webkit-resizer {
			display: none !important;
		}
		.activity-desc{
			display: block;
			width: 90% !important;
			padding: 5%;
			border-radius: 25px;
		}
		.save-btn{
			width: 60%;
			background-color: #FF381F;
			color: #fff;
			padding: 10px;
			margin: 15px 20%;
			border-radius: 20px;
			box-shadow: 0px 0px 5px #9c9c9c;
		}
		.qr_code_image{
			position: absolute;
			width: 100%;
			padding: 64.7% 37.5%;
		}
	</style>
	<script src="${resourcePath}/js/qrcode/jquery.qrcode.min.js"></script>
</head>
<body style="height: auto;">
<div id="app" class="">
	<div id="registerActivityEntrance">
		<div class="top">
			<div class="qr_code_image" id="qrcode">
			</div>
			<img src="https://syb-resource.oss-cn-hangzhou.aliyuncs.com/images/poster.bg-2.png" id="qrCodePic" class="activity-desc">
<%--			<button class="save-btn" onclick="savePic()">保存到相册</button>--%>
		</div>

	</div>
	<!---->
	<!---->
</div>
	<div class="toast-wrapper" style="display: none;">
		<div class="toast"></div>
	</div>
	<div class="toast3-wrapper" style="display: none;">

	</div>
	<div class="toast-wrapper2" style="display: none;">
		<div class="toast2" style="height: 200px;">
			<p class="toast-title"></p>
			<p class="toast-message"></p>
			<div class="btn-wrapper">
				<!----><button type="button" class="btn"></button></div>
		</div>
	</div>
	<script>
		$('#qrcode').qrcode({
			render: "canvas",//设置渲染方式(有两种方式 table和canvas，默认是canvas）
			text: '${url}',
			width: 97, //二维码宽
			height: 97, //二维码长
			background: "#ffffff",//背景颜色
			foreground: "#000000", //前景颜色
			correctLevel :0,//纠错等级
		});
	</script>
<%--<script>--%>
<%--	function savePic(){--%>
<%--		var picurl= $("#qrCodePic").attr("src");--%>
<%--		//alert(picurl);--%>
<%--		savePicture(picurl);--%>
<%--	}--%>
<%--	var triggerEvent = "touchstart";--%>
<%--	function savePicture(Url){--%>
<%--		var blob=new Blob([''], {type:'application/octet-stream'});--%>
<%--		var url = URL.createObjectURL(blob);--%>
<%--		var a = document.createElement('a');--%>
<%--		a.href = Url;--%>
<%--		a.download = Url.replace(/(.*\/)*([^.]+.*)/ig,"$2").split("?")[0];--%>
<%--		var e = document.createEvent('MouseEvents');--%>
<%--		e.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);--%>
<%--		a.dispatchEvent(e);--%>
<%--		URL.revokeObjectURL(url);--%>
<%--	}--%>
<%--</script>--%>
</body>
</html>