您好,欢迎来到95分类目录!站长微信:vip3632094
当前位置:95分类目录 » 站长资讯 » 网站测评 » 文章详细 订阅RssFeed

【深度测评】m.1688.com - 国内领先的B2B批发采购平台

来源:本站原创 浏览:62次 时间:2026-02-13
简介:m.1688 的核心内容是商品与供应商列表,这些信息由海量卖家上传,属于“交易信息”而非原创内容。然而,平台通过持续的运营活动,如专题推广、品牌旗舰店、质量评测等,保持每日 >10 万条商品更新,信息新鲜度较高。平台自带的 搜索页面 包含多维过滤(行业、价格区间、付款方式、运输方式),为买家提供精准匹配,且页面脚注常併展示相关行业资讯,提升信息价值。

【深度测评】m.1688.com - 国内领先的B2B批发采购平台


站点概览































指标 说明
域名 m.1688.com
定位 面向中国制造业和中小企业的移动B2B批发采购平台
所属行业 电商、贸买
细分领域地位 国内最大的批发供应链信息提供者之一,功能覆盖精准搜索、砍价、加工合作、代理合作
目标人群 采购商、供应商、加工厂商、代理商及海外买家

审核员评价(重点)


内容质量


m.1688 的核心内容是商品与供应商列表,这些信息由海量卖家上传,属于“交易信息”而非原创内容。然而,平台通过持续的运营活动,如专题推广、品牌旗舰店、质量评测等,保持每日 >10 万条商品更新,信息新鲜度较高。平台自带的 搜索页面 包含多维过滤(行业、价格区间、付款方式、运输方式),为买家提供精准匹配,且页面脚注常併展示相关行业资讯,提升信息价值。


用户体验



  • 加载速度:移动端首屏加载约 1.8 秒,页面整体响应时间保持在 2.5 秒以内。服务器已完成 CDN+全局缓存部署,春节期间数据量大幅增加仍能稳定提供服务。

  • 交互设计:采用“类App”式沉浸式布局,顶部橱窗条放置关键操作(砍价、在线客服、会议邀请),底部固定导航栏提升访问流畅度。商品详情页的 3D 视图、视差滚动以及秒级连调 API,满足中小卖家对展示的需求。

  • 移动端兼容性:支持 iOS 12+、Android 7+,并通过 Responsive Design 统一适配,保证在多尺寸设备上无白边、无拉伸。


SEO 潜力(从目录站视角)


