{"id":59704,"date":"2025-04-23T15:42:08","date_gmt":"2025-04-23T07:42:08","guid":{"rendered":"https:\/\/fwq.ai\/blog\/59704\/"},"modified":"2025-04-23T15:42:08","modified_gmt":"2025-04-23T07:42:08","slug":"%e5%9c%a8ecshop%e7%95%99%e8%a8%80%e6%9d%bf%e9%a1%b5%e9%9d%a2%e6%98%be%e7%a4%ba%e5%95%86%e5%93%81%e7%bc%a9%e7%95%a5%e5%9b%be","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/59704\/","title":{"rendered":"\u5728ECSHOP\u7559\u8a00\u677f\u9875\u9762\u663e\u793a\u5546\u54c1\u7f29\u7565\u56fe"},"content":{"rendered":"<p> \u8fd9\u91cc\u6240\u8bf4\u7684\u7559\u8a00\u677f\u9875\u9762\uff0c\u662f\u6307\u72ec\u7acb\u7684ecshop\u90a3\u4e2a\u7559\u8a00\u677f\u680f\u76ee\uff08message.php\uff09\uff0c\u800c\u4e0d\u662f\u6307\u5546\u54c1\u8be6\u60c5\u9875\u9762\u5e95\u90e8\u7684\u201c\u7528\u6237\u8bc4\u8bba\u201d\u533a\uff0c\u901a\u8fc7\u8fd9\u4e2a\u65b9\u6cd5\uff0c\u7528\u6237\u53ef\u4ee5\u5f15\u7528\u5546\u54c1\u7684\u4fe1\u606f\uff0c\u8fdb\u884c\u5546\u54c1\u7684\u8ba8\u8bba\u548c\u7559\u8a00\u3002\u90a3\u4e48\u5728\u8fd9\u91cc\u7559\u8a00\u677f\u91cc\u5982\u4f55\u624d\u80fd\u5c06\u5546\u54c1\u7684\u7f29\u7565\u56fe\u663e\u793a\u51fa\u6765\u5462\uff0c\u73b0\u5728\u6765\u8bf4\u4e00\u8bf4\u5177\u4f53\u7684\u65b9\u6cd5\u3002<\/p>\n<h2> \u4fee\u6539\u65b9\u6cd5<\/h2>\n<p> \u9996\u5148\u4fee\u6539&nbsp;message.php&nbsp;\u6587\u4ef6\uff0c\u5c06\u4e0b\u9762\u4ee3\u7801<\/p>\n<pre>\r\nif($rows['id_value']){\r\n&nbsp;&nbsp; &nbsp;$sql_goods = \"SELECT goods_name FROM \".$GLOBALS['ecs']-&gt;table('goods');\r\n&nbsp;&nbsp; &nbsp;$sql_goods .= \"WHERE goods_id= \".$rows['id_value'];\r\n&nbsp;&nbsp; &nbsp;$goods_res = $GLOBALS['db']-&gt;getRow($sql_goods);\r\n&nbsp;&nbsp; &nbsp;$msg[$rows['msg_time']]['goods_name'] = $goods_res['goods_name'];\r\n&nbsp;&nbsp; &nbsp;$msg[$rows['msg_time']]['goods_url'] = build_uri('goods', array('gid' =&gt; $rows['id_value']), $goods_res['goods_name']);\r\n}<\/pre>\n<p> \u4fee\u6539\u4e3a\uff1a<\/p>\n<pre>\r\nif($rows['id_value']){\r\n&nbsp;&nbsp; &nbsp;$sql_goods = \"SELECT goods_name,goods_thumb FROM \".$GLOBALS['ecs']-&gt;table('goods');\r\n&nbsp;&nbsp; &nbsp;$sql_goods .= \"WHERE goods_id= \".$rows['id_value'];\r\n&nbsp;&nbsp; &nbsp;$goods_res = $GLOBALS['db']-&gt;getRow($sql_goods);\r\n&nbsp;&nbsp; &nbsp;$msg[$rows['msg_time']]['goods_name'] = $goods_res['goods_name'];\r\n&nbsp;&nbsp; &nbsp;$msg[$rows['msg_time']]['goods_url'] = build_uri('goods', array('gid' =&gt; $rows['id_value']), $goods_res['goods_name']);\r\n&nbsp;&nbsp; &nbsp;$msg[$rows['msg_time']]['goods_thumb'] = get_image_path($row['id_value'], $goods_res['goods_thumb'], true);\r\n}<\/pre>\n<p> \u7136\u540e\u518d\u7ee7\u7eed\u4fee\u6539\u6a21\u677f\u6587\u4ef6\uff0c\u8fd9\u91cc\u4ee5\u9ed8\u8ba4\u6a21\u677f\u4e3a\u4f8b\uff0c\u6253\u5f00 \/themes\/default\/library\/message_list.lbi \u6587\u4ef6\u5728<\/p>\n<pre>\r\n&lt;div class=\"msgBottomBorder word\"&gt;<\/pre>\n<p> \u4e0b\u8fb9\u589e\u52a0\u4e00\u884c\u4ee3\u7801<\/p>\n<pre>\r\n&lt;!-{if $msg.goods_thumb}-&gt;&lt;img src=\"{$msg.goods_thumb}\" width=\"100\" height=\"100\"&gt;&lt;br\/&gt;&lt;!-{\/if}-&gt;<\/pre>\n<p> \u8fd9\u6837\u5c31\u53ef\u4ee5\u4e86\uff0c\u5237\u65b0\u4e00\u4e0b\u5c31\u80fd\u770b\u5230\u6548\u679c\u4e86\uff0c\u6ce8\u610f\u4e0a\u9762\u7684\u7f29\u7565\u56fe\u5927\u5c0f\u662f\u9ed8\u8ba4\u7684\u8bbe\u7f6e\uff0c\u5982\u679c\u4f60\u4fee\u6539\u4e86\u5546\u54c1\u7684\u7f29\u7565\u56fe\u5927\u5c0f\uff0c\u8bf7\u4fee\u6539\u4e3a\u4f60\u8bbe\u7f6e\u7684\u503c\uff0c\u4e0d\u7136\u56fe\u7247\u663e\u793a\u53ef\u80fd\u6709\u5f02\u5e38\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u91cc\u6240\u8bf4\u7684\u7559\u8a00\u677f\u9875\u9762\uff0c\u662f\u6307\u72ec\u7acb\u7684ecshop\u90a3\u4e2a\u7559\u8a00\u677f\u680f\u76ee\uff08message.php\uff09\uff0c\u800c\u4e0d\u662f\u6307\u5546\u54c1\u8be6\u60c5\u9875\u9762\u5e95\u90e8\u7684\u201c\u7528\u6237\u8bc4\u8bba\u201d\u533a\uff0c\u901a\u8fc7\u8fd9\u4e2a\u65b9\u6cd5\uff0c\u7528\u6237\u53ef\u4ee5\u5f15\u7528\u5546\u54c1\u7684\u4fe1\u606f\uff0c\u8fdb\u884c\u5546\u54c1\u7684\u8ba8\u8bba\u548c\u7559\u8a00\u3002\u90a3\u4e48\u5728\u8fd9\u91cc\u7559\u8a00\u677f\u91cc\u5982\u4f55\u624d\u80fd\u5c06\u5546\u54c1\u7684\u7f29\u7565\u56fe\u663e\u793a\u51fa\u6765\u5462\uff0c\u73b0\u5728\u6765\u8bf4\u4e00\u8bf4\u5177\u4f53\u7684\u65b9\u6cd5\u3002 \u4fee\u6539\u65b9\u6cd5 \u9996\u5148\u4fee\u6539&nbsp;message.php&nbsp;\u6587\u4ef6\uff0c\u5c06\u4e0b\u9762\u4ee3\u7801 if($rows[&#8216;id_value&#8217;]){ &nbsp;&nbsp; &nbsp;$sql_goods = &#8220;SELECT goods_name FROM &#8220;.$GLOBALS[&#8216;ecs&#8217;]-&gt;table(&#8216;goods&#8217;); &nbsp;&nbsp; &nbsp;$sql_goods .= &#8220;WHERE goods_id= &#8220;.$rows[&#8216;id_value&#8217;]; &nbsp;&nbsp; &nbsp;$goods_res = $GLOBALS[&#8216;db&#8217;]-&gt;getRow($sql_goods); &nbsp;&nbsp; &nbsp;$msg[$rows[&#8216;msg_time&#8217;]][&#8216;goods_name&#8217;] = $goods_res[&#8216;goods_name&#8217;]; &nbsp;&nbsp; &nbsp;$msg[$rows[&#8216;msg_time&#8217;]][&#8216;goods_url&#8217;] = build_uri(&#8216;goods&#8217;, array(&#8216;gid&#8217; =&gt; $rows[&#8216;id_value&#8217;]), $goods_res[&#8216;goods_name&#8217;]); } \u4fee\u6539\u4e3a\uff1a if($rows[&#8216;id_value&#8217;]){ &nbsp;&nbsp; &nbsp;$sql_goods = &#8220;SELECT goods_name,goods_thumb FROM &#8220;.$GLOBALS[&#8216;ecs&#8217;]-&gt;table(&#8216;goods&#8217;); &nbsp;&nbsp; &nbsp;$sql_goods .= &#8220;WHERE goods_id= &#8220;.$rows[&#8216;id_value&#8217;]; &nbsp;&nbsp; &nbsp;$goods_res = $GLOBALS[&#8216;db&#8217;]-&gt;getRow($sql_goods); &nbsp;&nbsp; &nbsp;$msg[$rows[&#8216;msg_time&#8217;]][&#8216;goods_name&#8217;] [&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-59704","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/59704","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=59704"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/59704\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=59704"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=59704"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=59704"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}