lilei 4 tahun lalu
induk
melakukan
5d1b892ae1
2 mengubah file dengan 11 tambahan dan 8 penghapusan
  1. 8 4
      poster.html
  2. 3 4
      新模板/活动模板/tpl.html

+ 8 - 4
poster.html

@@ -122,10 +122,10 @@
 			overflow: hidden;
 			position: fixed;
 			z-index: 10000;
-			width: 70%;
+			width: 80%;
 			top: 30%;
 			left: 50%;
-			margin-left: -35%;
+			margin-left: -40%;
 			margin-top: -140px;
 			border: 1px solid #eee;
 			display: none;
@@ -255,9 +255,13 @@
 							document.getElementById("use-item").onclick = function(){
 								//  合并图片和二维码
 								html2canvas(document.getElementById('poster-con' + swiperInd), {
-									backgroundColor: "transparent",
+									backgroundColor: "#ffffff",
 									allowTaint: true,
-									useCORS: true 
+									useCORS: true,
+									scale: 2,
+									foreignObjectRendering: true,
+									async: false, // 是否异步解析和呈现元素
+									dpi: 300 // 处理模糊问题
 								}).then(canvas => {
 									let dataURL = canvas.toDataURL("image/png")
 									document.getElementById('poster-img').src = dataURL

+ 3 - 4
新模板/活动模板/tpl.html

@@ -7,14 +7,13 @@
 		<meta http-equiv="pragram" content="no-cache">
 		<meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate">
 		<meta http-equiv="expires" content="0">
-		<title>${active.name!}</title>
 	</head>
 	<body>
 		<div class="wrapper">
 			<!-- 模板 -->
 			<div class="zy-h5-page">
 				<!-- 倒计时 -->
-				<div class="countdown-box" id="dateShow1" data-date="2020-12-20 23:59:59">
+				<div class="countdown-box" id="dateShow1" data-date="2020-12-28 23:59:59">
 					<span class="countdown-des">距离活动结束还有:</span><span class="date-time d">00</span>天
 					<span class="date-time h">00</span>时
 					<span class="date-time m">00</span>分
@@ -29,7 +28,7 @@
 							<p>[<span id="store-head">XXX汽车服务中心</span>]</p>
 						</div>
 						<div class="active-time">
-							活动时间:2020-11-20 至 2020-12-20
+							活动时间:2020-11-28 至 2020-12-28
 						</div>
 					</div>
 					<!-- 活动内容 -->
@@ -37,7 +36,7 @@
 						<img class="img-hdnr" src="${active.staticMouldTheme.basePath}/img/hdnr.png">
 						<#list active.parentItemList as parentItem>
 						<div class="active-content">
-							<p><span>套餐包含:</span></p>
+							<p><span>${parentItem.itemName!}</span></p>
 							<p>
 							<#list parentItem.children as childItem>
 								<#if childItem_index gt 0>+</#if>${childItem.itemName!} ${childItem.itemNum} 次