bot.gif
取消
选择语言
确认
简体中文
繁体中文
English
close
正在加载
全部 数字货币专题 区块链专题 钱包专题 空投专题
空投专题
加密货币空投趋势分析:2024年五大空投项目的机遇与挑战​
摘要
2024年,加密货币空投成为开发者吸引用户的利器,其成功与否取决于代币分配策略及市场环境。 例如,Jupiter向早期用户空投了10亿JUP,推动了Solana生态的繁荣。 Starknet向130万个地址分发数亿美元,但STRK代币全年价格下跌75%,暴露出L2项目投资机会的饱和和缺乏杀手级应用的问题。 这些案例展现了代币分配策略对项目成败的关键作用,也反映了加密市场瞬息万变的特点。
@yiboyun6
更新时间: 2025-04-11 16:46
关注
</div> <!-- 打分 --> <!-- <div class="special_scoring"> <p>告诉我们您有多喜欢这篇文章!</p> <div class="scoring_img_box f-c-c"> <img src="/web-v2/img/special/difference.png" alt=""> <img src="/web-v2/img/special/commonly.png" alt=""> <img src="/web-v2/img/special/good.png" alt=""> <img src="/web-v2/img/special/better.png" alt=""> <img src="/web-v2/img/special/nice.png" alt=""> </div> <div class="scoring_vote_num">投票数:147</div> </div> --> <!-- 点赞收藏 --> <div class="special_option f-sb-c"> <div class="option_item f-c-c option_collect" onclick="collectArt()"> <img src="/web-v2/img/special/start.png" alt=""/> <div class="option_txt">收藏</div> <div class="collect_num num">0</div> </div> <div class="option_item f-c-c option_like" onclick="likeArt()"> <img src="/web-v2/img/special/like.png" alt=""/> <div class="option_txt">点赞</div> <div class="like_num num">0</div> </div> </div> <!-- 最新文章 --> <div class="latest_articles"> <div class="latest_articles_title">最新文章</div> <div class="latest_art_box"> <div class="swiper-container latest_art_container"> <div class="swiper-wrapper"> <a href="/news/116358316.html" class="latest_art_item swiper-slide" > <img src="http://img.528btc.com.cn/pro/2025-12-14/img/1765657209623ch2a60bb2hb8156h9a89cxa759x482b1.jpg" class="latest_art_img"/> <div class="latest_art_title"> 美国一家贷款机构在数据泄露事件中向客户支付最高 5100 美元的赔偿金,泄露事件导致客户的姓名、社会安全号码和其他敏感信息曝光。 </div> </a> <a href="/news/116358315.html" class="latest_art_item swiper-slide" > <img src="http://img.528btc.com.cn/pro/2025-12-14/img/1765655410501995491ja90x953a1c5c856b98a96814h.jpg" class="latest_art_img"/> <div class="latest_art_title"> Exor一致否决了Tether提出的以13亿美元收购尤文图斯足球俱乐部的要约。 </div> </a> <a href="/news/116358314.html" class="latest_art_item swiper-slide" > <img src="http://img.528btc.com.cn/pro/2025-12-14/img/1765653015408519bhbxxjc7bbx44c82122jx763j426c.jpg" class="latest_art_img"/> <div class="latest_art_title"> 语法诗每日测验答案 2025年12月14日:答案就在里面! </div> </a> </div> </div> <div class="swiper-pagination"></div> </div> </div> <!-- 上一篇下一篇 --> <div class="special_button_box f-sb-c"> <a class="special_button" href="/zhuanti/13410427.html" > <div class="special_button_txt"> 了解 <span> 空投 </span> 的知识 </div> <div class="special_button_title"> 深度解析:FDV和代币经济学如何影响空投代币价格 </div> <div class="button_box">上一篇</div> </a> <a class="special_button" href="/zhuanti/13410444.html" > <div class="special_button_txt"> 了解 <span> 空投 </span> 的知识 </div> <div class="special_button_title"> 空投数据全解析:DeFi、L2、NFT项目空投金额占比曝光​ </div> <div class="button_box">下一篇</div> </a> </div> <!-- 评论 --> <div class="comment_box"> <div class="comment_box_head f-fs-c"> <div class="comment_left">评论</div> <div class="comment_right"> 已发布 <span id="commentTotalNum"></span> 条 </div> </div> <div class="comment_push_box login_status_box"> <div class="comment_push_head f-fs-fs"> <img src="/web-v2/img/special/adv.jpg" alt="" class="comment_push_adv" id="userAdv" /> <div class="textarea_box"> <textarea id="pushText" class="comment_textarea" placeholder="说点什么~" ></textarea> <div class="comment_push_btn" onclick="pushComment();"> 发布评论 </div> </div> </div> </div> <div class="comment_push_box nologin_status_box" style="display: none"> <div class="comment_push_head f-fs-fs"> <img src="/web-v2/img/user.png" alt="" class="comment_push_adv"/> <div class="textarea_box"> <div class="comment_login_box f-c-c"> <div class="comment_login_btn" onclick="handleLoginH5()"> 登录 </div> <div class="comment_login_tips">评论你的想法~</div> </div> <div class="f-fe-fs"> <div class="comment_nologin_btn">发布评论</div> </div> </div> </div> </div> <div class="comment_list_box" id="commentList"></div> <div class="comment_nocomment_box">成为第一个评论的人</div> <div class="comment_more_box f-c-c" onclick="moreCommentList()"> 查看更多评论<img src="/web-v2/img/special/right_arrow.png" class="comment_more_icon" /> </div> <div class="comment_nomore_box">没有更多评论了</div> </div> <!-- 更多文章 --> <div class="more_special"> <div class="more_special_title">阅读更多专题</div> <!-- 展示的四篇文章 --> <div class="more_special_box"> <a class="more_special_item extend_special" href="/zhuanti/13411444.html" > <!-- 封面 --> <img src="http://img.528btc.com.cn/uploadfile/2025-11-24/4b0581252be227327588251083d7b2c1.jpg" alt="什么是Zama:是否是2026年最确定的隐私基础设施" class="special_cover" /> <!-- 标题 --> <div class="special_title"> 什么是Zama:是否是2026年最确定的隐私基础设施 </div> <!-- 文章 --> <div class="special_content"> 距离 Zama 主网正式上线仅剩最后几个关键里程碑。在全市场为隐私叙事疯狂追逐、却始终找不到可落地的技术路径时,一个由法国顶尖密码学家团队打造、已累计融资超 1.5 亿美元、最新估值突破 10 亿美元的 FHE(完全同态加密)独角兽,正以开源协议 + 硬件加速 + 全栈开发者工具链的组合拳,悄然成为 2025-2026 年最确定性的基础设施级机会。它就是 Zama——被 Multicoin Capital 称为密码学的圣杯,被 Binance Labs 列为下一代隐私基础层的终极玩家。 </div> <!-- 作者 --> <div class="special_bottom f-sb-c"> <div class="special_list_author"> 2025-11-24 17:21 </div> <div class="special_list_tab"> 空投专题 </div> </div> </a> <a class="more_special_item extend_special" href="/zhuanti/13411432.html" > <!-- 封面 --> <img src="http://img.528btc.com.cn/uploadfile/2025-11-21/114a3ea64ae6e23c4465f05c9788591a.jpg" alt="MSX:2025年RWA赛道最后的低市值确定性Alpha" class="special_cover" /> <!-- 标题 --> <div class="special_title"> MSX:2025年RWA赛道最后的低市值确定性Alpha </div> <!-- 文章 --> <div class="special_content"> 2025年11月21日,MSX(MyStonks Exchange)以1.01亿美元FDV、2.5亿美元TVL,在RWA赛道形成极端估值洼地(P/TVL仅0.4倍,远低于Ondo的8-12倍)。平台已实现美股代币化现货+100x合约+自动分红+抵押借贷+Pendle收益拆分的全栈闭环,产品力对标“链上投行”。S1积分赛季(11.5-12.2)将40%社区代币(4亿枚$MSX)100%空投,权重交易量60%+持仓30%+盈亏10%,实测1000U对冲交易净损耗2.4-3U可获2000+M Bean,ROI 3-4倍,前1万名保守200-500美元,团队前100轻松千美元以上。 </div> <!-- 作者 --> <div class="special_bottom f-sb-c"> <div class="special_list_author"> 2025-11-21 15:16 </div> <div class="special_list_tab"> 空投专题 </div> </div> </a> <a class="more_special_item extend_special" href="/zhuanti/13411397.html" > <!-- 封面 --> <img src="http://img.528btc.com.cn/uploadfile/2025-11-18/836ed3529a2082db9aec68f965dc49ce.png" alt="空投在即,Sentient:去中心化AGI的野心与2025年最受瞩目的AI×Crypto项目" class="special_cover" /> <!-- 标题 --> <div class="special_title"> 空投在即,Sentient:去中心化AGI的野心与2025年最受瞩目的AI×Crypto项目 </div> <!-- 文章 --> <div class="special_content"> Sentient 是2025年AI×Crypto赛道最受机构认可的去中心化AGI项目,目标将算力、数据、模型与治理全面开源社区化,用区块链对抗中心化AI巨头垄断。核心产品为Dobby V2多模态大模型(日查询超120万次)与THE GRID分布式算力网络。2025年7月获Peter Thiel旗下Founders Fund领投8500万美元种子轮,投后估值约4.5亿美元。 </div> <!-- 作者 --> <div class="special_bottom f-sb-c"> <div class="special_list_author"> 2025-11-18 11:29 </div> <div class="special_list_tab"> 空投专题 </div> </div> </a> <a class="more_special_item extend_special" href="/zhuanti/13411199.html" > <!-- 封面 --> <img src="http://img.528btc.com.cn/uploadfile/2025-10-21/c3e9d5dd8ebb7c7abf3bddebaa7eb69b.png" alt="Base 巨额空投在即:详解 Base空投模式与潜伏机会" class="special_cover" /> <!-- 标题 --> <div class="special_title"> Base 巨额空投在即:详解 Base空投模式与潜伏机会 </div> <!-- 文章 --> <div class="special_content"> Coinbase 旗下的 Layer-2 解决方案 Base,长期以来坚持“无原生代币”的理念,专注于实用性和分厘级的 Gas 费。这种策略使其月活跃用户在 2025 年中期达到 2080 万,超越了多数竞争对手 L2。然而,随着网络活动的激增和高达 90% 的运营亏损率,协议的可持续性面临挑战。 2025 年 9 月在 BaseCamp 活动中,创始人 Jesse Pollak 宣布,协议正在探索网络代币,以加强去中心化和开发者激励。这一战略转变,加上 Coinbase CEO Brian Armstrong 的支持性评论,正式开启了 Base 潜在的巨额空投倒计时。对于用户而言,代币的发行不仅是为了序列器质押和治理,更是为了通过空投奖励有机活动,注入流动性。 </div> <!-- 作者 --> <div class="special_bottom f-sb-c"> <div class="special_list_author"> 2025-10-21 17:53 </div> <div class="special_list_tab"> 空投专题 </div> </div> </a> <a class="more_special_item extend_special" href="/zhuanti/13410843.html" > <!-- 封面 --> <img src="http://img.528btc.com.cn/uploadfile/2025-08-20/c71b829f489889404387d11e20a6865b.png" alt="monad tge在即?深度解析monad如何重塑EVM公链竞争格局的潜力与挑战" class="special_cover" /> <!-- 标题 --> <div class="special_title"> monad tge在即?深度解析monad如何重塑EVM公链竞争格局的潜力与挑战 </div> <!-- 文章 --> <div class="special_content"> ​随着区块链技术的应用深化,以太坊等主流公链在性能方面的瓶颈日益凸显,成为制约去中心化应用(dApps)大规模采用的核心障碍。在此背景下,Monad作为一个兼容以太坊虚拟机(EVM)的新型Layer 1区块链,提出了旨在解决上述挑战的系统性方案,其战略愿景是让Solana的资本效率与创新能力在庞大的EVM生态中生根发芽。 通过结合并行执行、异步执行、优化的共识机制(MonadBFT)和自定义数据库(MonadDB)四大原生技术创新,Monad旨在实现高达10,000 TPS的交易吞吐量与1秒的即时最终性。本文将深入剖析Monad的技术架构、市场定位、其独特的资本基因,并基于成功的公链范式(性能、生态、财富效应),对其面临的激烈市场竞争、生态构建策略及关键风险进行客观评估。 </div> <!-- 作者 --> <div class="special_bottom f-sb-c"> <div class="special_list_author"> 2025-08-20 17:03 </div> <div class="special_list_tab"> 空投专题 </div> </div> </a> <a class="more_special_item extend_special" href="/zhuanti/13410739.html" > <!-- 封面 --> <img src="http://img.528btc.com.cn/uploadfile/2025-08-07/27ac150852a5d73c35eea96ea8df2838.jpg" alt="Sidekick即将发空投:a16z重注的LiveFi项目,你能领多少钱?" class="special_cover" /> <!-- 标题 --> <div class="special_title"> Sidekick即将发空投:a16z重注的LiveFi项目,你能领多少钱? </div> <!-- 文章 --> <div class="special_content"> 随着币安Alpha宣布将在8月8日首发上线Sidekick(K)代币,Sidekick即将发空投的消息终于得到证实。这个手握a16z等顶级风投巨额融资的“LiveFi”新星,瞬间被推到了聚光灯下。所有早期参与者的目光都聚焦在一个核心问题上:我辛苦交互的积分,究竟能换回多少钱?本文将为您深度剖析。 </div> <!-- 作者 --> <div class="special_bottom f-sb-c"> <div class="special_list_author"> 2025-08-07 14:28 </div> <div class="special_list_tab"> 空投专题 </div> </div> </a> <a class="more_special_item extend_special" href="/zhuanti/13410726.html" > <!-- 封面 --> <img src="http://img.528btc.com.cn/uploadfile/2025-08-06/18a5fde2cc5aec51b7563a4d1b65a06f.jpg" alt="Towns空投在即:4600万美元融资背后,你的积分值多少钱?" class="special_cover" /> <!-- 标题 --> <div class="special_title"> Towns空投在即:4600万美元融资背后,你的积分值多少钱? </div> <!-- 文章 --> <div class="special_content"> 随着币安Alpha宣布将在8月5日上线Towns(TOWNS),Towns空投在即的消息终于得到证实。在a16z、Coinbase Ventures等顶级风投累计押注4600万美元后,所有早期参与者的目光都聚焦在一个核心问题上:我辛苦交互的积分,究竟能换回多少钱?本文将为您深度剖析Towns的项目亮点、代币经济模型,并根据链上数据,估算这次空投的潜在价值。 </div> <!-- 作者 --> <div class="special_bottom f-sb-c"> <div class="special_list_author"> 2025-08-06 15:03 </div> <div class="special_list_tab"> 空投专题 </div> </div> </a> <a class="more_special_item extend_special" href="/zhuanti/13410448.html" > <!-- 封面 --> <img src="https://www.528btc.com/d/file/20250411/1744365148625934.png" alt="Hyperliquid空投创纪录,用户最高获利超10万美元!" class="special_cover" /> <!-- 标题 --> <div class="special_title"> Hyperliquid空投创纪录,用户最高获利超10万美元! </div> <!-- 文章 --> <div class="special_content"> ​Hyperliquid在2024年11月向用户空投了3100万枚HYPE代币,初始价值16亿美元,短短几周内飙升至超过108亿美元。本文详细介绍该空投的参与条件、分发机制及市场反响。 </div> <!-- 作者 --> <div class="special_bottom f-sb-c"> <div class="special_list_author"> 2025-04-11 17:49 </div> <div class="special_list_tab"> 空投专题 </div> </div> </a> </div> <div class="more_recommendations"> 还有 33099篇更精彩 </div> <div class="more_recommendations_btn">继续阅读更多专题</div> </div> </div> </body> <script> document.addEventListener("DOMContentLoaded", () => { const aiBtn = document.querySelector(".ai_btn"); // 速看按钮 const aiContent = document.querySelector(".ai_content"); // 包含内容的容器 const titleRight = document.querySelector(".ai_title_right"); // 收起按钮 const aiDetails = document.querySelector("#ai-details"); // 动态插入内容的容器 const abstractDetailsAi = document.querySelector(".Abstract_details_ai"); // 顶部速看容器 const smallText = `[!--ai_intro--]`; console.log(smallText, "smallText"); const tempElement = document.createElement("div"); // 清理和提取 smallText 中的纯文本 tempElement.innerHTML = smallText; const cleanText = tempElement.textContent.trim(); // 去掉首尾空格 let animationCompleted = false; // 标记动画是否完成 if (!smallText || smallText.trim() === "") { if (abstractDetailsAi) { abstractDetailsAi.style.display = "none"; // 隐藏 .Abstract_details_ai } } else { if (abstractDetailsAi) { abstractDetailsAi.style.display = "flex"; // 隐藏 .Abstract_details_ai } } if ( !aiBtn || !aiContent || !titleRight || !aiDetails || !abstractDetailsAi ) { return; } // 逐字动画函数 function typeWriterEffect(content, element, callback) { element.innerHTML = ""; // 清空内容 let index = 0; const interval = setInterval(() => { if (index < content.length) { element.innerHTML += content[index++]; // 逐字插入到元素中 } else { clearInterval(interval); // 停止动画 animationCompleted = true; // 标记动画完成 titleRight.style.pointerEvents = "auto"; // 启用收起按钮 if (callback) callback(); // 动画完成后的回调 } }, 50); // 每50ms显示一个字符 } // 点击“速看”按钮 aiBtn.addEventListener("click", () => { abstractDetailsAi.style.display = "none"; // 隐藏顶部速看容器 aiContent.style.display = "block"; // 显示 ai_content if (!animationCompleted) { titleRight.style.pointerEvents = "none"; // 禁用收起按钮 typeWriterEffect(cleanText, aiDetails, () => { // console.log("动画完成"); }); } else { aiDetails.innerHTML = cleanText; // 直接显示完整内容 } }); // 点击“收起”按钮 titleRight.addEventListener("click", () => { if (animationCompleted) { aiContent.style.display = "none"; // 隐藏内容 abstractDetailsAi.style.display = "flex"; // 恢复顶部速看容器 } }); }); </script> <!-- 公共 --> <script> let commentLoginStatus = false; let commentList = $('#commentList'); function isLogin() { let url = '/e/extend/api/index.php?m=v2&c=app' $.ajax({ url: url, data: { action: "getUserInfo", data: {}, }, type: 'POST', success: function (res) { let resData = JSON.parse(res) commentLoginStatus = resData.data != ""; if (commentLoginStatus) { $('.login_status_box').show(); $('.nologin_status_box').hide(); $('#userAdv').attr('src', resData.data.header); getFollowStatus(); } else { $('.login_status_box').hide(); $('.nologin_status_box').show(); } }, error: function (e) { console.log('resdata e', e); } }) } $(document).ready(function () { isLogin(); var myArtSwiper = new Swiper('.latest_art_container', { slidesPerView: 1, centeredSlides: true, // active slide 居中 // 设置指示器 pagination: { el: '.swiper-pagination', clickable: true, // 允许点击小点进行切换 }, }); }) let categoryId = 134; if (categoryId == '131') { $(".special_tab_box").scrollLeft(400); } if (categoryId == '134') { $(".special_tab_box").scrollLeft(500); } </script> <!-- 关注作者 --> <script> let followStatus = false; function getFollowStatus() { let id = 114; $.ajax({ url: "/e/extend/api/index.php?m=user&c=followStatus", type: 'post', data: JSON.stringify({ ids: [id], }), success: function (res) { if (res.code === 200) { followStatus = res.data[id].status; if (followStatus) { $('.special_follow_btn').hide(); $('.special_unfollow_btn').show(); } else { $('.special_follow_btn').show(); $('.special_unfollow_btn').hide(); } } }, error: function (err) { console.error("请求失败:", err); }, }); } function followAuthor() { let id = 114; $.ajax({ url: "/e/extend/api/index.php?m=user&c=follow", type: 'post', data: JSON.stringify({ id: id, status: !followStatus, }), success: function (res) { if (res.code === 200) { followStatus = !followStatus if (followStatus) { $('.special_follow_btn').hide(); $('.special_unfollow_btn').show(); } else { $('.special_follow_btn').show(); $('.special_unfollow_btn').hide(); } layer.msg('操作成功', {icon: 1}) } }, error: function (err) { console.error("请求失败:", err); }, }); } </script> <!-- 文章详情相关 --> <script> // 点赞收藏状态数量 let specialLikeSatus = false; let specialCollected = false; let collectNum = 0; let likeNum = 0; requestOptions(); function requestOptions() { let id = "10443"; $.ajax({ url: "/e/extend/api/index.php?m=news&c=listData", type: "post", data: JSON.stringify({ ids: [id], type: 4, }), success: function (res) { if (res.code === 200) { listData = res.data[id]; $(".special_option .collect_num").html(listData.collectCount); $(".special_option .like_num").html(listData.likeCount); specialLikeSatus = listData.isLiked; specialCollected = listData.isCollected; collectNum = listData.collectCount; likeNum = listData.likeCount; if (listData.isCollected) { $(".special_option .option_collect").addClass("active"); } else { $(".special_option .option_collect").removeClass("active"); } if (listData.isLiked) { $(".special_option .option_like").addClass("active"); } else { $(".special_option .option_like").removeClass("active"); } } }, error: function (err) { console.error("请求失败:", err); }, }); } // 收藏 function collectArt() { let id = "10443"; $.ajax({ url: "/e/extend/api/index.php?m=user&c=collect", type: "post", data: JSON.stringify({ id: id, status: !specialCollected, type: 4, }), success: function (res) { if (res.code == 200) { specialCollected = !specialCollected; let currentNum = specialCollected ? collectNum + 1 : collectNum - 1; collectNum = currentNum; $(".special_option .collect_num").html(currentNum); if (specialCollected) { $(".special_option .option_collect").addClass("active"); } else { $(".special_option .option_collect").removeClass("active"); } layer.msg("操作成功", {icon: 1}); } }, error: function (err) { console.error("请求失败:", err); }, }); } // 点赞 function likeArt() { let id = "10443"; $.ajax({ url: "/e/extend/api/index.php?m=user&c=like", type: "post", data: JSON.stringify({ id: id, status: !specialLikeSatus, type: 4, }), success: function (res) { if (res.code == 200) { specialLikeSatus = !specialLikeSatus; let currentNum = specialLikeSatus ? likeNum + 1 : likeNum - 1; likeNum = currentNum; $(".special_option .like_num").html(currentNum); if (specialLikeSatus) { $(".special_option .option_like").addClass("active"); } else { $(".special_option .option_like").removeClass("active"); } layer.msg("操作成功", {icon: 1}); } }, error: function (err) { console.error("请求失败:", err); }, }); } </script> <!-- 评论相关 --> <script> // 获取评论列表 let commentPage = 0; let pid; let commentTotal = 0; let allCommentConut = 0; let allCommentList = []; let pageSize = 5; getCommentList(); function getCommentList() { $(".comment_nomore_box").hide(); $(".comment_more_box").hide(); let id = "10443"; commentPage++; $.ajax({ url: `/e/extend/api/index.php?m=comment&c=list&id=${id}&pageSize=${pageSize}&page=${commentPage}&type=4&subpageSize=5`, type: "GET", success: function (res) { if (res.code === 200) { commentTotal = res.data.total; allCommentConut = res.data.count; $("#commentTotalNum").html(allCommentConut); $(".op_b_comment .op_bottom_num").html(allCommentConut); if (commentPage == 1) { //首次加载判断有没有评论 if (res.data.list.length > 0) { commentList.show(); $(".comment_nocomment_box").hide(); commentListShow(res.data.list); } else { commentList.hide(); $(".comment_nocomment_box").show(); } //首次加载判断有没有更多 if (res.data.total > 5) { $(".comment_more_box").css("display", "flex"); } else if (res.data.total > 0 && res.data.total < 5) { $(".comment_nomore_box").show(); } else { $(".comment_more_box").hide(); $(".comment_nomore_box").hide(); } } else { commentListShow(res.data.list); } } }, error: function (err) { console.error("请求失败:", err); }, }); } //处理评论列表逻辑 function commentListShow(list) { if (commentPage == 1) { commentList.empty(); } $.each(list, function (index, item) { allCommentList.push(item); let html = ` <div class="comment_list_item f-fs-fs" data-id="${item.id}" > <img src="${item.avatar}" class="comment_list_adv"> <div class="comment_item" id="CommentList_${item.id}"> <div class="comment_item_head f-fs-c"> <div class="comment_username f-fs-c"> <div class="username">${item.username}</div> <div class="comment_author" style="display:${ item.isAuthor ? "bolck" : "none" }">作者</div> </div> <div class="comment_item_time">${timeAgo( dayjs(item.created_at).valueOf() )}</div> </div> <div class="comment_item_content"> ${item.content} </div> <div class="comment_item_bottom f-sb-c"> <div class="comment_reply father_reply f-c-c">回复</div> <div class="comment_option_box f-fs-c"> <img src="/web-v2/img/special/${ item.isLiked ? "comment_like" : "like_comment" }.png" class="comment_like_icon fatherlike" data-status="${ item.isLiked }"> <div class="comment_likenum">${ item.likeCount }</div> </div> </div> <div class="reply_comment_box"> <textarea class="replay_textarea" placeholder="回复:" ></textarea> <div class="reply_btn_box f-fe-fs"> <div class="ready_btn">回复</div> </div> </div> <div class="comment_subitem_list" style="display:${ item.sub.total ? "bolck" : "none" }" id="subCommentList_${item.id}"> </div> </div> </div> `; commentList.append(html); if (item.sub.list && item.sub.list.length > 0) { let list = item.sub.list; $.each(list, function (subIdx, subItem) { let html = ` <div class="subitem_box f-fs-fs" data-id="${ subItem.id }"> <img src="${subItem.avatar}" class="subitem_adv"> <div class="comment_subitem"> <div class="comment_subitem_head f-fs-c"> <div class="subitem_username f-fs-c"> <div class="username">${ subItem.username }</div> <div class="subitem_author" style="display:${ subItem.isAuthor ? "block" : "none" }">作者</div> <div class="reply" style="display:${ subItem.commentTo ? "block" : "none" }">回复</div> <div class="username" style="display:${ subItem.commentTo ? "block" : "none" }">${subItem.commentTo}</div> </div> <div class="comment_subitem_time">${timeAgo( dayjs(subItem.created_at).valueOf() )}</div> </div> <div class="comment_subitem_content"> ${subItem.content} </div> <div class="comment_item_bottom f-sb-c"> <div class="comment_reply sub_replay f-c-c">回复</div> <div class="comment_option_box f-fs-c"> <img src="/web-v2/img/special/${ subItem.isLiked ? "comment_like" : "like_comment" }.png" class="comment_like_icon sublike" data-status="${ subItem.isLiked }"> <div class="comment_likenum">${ subItem.likeCount }</div> </div> </div> <div class="subreply_comment_box"> <textarea class="subreplay_textarea" placeholder="回复:" ></textarea> <div class="subreply_btn_box f-fe-fs"> <div class="subready_btn">回复</div> </div> </div> </div> </div> `; $(`#subCommentList_${item.id}`).append(html); }); } if (item.sub.total > 5) { let moreHtml = ` <div class="show_more_btn">展开更多评论</div>`; $(`#CommentList_${item.id}`).append(moreHtml); } }); if (commentPage > 1) { if (commentTotal == allCommentList.length) { $(".comment_more_box").hide(); $(".comment_nomore_box").show(); } else { $(".comment_more_box").css("display", "flex"); $(".comment_nomore_box").hide(); } } } //时间戳处理 function timeAgo(timestamp) { const now = new Date().getTime(); const then = new Date(timestamp).getTime(); const diff = now - then; const seconds = Math.floor(diff / 1000); const minutes = Math.floor(seconds / 60); const hours = Math.floor(minutes / 60); const days = Math.floor(hours / 24); if (seconds < 60) { return "刚刚"; } else if (minutes < 60) { return `${minutes}分钟前`; } else if (hours < 24) { return `${hours}小时前`; } else { const date = new Date(timestamp); const year = date.getFullYear(); const month = String(date.getMonth() + 1).padStart(2, "0"); const day = String(date.getDate()).padStart(2, "0"); return `${year}-${month}-${day}`; } } //展开更多回复 let pageListMap = new Map(); $(document).on("click", ".show_more_btn", function () { const parentComment = $(this).closest(".comment_list_item"); // 获取当前评论项 pid = parentComment.data("id"); // 获取评论的ID let _this = $(this); //存入每一个评论的子回复页数 let page; if (!pageListMap.get(pid)) { page = 1; pageListMap.set(pid, page); } else { page = pageListMap.get(pid); } let id = "10443"; page++; pageListMap.set(pid, page); $.ajax({ url: `/e/extend/api/index.php?m=comment&c=list&pid=${pid}&subpageSize=5&page=${page}&type=4`, type: "GET", success: function (res) { let list = res.data.list; let maxPage = Math.ceil(res.data.total / 5); $.each(list, function (subIdx, subItem) { let html = ` <div class="subitem_box f-fs-fs" data-id="${ subItem.id }"> <img src="${subItem.avatar}" class="subitem_adv"> <div class="comment_subitem"> <div class="comment_subitem_head f-fs-c"> <div class="subitem_username f-fs-c"> <div class="username">${ subItem.username }</div> <div class="subitem_author" style="display:${ subItem.isAuthor ? "block" : "none" }">作者</div> <div class="reply" style="display:${ subItem.commentTo ? "block" : "none" }">回复</div> <div class="username" style="display:${ subItem.commentTo ? "block" : "none" }">${subItem.commentTo}</div> </div> <div class="comment_subitem_time">${timeAgo( dayjs(subItem.created_at).valueOf() )}</div> </div> <div class="comment_subitem_content"> ${subItem.content} </div> <div class="comment_item_bottom f-sb-c"> <div class="comment_reply sub_replay f-c-c">回复</div> <div class="comment_option_box f-fs-c"> <img src="/web-v2/img/special/${ subItem.isLiked ? "comment_like" : "like_comment" }.png" class="comment_like_icon sublike" data-status="${ subItem.isLiked }"> <div class="comment_likenum">${ subItem.likeCount }</div> </div> </div> <div class="subreply_comment_box"> <textarea class="subreplay_textarea" placeholder="回复:" ></textarea> <div class="subreply_btn_box f-fe-fs"> <div class="subready_btn">回复</div> </div> </div> </div> </div> `; $(`#subCommentList_${pid}`).append(html); }); if (page >= maxPage) { _this.remove(); } }, error: function (err) { console.error("请求失败:", err); }, }); console.log(pid); }); //发表评论 function pushComment() { const commentText = $("#pushText").val(); if (!commentText) { layer.msg("请输入内容", {icon: 2}); return; } let id = "10443"; $.ajax({ url: "/e/extend/api/index.php?m=comment&c=add", type: "post", data: JSON.stringify({ id: id, type: 4, content: commentText, }), success: function (res) { if (res.code === 200) { commentPage = 0; allCommentList = []; commentList.empty(); $("#pushText").val(""); layer.msg("评论成功", {icon: 1}); getCommentList(); } }, error: function (err) { console.error("请求失败:", err); }, }); } //点击评论按钮 $(document).on("click", ".father_reply", function () { if (!commentLoginStatus) { handleLoginH5(); return; } const parentComment = $(this).closest(".comment_list_item"); // 获取当前评论项 parentComment.find(".reply_comment_box").show(); const replyUsername = parentComment .find(".comment_item_head .username") .text(); // 获取主评论的用户名 parentComment .find(".replay_textarea") .attr("placeholder", `回复 ${replyUsername}:`); pid = parentComment.data("id"); // 获取评论的ID }); function subPushComment(commentText, commentPid) { $.ajax({ url: "/e/extend/api/index.php?m=comment&c=add", type: "post", data: JSON.stringify({ pid: commentPid, type: 4, content: commentText, }), success: function (res) { if (res.code === 200) { pageSize = allCommentList.length < 5 ? 5 : allCommentList.length; allCommentList = []; commentPage = 0; layer.msg("评论成功", {icon: 1}); pageListMap.clear(); getCommentList(); } }, error: function (err) { console.error("请求失败:", err); }, }); } //回复一级评论 $(document).on("click", ".ready_btn", function () { if (!commentLoginStatus) { handleLoginH5(); return; } const parentComment = $(this).closest(".comment_list_item"); // 获取当前评论项 let commentPid = parentComment.data("id"); // 获取评论的ID const commentText = parentComment.find(".replay_textarea").val(); // 获取评论内容 console.log("commentText", commentText); if (!commentText) { layer.msg("请输入内容", {icon: 2}); return; } subPushComment(commentText, commentPid); }); //二级评论按钮 $(document).on("click", ".sub_replay", function () { if (!commentLoginStatus) { handleLoginH5(); return; } const parentComment = $(this).closest(".subitem_box"); // 获取当前评论项 parentComment.find(".subreply_comment_box").show(); const replyUsername = parentComment .find(".comment_subitem_head .username:first") .text(); // 获取主评论的用户名 parentComment .find(".subreplay_textarea") .attr("placeholder", `回复 ${replyUsername}:`); }); //回复二级评论 $(document).on("click", ".subready_btn", function () { if (!commentLoginStatus) { handleLoginH5(); return; } const parentComment = $(this).closest(".subitem_box"); // 获取当前评论项 let commentPid = parentComment.data("id"); // 获取评论的ID const commentText = parentComment.find(".subreplay_textarea").val(); // 获取评论内容 console.log("commentText", commentText); if (!commentText) { layer.msg("请输入内容", {icon: 2}); return; } subPushComment(commentText, commentPid); }); // 点赞 function likeCommentOption(id, status) { $.ajax({ url: "/e/extend/api/index.php?m=comment&c=like", type: "post", data: JSON.stringify({ id: id, status: !status, }), success: function (res) { if (res.code === 200) { allCommentList.length < 5 ? 5 : allCommentList.length; allCommentList = []; commentPage = 0; layer.msg("操作成功", {icon: 1}); pageListMap.clear(); getCommentList(); } }, error: function (err) { console.error("请求失败:", err); }, }); } //一级评论点赞 $(document).on("click", ".fatherlike", function () { if (!commentLoginStatus) { handleLoginH5(); return; } const parentComment = $(this).closest(".comment_list_item"); // 获取当前评论项 let commentPid = parentComment.data("id"); // 获取评论的ID let status = $(this).data("status"); likeCommentOption(commentPid, status); }); //二级评论点赞 $(document).on("click", ".sublike", function () { if (!commentLoginStatus) { handleLoginH5(); return; } const parentComment = $(this).closest(".subitem_box"); // 获取当前评论项 let commentPid = parentComment.data("id"); // 获取评论的ID let status = $(this).data("status"); likeCommentOption(commentPid, status); }); //获取更多评论 function moreCommentList() { // pageSize = 5; getCommentList(); } </script> <!-- 跳转更多专题 --> <script> let firstSumbit = true; $(".more_recommendations_btn").click(function () { if (firstSumbit) { firstSumbit = false; $(".more_special_item").removeClass("extend_special"); $(".more_recommendations_btn").html("返回专题首页"); $(".more_recommendations").html("百万币友都在看"); } else { window.location.href = "/zhuanti/"; } }); </script> </html>