{"id":199318,"date":"2025-05-03T13:00:12","date_gmt":"2025-05-03T05:00:12","guid":{"rendered":"https:\/\/server.hk\/cnblog\/199318\/"},"modified":"2025-05-03T13:00:12","modified_gmt":"2025-05-03T05:00:12","slug":"ecshop%e4%b8%8d%e5%90%8c%e6%96%87%e7%ab%a0%e5%88%86%e7%b1%bb%e4%bd%bf%e7%94%a8%e4%b8%8d%e5%90%8c%e6%a8%a1%e6%9d%bf%e7%9a%84%e4%b8%a4%e7%a7%8d%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/199318\/","title":{"rendered":"ecshop\u4e0d\u540c\u6587\u7ae0\u5206\u7c7b\u4f7f\u7528\u4e0d\u540c\u6a21\u677f\u7684\u4e24\u79cd\u65b9\u6cd5"},"content":{"rendered":"<p>ecshop\u4e0d\u540c\u6587\u7ae0\u5206\u7c7b\u4f7f\u7528\u4e0d\u540c\u6a21\u677f\uff0c\u8fd9\u91cc\u63d0\u4f9b\u4e24\u79cd\u65b9\u6cd5\uff0c\u4e00\u79cd\u662f\u9012\u589e\u5224\u65adID\u7ed9\u4e0d\u540c\u6a21\u677f\u503c\uff0c\u53e6\u5916\u4e00\u79cd\u6240\u6709\u5206\u7c7b\u901a\u8fc7ID\u751f\u6210\u6a21\u677f\u540d\u79f0<\/p>\n<p> \u4e00\u3001 \u7b2c\u4e00\u79cd\u65b9\u6cd5<\/p>\n<p> 1.\u6253\u5f00article_cat.php\u6587\u4ef6\uff0c\u5728\u6700\u4e0b\u9762\u627e\u5230<\/p>\n<p> $smarty-&gt;display(&#8216;article_cat.dwt&#8217;, $cache_id);<\/p>\n<p> &nbsp;<\/p>\n<p> \u628a\u4ed6\u4fee\u6539\u4e3a\uff1a<\/p>\n<p> switch ($cat_id)<\/p>\n<p> {<\/p>\n<p> case 6:<\/p>\n<p> $smarty-&gt;display(&#8216;article_cat6.dwt&#8217;,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$cache_id);<br \/> &nbsp;break;<\/p>\n<p> case 7:<\/p>\n<p> $smarty-&gt;display(&#8216;article_cat7.dwt&#8217;,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$cache_id);<br \/> &nbsp;break;<\/p>\n<p> default:<br \/> $smarty-&gt;display(&#8216;article_cat.dwt&#8217;, $cache_id);<br \/> }<\/p>\n<p> &nbsp;<\/p>\n<p> \u6ce8\u91ca\uff1a<\/p>\n<p> case6&nbsp;&nbsp;\u4e2d&nbsp;6\u5c31\u662f\u6307id\u4e3a6\u7684\u6587\u7ae0\u5206\u7c7b\u3002\u6587\u7ae0\u5206\u7c7bID\u53ef\u5728\u540e\u53f0\u6587\u7ae0\u5206\u7c7b\u67e5\u770b\uff0c\u5c06\u9f20\u6807\u653e\u5728\u5206\u7c7b\u540d\u79f0\u4e0a\u6d4f\u89c8\u5668\u7684\u4e0b\u65b9\u5c31\u4f1a\u663e\u793a\u6539\u5206\u7c7b\u7684ID\u3002\u5982\uff1a\u4f60\u7684\u57df\u540d\/admin\/article.php?act=list&amp;cat_id=6\uff0c\u8fd9\u5c31\u662f\u4e00\u6587\u7ae0\u5206\u7c7b\u7684ID\u4e3a6\u3002<\/p>\n<p> $smarty-&gt;display(&#8216;article_cat6.dwt&#8217;,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$cache_id); \u5373\u4e3a\u6587\u7ae0\u5206\u7c7b\u4e3a6\u7684\u5206\u7c7b\u6307\u5b9a\u6a21\u677f\uff0c\u6a21\u677f\u4e3aarticle_cat6.dwt <\/p>\n","protected":false},"excerpt":{"rendered":"<p>ecshop\u4e0d\u540c\u6587\u7ae0\u5206\u7c7b\u4f7f\u7528\u4e0d\u540c&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-199318","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/199318","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=199318"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/199318\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=199318"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=199318"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=199318"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}