<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('公众号二维码')"/>
    <th:block th:include="include :: layout-latest-css"/>
    <style>
        #wxQrcode {
            margin-left: 17px;
        }
    </style>
</head>
<body class="gray-bg">
<div id="wxQrcode"></div>

<th:block th:include="include :: footer"/>
<th:block th:include="include :: layout-latest-js"/>
<script th:src="@{/js/jquery.qrcode.min.js}"></script>
<script th:inline="javascript">
    var id = [[${id}]];
    var prefix = ctx + "system/playlet/account";

    $(function(){
        $.ajax({
            type: "POST",
            dataType:"json",
            url: prefix + "/checkExist",
            data: id,
            contentType: "application/json",
            success: function (result) {
                if (result.code == web_status.SUCCESS) {
                    $('#wxQrcode').qrcode("https://www.mungerfans.com/article/?id="+id);
                } else {
                    $.modal.msgError("文章不存在!")
                }
            }
        })
    });
</script>
</body>
</html>
