{"id":546,"date":"2019-05-08T16:20:41","date_gmt":"2019-05-08T08:20:41","guid":{"rendered":"http:\/\/blog.yyhcw.com\/?p=546"},"modified":"2019-08-10T11:57:38","modified_gmt":"2019-08-10T03:57:38","slug":"tint-k%e4%b8%bb%e9%a2%98%e5%a2%9e%e5%8a%a0%e7%94%a8%e6%88%b7%e7%ae%a1%e7%90%86%e6%94%b6%e8%b4%a7%e5%9c%b0%e5%9d%80-%e6%89%8b%e6%8a%8a%e6%89%8b%e6%95%99%e4%bd%a0","status":"publish","type":"post","link":"https:\/\/blog.yyhcw.com\/post\/546.html","title":{"rendered":"Tint-K\u4e3b\u9898\u589e\u52a0\u7528\u6237\u7ba1\u7406\u6536\u8d27\u5730\u5740-\u624b\u628a\u624b\u6559\u4f60"},"content":{"rendered":"<!--wp-compress-html--><!--wp-compress-html no compression--><p>\u7531\u4e8e\u6211\u7684\u8fd9\u4e2a<a href=\"http:\/\/blog.yyhcw.com\">\u7269\u8054\u5361<\/a>\u4f7f\u7528\u7684\u662f\u7f51\u4e0aDOWN\u4e0b\u6765\u7684<a href=\"https:\/\/blog.yyhcw.com\/post\/tag\/tint-k%e4%b8%bb%e9%a2%98\" class=\"tag-tooltip\" data-toggle=\"tooltip\" title=\"\u67e5\u770b\u66f4\u591a\u5173\u4e8e Tint-K\u4e3b\u9898 \u7684\u6587\u7ae0\" target=\"_blank\">Tint-K\u4e3b\u9898<\/a>\uff0c\u53c8\u56e0\u9996\u6b21\u4f7f\u7528<a href=\"https:\/\/blog.yyhcw.com\/post\/tag\/wordpress\" class=\"tag-tooltip\" data-toggle=\"tooltip\" title=\"\u67e5\u770b\u66f4\u591a\u5173\u4e8e wordpress \u7684\u6587\u7ae0\" target=\"_blank\">wordpress<\/a>\uff0c\u5f88\u591a\u90fd\u4e0d\u77e5\u9053\u600e\u4e48\u4fee\u6539\uff0c\u53c8\u56e0\u4e3a\u8fd9\u4e2a<a href=\"https:\/\/blog.yyhcw.com\/post\/tag\/tint-k%e4%b8%bb%e9%a2%98\" class=\"tag-tooltip\" data-toggle=\"tooltip\" title=\"\u67e5\u770b\u66f4\u591a\u5173\u4e8e Tint-K\u4e3b\u9898 \u7684\u6587\u7ae0\" target=\"_blank\">Tint-K\u4e3b\u9898<\/a>\u5df2\u7ecf\u628a\u539f\u672c\u7684<a href=\"http:\/\/blog.yyhcw.com\/post\/540.html\">Tint\u6a21\u677f\u76ee\u5f55\u7ed3\u6784<\/a>\u66f4\u6539\u4e86\uff0c\u6545\u800c\u5f88\u591a\u5730\u65b9\u90fd\u9700\u8981\u81ea\u884c\u6478\u7d22\uff01<\/p>\n<p>\u4e0d\u77e5\u662f\u6211\u6ca1\u627e\u5230\u8fd8\u662f\u6a21\u677f\u4e2d\u6ca1\u6709\u8fd9\u4e2a\u7248\u5757\uff0c\u7528\u6237\u8d2d\u4e70\u5546\u54c1\u53ea\u80fd\u5728\u8d2d\u4e70\u7684\u65f6\u5019\u7ba1\u7406\u5730\u5740\uff0c\u5e76\u4e14\u6ca1\u6709\u5220\u9664\u529f\u80fd\uff0c\u6545\u800c\u60f3\u81ea\u884c\u89e3\u51b3\u4e0b\uff0c\u4e0b\u9762\u5c31\u628a\u9700\u8981\u6dfb\u52a0\u7684\u6587\u4ef6\u53ca\u9700\u8981\u4fee\u6539\u7684\u5730\u65b9\u8bb0\u5f55\u4e0b\uff0c\u5df2\u88ab\u540e\u9762\u518d\u6dfb\u52a0\u9875\u9762\u7684\u65f6\u5019\u4f7f\u7528\uff01\u76f4\u5954\u4e3b\u9898\uff1a<\/p>\n<p>1\uff1a\u5728 Tint\\core\\functions\\func.Loader.php \u4e2d\u5927\u69828748\u884c\u4f4d\u7f6e\u589e\u52a0\u8f7d\u5165 load_vm('me\/vm.Me.Address');<\/p>\n<p>2\uff1a\u5728 Tint\\core\\functions\\Constants.php \u6587\u4ef6\u4e2d\u5927\u698280\u884c\u5de6\u53f3 \u52a0\u4e0a \u201c'address' =&gt; 'address',\u201d\u7ed3\u679c\uff1a<\/p>\n<pre class=\"lang:php decode:true\">$me_allow_routes = json_encode(array(\r\n    'settings' =&gt; 'settings', \/\/profile\u8bbe\u7f6e\u7b49, @xxx\/profile\u53ea\u63d0\u4f9bprofile\u8d44\u6599\u67e5\u9605, \u4e0d\u53ef\u7f16\u8f91\r\n    \/\/'balance'  =&gt; 'balance',\r\n    'drafts'    =&gt; 'drafts',\r\n    'credits' =&gt; 'credits',\r\n\t'cash' =&gt; 'cash',\r\n    'order'    =&gt; 'order',\r\n\t'address'    =&gt; 'address',\r\n    'newpost' =&gt; 'newpost',\r\n    'editpost' =&gt; 'editpost',\r\n    'membership' =&gt; 'membership',\r\n    'notifications' =&gt; array(\r\n        'all',\r\n        'comment',\r\n        'star',\r\n        'update',\r\n        'credit' \/\/TODO remove?\r\n    ),\r\n    'messages' =&gt; array(\r\n        'inbox',\r\n        'sendbox'\r\n    ),\r\n    'orders' =&gt; array(\r\n        'all',\r\n        'credit',\r\n        'cash'\r\n    )\r\n));<\/pre>\n<p>\u672c\u6587\u4ef6\u4e2d166\u884c $site_endpoints = json_encode(array()); \u6570\u7ec4\u4e2d\u52a0\u5165\uff1a'my_address' =&gt; 'me\/address', \/\/\u6536\u8d27\u5730\u5740\u7ba1\u7406\u00a0 \u8fd9\u4e2a\u662f\u4f2a\u9759\u6001URL\u5730\u5740 \u53ef\u81ea\u884c\u8bbe\u7f6e<\/p>\n<p>3\uff1a\u5728 Tint\\core\\viewModels\\me \u76ee\u5f55\u4e2d \u589e\u52a0\u6587\u4ef6 vm.Me.Address.php \u5185\u5bb9 \u5f85\u5b9a\uff01<\/p>\n<p>4\uff1a\u5728 Tint\\core\\templates\\me \u76ee\u5f55\u4e2d \u589e\u52a0\u6587\u4ef6 tpl.Me.Address.php \u5185\u5bb9\u4e3a<\/p>\n<pre class=\"lang:php decode:true\">&lt;?php tt_get_header(); ?&gt;\r\n&lt;div id=\"content\" class=\"wrapper\"&gt;\r\n    &lt;!-- \u4e3b\u8981\u5185\u5bb9\u533a --&gt;\r\n    &lt;section class=\"container user-area\"&gt;\r\n        &lt;div class=\"inner row\"&gt;\r\n            &lt;?php load_mod('me\/me.NavMenu'); ?&gt;\r\n            &lt;?php load_mod('me\/me.Tab.Address'); ?&gt;  &lt;!---\u8fd9\u4e2a\u5730\u65b9\u53ef\u4ee5\u76f4\u63a5\u5199HTML \u4e5f\u53ef\u52a0\u8f7d\u5176\u5b83\u6587\u4ef6 --&gt;\r\n        &lt;\/div&gt;\r\n    &lt;\/section&gt;\r\n&lt;\/div&gt;\r\n&lt;?php tt_get_footer(); ?&gt;<\/pre>\n<p>5\uff1a\u5982\u679c\u5728\u7b2c\u56db\u4e2a\u6587\u4ef6\u4e2d\u76f4\u63a5\u5199HTML\u4e86\uff0c\u5219\u6b64\u6b65\u9aa4\u53ef\u7701\u7565\uff01\u5728 Tint\\core\\modules\\me \u76ee\u5f55\u4e2d \u589e\u52a0\u6587\u4ef6 me.Tab.Address.php \u91cc\u9762\u662f\u9875\u9762\u4e0a\u663e\u793a\u7684html\u5185\u5bb9<\/p>\n<p>OK\u4e86\uff0c\u770b\u770b\u9875\u9762\u662f\u4e0d\u662f\u53ef\u4ee5\u6253\u5f00\u4e86 http:\/\/blog.yyhcw.com\/me\/address \u7528\u6237\u53ef\u4ee5\u81ea\u884c\u8bbe\u5b9a\u6536\u8d27\u5730\u5740\u4e86\uff01<\/p>\n<!--wp-compress-html no compression--><!--wp-compress-html-->","protected":false},"excerpt":{"rendered":"\u7531\u4e8e\u6211\u7684\u8fd9\u4e2a\u7269\u8054\u5361\u4f7f\u7528\u7684\u662f\u7f51\u4e0aDOWN\u4e0b\u6765\u7684Tint-K\u4e3b\u9898\uff0c\u53c8\u56e0\u9996\u6b21\u4f7f\u7528wordpress\uff0c\u5f88\u591a\u90fd\u4e0d\u77e5\u9053\u600e\u4e48 \u00b7\u00b7\u00b7","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[126,28],"views":626,"_links":{"self":[{"href":"https:\/\/blog.yyhcw.com\/api\/wp\/v2\/posts\/546"}],"collection":[{"href":"https:\/\/blog.yyhcw.com\/api\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.yyhcw.com\/api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.yyhcw.com\/api\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.yyhcw.com\/api\/wp\/v2\/comments?post=546"}],"version-history":[{"count":0,"href":"https:\/\/blog.yyhcw.com\/api\/wp\/v2\/posts\/546\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.yyhcw.com\/api\/wp\/v2\/media?parent=546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.yyhcw.com\/api\/wp\/v2\/categories?post=546"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.yyhcw.com\/api\/wp\/v2\/tags?post=546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}