{"id":299993,"date":"2024-05-20T17:31:22","date_gmt":"2024-05-20T09:31:22","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/299993.html"},"modified":"2024-05-20T17:31:31","modified_gmt":"2024-05-20T09:31:31","slug":"%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-html-canvas-%e7%94%9f%e6%88%90%e9%aa%8c%e8%af%81%e7%a0%81","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/299993.html","title":{"rendered":"\u5982\u4f55\u4f7f\u7528 html canvas \u751f\u6210\u9a8c\u8bc1\u7801"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/26210747\/335528c0-dacf-4b47-9dc2-e5ba789dab79.webp\" alt=\"\u5982\u4f55\u4f7f\u7528 html canvas \u751f\u6210\u9a8c\u8bc1\u7801\" \/><\/p>\n<p><p>HTML Canvas \u7528\u4e8e\u751f\u6210\u9a8c\u8bc1\u7801\u7684\u65b9\u6cd5\u5305\u62ec<strong>\u521b\u5efa\u753b\u5e03\u3001\u751f\u6210\u968f\u673a\u5b57\u7b26\u3001\u5e94\u7528\u6587\u672c\u626d\u66f2\u3001\u6dfb\u52a0\u566a\u70b9\u4e0e\u5e72\u6270\u7ebf\u3001\u4ee5\u53ca\u6700\u7ec8\u6e32\u67d3\u56fe\u50cf<\/strong>\u3002\u9a8c\u8bc1\u7801\u7684\u6838\u5fc3\u76ee\u7684\u662f\u533a\u5206\u4eba\u7c7b\u7528\u6237\u548c\u673a\u5668\u7a0b\u5e8f\uff0c\u901a\u8fc7\u7ed8\u5236\u4e00\u5b9a\u7a0b\u5ea6\u4e0a\u590d\u6742\u8ba4\u8bc1\u56fe\u6848\u6765\u5b9e\u73b0\u3002\u4e3a\u4e86\u8be6\u7ec6\u63cf\u8ff0\uff0c\u4ee5<strong>\u751f\u6210\u968f\u673a\u5b57\u7b26<\/strong>\u4e3a\u4f8b\uff1a\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u5b9a\u4e49\u4e00\u4e2a\u51fd\u6570\u6765\u751f\u6210\u4e00\u4e2a\u968f\u673a\u7684\u5b57\u7b26\u4e32\uff0c\u8be5\u5b57\u7b26\u4e32\u53ef\u4ee5\u5305\u62ec\u6570\u5b57\u3001\u5927\u5199\u5b57\u6bcd\u548c\u5c0f\u5199\u5b57\u6bcd\u3002\u7136\u540e\uff0c\u6211\u4eec\u968f\u673a\u6311\u9009\u5b57\u7b26\u7ec4\u5408\u6210\u9a8c\u8bc1\u7801\u7684\u6587\u672c\u5185\u5bb9\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u521b\u5efa\u57fa\u672c\u7684HTML\u7ed3\u6784\u548cCanvas\u5143\u7d20<\/h3>\n<\/p>\n<p><p>\u5728\u7f51\u9875\u4e2d\u5d4c\u5165Canvas\u6807\u7b7e\u4ee5\u521b\u5efa\u753b\u5e03\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-html\">&lt;!DOCTYPE html&gt;<\/p>\n<p>&lt;html lang=&quot;en&quot;&gt;<\/p>\n<p>&lt;head&gt;<\/p>\n<p>    &lt;meta charset=&quot;UTF-8&quot;&gt;<\/p>\n<p>    &lt;title&gt;Canvas \u9a8c\u8bc1\u7801&lt;\/title&gt;<\/p>\n<p>    &lt;script src=&quot;captcha.js&quot;&gt;&lt;\/script&gt;<\/p>\n<p>&lt;\/head&gt;<\/p>\n<p>&lt;body&gt;<\/p>\n<p>    &lt;canvas id=&quot;captcha&quot; width=&quot;200&quot; height=&quot;70&quot;&gt;&lt;\/canvas&gt;<\/p>\n<p>&lt;\/body&gt;<\/p>\n<p>&lt;\/html&gt;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u521b\u5efa\u540e\u7684Canvas\u5143\u7d20\u662f\u753b\u9a8c\u8bc1\u7801\u7684\u753b\u677f\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u521d\u59cb\u5316Canvas<\/h3>\n<\/p>\n<p><p>JavaScript\u4e2d\u521d\u59cb\u5316Canvas\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-javascript\">function initCaptcha() {<\/p>\n<p>    var canvas = document.getElementById(&#039;captcha&#039;);<\/p>\n<p>    var ctx = canvas.getContext(&#039;2d&#039;);<\/p>\n<p>    \/\/ \u540e\u7eed\u7684\u7ed8\u5236\u4ee3\u7801\u5c06\u653e\u5728\u8fd9\u91cc<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>Canvas\u7ed8\u56fe\u4e0a\u4e0b\u6587\uff08Context\uff09\u5b9a\u4e49\u4e86\u5982\u4f55\u5728\u753b\u5e03\u4e0a\u7ed8\u5236\u56fe\u6848\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u751f\u6210\u968f\u673a\u5b57\u7b26<\/h3>\n<\/p>\n<p><p>\u5b9a\u4e49\u51fd\u6570\u4ee5\u751f\u6210\u968f\u673a\u5b57\u7b26\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-javascript\">function generateRandomString(length) {<\/p>\n<p>    var chars = &#039;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789&#039;;<\/p>\n<p>    var result = &#039;&#039;;<\/p>\n<p>    for (var i = 0; i &lt; length; i++) {<\/p>\n<p>        result += chars.charAt(Math.floor(Math.random() * chars.length));<\/p>\n<p>    }<\/p>\n<p>    return result;<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u51fd\u6570\u968f\u673a\u751f\u6210\u4e00\u4e2a\u786e\u5b9a\u957f\u5ea6\u7684\u5b57\u7b26\u4e32\uff0c\u7528\u4f5c\u9a8c\u8bc1\u7801\u6587\u672c\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u7ed8\u5236\u6587\u672c<\/h3>\n<\/p>\n<p><p>\u628a\u751f\u6210\u7684\u5b57\u7b26\u4e32\u7ed8\u5236\u5230Canvas\u4e0a\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-javascript\">function drawText(ctx, text) {<\/p>\n<p>    ctx.font = &#039;40px Arial&#039;;<\/p>\n<p>    ctx.fillStyle = &#039;#0D8&#039;;<\/p>\n<p>    ctx.fillText(text, 10, 50);<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6587\u672c\u6837\u5f0f\u548c\u4f4d\u7f6e\u901a\u8fc7Canvas API\u8bbe\u5b9a\uff0c\u6587\u672c\u626d\u66f2\u4e5f\u53ef\u5728\u6b64\u6b65\u9aa4\u5b9e\u73b0\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u5e94\u7528\u6587\u672c\u626d\u66f2\u548c\u6837\u5f0f<\/h3>\n<\/p>\n<p><p>\u5e94\u7528\u626d\u66f2\u6548\u679c\u548c\u5404\u79cd\u6837\u5f0f\u589e\u52a0\u5b57\u7b26\u8bc6\u522b\u96be\u5ea6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-javascript\">function applyDistortions(ctx, text) {<\/p>\n<p>    \/\/ \u5728\u6b64\u5e94\u7528\u6587\u672c\u626d\u66f2\u6548\u679c<\/p>\n<p>    \/\/ \u53ef\u4ee5\u901a\u8fc7\u6539\u53d8\u7ed8\u5236\u65f6\u7684\u8d77\u59cb\u4f4d\u7f6e\u3001\u65cb\u8f6c\u89d2\u5ea6\u7b49\u65b9\u5f0f\u5b9e\u73b0<\/p>\n<p>    \/\/ \u540c\u65f6\u4e5f\u53ef\u4ee5\u589e\u52a0\u9634\u5f71\u3001\u7ebf\u6761\u5bbd\u5ea6\u7b49\u6837\u5f0f<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f7f\u5f97\u9a8c\u8bc1\u7801\u4e0d\u6613\u88ab\u8ba1\u7b97\u673a\u7a0b\u5e8f\u81ea\u52a8\u8bc6\u522b\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u6dfb\u52a0\u5e72\u6270\u5143\u7d20<\/h3>\n<\/p>\n<p><p>\u5728\u9a8c\u8bc1\u7801\u4e0a\u589e\u52a0\u5e72\u6270\u5143\u7d20\uff0c\u5982\u566a\u70b9\u3001\u5e72\u6270\u7ebf\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-javascript\">function addNoise(ctx) {<\/p>\n<p>    \/\/ \u5728Canvas\u4e0a\u7ed8\u5236\u50cf\u7d20\u70b9\u4f5c\u4e3a\u566a\u70b9<\/p>\n<p>    \/\/ \u6216\u8005\u7ed8\u5236\u5e72\u6270\u7ebf\u6761<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5e72\u6270\u5143\u7d20\u4f7f\u5f97\u9a8c\u8bc1\u7801\u4e0d\u6613\u88ab\u56fe\u50cf\u8bc6\u522b\u6280\u672f\u89e3\u6790\u3002<\/p>\n<\/p>\n<p><h3>\u4e03\u3001\u6e32\u67d3\u9a8c\u8bc1\u7801<\/h3>\n<\/p>\n<p><p>\u6574\u5408\u4e0a\u8ff0\u6b65\u9aa4\uff0c\u5b8c\u6210\u9a8c\u8bc1\u7801\u7684\u751f\u6210\u548c\u6e32\u67d3\u5de5\u4f5c\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-javascript\">function renderCaptcha() {<\/p>\n<p>    var canvas = document.getElementById(&#039;captcha&#039;);<\/p>\n<p>    var ctx = canvas.getContext(&#039;2d&#039;);<\/p>\n<p>    ctx.clearRect(0, 0, canvas.width, canvas.height);  \/\/ \u6e05\u9664\u753b\u5e03<\/p>\n<p>    var captchaText = generateRandomString(6);         \/\/ \u751f\u6210\u968f\u673a\u5b57\u7b26\u4e32<\/p>\n<p>    drawText(ctx, captchaText);                        \/\/ \u7ed8\u5236\u6587\u672c<\/p>\n<p>    applyDistortions(ctx, captchaText);                \/\/ \u5e94\u7528\u6587\u672c\u626d\u66f2<\/p>\n<p>    addNoise(ctx);                                     \/\/ \u6dfb\u52a0\u566a\u70b9\/\u5e72\u6270\u7ebf<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6bcf\u6b21\u8c03\u7528<code>renderCaptcha<\/code>\u65b9\u6cd5\u90fd\u4f1a\u5728Canvas\u4e0a\u751f\u6210\u4e00\u4e2a\u5305\u542b\u968f\u673a\u5b57\u7b26\u4e32\u3001\u6837\u5f0f\u548c\u5e72\u6270\u5143\u7d20\u7684\u9a8c\u8bc1\u7801\u3002<\/p>\n<\/p>\n<p><h3>\u516b\u3001\u9a8c\u8bc1\u7801\u7684\u524d\u7aef\u9a8c\u8bc1<\/h3>\n<\/p>\n<p><p>\u63d0\u4f9b\u7528\u6237\u8f93\u5165\u9a8c\u8bc1\u7801\u7684\u754c\u9762\u5143\u7d20\u548c\u7b80\u5355\u7684\u9a8c\u8bc1\u903b\u8f91\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-html\">&lt;input type=&quot;text&quot; id=&quot;user-input&quot; placeholder=&quot;\u8f93\u5165\u9a8c\u8bc1\u7801&quot;&gt;<\/p>\n<p>&lt;button onclick=&quot;validateCaptcha()&quot;&gt;\u9a8c\u8bc1&lt;\/button&gt;<\/p>\n<p>&lt;script&gt;<\/p>\n<p>function validateCaptcha() {<\/p>\n<p>    \/\/ \u7528\u6237\u8f93\u5165\u503c\u7684\u83b7\u53d6\u4e0e\u9a8c\u8bc1\u7801\u7684\u6838\u5bf9<\/p>\n<p>    \/\/ \u5f39\u51fa\u63d0\u793a\u6216\u5bf9\u8868\u5355\u8fdb\u884c\u89e3\u9501<\/p>\n<p>}<\/p>\n<p>&lt;\/script&gt;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u9a8c\u8bc1\u8fc7\u7a0b\u786e\u4fdd\u7528\u6237\u6b63\u786e\u8f93\u5165\u4e86\u9a8c\u8bc1\u7801\u3002<\/p>\n<\/p>\n<p><p>\u6b64\u5916\uff0c\u8fd8\u53ef\u8fdb\u884c<strong>\u670d\u52a1\u5668\u7aef\u9a8c\u8bc1<\/strong>\uff0c\u4ee5\u786e\u4fdd\u9a8c\u8bc1\u8fc7\u7a0b\u7684\u5b89\u5168\u6027\uff0c\u56e0\u4e3a\u5ba2\u6237\u7aef\u9a8c\u8bc1\u53ef\u4ee5\u88ab\u7ed5\u8fc7\u3002\u670d\u52a1\u5668\u4e0a\u4fdd\u5b58\u751f\u6210\u7684\u9a8c\u8bc1\u7801\u6587\u672c\uff0c\u7528\u6237\u63d0\u4ea4\u7684\u9a8c\u8bc1\u7801\u4e0e\u670d\u52a1\u5668\u4e0a\u7684\u6587\u672c\u8fdb\u884c\u6bd4\u5bf9\uff0c\u4ee5\u5b8c\u6210\u9a8c\u8bc1\u6d41\u7a0b\u3002<\/p>\n<\/p>\n<p><p>\u4ee5\u4e0a\u6b65\u9aa4\u5b8c\u6574\u5b9e\u73b0\u4e86\u4f7f\u7528HTML Canvas\u751f\u6210\u9a8c\u8bc1\u7801\u7684\u529f\u80fd\uff0c\u5176\u4e2d\u6bcf\u6b65\u90fd\u53ef\u4ee5\u6839\u636e\u5b9e\u9645\u9700\u8981\u589e\u52a0\u66f4\u591a\u590d\u6742\u5ea6\u548c\u5b89\u5168\u6027\u8003\u91cf\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>1. \u4e3a\u4ec0\u4e48\u8981\u4f7f\u7528 HTML Canvas \u751f\u6210\u9a8c\u8bc1\u7801\uff1f<\/strong><\/p>\n<p>\u4f7f\u7528 HTML Canvas \u751f\u6210\u9a8c\u8bc1\u7801\u7684\u4e3b\u8981\u4f18\u52bf\u5728\u4e8e\u5b83\u63d0\u4f9b\u4e86\u4e00\u79cd\u7075\u6d3b\u7684\u65b9\u5f0f\u6765\u521b\u5efa\u4e2a\u6027\u5316\u548c\u5b89\u5168\u6027\u66f4\u9ad8\u7684\u9a8c\u8bc1\u7801\u3002\u76f8\u6bd4\u4e8e\u4f20\u7edf\u7684\u9a8c\u8bc1\u7801\u751f\u6210\u65b9\u5f0f\uff0c\u901a\u8fc7\u4f7f\u7528 HTML Canvas\uff0c\u60a8\u53ef\u4ee5\u81ea\u5b9a\u4e49\u9a8c\u8bc1\u7801\u7684\u6837\u5f0f\u3001\u5b57\u4f53\u3001\u989c\u8272\u7b49\u7ec6\u8282\uff0c\u63d0\u9ad8\u9a8c\u8bc1\u7801\u7684\u53ef\u8bfb\u6027\u548c\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n<p><strong>2. HTML Canvas \u751f\u6210\u9a8c\u8bc1\u7801\u7684\u6b65\u9aa4\u662f\u4ec0\u4e48\uff1f<\/strong><\/p>\n<p>\u751f\u6210\u9a8c\u8bc1\u7801\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<ul>\n<li>\u521b\u5efa\u4e00\u4e2a HTML Canvas \u5143\u7d20\uff0c\u5e76\u8bbe\u7f6e\u5bbd\u5ea6\u548c\u9ad8\u5ea6\u3002<\/li>\n<li>\u83b7\u53d6 Canvas \u7684 2D \u4e0a\u4e0b\u6587\u5bf9\u8c61\u3002<\/li>\n<li>\u751f\u6210\u968f\u673a\u7684\u9a8c\u8bc1\u7801\u6587\u672c\u3002<\/li>\n<li>\u8bbe\u7f6e\u9a8c\u8bc1\u7801\u7684\u5b57\u4f53\u3001\u989c\u8272\u3001\u80cc\u666f\u7b49\u6837\u5f0f\u3002<\/li>\n<li>\u4f7f\u7528\u7ed8\u56fe\u64cd\u4f5c\u5c06\u9a8c\u8bc1\u7801\u6587\u672c\u5448\u73b0\u5728 Canvas \u4e0a\u3002<\/li>\n<li>\u4f7f\u7528\u7ed8\u56fe\u64cd\u4f5c\u6dfb\u52a0\u5e72\u6270\u7ebf\u3001\u566a\u70b9\u7b49\u589e\u52a0\u9a8c\u8bc1\u7801\u7684\u5b89\u5168\u6027\u3002<\/li>\n<li>\u6700\u540e\uff0c\u5c06\u751f\u6210\u7684\u9a8c\u8bc1\u7801\u56fe\u7247\u6216 Canvas \u5143\u7d20\u5448\u73b0\u7ed9\u7528\u6237\u3002<\/li>\n<\/ul>\n<p><strong>3. \u6709\u6ca1\u6709\u793a\u4f8b\u4ee3\u7801\u53ef\u4ee5\u53c2\u8003\uff1f<\/strong><\/p>\n<p>\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\u4ee3\u7801\u6bb5\uff0c\u6f14\u793a\u5982\u4f55\u4f7f\u7528 HTML Canvas \u751f\u6210\u9a8c\u8bc1\u7801\uff1a<\/p>\n<pre><code class=\"language-html\">&lt;canvas id=&quot;captchaCanvas&quot; width=&quot;200&quot; height=&quot;100&quot;&gt;&lt;\/canvas&gt;\n\n&lt;script&gt;\n  \/\/ \u83b7\u53d6 Canvas \u5143\u7d20\n  var canvas = document.getElementById(&quot;captchaCanvas&quot;);\n  var ctx = canvas.getContext(&quot;2d&quot;);\n  \n  \/\/ \u751f\u6210\u968f\u673a\u9a8c\u8bc1\u7801\u6587\u672c\n  var captchaText = generateRandomText();\n  \n  \/\/ \u8bbe\u7f6e\u9a8c\u8bc1\u7801\u6837\u5f0f\n  ctx.font = &quot;30px Arial&quot;;\n  ctx.fillStyle = &quot;black&quot;;\n  \n  \/\/ \u5728 Canvas \u4e0a\u7ed8\u5236\u9a8c\u8bc1\u7801\u6587\u672c\n  ctx.fillText(captchaText, 10, 50);\n  \n  \/\/ \u6dfb\u52a0\u5e72\u6270\u7ebf\u3001\u566a\u70b9\u7b49\n  \/\/ ...\n  \n  \/\/ \u751f\u6210\u7684\u9a8c\u8bc1\u7801\u56fe\u7247\u53ef\u4ee5\u4fdd\u5b58\u4e3a\u6587\u4ef6\u6216\u76f4\u63a5\u5c55\u793a\u7ed9\u7528\u6237\n  \/\/ ...\n  \n  \/\/ \u751f\u6210\u968f\u673a\u6587\u672c\u7684\u51fd\u6570\u793a\u4f8b\n  function generateRandomText() {\n    var text = &quot;&quot;;\n    var possible = &quot;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789&quot;;\n    \n    for (var i = 0; i &lt; 6; i++) {\n      text += possible.charAt(Math.floor(Math.random() * possible.length));\n    }\n    \n    return text;\n  }\n&lt;\/script&gt;\n<\/code><\/pre>\n<p>\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528\u4e86 Canvas \u5143\u7d20\u548c JavaScript \u7ed8\u56fe\u64cd\u4f5c\u6765\u751f\u6210\u4e00\u4e2a\u9a8c\u8bc1\u7801\u56fe\u7247\u3002\u4f60\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u9700\u8981\u8c03\u6574\u5b57\u4f53\u3001\u989c\u8272\u3001\u4f4d\u7f6e\u548c\u9a8c\u8bc1\u7801\u957f\u5ea6\u7b49\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"HTML Canvas \u7528\u4e8e\u751f\u6210\u9a8c\u8bc1\u7801\u7684\u65b9\u6cd5\u5305\u62ec\u521b\u5efa\u753b\u5e03\u3001\u751f\u6210\u968f\u673a\u5b57\u7b26\u3001\u5e94\u7528\u6587\u672c\u626d\u66f2\u3001\u6dfb\u52a0\u566a\u70b9\u4e0e\u5e72\u6270\u7ebf\u3001\u4ee5\u53ca\u6700 [&hellip;]","protected":false},"author":3,"featured_media":300002,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/299993"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=299993"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/299993\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/300002"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=299993"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=299993"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=299993"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}