{"id":60565,"date":"2025-04-24T10:43:03","date_gmt":"2025-04-24T02:43:03","guid":{"rendered":"https:\/\/fwq.ai\/blog\/60565\/"},"modified":"2025-04-24T10:43:03","modified_gmt":"2025-04-24T02:43:03","slug":"ecshop%e9%a6%96%e9%a1%b5%e4%b8%ad%ef%bc%82%e6%89%80%e6%9c%89%e5%95%86%e5%93%81%e5%88%86%e7%b1%bb%ef%bc%82%e7%9a%84%e8%87%aa%e5%8a%a8%e9%9a%90%e8%97%8f%e5%8a%9f%e8%83%bd-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/60565\/","title":{"rendered":"Ecshop\u9996\u9875\u4e2d\uff02\u6240\u6709\u5546\u54c1\u5206\u7c7b\uff02\u7684\u81ea\u52a8\u9690\u85cf\u529f\u80fd"},"content":{"rendered":"<p> \u5728ecshop\u505a\u7684\u4e00\u4e2a\u7f51\u7ad9\u4e2d\uff0c\u9996\u9875\u7684\u6240\u6709\u5546\u54c1\u5206\u7c7b\u6321\u4f4f\u4e86\u540e\u9762\u7684\u9996\u9875\u6eda\u52a8\u5e7f\u544a\uff0c\u5e0c\u671b\u80fd\u591f\u9f20\u6807\u653e\u4e0a\u53bb\uff0c\u663e\u793a\uff0c\u4e0d\u653e\u4e0a\u53bb\uff0c\u5c31\u81ea\u52a8\u9690\u85cf\u3002<\/p>\n<p> \u8fd9\u4e2a\u529f\u80fd\uff0c\u770b\u8d77\u6765\u5f88\u5bb9\u6613\uff0c\u539f\u672c\u4ee5\u4e3a\uff0c\u51e0\u5206\u949f\u7684\u4e8b\u60c5\u3002\u7ed3\u679c\u505a\u8d77\u6765\uff0c\u53d1\u73b0\u8fd8\u7ecf\u5386\u4e86\u4e00\u4e9b\u5c0f\u66f2\u6298\u3002\u6700\u7ec8\u5b9e\u73b0\u6548\u679c\u5982\u4e0b\u3002<\/p>\n<p> \u5de6\u4fa7\u4e3a\u9f20\u6807\u6ca1\u653e\u4e0a\u53bb\u7684\u65f6\u5019\uff0c\u83dc\u5355\u81ea\u52a8\u9690\u85cf\u3002\u53f3\u4fa7\u4e3a\u9f20\u6807\u653e\u4e0a\u53bb\u540e\uff0c\u83dc\u5355\u81ea\u52a8\u663e\u793a\u3002<\/p>\n<p> \u4e8b\u4ef6\u4ece&nbsp;onclick\u4fee\u6539\u4e3aonMouseOver\uff0conMouseOut\u5373\u53ef\u3002<\/p>\n<p> \u8fd9\u6837\u5b8c\u6210\u540e\uff0c\u611f\u89c9\u5927\u529f\u544a\u6210\u4e86\uff0c\u7ed3\u679c\u4e00\u8bd5\u9a8c\uff0c\u53d1\u73b0\u8fd8\u6709\u95ee\u9898\u3002\u8fd9\u6837\u505a\uff0c\u53ea\u662f\u628a\u83dc\u5355\u4e2d\u7684\u7b2c\u4e00\u6761\u9690\u85cf\u4e86\u3002\u5176\u4ed6\u7684\u8fd8\u4e00\u76f4\u5728\u663e\u793a\u3002\u968f\u540e\uff0c\u5bf9js\u4e2d\u7684sw_navTest\u8fdb\u884c\u4e86\u6539\u9020\u3002\u7ec8\u4e8e\u641e\u5b9a\u3002<\/p>\n<p> \u73b0\u5728\u4ecd\u6709\u4e00\u4e2a\u7591\u95ee\u3002\u5373\uff0c\u867d\u7136\u5b9e\u73b0\u4e86\uff0c\u4f46\u662f\u5e76\u4e0d\u660e\u767d\u539f\u7406\u3002<\/p>\n<p> \u6700\u7ec8\u5b9e\u73b0\u7ed3\u679c\u5982\u4e0b\u3002<\/p>\n<p> \u5728category_tree_index.lbi \u6587\u4ef6\u4e2d\u8fdb\u884c\u4fee\u6539\u3002<\/p>\n<p> \u5728&lt;script type=&#8221;text\/javascript&#8221;&gt;&lt;\/script&gt;\u4e4b\u95f4\u518d\u589e\u52a0\u4e00\u4e2ajs\u51fd\u6570\u3002<\/p>\n<p> \u6211\u547d\u540d\u4e3asw_navTest(),\u5927\u5bb6\u53ef\u4ee5\u6839\u636e\u8981\u6c42\u81ea\u5df1\u6765\u5b9a\u3002\u51fd\u6570\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<p> &nbsp; function sw_navTest(obj)<br \/> &nbsp; {<br \/> &nbsp; var a = document.getElementsByName(obj);<br \/> &nbsp; &nbsp; var num=0;<br \/> &nbsp; &nbsp; for (i=0; i&lt;=a.length; i++){<br \/> &nbsp; &nbsp; &nbsp; &nbsp; var cat =a[i];<br \/> &nbsp; &nbsp; &nbsp; &nbsp; if (cat){<br \/> &nbsp;if(cat.style.visibility == &#8220;hidden&#8221;)<br \/> &nbsp;{<br \/> &nbsp;cat.style.visibility = &#8220;visible&#8221;;<br \/> &nbsp;}<br \/> &nbsp;else<br \/> &nbsp;{<br \/> &nbsp;cat.style.visibility = &#8220;hidden&#8221;;<br \/> &nbsp;}<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br \/> &nbsp; &nbsp; &nbsp; &nbsp; }<br \/> &nbsp; }<\/p>\n<p> \u5728\u53e6\u4e00\u90e8\u5206\u4e2d\u4fee\u6539\u540e\u5982\u4e0b\uff1a<\/p>\n<p> &lt;div id=&#8221;category_tree&#8221; onMouseOver =&#8221;sw_navTest(1)&#8221; &nbsp;onMouseOut=&#8221;sw_navTest(1)&#8221; &gt;<br \/> &lt;dl class=&#8221;clearfix&#8221;&gt;<br \/> &lt;div class=&#8221;mainCategory&#8221;&gt;<br \/> &nbsp; &nbsp; &lt;h2&gt;&lt;a href=&#8221;http:\/\/blog.csdn.net\/kllsg\/article\/details\/search.php&#8221; target=&#8221;_blank&#8221;&gt;\u6240\u6709\u5546\u54c1\u5206\u7c7b&lt;\/a&gt;&lt;\/h2&gt;<br \/> &nbsp; &nbsp; &lt;\/div&gt;<br \/> &nbsp; &nbsp; &lt;!&#8211;{foreach from=$categories item=cat name=no}&#8211;&gt;<br \/> &lt;div class=&#8221;dt&#8221; name=&#8221;1&#8243; style=&#8221;visibility:hidden;&#8221; &gt;<br \/> &nbsp; &nbsp; &lt;div &nbsp;{if $smarty.foreach.no.iteration eq 9}style=&#8221;border-bottom:none;&#8221;{\/if} onMouseOver=&#8221;sw_nav2({$smarty.foreach.no.iteration},1);&#8221; onMouseOut=&#8221;sw_nav2({$smarty.foreach.no.iteration},0);&#8221; &gt;<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &lt;div id=&#8221;HandleLI2_{$smarty.foreach.no.iteration}&#8221;&gt;&lt;a class=&#8221;a {if $smarty.foreach.no.index mod 2 eq 0}{else}t{\/if}&#8221; href=&#8221;http:\/\/blog.csdn.net\/kllsg\/article\/details\/{$cat.url}&#8221;&gt;{$cat.name|escape:html}&lt;i&gt;&lt;\/i&gt;&lt;\/a&gt;&lt;\/div&gt;<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;dd id=DisSub2_{$smarty.foreach.no.iteration} style=&#8221;display:none&#8221;&gt;<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;!&#8211;{foreach from=$cat.cat_id item=child}&#8211;&gt;<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;a class=&#8221;over_2&#8243; href=&#8221;http:\/\/blog.csdn.net\/kllsg\/article\/details\/{$child.url}&#8221;&gt;{$child.name|escape:html}&lt;\/a&gt;<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div class=&#8221;clearfix&#8221;&gt;<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;!&#8211;{foreach from=$child.cat_id item=childer}&#8211;&gt;<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;a class=&#8221;over_3&#8243; href=&#8221;http:\/\/blog.csdn.net\/kllsg\/article\/details\/{$childer.url}&#8221;&gt;{$childer.name|escape:html}&lt;\/a&gt;<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;!&#8211;{\/foreach}&#8211;&gt;<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/div&gt;<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;!&#8211;{\/foreach}&#8211;&gt;<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/dd&gt;&nbsp;<br \/> &lt;\/div&gt;<br \/> &lt;\/div&gt;<br \/> &nbsp; &nbsp; &lt;!&#8211;{\/foreach}&#8211;&gt;&nbsp;<br \/> &lt;\/dl&gt;<br \/> &lt;\/div&gt;<\/p>\n<p> \u4e3b\u8981\u5728id=&#8221;category_tree&#8221; \u8fd9\u4e2adiv\u4e2d\u589e\u52a0\u4e86\u9f20\u6807\u4e8b\u4ef6\u3002\u53e6\u5916\u547d\u540d\u4e86div\u540d\u5b57\u4e3a1\uff0c\u5e76\u9ed8\u8ba4\u4e3a\u9690\u85cf\u3002<\/p>\n<p> \u8fd9\u91cc\u8981\u8bf4\u660e\u4e00\u4e0b\u3002\u6ca1\u770b\u5230\u8fd9\u4e2a\u547d\u540d\u4e3a1\u7684div\u6709\u5faa\u73af\u5440\uff0c\u4e3a\u4ec0\u4e48\u7b2c\u4e00\u6b21\u5c06\u8fd9\u4e2adiv\u7684id\u547d\u540d\u4e3a1\uff0c\u4e14\u54cd\u5e94\u51fd\u6570\u4e2d\u53ea\u5904\u7406\u4e00\u6b21\u7684\u65f6\u5019\uff0c\u53d1\u73b0\uff0c\u53ea\u6709\u4e00\u4e2a\u4e00\u7ea7\u83dc\u5355\u88ab\u9690\u85cf\u3002\u540e\u6765\u6539\u4e3a\u540d\u5b57\u4e3a1\uff0c\u5e76\u4e14\u8fdb\u884c\u4e86\u5faa\u73af\u540e\uff0c\u624d\u8fbe\u5230\u7406\u60f3\u6548\u679c\u3002<\/p>\n<p> \u8fd9\u91cc\u8fd8\u8981\u4ee5\u540e\u7814\u7a76\uff0c\u5927\u5bb6\u5982\u679c\u77e5\u9053\u8bf7\u7559\u8a00\u544a\u77e5\u3002<\/p>\n<p> \u8fd9\u6837\uff0c\u5c31\u57fa\u672c\u5b9e\u73b0\u4e86ecshop\u9996\u9875\u7684\u201c\u5168\u90e8\u5546\u54c1\u5206\u7c7b\u201d\u81ea\u52a8\u663e\u793a\u548c\u9690\u85cf\u7684\u529f\u80fd\u3002<\/p>\n<p> \u6574\u4e2a\u8fc7\u7a0b\u8fdb\u5c55\u8fd8\u7b97\u987a\u5229\uff0c\u4e3b\u8981\u611f\u8c22\u5404\u4f4d\u5927\u795e\u5728\u7f51\u4e0a\u7684\u5206\u4eab\u3002\u5c06\u6574\u4e2a\u8fc7\u7a0b\u8bb0\u5f55\u4e0b\u6765\u3002\u4e5f\u5e0c\u671b\u80fd\u5e2e\u5230\u9700\u8981\u7684\u4eba\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728ecshop\u505a\u7684\u4e00\u4e2a\u7f51\u7ad9\u4e2d\uff0c\u9996\u9875\u7684\u6240\u6709\u5546\u54c1\u5206\u7c7b\u6321\u4f4f\u4e86\u540e\u9762\u7684\u9996\u9875\u6eda\u52a8\u5e7f\u544a\uff0c\u5e0c\u671b\u80fd\u591f\u9f20\u6807\u653e\u4e0a\u53bb\uff0c\u663e\u793a\uff0c\u4e0d\u653e\u4e0a\u53bb\uff0c\u5c31\u81ea\u52a8\u9690\u85cf\u3002 \u8fd9\u4e2a\u529f\u80fd\uff0c\u770b\u8d77\u6765\u5f88\u5bb9\u6613\uff0c\u539f\u672c\u4ee5\u4e3a\uff0c\u51e0\u5206\u949f\u7684\u4e8b\u60c5\u3002\u7ed3\u679c\u505a\u8d77\u6765\uff0c\u53d1\u73b0\u8fd8\u7ecf\u5386\u4e86\u4e00\u4e9b\u5c0f\u66f2\u6298\u3002\u6700\u7ec8\u5b9e\u73b0\u6548\u679c\u5982\u4e0b\u3002 \u5de6\u4fa7\u4e3a\u9f20\u6807\u6ca1\u653e\u4e0a\u53bb\u7684\u65f6\u5019\uff0c\u83dc\u5355\u81ea\u52a8\u9690\u85cf\u3002\u53f3\u4fa7\u4e3a\u9f20\u6807\u653e\u4e0a\u53bb\u540e\uff0c\u83dc\u5355\u81ea\u52a8\u663e\u793a\u3002 \u4e8b\u4ef6\u4ece&nbsp;onclick\u4fee\u6539\u4e3aonMouseOver\uff0conMouseOut\u5373\u53ef\u3002 \u8fd9\u6837\u5b8c\u6210\u540e\uff0c\u611f\u89c9\u5927\u529f\u544a\u6210\u4e86\uff0c\u7ed3\u679c\u4e00\u8bd5\u9a8c\uff0c\u53d1\u73b0\u8fd8\u6709\u95ee\u9898\u3002\u8fd9\u6837\u505a\uff0c\u53ea\u662f\u628a\u83dc\u5355\u4e2d\u7684\u7b2c\u4e00\u6761\u9690\u85cf\u4e86\u3002\u5176\u4ed6\u7684\u8fd8\u4e00\u76f4\u5728\u663e\u793a\u3002\u968f\u540e\uff0c\u5bf9js\u4e2d\u7684sw_navTest\u8fdb\u884c\u4e86\u6539\u9020\u3002\u7ec8\u4e8e\u641e\u5b9a\u3002 \u73b0\u5728\u4ecd\u6709\u4e00\u4e2a\u7591\u95ee\u3002\u5373\uff0c\u867d\u7136\u5b9e\u73b0\u4e86\uff0c\u4f46\u662f\u5e76\u4e0d\u660e\u767d\u539f\u7406\u3002 \u6700\u7ec8\u5b9e\u73b0\u7ed3\u679c\u5982\u4e0b\u3002 \u5728category_tree_index.lbi \u6587\u4ef6\u4e2d\u8fdb\u884c\u4fee\u6539\u3002 \u5728&lt;script type=&#8221;text\/javascript&#8221;&gt;&lt;\/script&gt;\u4e4b\u95f4\u518d\u589e\u52a0\u4e00\u4e2ajs\u51fd\u6570\u3002 \u6211\u547d\u540d\u4e3asw_navTest(),\u5927\u5bb6\u53ef\u4ee5\u6839\u636e\u8981\u6c42\u81ea\u5df1\u6765\u5b9a\u3002\u51fd\u6570\u5185\u5bb9\u5982\u4e0b\uff1a &nbsp; function sw_navTest(obj) &nbsp; { &nbsp; var a = document.getElementsByName(obj); &nbsp; &nbsp; var num=0; &nbsp; &nbsp; for (i=0; i&lt;=a.length; i++){ &nbsp; &nbsp; &nbsp; &nbsp; var cat =a[i]; &nbsp; &nbsp; &nbsp; &nbsp; if (cat){ &nbsp;if(cat.style.visibility == &#8220;hidden&#8221;) &nbsp;{ &nbsp;cat.style.visibility = &#8220;visible&#8221;; &nbsp;} &nbsp;else &nbsp;{ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-60565","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/60565","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=60565"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/60565\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=60565"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=60565"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=60565"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}