{"id":154,"date":"2026-05-17T17:24:20","date_gmt":"2026-05-17T10:24:20","guid":{"rendered":"https:\/\/thaiamulet.hk\/?page_id=154"},"modified":"2026-05-17T22:37:19","modified_gmt":"2026-05-17T15:37:19","slug":"%e9%98%b2%e4%bc%aa%e8%af%81%e4%b9%a6%e6%9f%a5%e8%af%a2","status":"publish","type":"page","link":"https:\/\/thaiamulet.hk\/index.php\/%e9%98%b2%e4%bc%aa%e8%af%81%e4%b9%a6%e6%9f%a5%e8%af%a2\/","title":{"rendered":"\u0e2a\u0e2d\u0e1a\u0e16\u0e32\u0e21\u0e1c\u0e25\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u67e5\u8a62"},"content":{"rendered":"    <div class=\"certificate-query-container\" style=\"max-width: 600px; margin: 20px auto; padding: 30px; background: #fff; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.1);\">\n        <h2 style=\"text-align: center; color: #333; margin-bottom: 30px;\">\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a \u8b49\u66f8\u9632\u507d\u67e5\u8a62<\/h2>\n        \n        <!-- \u67e5\u8be2\u8868\u5355 -->\n        <div class=\"query-form\" style=\"margin: 20px 0;\">\n            <div style=\"display: flex; gap: 10px; flex-wrap: wrap;\">\n                <input type=\"text\" id=\"cert_number_input\" \n                       placeholder=\"\u8bf7\u8f93\u5165\u8bc1\u4e66\u7f16\u53f7\" \n                       value=\"\"\n                       style=\"flex: 1; min-width: 200px; padding: 12px 15px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 16px; transition: border-color 0.3s;\">\n                <button onclick=\"queryCertificate()\" \n                        style=\"padding: 12px 30px; background: #2271b1; color: white; border: none; border-radius: 8px; cursor: pointer; font-size: 16px; transition: background 0.3s; white-space: nowrap;\">\n                    \u67e5\u8a62\u8b49\u66f8\n                <\/button>\n            <\/div>\n        <\/div>\n        \n        <!-- \u67e5\u8be2\u7ed3\u679c -->\n        <div id=\"certificate_result\">\n                    <\/div>\n    <\/div>\n    \n    <script>\n    function queryCertificate() {\n        const certNumber = document.getElementById('cert_number_input').value.trim();\n        const resultDiv = document.getElementById('certificate_result');\n        \n        if (!certNumber) {\n            alert('\u8bf7\u8f93\u5165\u8bc1\u4e66\u7f16\u53f7');\n            return;\n        }\n        \n        \/\/ \u663e\u793a\u52a0\u8f7d\u72b6\u6001\n        resultDiv.style.display = 'block';\n        resultDiv.innerHTML = '<div style=\"text-align: center; padding: 30px;\"><div style=\"display: inline-block; width: 40px; height: 40px; border: 4px solid #f3f3f3; border-top: 4px solid #2271b1; border-radius: 50%; animation: spin 1s linear infinite;\"><\/div><p style=\"margin-top: 15px; color: #666;\">\u67e5\u8be2\u4e2d...<\/p><\/div>';\n        \n        \/\/ AJAX\u67e5\u8be2\n        const formData = new FormData();\n        formData.append('action', 'query_certificate');\n        formData.append('cert_number', certNumber);\n        \n        fetch('https:\/\/thaiamulet.hk\/wp-admin\/admin-ajax.php', {\n            method: 'POST',\n            body: formData\n        })\n        .then(response => response.json())\n        .then(data => {\n            if (data.success) {\n                displayCertificate(data.data);\n            } else {\n                resultDiv.innerHTML = `\n                    <div style=\"text-align: center; padding: 30px; background: #fff5f5; border-left: 4px solid #d63638; border-radius: 8px; margin-top: 20px;\">\n                        <div style=\"font-size: 48px; margin-bottom: 15px;\">\u274c<\/div>\n                        <h3 style=\"color: #d63638; margin-bottom: 10px;\">\u0e44\u0e21\u0e48\u0e1e\u0e1a\u0e23\u0e2b\u0e31\u0e2a\/\u67e5\u8a62\u7de8\u78bc\u4e0d\u5b58\u5728<\/h3>\n                        <p style=\"color: #666; margin: 0;\">\u8acb\u6838\u5be6\u8b49\u66f8\u7de8\u865f\u662f\u5426\u6b63\u78ba\uff0c\u6216\u806f\u7e6b\u767c\u8b49\u6a5f\u69cb\u78ba\u8a8d\n\u0e01\u0e23\u0e38\u0e13\u0e32\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e2b\u0e21\u0e32\u0e22\u0e40\u0e25\u0e02\u0e43\u0e2b\u0e49\u0e16\u0e39\u0e01\u0e15\u0e49\u0e2d\u0e07 \u0e2b\u0e23\u0e37\u0e2d\u0e15\u0e34\u0e14\u0e15\u0e48\u0e2d\u0e40\u0e08\u0e49\u0e32\u0e2b\u0e19\u0e49\u0e32\u0e17\u0e35\u0e48\u0e2a\u0e21\u0e32\u0e04\u0e21<\/p>\n                    <\/div>\n                `;\n            }\n        })\n        .catch(error => {\n            resultDiv.innerHTML = '<p style=\"color: red; text-align: center;\">\u67e5\u8be2\u51fa\u9519\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5<\/p>';\n            console.error('Error:', error);\n        });\n    }\n    \n    function displayCertificate(cert) {\n        const resultDiv = document.getElementById('certificate_result');\n        \n        \/\/ \u751f\u6210\u5305\u542b\u8bc1\u4e66\u7f16\u53f7\u7684\u4e13\u5c5e\u67e5\u8be2\u94fe\u63a5\n        const queryUrl = 'https:\/\/thaiamulet.hk\/index.php\/%e9%98%b2%e4%bc%aa%e8%af%81%e4%b9%a6%e6%9f%a5%e8%af%a2\/?cert_no=' + encodeURIComponent(cert.certificate_number);\n        \n        \/\/ \u4f7f\u7528\u672c\u5730\u751f\u6210\u7684\u4e8c\u7ef4\u7801\uff08\u907f\u514d\u4f9d\u8d56\u5916\u90e8API\uff09\n        const qrCodeHtml = generateQRCode(queryUrl);\n        \n        resultDiv.innerHTML = `\n            <div style=\"border: 2px solid #2271b1; border-radius: 15px; padding: 30px; margin-top: 20px; background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%); box-shadow: 0 5px 20px rgba(0,0,0,0.1);\">\n                <div style=\"text-align: center;\">\n                    <!-- \u9a8c\u8bc1\u6210\u529f\u6807\u8bc6 -->\n                    <div style=\"background: linear-gradient(135deg, #2271b1, #1a5a8a); color: white; padding: 15px; border-radius: 10px; margin-bottom: 25px;\">\n                        <div style=\"font-size: 24px; margin-bottom: 5px;\">\u2705<\/div>\n                        <h3 style=\"margin: 5px 0; font-size: 20px;\">\u8b49\u66f8\u9a57\u8b49\u6210\u529f-\u771f\u54c1<\/h3>\n                        <p style=\"margin: 0; font-size: 14px; opacity: 0.9;\">\u0e02\u0e2d\u0e07\u0e41\u0e17\u0e49<\/p>\n                    <\/div>\n                    \n                    <!-- \u8bc1\u4e66\u56fe\u72471 -->\n                    ${cert.image_url ? \n                        `<div style=\"margin-bottom: 15px; padding: 15px; background: white; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.05);\">\n                            <img decoding=\"async\" src=\"${cert.image_url}\" alt=\"${cert.title}\" \n                                 style=\"max-width: 100%; height: auto; border-radius: 5px; display: block; margin: 0 auto;\"\n                                 onerror=\"this.style.display='none'; this.nextElementSibling.style.display='block';\">\n                            <p style=\"display: none; color: #999; padding: 20px;\">\u8bc1\u4e66\u56fe\u7247\u52a0\u8f7d\u5931\u8d25<\/p>\n                        <\/div>`\n                        : ''\n                    }\n                    \n                    <!-- \u8bc1\u4e66\u56fe\u72472 -->\n                    ${cert.image_url2 ? \n                        `<div style=\"margin-bottom: 25px; padding: 15px; background: white; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.05);\">\n                            <img decoding=\"async\" src=\"${cert.image_url2}\" alt=\"${cert.title}-\u7b2c\u4e8c\u5f20\u56fe\" \n                                 style=\"max-width: 100%; height: auto; border-radius: 5px; display: block; margin: 0 auto;\"\n                                 onerror=\"this.style.display='none'; this.nextElementSibling.style.display='block';\">\n                            <p style=\"display: none; color: #999; padding: 20px;\">\u7b2c\u4e8c\u5f20\u8bc1\u4e66\u56fe\u7247\u52a0\u8f7d\u5931\u8d25<\/p>\n                        <\/div>`\n                        : ''\n                    }\n                    \n                    <!-- \u8bc1\u4e66\u4fe1\u606f -->\n                    <div style=\"background: white; padding: 25px; border-radius: 10px; margin-bottom: 25px; box-shadow: 0 2px 10px rgba(0,0,0,0.05);\">\n                        <h4 style=\"font-size: 22px; color: #333; margin-bottom: 15px; font-weight: bold;\">${cert.title}<\/h4>\n                        ${cert.description ? \n                            `<div style=\"color: #555; font-size: 15px; line-height: 1.8; text-align: left; padding: 15px; background: #f8f9fa; border-radius: 8px;\">${cert.description}<\/div>` \n                            : ''}\n                        <div style=\"margin-top: 15px; padding-top: 15px; border-top: 1px solid #eee;\">\n                            <p style=\"color: #888; font-size: 13px; margin: 0;\">\u767c\u8b49\u65e5\u671f\uff1a${new Date(cert.created_at).toLocaleDateString('zh-CN')}<\/p>\n                        <\/div>\n                    <\/div>\n                    \n                    <!-- \u4e8c\u7ef4\u7801\u533a\u57df -->\n                    <div style=\"margin: 25px 0; padding: 25px; background: white; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.05);\">\n                        <p style=\"font-size: 14px; color: #666; margin-bottom: 15px; font-weight: bold;\">\ud83d\udcf1 QR cord\/\u540c\u6b65\u4e8c\u7dad\u78bc<\/p>\n                        <div style=\"display: flex; justify-content: center; align-items: center;\">\n                            ${qrCodeHtml}\n                        <\/div>\n                        <p style=\"font-size: 12px; color: #999; margin-top: 10px;\">\u0e2a\u0e41\u0e01\u0e19 QR Code\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a<\/p>\n                    <\/div>\n                    \n                    <!-- \u8bc1\u4e66\u7f16\u53f7 -->\n                    <div style=\"background: linear-gradient(135deg, #e8f4f8, #d1ecf1); padding: 15px 20px; border-radius: 8px; display: flex; align-items: center; justify-content: space-between;\">\n                        <div>\n                            <span style=\"font-size: 12px; color: #666;\">\u8b49\u66f8\u7de8\u865f\/\u0e40\u0e25\u0e02<\/span>\n                            <p style=\"margin: 5px 0 0 0; font-size: 18px; font-weight: bold; color: #2271b1; font-family: monospace;\">${cert.certificate_number}<\/p>\n                        <\/div>\n                        <button onclick=\"navigator.clipboard.writeText('${cert.certificate_number}')\" \n                                style=\"padding: 8px 15px; background: #2271b1; color: white; border: none; border-radius: 5px; cursor: pointer; font-size: 13px;\">\n                            \ud83d\udccb \u8907\u88fd\/\n                        <\/button>\n                    <\/div>\n                <\/div>\n            <\/div>\n        `;\n    }\n    \n    \/\/ \u751f\u6210\u4e8c\u7ef4\u7801\u7684\u51fd\u6570\n    function generateQRCode(url) {\n        \/\/ \u4f7f\u7528QR Code Generator API\uff08\u514d\u8d39\u7684\u4e8c\u7ef4\u7801\u751f\u6210\u670d\u52a1\uff09\n        const qrApiUrl = `https:\/\/api.qrserver.com\/v1\/create-qr-code\/?size=200x200&data=${encodeURIComponent(url)}&bgcolor=ffffff&color=2271b1`;\n        return `<img decoding=\"async\" src=\"${qrApiUrl}\" alt=\"\u8bc1\u4e66\u4e8c\u7ef4\u7801\" style=\"width: 200px; height: 200px; border: 3px solid #2271b1; padding: 10px; background: white; border-radius: 10px;\">`;\n    }\n    \n    \/\/ \u652f\u6301\u56de\u8f66\u952e\u67e5\u8be2\n    document.getElementById('cert_number_input').addEventListener('keypress', function(e) {\n        if (e.key === 'Enter') {\n            queryCertificate();\n        }\n    });\n    <\/script>\n    \n    <style>\n    \/* \u52a0\u8f7d\u52a8\u753b *\/\n    @keyframes spin {\n        0% { transform: rotate(0deg); }\n        100% { transform: rotate(360deg); }\n    }\n    \n    \/* \u8f93\u5165\u6846\u805a\u7126\u6837\u5f0f *\/\n    #cert_number_input:focus {\n        outline: none;\n        border-color: #2271b1 !important;\n        box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);\n    }\n    \n    \/* \u6309\u94ae\u60ac\u505c\u6548\u679c *\/\n    .certificate-query-container button:hover {\n        opacity: 0.9;\n        transform: translateY(-1px);\n        box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);\n    }\n    \n    \/* \u54cd\u5e94\u5f0f\u8bbe\u8ba1 *\/\n    @media (max-width: 480px) {\n        .certificate-query-container {\n            margin: 10px !important;\n            padding: 20px !important;\n        }\n        \n        .query-form > div {\n            flex-direction: column;\n        }\n        \n        #cert_number_input {\n            width: 100%;\n        }\n        \n        .query-form button {\n            width: 100%;\n        }\n    }\n    <\/style>\n    \n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-154","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/thaiamulet.hk\/index.php\/wp-json\/wp\/v2\/pages\/154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thaiamulet.hk\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/thaiamulet.hk\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/thaiamulet.hk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thaiamulet.hk\/index.php\/wp-json\/wp\/v2\/comments?post=154"}],"version-history":[{"count":5,"href":"https:\/\/thaiamulet.hk\/index.php\/wp-json\/wp\/v2\/pages\/154\/revisions"}],"predecessor-version":[{"id":175,"href":"https:\/\/thaiamulet.hk\/index.php\/wp-json\/wp\/v2\/pages\/154\/revisions\/175"}],"wp:attachment":[{"href":"https:\/\/thaiamulet.hk\/index.php\/wp-json\/wp\/v2\/media?parent=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}