平台的页面布局基于业务端的关键字参数(如 price, category, agent),各分类页均拥有自定义 </code> 与 <code><meta description></code>,但缺乏深层次的站内链接结构。已通过 Open Graph 与 Structured Data 提高搜索展示效果。然而,<strong>目录站关注的外链权重</strong>方面,该站点主要使用内部代理和第三方支付链接,缺乏外部权重链,需进一步提升与行业门户(如 <a href="https://www.alibaba.com" target="_blank" rel="noopener">Alibaba.com</a>)的引用质量。</p> <br><h2>特色亮点</h2> <br><ol> <br><li><strong>精准搜索与过滤</strong>:支持多维字段组合搜索,并以即时筛选结果呈现,极大缩短了采购周期。</li> <br><li><strong>砍价谈判功能</strong>:买卖双方可在个人消息频道进行即时价格谈判,支持订单即时生效,减少交易摩擦。</li> <br><li><strong>加工与代理服务</strong>:平台提供“加工合作”与“代理合作”快捷入口,在商品详情页右侧直接展示可合作意向,帮助企业快速拓展供应链。</li> <br></ol> <br><h2>优缺点</h2> <br><table class="table"> <br><tbody> <br><tr> <br><td>✅ 优点</td> <br><td>1. 海量供应商,覆盖各类工业品与消费品; 2. 价格谈判直连,省去中间人。 3. 移动端体验细腻,适配多屏设备。</td> <br></tr> <br><tr> <br><td>❌ 缺点</td> <br><td>1. 语言设置限定较多,海外买家使用体验不佳; 2. 需要实名注册,流程相对繁琐; 3. 商品品质鉴别不够透明,需单独评测。</td> <br></tr> <br></tbody> <br></table> <br><h2>目录站收录结语</h2> <br><p>经过严格评估,<a href="../siteinfo/3149.html">m.1688.com</a> 具备<strong>内容扎实、备案健全、用户口碑好</strong>等多项收录底线,且平台的移动化布局与行业深耕服务契合目录站的站点筛选标准。我们授权名单收录,并赋予此站 <strong>4⭐</strong> 的推荐星级,期待为广大读者带来可靠的进口与采购渠道。</p> <br><p class="alert">温馨提示:如有合作商机,建议通过平台提供的官方 API 进行深度集成。</p> <br><div style="text-align: center; margin-top: 30px;"><a class="btn" href="https://m.1688.com" target="_blank" rel="noopener">立即访问 m.1688.com</a></div> <br><p class="verified">本文由 <strong>[95分类目录]</strong> 审核组原创测评,旨在发掘中文互联网优质站点。</p></div> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7900219627358725" crossorigin="anonymous"></script> <!-- 95dir-shouye-vip-xiamian --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-7900219627358725" data-ad-slot="5028809478" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <div class="hcatelist"> <li><i class="fas fa-tag"></i>标签: <a href="/search/tags/%E7%94%B5%E5%95%86.html" title="查看更多关于'电商'的文章">电商</a> <a href="/search/tags/%E8%B4%B8%E4%B9%B0.html" title="查看更多关于'贸买'的文章">贸买</a> </li> </div> <!-- SEO内链优化:相关文章和导航 --> <div class="seo-internal-links" style="margin: 20px 0; padding: 15px; background: #f8f9fa; border-radius: 8px; border-left: 4px solid #28a745;"> <h4 style="margin: 0 0 12px 0; font-size: 16px; color: #333; font-weight: bold;"> <i class="fas fa-link" style="color: #28a745; margin-right: 8px;"></i>相关推荐 </h4> <div style="line-height: 2.2; font-size: 14px;"> <a href="/article/326.html" title="浏览更多网站测评文章" style="color: #28a745; text-decoration: none; margin-right: 15px;"> <i class="fas fa-folder" style="margin-right: 5px;"></i>更多网站测评文章 </a> <a href="/article/" title="站长资讯" style="color: #28a745; text-decoration: none; margin-right: 15px;"> <i class="fas fa-newspaper" style="margin-right: 5px;"></i>站长资讯 </a> <a href="/webdir/" title="网站目录" style="color: #28a745; text-decoration: none; margin-right: 15px;"> <i class="fas fa-sitemap" style="margin-right: 5px;"></i>网站目录 </a> <a href="/update/" title="最新收录" style="color: #28a745; text-decoration: none; margin-right: 15px;"> <i class="fas fa-clock" style="margin-right: 5px;"></i>最新收录 </a> <a href="/vip_list/" title="VIP网站" style="color: #28a745; text-decoration: none;"> <i class="fas fa-crown" style="margin-right: 5px;"></i>VIP网站 </a> </div> </div> <div id="relsite" class="clearfix"> <h2>相关站点</h2> <ul class="rellist" itemscope itemtype="https://schema.org/ItemList"> <li itemprop="itemListElement" itemscope itemtype="https://schema.org/WebSite"><a href="/siteinfo/9971.html" title="访问王策中技术博客网站" itemprop="url"><img src="/public/images/nopic.gif" width="100" height="80" alt="王策中技术博客网站截图" itemprop="image" /><strong itemprop="name">王策中技术博客</strong></a></li> </ul> </div> <div class="text-xs text-muted"><div><span>©</span> 版权声明</div><div class="posts-copyright"><div><br><fieldset style="border:1px dashed #008CFF;padding:10px;border-radius:8px;line-height: 2em;color: #6D6D6D"><legend align="center" style="color:#FFFFFF;width:200px;text-align:center;background-color:#008CFF;font-size: 14px;border-radius: 5px">95分类目录 - 版权声明</legend>1、本主题所有言论和图片纯属会员个人意见,与本站立场无关。<br> 2、本站所有主题由该文章作者发表,该文章作者与<a href="https://www.95dir.com/" rel="nofollow"><font color="#FF6600">95分类目录</font></a>享有文章相关版权。<br> 3、其他单位或个人使用、转载或引用本文时必须同时征得该文章作者和<a href="https://www.95dir.com/" rel="nofollow"><font color="#FF6600">95分类目录</font></a>的同意。<br> 4、文章作者须承担一切因本文发表而直接或间接导致的民事或刑事法律责任。<br> 5、本帖部分内容转载自其它媒体,但并不代表本站赞同其观点和对其真实性负责。<br> 6、如本帖侵犯到任何版权问题,请立即告知本站,本站将及时予与删除并致以最深的歉意。<br> 7、<a href="https://www.95dir.com/" rel="nofollow"><font color="#FF6600">95分类目录</font></a>管理员有权不事先通知发贴者而删除本文。</fieldset><br></div></div></div> <!-- 打赏按钮 --> <div class="donate-button-container"> <button onclick="showDonatePopup()">打赏支持</button> <div class="fenxiang"><div class="social-share"></div></div> </div><!-- 打赏弹窗 --> <div id="donate-popup" style="display:none;"> <div class="donate-popup-content"> <span class="close" onclick="closeDonatePopup()">×</span> <h3>您的赞助更新的动力</h3> <div class="donate-qr-codes"> <div> <h4>微信打赏</h4> <img src="https://cdn.jsdelivr.net/gh/zhuxiaoming2001/tuchuang/wzlingdi/202412022206265.png" alt="WeChat QR Code"> </div> <div> <h4>支付宝打赏</h4> <img src="https://cdn.jsdelivr.net/gh/zhuxiaoming2001/tuchuang/wzlingdi/202412022206984.png" alt="Alipay QR Code"> </div> </div> </div> </div> <ul class="prevnext"> <li>上一篇: <a href="/artinfo/1532759.html">2026年remove.bg官方网站入口+深度测评</a></li> <li>下一篇: <a href="/artinfo/1532761.html">2026年豆瓣读书官方网站入口+深度测评</a></li> </ul> </div> <!-- 文章评论功能 --> <div class="blank10"></div> <div id="article-comments" class="clearfix"> <h2 style="color: #667eea;font-size:16px;">💬 文章评论</h2> <!-- 评论统计 --> <div id="comment-stats" class="comment-stats" style="background: #f8f9fa; padding: 15px; border-radius: 8px; margin-bottom: 20px;"> <div style="text-align: center; color: #666;"> <span id="loading-stats">正在加载评论统计...</span> </div> </div> <!-- 评论表单 --> <div class="comment-form" style="background: #fff; padding: 20px; border: 1px solid #e9ecef; border-radius: 8px; margin-bottom: 20px;"> <h3 style="margin-top: 0; color: #333; font-size: 16px;">发表评论</h3> <form id="comment-form"> <input type="hidden" name="art_id" value="1532760"> <!-- 评论内容 --> <div style="margin-bottom: 15px;"> <label style="display: block; margin-bottom: 5px; font-weight: bold;">评论内容:</label> <div class="textarea-container" style="position: relative;"> <textarea name="comment_content" id="main-comment-textarea" placeholder="请分享您对这篇文章的看法,支持表情和媒体链接..." style="width: 100%; height: 100px; padding: 10px; border: 1px solid #ddd; border-radius: 4px; resize: vertical; font-family: inherit;" maxlength="1000"></textarea> <!-- 表情按钮 --> <button type="button" id="emoji-btn-main" style="position: absolute; right: 10px; bottom: 10px; background: none; border: none; font-size: 18px; cursor: pointer; padding: 5px; z-index: 10;">😊</button> <!-- 表情选择器 --> <div id="emoji-picker-main-comment-textarea" class="emoji-picker" style="display: none; position: absolute; top: 100%; left: 0; right: 0; background: white; border: 1px solid #ddd; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 1000; margin-top: 5px;"> <div class="emoji-grid"> <span onclick="insertEmoji('main-comment-textarea', '😊')">😊</span> <span onclick="insertEmoji('main-comment-textarea', '😂')">😂</span> <span onclick="insertEmoji('main-comment-textarea', '❤️')">❤️</span> <span onclick="insertEmoji('main-comment-textarea', '👍')">👍</span> <span onclick="insertEmoji('main-comment-textarea', '👎')">👎</span> <span onclick="insertEmoji('main-comment-textarea', '😍')">😍</span> <span onclick="insertEmoji('main-comment-textarea', '😭')">😭</span> <span onclick="insertEmoji('main-comment-textarea', '😱')">😱</span> <span onclick="insertEmoji('main-comment-textarea', '🤔')">🤔</span> <span onclick="insertEmoji('main-comment-textarea', '😴')">😴</span> <span onclick="insertEmoji('main-comment-textarea', '🎉')">🎉</span> <span onclick="insertEmoji('main-comment-textarea', '🔥')">🔥</span> <span onclick="insertEmoji('main-comment-textarea', '💯')">💯</span> <span onclick="insertEmoji('main-comment-textarea', '⭐')">⭐</span> <span onclick="insertEmoji('main-comment-textarea', '🚀')">🚀</span> <span onclick="insertEmoji('main-comment-textarea', '💡')">💡</span> </div> </div> </div> <div style="text-align: right; font-size: 12px; color: #999; margin-top: 5px;"> <span id="char-count">0</span>/1000字符 </div> </div> <!-- 验证码 + 提交按钮 --> <div style="text-align:center; margin-top:20px;"> <div style="display:inline-flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:center;"> <!-- 验证码输入框 --> <input type="text" name="code" id="comment-code-input" placeholder="验证码" maxlength="6" style="width:90px; height:36px; padding:5px 8px; border:1px solid #ccc; border-radius:4px; font-size:14px; text-align:center;" /> <!-- 验证码图片 --> <span id="mycode" style="vertical-align:middle;"></span> <!-- 提交按钮 --> <button type="submit" style="background:#007bff; color:white; padding:8px 25px; border:none; border-radius:4px; cursor:pointer; font-size:14px;"> 发表评论 </button> </div> </div> </form> </div> <!-- 评论列表 --> <div id="comments-list" class="comments-list"> <div style="text-align: center; color: #666; padding: 20px;"> 正在加载评论... </div> </div> </div> <div class="blank10"></div> </div> <aside id="mainbox-right"> <!--<div class="ad250x250"></div>--> <div class="blank10"></div> <div id="bestart"> <h3>推荐资讯</h3> <ul class="artlist_b"> <li><a href="/artinfo/1534004.html">五款本周精选开源实用项目,个个干货满满</a></li> <li><a href="/artinfo/1534003.html">GitHub超10万Star项目:免费域名永久注册,零花费搞定个人网站地址</a></li> <li><a href="/artinfo/1534002.html">Win7终极版x64重制镜像发布:内置补丁与USB3/NVMe驱动,旧电脑装机告别驱动难题</a></li> <li><a href="/artinfo/1533998.html">2026年当佰网 - 文章资料与软件下载资源站官方网站入口+深度测评</a></li> <li><a href="/artinfo/1533997.html">2026年GitHub - JustVugg/colibri: Run frontier MoE models on hardware you already own — pure C, zero d</a></li> <li><a href="/artinfo/1533996.html">2026年GitHub - JustVugg/colibri: Run frontier MoE models on hardware you already own — pure C, zero d</a></li> <li><a href="/artinfo/1533995.html">2026年习题打印生成器 - 在线出题A4打印工具官方网站入口+深度测评</a></li> <li><a href="/artinfo/1533994.html">2026年中国天气地图 — 实时城市天气预报可视化官方网站入口+深度测评</a></li> <li><a href="/artinfo/1534001.html">PHP2Shell漏洞爆发,老版本用户需紧急应对</a></li> <li><a href="/artinfo/1533999.html">新版《魔女嘉莉》为何口碑登顶系列之最</a></li> </ul> </div> <div class="blank10"></div> <div id="bestweb" class="mag"> <h3>推荐站点</h3> <ul class="weblist_b"> <li><a href="/siteinfo/10015.html"><img src="/uploads/website/www.kfzy.net.webp" width="100" height="80" alt="夸父资源社" loading="lazy"></a><strong><a href="/siteinfo/10015.html" title="夸父资源社">夸父资源社</a></strong><p>夸父资源社(kfzy.net)是一个专注于夸克网盘资源分享与交流的专业社区,同时整合百度云网盘、迅雷等多平台资源,致力于为广大网盘爱好者提供一站式资源下载与分享服务。平台汇聚了海量夸克网盘资源,涵盖影视、软件、文档、学习资料等多元分类,用户可便捷搜索、获取并分享各类网盘资源。夸父资源社注重用户体验,提供高效的资源检索功能和活跃的盘友交流社区,帮助用户快速找到所需资源,解决网盘资源获取难题。同时,平台鼓励用户参与互动,分享优质资源,共同构建绿色、健康、丰富的网盘资源生态圈。无论您是资源搜集达人还是普通下载用户,夸父资源社都能为您提供高效、便捷、可靠的网盘资源服务,是您值得信赖的网盘资源共享与交流首选平台。</p><address><a href="http://www.kfzy.net" target="_blank" rel="noopener" class="visit" onClick="clickout(10015)">www.kfzy.net</a></address></li> <li><a href="/siteinfo/10014.html"><img src="/uploads/website/www.wpzy.org.webp" width="100" height="80" alt="网盘资源社" loading="lazy"></a><strong><a href="/siteinfo/10014.html" title="网盘资源社">网盘资源社</a></strong><p>网盘资源社(wpzy.org)是一个专业的云盘资源导航与交流平台,致力于为用户提供高效、全面的网盘资源聚合服务。网站深度整合夸克网盘、百度云网盘、迅雷云盘等主流云存储生态中的公开共享资源,涵盖影视、软件、学习资料、电子书等多个领域。通过人工筛选与用户共建的模式,盘友资源社不仅提供精准的资源导航与搜索服务,更打造了一个活跃的网盘爱好者交流社区。用户在此可获取最新的网盘资源链接、分享稀缺内容、交流搜索技巧,并获取各类资源的实用评测。作为专业的下载资源分享网站,网盘资源社始终以提升资源获取效率、保障链接有效性为核心,为每一位访客节省时间,提供省心、可靠的一站式云资源发现体验。</p><address><a href="http://www.wpzy.org" target="_blank" rel="noopener" class="visit" onClick="clickout(10014)">www.wpzy.org</a></address></li> <li><a href="/siteinfo/9955.html"><img src="/uploads/website/www.qqdir.com.webp" width="100" height="80" alt="QQ上网导航" loading="lazy"></a><strong><a href="/siteinfo/9955.html" title="QQ上网导航">QQ上网导航</a></strong><p>QQ上网导航是一个专业的免费网站分类目录平台,提供快捷的行业网站检索与提交服务。平台精选国内教育、金融、医疗、娱乐等十余大类的权威站点,确保收录网站高质量、信誉良好。用户可通过关键词搜索、一键收藏或RSS订阅,快速定位所需资源,显著提升浏览效率。站长亦可免费提交站点、获取收录报告并参与平台推广,获得精准流量扶持,实现站点曝光与增长。</p><address><a href="http://qqdir.com" target="_blank" rel="noopener" class="visit" onClick="clickout(9955)">qqdir.com</a></address></li> <li><a href="/siteinfo/9943.html"><img src="/public/images/nopic.gif" width="100" height="80" alt="AI工具导航站 - 发现优质实用AI工具网站" loading="lazy"></a><strong><a href="/siteinfo/9943.html" title="AI工具导航站 - 发现优质实用AI工具网站">AI工具导航站 - 发现优质实用AI工具网站</a></strong><p>AI工具导航站(asll.net)是一个致力于帮助用户发现全球优质、实用AI工具的一站式网站导航平台。平台紧跟人工智能发展前沿,系统性地收录并分类整理了涵盖AI写作、AI绘画、音视频处理、编程开发及办公协同等多个领域的尖端生产力工具。我们通过严格的筛选机制与多维度评估,为职场人士、创作者和开发者提供精准的工具分类索引与直达链接。无论您是寻求提升工作效率,还是探索前沿AI应用,都能在此快速定位最适合的智能化解决方案,轻松开启高效智能的数字化工作流。</p><address><a href="http://asll.net" target="_blank" rel="noopener" class="visit" onClick="clickout(9943)">asll.net</a></address></li> <li><a href="/siteinfo/9919.html"><img src="/uploads/website/shuzinengliang.oss-cn-beijing.aliyuncs.com.webp" width="100" height="80" alt="号令天下" loading="lazy"></a><strong><a href="/siteinfo/9919.html" title="号令天下">号令天下</a></strong><p>号令天下(913.com.cn)是国内专业的手机号码测吉凶及数字能量分析平台。网站依托传统周易五行理论,融合现代数字能量学,独创“八星排盘”测算系统,为用户提供免费、便捷的手机号吉凶查询服务。通过深度解析手机号码背后的数理磁场,帮助用户全面了解号码对个人运势、财运及事业的潜在影响。号令天下致力于用科学严谨的态度解读数字密码,引导用户理性看待数字能量,为您挑选吉祥号码、优化人生运势提供客观的决策参考。</p><address><a href="http://913.com.cn" target="_blank" rel="noopener" class="visit" onClick="clickout(9919)">913.com.cn</a></address></li> </ul> </div> </div> </div> <!--<div style="max-width: 1200px; margin: 0 auto 15px auto; padding-left: 10px;"> <span style="font-size: 13px; color: #888; font-weight: bold; border-left: 3px solid #ff6b35; padding-left: 8px;">精品专题</span> </div> <div style="max-width: 1000px; margin: 0 auto 25px auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; padding: 0 10px;"> <a href="/diypage/1.html" title="95dir网站日志" style="display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #eee; padding: 12px; border-radius: 10px; text-decoration: none; transition: all 0.3s;" onmouseover="this.style.borderColor='#ff6b35';this.style.transform='translateY(-2px)';" onmouseout="this.style.borderColor='#eee';this.style.transform='translateY(0)栽培';"> <span style="font-size: 18px; margin-right: 8px;">📄</span> <span style="color: #333; font-weight: bold; font-size: 14px;">95dir网站日志</span> </a> <a href="/diypage/3.html" title="网站收录说明" style="display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #eee; padding: 12px; border-radius: 10px; text-decoration: none; transition: all 0.3s;" onmouseover="this.style.borderColor='#ff6b35';this.style.transform='translateY(-2px)';" onmouseout="this.style.borderColor='#eee';this.style.transform='translateY(0)栽培';"> <span style="font-size: 18px; margin-right: 8px;">📄</span> <span style="color: #333; font-weight: bold; font-size: 14px;">网站收录说明</span> </a> <a href="/diypage/4.html" title="全球主流搜索引擎收录入口大全" style="display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #eee; padding: 12px; border-radius: 10px; text-decoration: none; transition: all 0.3s;" onmouseover="this.style.borderColor='#ff6b35';this.style.transform='translateY(-2px)';" onmouseout="this.style.borderColor='#eee';this.style.transform='translateY(0)栽培';"> <span style="font-size: 18px; margin-right: 8px;">📄</span> <span style="color: #333; font-weight: bold; font-size: 14px;">全球主流搜索引擎收录入口大全</span> </a> <a href="/diypage/5.html" title="95分类目录简介与平台收录运行机制公告" style="display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #eee; padding: 12px; border-radius: 10px; text-decoration: none; transition: all 0.3s;" onmouseover="this.style.borderColor='#ff6b35';this.style.transform='translateY(-2px)';" onmouseout="this.style.borderColor='#eee';this.style.transform='translateY(0)栽培';"> <span style="font-size: 18px; margin-right: 8px;">📄</span> <span style="color: #333; font-weight: bold; font-size: 14px;">95分类目录简介与平台收录运行机制公告</span> </a> <a href="/diypage/6.html" title="2026 年度 AI 生产力工具巅峰汇总" style="display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #eee; padding: 12px; border-radius: 10px; text-decoration: none; transition: all 0.3s;" onmouseover="this.style.borderColor='#ff6b35';this.style.transform='translateY(-2px)';" onmouseout="this.style.borderColor='#eee';this.style.transform='translateY(0)栽培';"> <span style="font-size: 18px; margin-right: 8px;">🚀</span> <span style="color: #333; font-weight: bold; font-size: 14px;">2026 年度 AI 生产力工具巅峰汇总</span> </a> <a href="/diypage/7.html" title="站长必备:2026 极致效率工具箱" style="display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #eee; padding: 12px; border-radius: 10px; text-decoration: none; transition: all 0.3s;" onmouseover="this.style.borderColor='#ff6b35';this.style.transform='translateY(-2px)';" onmouseout="this.style.borderColor='#eee';this.style.transform='translateY(0)栽培';"> <span style="font-size: 18px; margin-right: 8px;">📄</span> <span style="color: #333; font-weight: bold; font-size: 14px;">站长必备:2026 极致效率工具箱</span> </a> <a href="/diypage/8.html" title="2026 必看博客:深度思考与技术先锋" style="display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #eee; padding: 12px; border-radius: 10px; text-decoration: none; transition: all 0.3s;" onmouseover="this.style.borderColor='#ff6b35';this.style.transform='translateY(-2px)';" onmouseout="this.style.borderColor='#eee';this.style.transform='translateY(0)栽培';"> <span style="font-size: 18px; margin-right: 8px;">📄</span> <span style="color: #333; font-weight: bold; font-size: 14px;">2026 必看博客:深度思考与技术先锋</span> </a> <a href="/diypage/9.html" title="出海淘金:2026 全球化与跨境生存工具" style="display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #eee; padding: 12px; border-radius: 10px; text-decoration: none; transition: all 0.3s;" onmouseover="this.style.borderColor='#ff6b35';this.style.transform='translateY(-2px)';" onmouseout="this.style.borderColor='#eee';this.style.transform='translateY(0)栽培';"> <span style="font-size: 18px; margin-right: 8px;">📄</span> <span style="color: #333; font-weight: bold; font-size: 14px;">出海淘金:2026 全球化与跨境生存工具</span> </a> <a href="/diypage/10.html" title="2026 站长必备:全自动 AI 内容创作与 SEO 伪原创工具导航" style="display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #eee; padding: 12px; border-radius: 10px; text-decoration: none; transition: all 0.3s;" onmouseover="this.style.borderColor='#ff6b35';this.style.transform='translateY(-2px)';" onmouseout="this.style.borderColor='#eee';this.style.transform='translateY(0)栽培';"> <span style="font-size: 18px; margin-right: 8px;">🚀</span> <span style="color: #333; font-weight: bold; font-size: 14px;">2026 站长必备:全自动 AI 内容创作与 SEO 伪原创工具导航</span> </a> <a href="/diypage/11.html" title="网站收录翻倍实战方案:百度快照快速抓取与 Sitemap 优化指南" style="display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #eee; padding: 12px; border-radius: 10px; text-decoration: none; transition: all 0.3s;" onmouseover="this.style.borderColor='#ff6b35';this.style.transform='translateY(-2px)';" onmouseout="this.style.borderColor='#eee';this.style.transform='translateY(0)栽培';"> <span style="font-size: 18px; margin-right: 8px;">📄</span> <span style="color: #333; font-weight: bold; font-size: 14px;">网站收录翻倍实战方案:百度快照快速抓取与 Sitemap 优化指南</span> </a> <a href="/diypage/12.html" title="职场资源不求人:设计师、程序员与自媒体必备库" style="display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #eee; padding: 12px; border-radius: 10px; text-decoration: none; transition: all 0.3s;" onmouseover="this.style.borderColor='#ff6b35';this.style.transform='translateY(-2px)';" onmouseout="this.style.borderColor='#eee';this.style.transform='translateY(0)栽培';"> <span style="font-size: 18px; margin-right: 8px;">📄</span> <span style="color: #333; font-weight: bold; font-size: 14px;">职场资源不求人:设计师、程序员与自媒体必备库</span> </a> <a href="/diypage/13.html" title="2026 网站变现全攻略:权重提升与商业化之路" style="display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #eee; padding: 12px; border-radius: 10px; text-decoration: none; transition: all 0.3s;" onmouseover="this.style.borderColor='#ff6b35';this.style.transform='translateY(-2px)';" onmouseout="this.style.borderColor='#eee';this.style.transform='translateY(0)栽培';"> <span style="font-size: 18px; margin-right: 8px;">📄</span> <span style="color: #333; font-weight: bold; font-size: 14px;">2026 网站变现全攻略:权重提升与商业化之路</span> </a> <a href="/diypage/14.html" title="2026 极致效率工具与多媒体资源聚合" style="display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #eee; padding: 12px; border-radius: 10px; text-decoration: none; transition: all 0.3s;" onmouseover="this.style.borderColor='#ff6b35';this.style.transform='translateY(-2px)';" onmouseout="this.style.borderColor='#eee';this.style.transform='translateY(0)栽培';"> <span style="font-size: 18px; margin-right: 8px;">📄</span> <span style="color: #333; font-weight: bold; font-size: 14px;">2026 极致效率工具与多媒体资源聚合</span> </a> </div>--> <div id="fmenu" style="text-align: center; margin-bottom: 25px; background: #fafafa; padding: 15px; border-radius: 12px; max-width: 1000px; margin-left: auto; margin-right: auto;"> <a href="/update/" style="color: #666; text-decoration: none; margin: 0 12px; font-size: 14px; display: inline-flex; align-items: center;"> <span style="margin-right: 4px;">🆕</span>最新收录</a> <a href="/archives/" style="color: #666; text-decoration: none; margin: 0 12px; font-size: 14px; display: inline-flex; align-items: center;"> <span style="margin-right: 4px;">📚</span>数据归档</a> <a href="/top/" style="color: #666; text-decoration: none; margin: 0 12px; font-size: 14px; display: inline-flex; align-items: center;"> <span style="margin-right: 4px;">🔥</span>TOP排行</a> <a href="/datastats/" style="color: #666; text-decoration: none; margin: 0 12px; font-size: 14px; display: inline-flex; align-items: center;"> <span style="margin-right: 4px;">📊</span>数据公示</a> <a href="/sitemap/all.xml" style="color: #666; text-decoration: none; margin: 0 12px; font-size: 14px; display: inline-flex; align-items: center;"> <span style="margin-right: 4px;">🗺️</span>站点地图</a> </div> <div style="max-width: 1000px; margin: 0 auto 20px auto; padding: 15px 0; border-top: 1px solid #f5f5f5; border-bottom: 1px solid #f5f5f5; font-size: 14px; line-height: 1.8; color: #777;"> <p style="margin: 0 0 8px 0; text-align: center;"> <strong style="color: #333;">95分类目录</strong> - 专业的网站分类目录平台,精心收录 <a href="/webdir/" style="color: #ff6b35; text-decoration: none;">网站目录</a>、 <a href="/vip_list/" style="color: #ff6b35; text-decoration: none;">VIP优质网站</a> 及 <a href="/article/" style="color: #ff6b35; text-decoration: none;">站长资讯</a>。 </p > </div> <!--<a href="https://frogdr.com/95dir.com?utm_source=95dir.com" target="_blank" style="display: block; text-align: center; margin: 0 auto 15px auto;"> <img src="https://frogdr.com/95dir.com/badge-white.svg" alt="Monitor your Domain Rating with FrogDR" width="250" height="54" style="display: inline-block; margin: 0 auto; vertical-align: middle;"> </a>--> <div style="text-align: center; color: #999; font-size: 13px;"> <div id="fcopy" style="margin-bottom: 8px;"> Copyright © 2026 95dir.com All Rights Reserved <span style="margin: 0 8px;">·</span> <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank" style="color: #999; text-decoration: none;">鄂ICP备2024062716号-1</a> <span style="margin: 0 8px;">·</span> Processed in 0.399737 second(s), 27 Queries, Gzip Enabled </div> <div id="statsContainer" style="margin-bottom: 10px;"> <!--当前在线 <span id="onlineCount" style="color: #28a745; font-weight: bold;">...</span> 人 <span style="color: #eee;">|</span> 总访客 <span id="totalVisitors" style="color: #333; font-weight: bold;">...</span> 人 <span style="color: #eee;">|</span>--> <a href="http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=P8giPA6Ghq-xjdOZIMxq1RGrwUWJJ9q3&authKey=pAp40hn9v1YZaUnc30pmG0JzruRQbgWfKzcE17Zebqu%2BgvSp7fY6P1D3RmbT93%2Bh&noverify=0&group_code=1059212869" target="_blank" style="color: #007bff; text-decoration: none;">🐧交流群</a> </div> <div style="opacity: 0.7;"> <a href="https://tongji.baidu.com/" target="_blank" style="color: #bbb; text-decoration: none; font-size: 12px; display: inline-flex; align-items: center; gap: 4px;"> <svg width="12" height="12" viewBox="0 0 24 24" fill="#bbb"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 14.5v-9l6 4.5-6 4.5z"/></svg> 百度统计 </a > </div> </div> </div> <!--<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7900219627358725" crossorigin="anonymous"></script>--> <script> // 更新在线统计 function updateOnlineStats() { // 添加时间戳防止缓存 const timestamp = new Date().getTime(); const url = '/data/online_stats/online.php?t=' + timestamp; fetch(url, { method: 'GET', headers: { 'Cache-Control': 'no-cache', 'Pragma': 'no-cache' } }) .then(response => { if (!response.ok) { throw new Error('HTTP ' + response.status); } return response.json(); }) .then(data => { // 确保数据有效 const online = parseInt(data.online) || 0; const total = parseInt(data.total) || 0; document.getElementById('onlineCount').textContent = online; document.getElementById('totalVisitors').textContent = total.toLocaleString(); // 调试信息(可选) console.log('在线统计更新:', { online: online, total: total }); }) .catch(error => { console.error('在线统计服务错误:', error); document.getElementById('onlineCount').textContent = '加载中...'; document.getElementById('totalVisitors').textContent = '加载中...'; }); } // 页面加载时立即执行 document.addEventListener('DOMContentLoaded', function() { updateOnlineStats(); }); // 设置定时器 - 在线统计每60秒更新 setInterval(updateOnlineStats, 60000); // 页面获得焦点时也更新一次 window.addEventListener('focus', updateOnlineStats); </script> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?de6784c7f19b11f9d9d70711252011fe"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> <!-- 回到顶部按钮 --> <div id="backToTop" class="back-to-top" onclick="scrollToTop()"> <svg viewBox="0 0 24 24" width="24" height="24"> <path fill="currentColor" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path> </svg> </div> <style> .back-to-top { position: fixed; right: 20px; bottom: 30px; /* 避开手机浏览器底部工具栏 */ width: 45px; height: 45px; background-color: #1890ff; /* 对应图中的蓝色 */ color: #fff; border-radius: 50%; display: flex; justify-content: center; align-items: center; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); cursor: pointer; z-index: 999; opacity: 0; /* 默认隐藏 */ visibility: hidden; transition: all 0.3s ease; transform: translateY(20px); /* 初始位置稍低,配合淡入 */ } /* 显示状态 */ .back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); } .back-to-top svg { width: 28px; height: 28px; } /* 适配手机端点击效果 */ .back-to-top:active { transform: scale(0.9); background-color: #096dd9; } </style> <script> window.onscroll = function() { var topBtn = document.getElementById("backToTop"); // 当滚动高度超过 300 像素时显示按钮 if (document.documentElement.scrollTop > 300 || document.body.scrollTop > 300) { topBtn.classList.add("show"); } else { topBtn.classList.remove("show"); } }; // 平滑滚动回顶部 function scrollToTop() { window.scrollTo({ top: 0, behavior: 'smooth' // 平滑滚动 }); } </script></div> <!-- 文章评论功能脚本 --> <script> document.addEventListener('DOMContentLoaded', function() { console.log('DOM加载完成,开始初始化文章评论功能...'); // 全局错误处理 window.addEventListener('error', function(event) { console.error('JavaScript错误:', event.error); console.error('错误位置:', event.filename, ':', event.lineno); if (event.filename && event.filename.includes('artinfo')) { const commentsListElement = document.getElementById('comments-list'); if (commentsListElement && !commentsListElement.innerHTML.includes('评论功能暂时不可用')) { commentsListElement.innerHTML = '<div style="text-align: center; color: #dc3545; padding: 20px;">' + '评论功能暂时不可用,请刷新页面重试' + '</div>'; } } return false; }); // 延迟初始化,确保DOM完全准备好 setTimeout(function() { try { // 检查管理员权限 checkAdminPermission(); // 初始化字符计数 initCharCount(); // 加载评论 loadComments(); // 绑定表单提交 bindCommentForm(); } catch (error) { console.error('初始化文章评论功能时发生错误:', error); const commentsListElement = document.getElementById('comments-list'); if (commentsListElement) { commentsListElement.innerHTML = '<div style="text-align: center; color: #dc3545; padding: 20px;">' + '评论功能初始化失败,请刷新页面重试' + '</div>'; } } }, 200); }); // 初始化字符计数 function initCharCount() { const textarea = document.querySelector('textarea[name="comment_content"]'); const charCount = document.getElementById('char-count'); if (!textarea || !charCount) { console.log('字符计数初始化失败: 找不到必要的DOM元素'); return; } textarea.addEventListener('input', () => { const length = textarea.value.length; charCount.textContent = length; if (length > 1000) { charCount.style.color = '#dc3545'; } else if (length > 800) { charCount.style.color = '#ffc107'; } else { charCount.style.color = '#999'; } }); } // 加载评论 function loadComments() { try { const artIdInput = document.querySelector('input[name="art_id"]'); if (!artIdInput) { console.error('找不到art_id输入框'); document.getElementById('comments-list').innerHTML = '<div style="text-align: center; color: #dc3545; padding: 20px;">页面初始化错误</div>'; return; } const artId = artIdInput.value; if (!artId) { console.error('art_id为空'); document.getElementById('comments-list').innerHTML = '<div style="text-align: center; color: #999; padding: 20px;">暂无评论</div>'; return; } fetch('/module/article_comment_handler.php', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, body: `action=get_comments&art_id=${artId}&limit=20` }) .then(response => { if (!response.ok) { throw new Error(`HTTP错误: ${response.status}`); } return response.text(); }) .then(text => { try { const data = JSON.parse(text); if (data.success) { displayComments(data.comments || []); displayStats(data.stats || {}); } else { console.warn('获取评论失败:', data.message); document.getElementById('comments-list').innerHTML = '<div style="text-align: center; color: #999; padding: 20px;">暂无评论</div>'; } } catch (parseError) { console.error('JSON解析错误:', parseError); console.error('服务器响应:', text); document.getElementById('comments-list').innerHTML = '<div style="text-align: center; color: #dc3545; padding: 20px;">数据格式错误</div>'; } }) .catch(error => { console.error('加载评论失败:', error); document.getElementById('comments-list').innerHTML = '<div style="text-align: center; color: #dc3545; padding: 20px;">加载评论失败,请刷新页面重试</div>'; }); } catch (error) { console.error('loadComments函数执行错误:', error); document.getElementById('comments-list').innerHTML = '<div style="text-align: center; color: #dc3545; padding: 20px;">系统错误,请刷新页面</div>'; } } // 显示评论统计 function displayStats(stats) { if (!stats || typeof stats !== 'object') { document.getElementById('comment-stats').innerHTML = ` <div style="text-align: center; color: #666;"> <p>统计数据加载失败</p> </div> `; return; } const totalComments = parseInt(stats.total_comments) || 0; if (totalComments === 0) { document.getElementById('comment-stats').innerHTML = ` <div style="text-align: center; color: #666;"> <p>暂无评论数据</p> </div> `; return; } const statsHtml = ` <div class="stats-item"> <span class="stats-label">📊 总评论数</span> <span class="stats-value">${totalComments}</span> </div> `; document.getElementById('comment-stats').innerHTML = statsHtml; } // 显示评论列表 function displayComments(comments) { try { const commentsListElement = document.getElementById('comments-list'); if (!commentsListElement) { console.error('找不到评论列表容器'); return; } if (!Array.isArray(comments) || comments.length === 0) { commentsListElement.innerHTML = '<div style="text-align: center; color: #999; padding: 20px;">暂无评论,快来发表第一个评论吧!</div>'; return; } let html = ''; comments.forEach((comment, index) => { try { if (comment && typeof comment === 'object') { html += generateCommentHtml(comment); } else { console.warn(`评论数据格式错误,索引: ${index}`, comment); } } catch (error) { console.error(`生成评论HTML失败,索引: ${index}`, error, comment); } }); if (html) { commentsListElement.innerHTML = html; bindReplyButtons(); } else { commentsListElement.innerHTML = '<div style="text-align: center; color: #dc3545; padding: 20px;">评论数据处理失败</div>'; } } catch (error) { console.error('displayComments函数执行错误:', error); const commentsListElement = document.getElementById('comments-list'); if (commentsListElement) { commentsListElement.innerHTML = '<div style="text-align: center; color: #dc3545; padding: 20px;">显示评论时发生错误</div>'; } } } // 生成评论HTML function generateCommentHtml(comment) { try { if (!comment || typeof comment !== 'object') { console.error('无效的评论数据:', comment); return '<div class="comment-item" style="color: #dc3545; padding: 10px;">评论数据错误</div>'; } const commentId = comment.comment_id || 0; const userClass = comment.is_member ? 'member' : ''; const userDisplay = comment.is_member ? (comment.display_name || '会员用户') : `匿名 ( ${comment.display_ip || '未知IP'} )`; const displayTime = comment.display_time || '未知时间'; const commentContent = comment.comment_content || ''; let html = ` <div class="comment-item"> <div class="comment-header"> <span class="comment-user ${userClass}">${userDisplay}</span> <span class="comment-time">${displayTime}</span> </div> <div class="comment-content">${processMediaContent(commentContent)}</div> <div class="comment-actions"> <button class="reply-btn" onclick="showReplyForm(${commentId})">回复</button> ${window.isAdmin ? `<button class="delete-btn" onclick="deleteComment(${commentId})" style="background:#dc3545;color:white;padding:5px 10px;border:none;border-radius:4px;cursor:pointer;margin-left:10px;">删除</button>` : ''} </div> <div class="reply-form" id="reply-form-${commentId}" style="display:none;"> <textarea placeholder="请输入回复内容..." style="width:100%;height:60px;padding:8px;border:1px solid #ddd;border-radius:4px;resize:vertical;"></textarea> <div style="margin-top:10px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;clear:both;"> <input type="text" name="code" placeholder="验证码" maxlength="6" style="width:90px;height:32px;border:1px solid #ccc;border-radius:4px;text-align:center;font-size:13px;"> <img src="/source/include/captcha.php?ts=${Date.now()}" alt="点击刷新验证码" title="点击刷新验证码" style="height:32px;border-radius:4px;cursor:pointer;" onclick="this.src='/source/include/captcha.php?ts=' + Date.now();"> </div> <div class="comment-honeypot" style="display:none !important; tabindex:-1;"> <label>如果你是人类,请不要填写此项:</label> <input type="text" name="mail_security_verify" value="" autocomplete="off"> </div> <div style="text-align:right;margin-top:10px;clear:both;"> <button onclick="hideReplyForm(${commentId})" style="background:#6c757d;color:white;padding:5px 15px;border:none;border-radius:4px;cursor:pointer;margin-right:10px;">取消</button> <button onclick="submitReply(${commentId})" style="background:#007bff;color:white;padding:5px 15px;border:none;border-radius:4px;cursor:pointer;">提交回复</button> </div> </div> `; if (comment.replies && Array.isArray(comment.replies) && comment.replies.length > 0) { html += ` <div class="replies-section"> <div class="replies-header"> <span class="replies-count">${comment.replies.length} 条回复</span> </div> <div class="replies-list"> `; comment.replies.forEach((reply, index) => { try { if (!reply || typeof reply !== 'object') { console.warn(`回复数据格式错误,索引: ${index}`, reply); return; } html += generateReplyHtml(reply); } catch (replyError) { console.error(`处理回复时出错,索引: ${index}`, replyError, reply); } }); html += ` </div> </div> `; } html += '</div>'; return html; } catch (error) { console.error('generateCommentHtml函数执行错误:', error, comment); return '<div class="comment-item" style="color: #dc3545; padding: 10px;">生成评论HTML时发生错误</div>'; } } // 生成回复HTML function generateReplyHtml(reply) { try { if (!reply || typeof reply !== 'object') { console.warn('回复数据格式错误', reply); return ''; } const replyId = reply.comment_id || reply.id || 0; const replyUserClass = reply.is_member ? 'member' : ''; const replyUserDisplay = reply.is_member ? (reply.display_name || '会员用户') : `匿名 ( ${reply.display_ip || '未知IP'} )`; const replyDisplayTime = reply.display_time || '未知时间'; const replyContent = reply.comment_content || ''; let html = ` <div class="reply-item"> <div class="reply-avatar"> <i class="fas fa-reply" style="color: #667eea;"></i> </div> <div class="reply-content"> <div class="reply-header"> <span class="comment-user ${replyUserClass}">${replyUserDisplay}</span> <span class="reply-time">${replyDisplayTime}</span> ${window.isAdmin ? `<button onclick="deleteReply(${replyId})" class="reply-delete-btn" title="删除回复">×</button>` : ''} </div> <div class="reply-text">${replyContent}</div> <div class="reply-actions"> <button class="reply-btn" onclick="showReplyForm(${replyId})" style="font-size:12px;padding:3px 8px;">回复</button> </div> <div class="reply-form" id="reply-form-${replyId}" style="display:none;"> <textarea placeholder="请输入回复内容..." style="width:100%;height:50px;padding:6px;border:1px solid #ddd;border-radius:4px;resize:vertical;font-size:13px;"></textarea> <div style="margin-top:8px;display:flex;align-items:center;gap:6px;flex-wrap:wrap;"> <input type="text" name="code" placeholder="验证码" maxlength="6" style="width:80px;height:28px;border:1px solid #ccc;border-radius:4px;text-align:center;font-size:12px;"> <img src="/source/include/captcha.php?ts=${Date.now()}" alt="点击刷新验证码" title="点击刷新验证码" style="height:28px;border-radius:4px;cursor:pointer;" onclick="this.src='/source/include/captcha.php?ts=' + Date.now();"> </div> <div style="text-align:right;margin-top:8px;"> <button onclick="hideReplyForm(${replyId})" style="background:#6c757d;color:white;padding:4px 12px;border:none;border-radius:4px;cursor:pointer;margin-right:8px;font-size:12px;">取消</button> <button onclick="submitReply(${replyId})" style="background:#007bff;color:white;padding:4px 12px;border:none;border-radius:4px;cursor:pointer;font-size:12px;">提交回复</button> </div> </div> `; if (reply.replies && Array.isArray(reply.replies) && reply.replies.length > 0) { html += ` <div class="sub-replies" style="margin-left: 20px; margin-top: 10px; border-left: 2px solid #e9ecef; padding-left: 15px;"> `; reply.replies.forEach((subReply, index) => { try { if (!subReply || typeof subReply !== 'object') { console.warn(`子回复数据格式错误,索引: ${index}`, subReply); return; } html += generateReplyHtml(subReply); } catch (subReplyError) { console.error(`处理子回复时出错,索引: ${index}`, subReplyError, subReply); } }); html += ` </div> `; } html += ` </div> </div> `; return html; } catch (error) { console.error('generateReplyHtml函数执行错误:', error, reply); return '<div class="reply-item" style="color: #dc3545; padding: 10px;">生成回复HTML时发生错误</div>'; } } // 绑定评论表单提交 function bindCommentForm() { const form = document.getElementById('comment-form'); form.addEventListener('submit', function(e) { e.preventDefault(); const formData = new FormData(form); formData.append('action', 'submit_comment'); const content = formData.get('comment_content').trim(); if (content.length < 10) { alert('评论内容至少需要10个字符'); return; } if (content.length > 1000) { alert('评论内容不能超过1000个字符'); return; } const submitBtn = form.querySelector('button[type="submit"]'); submitBtn.disabled = true; submitBtn.textContent = '提交中...'; fetch('/module/article_comment_handler.php', { method: 'POST', body: formData }) .then(response => response.json()) .then(data => { if (data.success) { if (window.isAdmin) { alert('评论提交成功!'); } else { const successMessage = data.message || '评论提交成功!'; if (successMessage === '评论提交成功,等待管理员审核。') { alert(successMessage); } else { alert('评论提交成功!'); } } form.reset(); loadComments(); } else { alert(data.message || '评论提交失败'); } }) .catch(error => { console.error('提交评论失败:', error); alert('评论提交失败,请重试'); }) .finally(() => { submitBtn.disabled = false; submitBtn.textContent = '发表评论'; }); }); } // 显示回复表单 function showReplyForm(commentId) { const replyForm = document.getElementById(`reply-form-${commentId}`); replyForm.style.display = 'block'; } // 隐藏回复表单 function hideReplyForm(commentId) { const replyForm = document.getElementById(`reply-form-${commentId}`); replyForm.style.display = 'none'; } // 提交回复 function submitReply(commentId) { const replyForm = document.getElementById(`reply-form-${commentId}`); const codeInput = replyForm.querySelector('input[name="code"]'); const checkCode = codeInput ? codeInput.value.trim() : ''; if (checkCode.length < 4) { alert('请输入验证码'); return; } const textarea = replyForm.querySelector('textarea'); const content = textarea.value.trim(); if (content.length < 5) { alert('回复内容至少需要5个字符'); return; } if (content.length > 1000) { alert('回复内容不能超过1000个字符'); return; } const artId = document.querySelector('input[name="art_id"]').value; const formData = new FormData(); formData.append('action', 'submit_reply'); formData.append('art_id', artId); formData.append('parent_id', commentId); formData.append('comment_content', content); formData.append('code', checkCode); fetch('/module/article_comment_handler.php', { method: 'POST', body: formData }) .then(response => response.json()) .then(data => { if (data.success) { alert('回复提交成功!'); hideReplyForm(commentId); textarea.value = ''; loadComments(); } else { alert(data.message || '回复提交失败'); } }) .catch(error => { console.error('提交回复失败:', error); alert('回复提交失败,请重试'); }); } // 绑定回复按钮事件 function bindReplyButtons() { // 实际的绑定通过onclick属性完成 } // 检查管理员权限 function checkAdminPermission() { fetch('/module/article_comment_handler.php', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, body: 'action=check_admin' }) .then(response => response.json()) .then(data => { if (data.success) { window.isAdmin = data.is_admin; console.log('管理员权限检查完成:', window.isAdmin ? '是管理员' : '非管理员'); } }) .catch(error => { console.error('检查管理员权限失败:', error); window.isAdmin = false; }); } // 删除评论 function deleteComment(commentId) { if (!window.isAdmin) { alert('您没有删除权限'); return; } if (!confirm('确定要删除这条评论吗?删除后无法恢复。')) { return; } fetch('/module/article_comment_handler.php', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, body: `action=delete_comment&comment_id=${commentId}` }) .then(response => response.json()) .then(data => { if (data.success) { alert('评论删除成功'); loadComments(); } else { alert(data.message || '删除失败'); } }) .catch(error => { console.error('删除评论失败:', error); alert('删除失败,请重试'); }); } // 删除回复 function deleteReply(replyId) { if (!window.isAdmin) { alert('您没有删除权限'); return; } if (!confirm('确定要删除这条回复吗?删除后无法恢复。')) { return; } fetch('/module/article_comment_handler.php', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, body: `action=delete_reply&reply_id=${replyId}` }) .then(response => response.json()) .then(data => { if (data.success) { alert('回复删除成功'); loadComments(); } else { alert(data.message || '删除失败'); } }) .catch(error => { console.error('删除回复失败:', error); alert('删除失败,请重试'); }); } // 验证码刷新 let captchaRefreshTimer = null; function refreshCaptcha() { if (captchaRefreshTimer) { clearTimeout(captchaRefreshTimer); } captchaRefreshTimer = setTimeout(() => { const codeContainer = document.getElementById('mycode'); if (!codeContainer) return; codeContainer.innerHTML = '<img src="/source/include/captcha.php?ts=' + Date.now() + '" ' + 'alt="点击刷新验证码" title="点击刷新验证码" ' + 'style="height:36px; border-radius:4px; box-shadow:0 0 3px rgba(0,0,0,0.1); cursor:pointer; vertical-align:middle;" ' + 'onclick="refreshCaptcha()">'; }, 300); } // === 表情系统 === // 在DOM加载完成后立即定义表情函数 function toggleEmojiPicker(textareaId) { console.log('切换表情选择器:', textareaId); const picker = document.getElementById(`emoji-picker-${textareaId}`); if (!picker) { console.error('找不到表情选择器:', `emoji-picker-${textareaId}`); return; } // 隐藏其他表情选择器 document.querySelectorAll('.emoji-picker').forEach(p => { if (p !== picker) p.style.display = 'none'; }); if (picker.style.display === 'none' || picker.style.display === '') { picker.style.display = 'block'; console.log('显示表情选择器'); } else { picker.style.display = 'none'; console.log('隐藏表情选择器'); } } function insertEmoji(textareaId, emoji) { console.log('插入表情:', textareaId, emoji); const textarea = document.getElementById(textareaId); if (!textarea) { console.error('找不到文本框:', textareaId); return; } const start = textarea.selectionStart || 0; const end = textarea.selectionEnd || 0; const text = textarea.value; textarea.value = text.substring(0, start) + emoji + text.substring(end); textarea.selectionStart = textarea.selectionEnd = start + emoji.length; textarea.focus(); // 隐藏表情选择器 const picker = document.getElementById(`emoji-picker-${textareaId}`); if (picker) { picker.style.display = 'none'; } // 触发input事件更新字符计数 const inputEvent = new Event('input', { bubbles: true }); textarea.dispatchEvent(inputEvent); console.log('表情插入完成'); } // 确保函数在全局作用域立即可用 window.toggleEmojiPicker = toggleEmojiPicker; window.insertEmoji = insertEmoji; // 验证码和表情系统初始化 document.addEventListener('DOMContentLoaded', function() { // 验证码初始化 const codeInput = document.getElementById('comment-code-input'); if (codeInput) { refreshCaptcha(); codeInput.addEventListener('focus', refreshCaptcha); } // 绑定表情按钮点击事件 const emojiBtn = document.getElementById('emoji-btn-main'); if (emojiBtn) { emojiBtn.addEventListener('click', function(e) { e.preventDefault(); e.stopPropagation(); toggleEmojiPicker('main-comment-textarea'); }); } // 点击页面其他地方时隐藏表情选择器 document.addEventListener('click', function(event) { const emojiPickers = document.querySelectorAll('.emoji-picker'); emojiPickers.forEach(picker => { const isClickInsidePicker = picker.contains(event.target); const isClickOnEmojiButton = event.target.id === 'emoji-btn-main' || event.target.textContent === '😊'; if (!isClickInsidePicker && !isClickOnEmojiButton) { picker.style.display = 'none'; } }); }); console.log('表情系统初始化完成'); }); function safeHTML(str) { return str.replace(/</g, "<").replace(/>/g, ">"); } function processMediaContent(content) { if (!content || typeof content !== 'string') return content || ''; let text = safeHTML(content); // 音频文件 text = text.replace( /(https?:\/\/[^\s<>"']+\.(mp3|wav|aac|m4a|ogg|flac))/gi, (match) => ` <div class="media-container audio-container"> <div class="media-header">🎵 音频</div> <audio controls autoplay preload="metadata" style="width:100%;max-width:400px;"> <source src="${match}" type="audio/mpeg"> 您的浏览器不支持音频播放。 </audio> <div class="media-link"><a href="${match}" target="_blank" rel="noopener">📥 下载音频</a></div> </div>` ); // 图片 text = text.replace( /(https?:\/\/[^\s<>"']+\.(jpg|jpeg|png|gif|webp|svg))/gi, (match) => ` <div class="media-container image-container"> <div class="media-header">🖼️ 图片</div> <img src="${match}" alt="图片" loading="lazy" style="max-width:100%;border-radius:8px;cursor:pointer;" onclick="window.open('${match}','_blank')"> <div class="media-link"><a href="${match}" target="_blank" rel="noopener">查看原图</a></div> </div>` ); // 视频文件直链 text = text.replace( /(https?:\/\/[^\s<>"']+\.(mp4|webm|mkv|mov|avi|flv|m4v))/gi, (match) => ` <div class="media-container video-container"> <div class="media-header">🎬 视频文件</div> <video controls preload="metadata" style="width:100%;max-width:500px;border-radius:8px;"> <source src="${match}" type="video/mp4"> 您的浏览器不支持视频播放。 </video> <div class="media-link"><a href="${match}" target="_blank" rel="noopener">新窗口播放</a></div> </div>` ); return text; } </script> <!-- 评论系统样式 --> <style> .comment-system { max-width: 800px; margin: 0 auto; padding: 20px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; line-height: 1.6; color: #333; } #comment-stats { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 12px; padding: 25px; margin-bottom: 30px; color: white; box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3); } .stats-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.2); color: black; } .stats-item:last-child { border-bottom: none; margin-bottom: 0; } .stats-label { font-weight: 600; font-size: 16px; } .stats-value { font-size: 18px; font-weight: bold; margin-right: 10px; } #comment-form { background: #fff; border-radius: 12px; padding: 25px; margin-bottom: 30px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); border: 1px solid #e9ecef; } .form-group { margin-bottom: 20px; } .form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #495057; font-size: 14px; } .form-group input, .form-group textarea { width: 100%; padding: 12px 16px; border: 2px solid #e9ecef; border-radius: 8px; font-size: 14px; transition: all 0.3s ease; box-sizing: border-box; } .form-group input:focus, .form-group textarea:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); } .form-group textarea { resize: vertical; min-height: 100px; } .char-count { text-align: right; font-size: 12px; color: #6c757d; margin-top: 5px; } .char-count.warning { color: #fd7e14; } .char-count.danger { color: #dc3545; } #comments-list { margin-top: 30px; } .comment-item { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08); border: 1px solid #f1f3f4; transition: all 0.3s ease; } .comment-item:hover { box-shadow: 0 4px 25px rgba(0, 0, 0, 0.12); transform: translateY(-2px); } .comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #f1f3f4; } .comment-user { font-weight: 600; color: #495057; } .comment-user.member { color: #667eea; position: relative; } .comment-user.member::after { content: "VIP"; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; font-size: 10px; padding: 2px 6px; border-radius: 10px; margin-left: 8px; font-weight: bold; } .comment-time { color: #6c757d; font-size: 13px; } .comment-content { line-height: 1.7; color: #333; margin-bottom: 15px; word-wrap: break-word; white-space: pre-wrap; } .comment-actions { display: flex; gap: 10px; align-items: center; } .reply-btn { background: #28a745; color: white; border: none; padding: 6px 16px; border-radius: 6px; font-size: 13px; cursor: pointer; transition: all 0.3s ease; } .reply-btn:hover { background: #218838; transform: translateY(-1px); } .delete-btn { background: #dc3545; color: white; border: none; padding: 6px 16px; border-radius: 6px; font-size: 13px; cursor: pointer; transition: all 0.3s ease; } .delete-btn:hover { background: #c82333; transform: translateY(-1px); } .reply-form { margin-top: 15px; padding: 15px; background: #f8f9fa; border-radius: 8px; border: 1px solid #e9ecef; } .reply-form textarea { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px; resize: vertical; font-size: 14px; box-sizing: border-box; } .reply-form textarea:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1); } .replies-section { margin-top: 15px; padding-top: 15px; border-top: 1px solid #e9ecef; } .replies-header { margin-bottom: 10px; } .replies-count { font-size: 13px; color: #667eea; font-weight: 600; } .replies-list { margin-left: 10px; } .reply-item { display: flex; background: #f8f9fa; border-radius: 8px; padding: 12px; margin-bottom: 10px; border-left: 3px solid #667eea; } .reply-avatar { margin-right: 10px; padding-top: 2px; } .reply-content { flex: 1; } .reply-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; } .reply-time { font-size: 12px; color: #6c757d; } .reply-text { font-size: 14px; line-height: 1.5; color: #333; } .reply-delete-btn { background: #dc3545; color: white; border: none; border-radius: 50%; width: 20px; height: 20px; font-size: 12px; cursor: pointer; margin-left: 10px; } .reply-actions { margin-top: 8px; padding-top: 5px; } .reply-actions .reply-btn { background: #17a2b8; color: white; border: none; padding: 3px 8px; border-radius: 4px; font-size: 12px; cursor: pointer; transition: all 0.3s ease; } .reply-actions .reply-btn:hover { background: #138496; transform: translateY(-1px); } .emoji-picker { position: absolute; top: 100%; left: 0; right: 0; background: white; border: 1px solid #ddd; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 1000; margin-top: 5px; } /* 确保表情选择器的父容器有相对定位 */ .comment-form > div[style*="position: relative"], .reply-form > div[style*="position: relative"] { position: relative !important; } .emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; padding: 10px; } .emoji-grid span { font-size: 20px; cursor: pointer; padding: 8px; text-align: center; border-radius: 4px; transition: background-color 0.2s; } .emoji-grid span:hover { background-color: #f0f0f0; } .media-container { margin: 15px 0; padding: 15px; background: #f8f9fa; border-radius: 12px; border-left: 4px solid #007bff; box-shadow: 0 2px 8px rgba(0,0,0,0.1); transition: all 0.3s ease; } .media-container:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.15); transform: translateY(-2px); } .media-header { font-weight: bold; color: #495057; margin-bottom: 10px; font-size: 14px; display: flex; align-items: center; gap: 8px; } .media-link { margin-top: 10px; text-align: center; } .media-link a { color: #007bff; text-decoration: none; font-size: 13px; padding: 5px 12px; border: 1px solid #007bff; border-radius: 20px; display: inline-block; transition: all 0.3s ease; } .media-link a:hover { background: #007bff; color: white; text-decoration: none; } .audio-container { border-left-color: #28a745; } .audio-container .media-header { color: #28a745; } .video-container { border-left-color: #dc3545; } .video-container .media-header { color: #dc3545; } .image-container { border-left-color: #17a2b8; } .image-container .media-header { color: #17a2b8; } .image-container img { max-width: 100%; height: auto; border-radius: 8px; margin: 10px 0; box-shadow: 0 2px 12px rgba(0,0,0,0.1); transition: transform 0.3s ease; } .image-container img:hover { transform: scale(1.02); } .media-container audio, .media-container video { width: 100%; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); margin: 10px 0; } .media-container video { max-width: 500px; } .media-container audio { max-width: 400px; } @media (max-width: 768px) { .comment-system { padding: 15px; } #comment-stats { padding: 20px; } #comment-form { padding: 20px; } .comment-header { flex-direction: column; align-items: flex-start; gap: 8px; } .comment-actions { flex-wrap: wrap; } .reply-item { margin-left: 10px; } .stats-item { flex-direction: column; align-items: flex-start; gap: 8px; } } @media (max-width: 480px) { .comment-system { padding: 10px; } #comment-stats, #comment-form, .comment-item { padding: 15px; } } </style> </body> </html>