html:
<script type="text/javascript" src="js/qrcode.min.js"></script>(资源里可下载)
<div class="tan_ma" style="width:100%; height:100%; position:fixed; left:0; top:0; background:rgba(0,0,0,0.5); display:none; justify-content: center; align-items: center;">
<div style="width:50%; background:#fff; padding:20px">
<div class="tan_close_ma" style="font-size:30px; margin-bottom:7px; float:right; position:relative; right:-5px; top:-5px">X</div>
<div id="code" style="clear:both;display:flex; justify-content: center; "></div>
</div>
</div>
$(document).on("click", ".fangda", function () {
var zhi=$(this).attr("zhi");
$("#code").html('');
$(".tan_ma").css("display","flex");
console.log('放大'+zhi);
var qrcode = new QRCode(document.getElementById("code"), {
width : 201,
height : 201
})
qrcode.makeCode(zhi)
})
$(document).on("click", ".tan_close_ma", function () {
$(".tan_ma").hide();
})