{"id":157906,"date":"2024-05-08T12:40:21","date_gmt":"2024-05-08T04:40:21","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/157906.html"},"modified":"2024-05-08T12:40:31","modified_gmt":"2024-05-08T04:40:31","slug":"%e5%a6%82%e4%bd%95%e7%94%a8%e4%bb%a3%e7%a0%81%e5%ae%9e%e7%8e%b0-javascript-mvc-%e6%a0%b7%e5%bc%8f%e6%a1%86%e6%9e%b6","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/157906.html","title":{"rendered":"\u5982\u4f55\u7528\u4ee3\u7801\u5b9e\u73b0 JavaScript MVC \u6837\u5f0f\u6846\u67b6"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/26220422\/6a499a03-cbde-430a-a03f-93300435b78a.webp\" alt=\"\u5982\u4f55\u7528\u4ee3\u7801\u5b9e\u73b0 JavaScript MVC \u6837\u5f0f\u6846\u67b6\" \/><\/p>\n<p><p>\u5728\u4f7f\u7528\u4ee3\u7801\u5b9e\u73b0JavaScript MVC\u6837\u5f0f\u6846\u67b6\u65f6\uff0c\u5173\u952e\u662f\u7406\u89e3\u5e76\u5206\u79bb\u5e94\u7528\u7684\u6a21\u578b(Model)\u3001\u89c6\u56fe(View)\u548c\u63a7\u5236\u5668(Controller)\u4e09\u4e2a\u6838\u5fc3\u7ec4\u4ef6\u3002<strong>\u6a21\u578b<\/strong>\u8d1f\u8d23\u6570\u636e\u64cd\u4f5c\u548c\u4e1a\u52a1\u903b\u8f91\u3001<strong>\u89c6\u56fe<\/strong>\u8d1f\u8d23\u9875\u9762\u5448\u73b0\u3001<strong>\u63a7\u5236\u5668<\/strong>\u8d1f\u8d23\u63a5\u6536\u7528\u6237\u8f93\u5165\u548c\u8c03\u7528\u6a21\u578b\u548c\u89c6\u56fe\u5b8c\u6210\u8bf7\u6c42\u3002\u5176\u4e2d\uff0c\u63a7\u5236\u5668\u4f5c\u4e3a\u6a21\u578b\u4e0e\u89c6\u56fe\u4e4b\u95f4\u7684\u4e2d\u95f4\u4eba\uff0c\u5b83\u51cf\u5c11\u4e86\u7cfb\u7edf\u5404\u90e8\u5206\u4e4b\u95f4\u7684\u8026\u5408\u5ea6\uff0c\u5e76\u4f7f\u5f97\u4ee3\u7801\u66f4\u6613\u4e8e\u7ef4\u62a4\u548c\u6269\u5c55\u3002<\/p>\n<\/p>\n<p><h2>\u4e00\u3001\u8bbe\u7f6e\u9879\u76ee\u7ed3\u6784<\/h2>\n<\/p>\n<p><p>\u5728\u5f00\u59cb\u7f16\u5199\u4ee3\u7801\u4e4b\u524d\uff0c\u9700\u8981\u8bbe\u7f6e\u4e00\u4e2a\u7b26\u5408MVC\u8bbe\u8ba1\u7684\u9879\u76ee\u7ed3\u6784\u3002\u5728\u9879\u76ee\u6587\u4ef6\u5939\u4e2d\uff0c\u4f60\u53ef\u80fd\u9700\u8981\u521b\u5efa\u4ee5\u4e0b\u5b50\u6587\u4ef6\u5939\uff1a<\/p>\n<\/p>\n<ul>\n<li>models: \u5b58\u653e\u5e94\u7528\u7684\u6570\u636e\u6a21\u578b\u76f8\u5173\u4ee3\u7801\u3002<\/li>\n<li>views: \u5b58\u653e\u5e94\u7528\u7684\u89c6\u56fe\u5c42\u76f8\u5173\u4ee3\u7801\u3002<\/li>\n<li>controllers: \u5b58\u653e\u5e94\u7528\u7684\u63a7\u5236\u5668\u76f8\u5173\u4ee3\u7801\u3002<\/li>\n<li>utils \u6216\u8005 lib: \u5b58\u653e\u4e00\u4e9b\u8f85\u52a9\u7c7b\u6216\u8005\u5e93\u6587\u4ef6\u3002<\/li>\n<\/ul>\n<p><p>\u5f53\u4f60\u7684\u9879\u76ee\u7ed3\u6784\u8bbe\u7f6e\u597d\u4e4b\u540e\uff0c\u4f60\u53ef\u4ee5\u5f00\u59cb\u6309\u7167MVC\u7684\u8bbe\u8ba1\u539f\u5219\u586b\u5165\u4ee3\u7801\u3002<\/p>\n<\/p>\n<p><h2>\u4e8c\u3001\u5efa\u7acb\u6a21\u578b\uff08MODEL\uff09<\/h2>\n<\/p>\n<p><p>\u6a21\u578b\u7528\u4e8e\u5c01\u88c5\u4e0e\u5e94\u7528\u7a0b\u5e8f\u7684\u4e1a\u52a1\u903b\u8f91\u76f8\u5173\u7684\u6570\u636e\u4ee5\u53ca\u5bf9\u6570\u636e\u7684\u5904\u7406\u65b9\u6cd5\u3002\u6a21\u578b\u6709\u8d23\u4efb\u5bf9\u8fd9\u4e9b\u6570\u636e\u8fdb\u884c\u5904\u7406\uff0c\u4f8b\u5982\uff1a\u6570\u636e\u5e93\u67e5\u8be2\u3001\u6570\u636e\u9a8c\u8bc1\u6216\u8005\u4e1a\u52a1\u903b\u8f91\u5e94\u7528\u3002<\/p>\n<\/p>\n<p><h3>\u521b\u5efa\u6570\u636e\u6a21\u578b<\/h3>\n<\/p>\n<p><pre><code class=\"language-javascript\">class Model {<\/p>\n<p>    constructor() {<\/p>\n<p>        this.data = [];<\/p>\n<p>    }<\/p>\n<p>    \/\/ \u6dfb\u52a0\u6570\u636e\u7684\u65b9\u6cd5<\/p>\n<p>    add(item) {<\/p>\n<p>        this.data.push(item);<\/p>\n<p>        this.commit(this.data);<\/p>\n<p>    }<\/p>\n<p>    \/\/ \u5220\u9664\u6570\u636e\u7684\u65b9\u6cd5<\/p>\n<p>    remove(index) {<\/p>\n<p>        this.data.splice(index, 1);<\/p>\n<p>        this.commit(this.data);<\/p>\n<p>    }<\/p>\n<p>    \/\/ \u6570\u636e\u66f4\u65b0\u81f3 localStorage \u7684\u65b9\u6cd5\uff0c\u6a21\u62df\u6301\u4e45\u5316<\/p>\n<p>    commit(data) {<\/p>\n<p>        localStorage.setItem(&#039;mvc_data&#039;, JSON.stringify(data));<\/p>\n<p>    }<\/p>\n<p>    \/\/ \u83b7\u53d6\u6570\u636e\u7684\u65b9\u6cd5<\/p>\n<p>    fetch() {<\/p>\n<p>        this.data = JSON.parse(localStorage.getItem(&#039;mvc_data&#039;)) || [];<\/p>\n<p>        return this.data;<\/p>\n<p>    }<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u4e09\u3001\u521b\u5efa\u89c6\u56fe\uff08VIEW\uff09<\/h2>\n<\/p>\n<p><p>\u89c6\u56fe\u662f\u5e94\u7528\u7a0b\u5e8f\u4e2d\u5904\u7406\u6570\u636e\u663e\u793a\u7684\u90e8\u5206\u3002\u5728MVC\u67b6\u6784\u4e2d\uff0c\u89c6\u56fe\u4ec5\u63a5\u53d7\u7528\u6237\u754c\u9762\u6240\u9700\u7684\u6570\u636e\uff0c\u4e0d\u5bf9\u5176\u8fdb\u884c\u4efb\u4f55\u5904\u7406\u3002<\/p>\n<\/p>\n<p><h3>\u6784\u5efa\u7528\u6237\u754c\u9762<\/h3>\n<\/p>\n<p><pre><code class=\"language-javascript\">class View {<\/p>\n<p>    constructor() {<\/p>\n<p>        this.app = this.getElement(&#039;#root&#039;);<\/p>\n<p>        \/\/ \u521b\u5efa\u5e76\u521d\u59cb\u5316\u8f93\u5165\u5143\u7d20<\/p>\n<p>        this.form = this.createElement(&#039;form&#039;);<\/p>\n<p>        this.input = this.createElement(&#039;input&#039;);<\/p>\n<p>        this.input.type = &#039;text&#039;;<\/p>\n<p>        this.submitButton = this.createElement(&#039;button&#039;);<\/p>\n<p>        this.submitButton.textContent = &#039;Submit&#039;;<\/p>\n<p>        \/\/ \u5c06\u8f93\u5165\u6846\u548c\u6309\u94ae\u6dfb\u52a0\u5230\u8868\u5355<\/p>\n<p>        this.form.append(this.input, this.submitButton);<\/p>\n<p>        \/\/ \u521b\u5efa\u663e\u793a\u6570\u636e\u5217\u8868\u7684\u5730\u65b9<\/p>\n<p>        this.list = this.createElement(&#039;ul&#039;, &#039;mvc-list&#039;);<\/p>\n<p>        \/\/ \u5c06\u8868\u5355\u548c\u5217\u8868\u6dfb\u52a0\u5230\u5e94\u7528\u7a0b\u5e8f<\/p>\n<p>        this.app.append(this.form, this.list);<\/p>\n<p>    }<\/p>\n<p>    createElement(tag, className) {<\/p>\n<p>        const element = document.createElement(tag);<\/p>\n<p>        if (className) element.classList.add(className);<\/p>\n<p>        return element;<\/p>\n<p>    }<\/p>\n<p>    getElement(selector) {<\/p>\n<p>        const element = document.querySelector(selector);<\/p>\n<p>        return element;<\/p>\n<p>    }<\/p>\n<p>    \/\/ \u83b7\u53d6\u8f93\u5165\u7684\u65b9\u6cd5<\/p>\n<p>    get _inputValue() {<\/p>\n<p>        return this.input.value.trim();<\/p>\n<p>    }<\/p>\n<p>    \/\/ \u91cd\u7f6e\u8f93\u5165\u6846\u7684\u65b9\u6cd5<\/p>\n<p>    _resetInput() {<\/p>\n<p>        this.input.value = &#039;&#039;;<\/p>\n<p>    }<\/p>\n<p>    \/\/ \u663e\u793a\u6a21\u578b\u6570\u636e\u7684\u65b9\u6cd5<\/p>\n<p>    displayItems(items) {<\/p>\n<p>        \/\/ \u5220\u9664\u6240\u6709\u5217\u8868\u9879<\/p>\n<p>        while (this.list.firstChild) {<\/p>\n<p>            this.list.removeChild(this.list.firstChild);<\/p>\n<p>        }<\/p>\n<p>        \/\/ \u663e\u793a\u5217\u8868\u4e2d\u6240\u6709\u9879<\/p>\n<p>        items.forEach((item, index) =&gt; {<\/p>\n<p>            const li = this.createElement(&#039;li&#039;);<\/p>\n<p>            li.textContent = item;<\/p>\n<p>            \/\/ \u8fd9\u91cc\u53ef\u4ee5\u6dfb\u52a0\u4e00\u4e2a\u5220\u9664\u6309\u94ae<\/p>\n<p>            this.list.append(li);<\/p>\n<p>        });<\/p>\n<p>    }<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u56db\u3001\u5b9e\u73b0\u63a7\u5236\u5668\uff08CONTROLLER\uff09<\/h2>\n<\/p>\n<p><p>\u63a7\u5236\u5668\u63a5\u6536\u7528\u6237\u7684\u8f93\u5165\u5e76\u8c03\u7528\u6a21\u578b\u548c\u89c6\u56fe\u53bb\u5b8c\u6210\u7528\u6237\u7684\u8bf7\u6c42\u3002\u63a7\u5236\u5668\u4e0d\u5904\u7406\u6570\u636e\uff0c\u53ea\u534f\u8c03\u6570\u636e\u5728\u6a21\u578b\u548c\u89c6\u56fe\u4e4b\u95f4\u6d41\u52a8\u3002<\/p>\n<\/p>\n<p><h3>\u7f16\u5199\u63a7\u5236\u5668\u903b\u8f91<\/h3>\n<\/p>\n<p><pre><code class=\"language-javascript\">class Controller {<\/p>\n<p>    constructor(model, view) {<\/p>\n<p>        this.model = model;<\/p>\n<p>        this.view = view;<\/p>\n<p>        \/\/ \u663e\u793a\u521d\u59cb\u5316\u7684\u6570\u636e<\/p>\n<p>        this.onInitDisplay();<\/p>\n<p>        \/\/ \u7ed1\u5b9a\u89c6\u56fe\u4e8b\u4ef6<\/p>\n<p>        this.view.form.addEventListener(&#039;submit&#039;, this.handleAddItem);<\/p>\n<p>        this.view.list.addEventListener(&#039;click&#039;, this.handleDeleteItem);<\/p>\n<p>    }<\/p>\n<p>    onInitDisplay = () =&gt; {<\/p>\n<p>        const items = this.model.fetch();<\/p>\n<p>        this.view.displayItems(items);<\/p>\n<p>    }<\/p>\n<p>    handleAddItem = event =&gt; {<\/p>\n<p>        event.preventDefault();<\/p>\n<p>        if (this.view._inputValue) {<\/p>\n<p>            this.model.add(this.view._inputValue);<\/p>\n<p>            this.view.displayItems(this.model.data);<\/p>\n<p>            this.view._resetInput();<\/p>\n<p>        }<\/p>\n<p>    }<\/p>\n<p>    handleDeleteItem = event =&gt; {<\/p>\n<p>        if (event.target.className === &#039;delete&#039;) {<\/p>\n<p>            const index = [...this.view.list.children].indexOf(event.target.parentElement);<\/p>\n<p>            this.model.remove(index);<\/p>\n<p>            this.view.displayItems(this.model.data);<\/p>\n<p>        }<\/p>\n<p>    }<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u4e94\u3001\u521d\u59cb\u5316\u5e94\u7528<\/h2>\n<\/p>\n<p><p>\u5728\u6240\u6709\u7ec4\u4ef6\u90fd\u521b\u5efa\u597d\u4e4b\u540e\uff0c\u53ef\u4ee5\u7f16\u5199\u4e00\u6bb5js\u4ee3\u7801\u5c06\u6a21\u578b\u3001\u89c6\u56fe\u548c\u63a7\u5236\u5668\u5b9e\u4f8b\u5316\uff0c\u5e76\u8fde\u63a5\u8d77\u6765\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-javascript\">document.addEventListener(&#039;DOMContentLoaded&#039;, () =&gt; {<\/p>\n<p>    const app = new Controller(new Model(), new View());<\/p>\n<p>});<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u4f60\u5c31\u80fd\u7528\u4ee3\u7801\u5b9e\u73b0\u4e00\u4e2a\u57fa\u672c\u7684JavaScript MVC\u6837\u5f0f\u6846\u67b6\u4e86\u3002\u8fd9\u53ea\u662f\u4e00\u4e2a\u7b80\u5316\u7684\u793a\u4f8b\uff0c\u9700\u8981\u6839\u636e\u5b9e\u9645\u5e94\u7528\u7684\u9700\u6c42\u8fdb\u884c\u8c03\u6574\u548c\u6269\u5c55\u3002\u7136\u800c\uff0c\u57fa\u7840\u6a21\u5f0f\u4fdd\u6301\u4e00\u81f4\uff1a\u6a21\u578b\u7ba1\u7406\u6570\u636e\uff0c\u89c6\u56fe\u663e\u793a\u5185\u5bb9\uff0c\u800c\u63a7\u5236\u5668\u5904\u7406\u7528\u6237\u8f93\u5165\u5e76\u534f\u8c03\u6a21\u578b\u548c\u89c6\u56fe\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>Q: \u5982\u4f55\u7528\u4ee3\u7801\u5b9e\u73b0 JavaScript \u7684 MVC \u6837\u5f0f\u6846\u67b6\uff1f<\/strong><\/p>\n<p>A: \u60f3\u8981\u5b9e\u73b0 JavaScript \u7684 MVC \u6837\u5f0f\u6846\u67b6\uff0c\u4f60\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u8fdb\u884c\uff1a<\/p>\n<ol>\n<li>\u9996\u5148\uff0c\u521b\u5efa\u4e00\u4e2a\u6a21\u578b\uff08Model\uff09\u5bf9\u8c61\uff0c\u7528\u4e8e\u5b58\u50a8\u6570\u636e\u3002\u8fd9\u4e2a\u5bf9\u8c61\u53ef\u4ee5\u5305\u542b\u6570\u636e\u7684\u5c5e\u6027\u548c\u65b9\u6cd5\uff0c\u7528\u4e8e\u83b7\u53d6\u548c\u4fee\u6539\u6570\u636e\u3002<\/li>\n<li><strong>Q1: \u5982\u4f55\u521b\u5efa\u6a21\u578b\u5bf9\u8c61\uff1f<\/strong><br \/>\nA: \u521b\u5efa\u6a21\u578b\u5bf9\u8c61\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u53ef\u4ee5\u4f7f\u7528\u539f\u751f JavaScript \u521b\u5efa\u5bf9\u8c61\u7684\u65b9\u5f0f\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u6765\u7b80\u5316\u8fd9\u4e2a\u8fc7\u7a0b\uff0c\u6bd4\u5982 Backbone.js \u6216 AngularJS\u3002<\/li>\n<li>\u63a5\u4e0b\u6765\uff0c\u521b\u5efa\u4e00\u4e2a\u89c6\u56fe\uff08View\uff09\u5bf9\u8c61\uff0c\u7528\u4e8e\u5c55\u793a\u6570\u636e\u548c\u4ea4\u4e92\u754c\u9762\u3002\u8fd9\u4e2a\u5bf9\u8c61\u53ef\u4ee5\u5305\u542b\u754c\u9762\u5143\u7d20\u7684\u5c5e\u6027\u548c\u65b9\u6cd5\uff0c\u7528\u4e8e\u64cd\u4f5c DOM \u5143\u7d20\u3002<\/li>\n<li><strong>Q2: \u5982\u4f55\u521b\u5efa\u89c6\u56fe\u5bf9\u8c61\uff1f<\/strong><br \/>\nA: \u521b\u5efa\u89c6\u56fe\u5bf9\u8c61\u7684\u65b9\u6cd5\u4e5f\u6709\u591a\u79cd\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u539f\u751f JavaScript \u64cd\u4f5c DOM \u5143\u7d20\u7684\u65b9\u5f0f\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u7c7b\u4f3c React \u6216 Vue.js \u8fd9\u6837\u7684\u5e93\u6765\u5b9e\u73b0\u53ef\u7ec4\u4ef6\u5316\u7684\u89c6\u56fe\u3002<\/li>\n<li>\u6700\u540e\uff0c\u521b\u5efa\u4e00\u4e2a\u63a7\u5236\u5668\uff08Controller\uff09\u5bf9\u8c61\uff0c\u7528\u4e8e\u8fde\u63a5\u6a21\u578b\u548c\u89c6\u56fe\uff0c\u5904\u7406\u7528\u6237\u4ea4\u4e92\u548c\u4e1a\u52a1\u903b\u8f91\u3002\u8fd9\u4e2a\u5bf9\u8c61\u53ef\u4ee5\u76d1\u542c\u7528\u6237\u7684\u64cd\u4f5c\uff0c\u8c03\u7528\u6a21\u578b\u5bf9\u8c61\u7684\u65b9\u6cd5\u6765\u4fee\u6539\u6570\u636e\uff0c\u7136\u540e\u66f4\u65b0\u89c6\u56fe\u5bf9\u8c61\u6765\u5c55\u793a\u6700\u65b0\u7684\u6570\u636e\u3002<\/li>\n<li><strong>Q3: \u5982\u4f55\u521b\u5efa\u63a7\u5236\u5668\u5bf9\u8c61\uff1f<\/strong><br \/>\nA: \u521b\u5efa\u63a7\u5236\u5668\u5bf9\u8c61\u7684\u65b9\u6cd5\u4e5f\u6709\u591a\u79cd\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u539f\u751f JavaScript \u76d1\u542c\u4e8b\u4ef6\u7684\u65b9\u5f0f\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u7c7b\u4f3c Ember.js \u6216 Knockout.js \u8fd9\u6837\u7684\u5e93\u6765\u5b9e\u73b0\u6570\u636e\u7ed1\u5b9a\u548c\u4e8b\u4ef6\u76d1\u542c\u3002<\/li>\n<li>\u6700\u540e\uff0c\u4f60\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u7684\u9700\u6c42\uff0c\u4f7f\u7528\u4ee5\u4e0a\u4e09\u4e2a\u5bf9\u8c61\u6765\u6784\u5efa\u4f60\u7684 MVC \u67b6\u6784\u3002\u53ef\u4ee5\u6839\u636e\u65e2\u5b9a\u89c4\u5219\u548c\u6d41\u7a0b\uff0c\u5c06\u4ee3\u7801\u9010\u6b65\u5b9e\u73b0\uff0c\u4ee5\u8fbe\u5230\u826f\u597d\u7684\u53ef\u7ef4\u62a4\u6027\u548c\u53ef\u6269\u5c55\u6027\u3002<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"\u5728\u4f7f\u7528\u4ee3\u7801\u5b9e\u73b0JavaScript MVC\u6837\u5f0f\u6846\u67b6\u65f6\uff0c\u5173\u952e\u662f\u7406\u89e3\u5e76\u5206\u79bb\u5e94\u7528\u7684\u6a21\u578b(Model)\u3001\u89c6\u56fe(View [&hellip;]","protected":false},"author":3,"featured_media":157930,"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\/157906"}],"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=157906"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/157906\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/157930"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=157906"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=157906"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=157906"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}