乐竞体育app官方版-乐竞体育app2026最新版V4.90.82安卓版-云奇手...

推荐
频道
反馈 提问
' item.forEach((value,key)=>{ if((value.position ==1&&item.length>1)){ str +='' str+='
' str+='
'+value.title+'
' str+='
' if(value.read_num){ str+='
阅读'+value.read_num+'
' } if(value.send_time&&value.send_time!=0){ const date = new Date(value.send_time * 1000); // 转换为毫秒 // 获取日期和时间部分 const year = date.getFullYear(); const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以加1 const day = String(date.getDate()).padStart(2, '0'); const hours = String(date.getHours()).padStart(2, '0'); const minutes = String(date.getMinutes()).padStart(2, '0'); const seconds = String(date.getSeconds()).padStart(2, '0'); // 格式化输出 const formattedDate = year+'-'+month+'-'+day+' '+hours+':'+minutes; str+='
'+formattedDate+'
' }else{ let publishDate = value.publish_date if(publishDate){ const formattedDate = publishDate.slice(0, 4) + '-' + publishDate.slice(4, 6) + '-' + publishDate.slice(6); str+='
'+formattedDate+'
' } } str+='
' str+='
' if(value.img_long){ str+='避免被站外镜像带偏' }else{ str+='继续了解' } str+='
' }else{ str +='' str+='
' str+='
'+value.title+'
' str+='
' if(value.read_num){ str+='
阅读'+value.read_num+'
' } if(value.send_time&&value.send_time!=0){ const date = new Date(value.send_time * 1000); // 转换为毫秒 // 获取日期和时间部分 const year = date.getFullYear(); const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以加1 const day = String(date.getDate()).padStart(2, '0'); const hours = String(date.getHours()).padStart(2, '0'); const minutes = String(date.getMinutes()).padStart(2, '0'); const seconds = String(date.getSeconds()).padStart(2, '0'); // 格式化输出 const formattedDate = year+'-'+month+'-'+day+' '+hours+':'+minutes; str+='
'+formattedDate+'
' }else{ let publishDate = value.publish_date if(publishDate){ const formattedDate = publishDate.slice(0, 4) + '-' + publishDate.slice(4, 6) + '-' + publishDate.slice(6); str+='
'+formattedDate+'
' } } str+='
' str+='
' str+='房产 / 旅游景点 / 事业单位 /' str+='
' } }) str+='
' } } } $('.content-artical-wrap').append(str); } // 公众号推文数据接口 - 直接使用推荐tab的渲染逻辑 function addGzhData(data, targetContainer){ let str = '' // 完全使用与推荐栏目相同的数据处理逻辑 for(const [k, v] of Object.entries(data)){ for(const [keyI, i] of Object.entries(v)){ for(const [index, item] of Object.entries(i)){ str +='
' item.forEach((value,key)=>{ if((value.position ==1&&item.length>1)){ str +='' str+='
' str+='
'+value.title+'
' str+='
' if(value.read_num){ str+='
阅读'+value.read_num+'
' } if(value.send_time&&value.send_time!=0){ const date = new Date(value.send_time * 1000); // 转换为毫秒 // 获取日期和时间部分 const year = date.getFullYear(); const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以加1 const day = String(date.getDate()).padStart(2, '0'); const hours = String(date.getHours()).padStart(2, '0'); const minutes = String(date.getMinutes()).padStart(2, '0'); const seconds = String(date.getSeconds()).padStart(2, '0'); // 格式化输出 const formattedDate = year+'-'+month+'-'+day+' '+hours+':'+minutes; str+='
'+formattedDate+'
' }else{ let publishDate = value.publish_date if(publishDate){ const formattedDate = publishDate.slice(0, 4) + '-' + publishDate.slice(4, 6) + '-' + publishDate.slice(6); str+='
'+formattedDate+'
' } } str+='
' str+='
' if(value.img_long){ str+='乐竞app体育官方入口官方网站入口说' }else{ str+='乐竞app体育官方入口官方网站入口说明' } str+='
' }else{ str +='' str+='
' str+='
'+value.title+'
' str+='
' if(value.read_num){ str+='
阅读'+value.read_num+'
' } if(value.send_time&&value.send_time!=0){ const date = new Date(value.send_time * 1000); // 转换为毫秒 // 获取日期和时间部分 const year = date.getFullYear(); const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以加1 const day = String(date.getDate()).padStart(2, '0'); const hours = String(date.getHours()).padStart(2, '0'); const minutes = String(date.getMinutes()).padStart(2, '0'); const seconds = String(date.getSeconds()).padStart(2, '0'); // 格式化输出 const formattedDate = year+'-'+month+'-'+day+' '+hours+':'+minutes; str+='
'+formattedDate+'
' }else{ let publishDate = value.publish_date if(publishDate){ const formattedDate = publishDate.slice(0, 4) + '-' + publishDate.slice(4, 6) + '-' + publishDate.slice(6); str+='
'+formattedDate+'
' } } str+='
' str+='
' str+='乐竞app体育官方入口' str+='
' } }) str+='
' } } } targetContainer.append(str); } // 加载公众号数据 function loadGzhData(gzhId, targetContainer,index){ if(gzhLoading) return gzhLoading = true $('.loading').show() let data1 = getFormattedDate(gzhNowDay[index]) let data2 = getFormattedDate(gzhNowDay[index] + 6) // 一周的数据 gzhNowDay[index] = gzhNowDay[index]+7 $.ajax({ url: '/index.php?view=1&start_date='+data2+'&end_date='+data1+'&gzh_id='+gzhId, type: 'get', success: function(data) { let jsonData = JSON.parse(data) if(Object.keys(jsonData).length > 0){ addGzhData(jsonData, targetContainer) } }, complete: function () { $('.loading').hide() gzhLoading = false } }); } // 监听滚动 调取下拉数据 $(window).scroll(debounce(function() { if ($(window).scrollTop() + $(window).height() >= $(document).height() - 100) { // 到达底部,触发加载更多内容的事件 // 推荐tab的下拉加载 if($('.content-select').eq(0).hasClass('active')&&$('.content-select.active').eq(0).html() == '推荐'){ if(loading)return if(nowDay>29)return loading = true $('.loading').show() data1 = getFormattedDate(++nowDay) data2 = getFormattedDate(++nowDay) $.ajax({ url: '/index.php?view=1&start_date='+data2+'&end_date='+data1, type: 'get', success: function(data) { addData(JSON.parse(data)); }, complete: function () { $('.loading').hide() loading = false } }); } // 公众号推文tab的下拉加载 if(currentGzhId && currentTabType){ if(gzhLoading)return if(gzhNowDay[currentindex]>29)return gzhLoading = true $('.loading').show() let data1 = getFormattedDate(gzhNowDay[currentindex]) let data2 = getFormattedDate(gzhNowDay[currentindex] + 6) gzhNowDay[currentindex] = gzhNowDay[currentindex]+7 console.log(gzhNowDay[currentindex]); let targetContainer = $('.gzh-artical-wrap[data-tab-type="'+currentTabType+'"] .content-artical-wrap') $.ajax({ url: '/index.php?view=1&start_date='+data2+'&end_date='+data1+'&gzh_id='+currentGzhId, type: 'get', success: function(data) { let jsonData = JSON.parse(data) if(Object.keys(jsonData).length > 0){ addGzhData(jsonData, targetContainer) } }, complete: function () { $('.loading').hide() gzhLoading = false } }); } } }, 100)); // 防抖延迟设置为200毫秒 // tab切换 $('.content-select').click(function(){ let index = $(this).index() if(!$(this).hasClass('active')){ $('.content-select').removeClass('active') $('.content-select').eq(index).addClass('active') // 移动到中间 var targetPosition = $(this).position().left; var containerWidth = $(".content-select-wrap").width(); let moveWidth = 0 $('.content-select').each((i,item)=>{ if(i<=index){ moveWidth+=$(this).width() moveWidth+=25 } }) moveWidth-=25 moveWidth = moveWidth - $(this).width() / 2 - 350/2 if(moveWidth<0){ moveWidth = 0 } // 移动到中间 // 滚动 .content-select-wrap 容器到目标位置 $(".content-select-wrap").animate({ scrollLeft: moveWidth }, 500); // 500ms平滑滚动 // 获取当前tab的公众号ID和类型 let gzhId = $(this).data('gzh-id') let tabType = $(this).data('tab-type') let tabIndex = $(this).data('index') if(index==0){ $('.content-artical-wrap').show() $('.other-artical-wrap').hide() $('.gzh-artical-wrap').hide() currentGzhId = '' currentTabType = '' currentindex = '' }else if(gzhId && tabType){ // 公众号推文tab $('.content-artical-wrap').hide() $('.other-artical-wrap').hide() $('.gzh-artical-wrap').hide() $('.gzh-artical-wrap[data-tab-type="'+tabType+'"]').show() // 确保容器内的content-artical-wrap也是可见的 $('.gzh-artical-wrap[data-tab-type="'+tabType+'"] .content-artical-wrap').show() currentGzhId = gzhId currentTabType = tabType currentindex = tabIndex // 如果该tab还没有数据,则加载数据 let targetContainer = $('.gzh-artical-wrap[data-tab-type="'+tabType+'"] .content-artical-wrap') if(targetContainer.children().length === 0){ loadGzhData(gzhId, targetContainer,tabIndex) } }else{ $('.content-artical-wrap').hide() $('.other-artical-wrap').hide() $('.gzh-artical-wrap').hide() $('.other-artical-wrap').eq(0).show() currentGzhId = '' currentTabType = '' currentindex = '' } } }) // window.onload = function() { // window.scrollBy({ // top: 1, // behavior: 'smooth' // }); // }; function getGzhData(gzhId, callback){ let data1 = getFormattedDate(0); let data2 = getFormattedDate(6); // 一周的数据 $.ajax({ url: '/index.php?view=1&start_date=' + data2 + '&end_date=' + data1 + '&gzh_id=' + gzhId, type: 'get', success: function(data) { let jsonData = JSON.parse(data); if (Object.keys(jsonData).length > 0) { $('[data-gzh-id="' + gzhId + '"]').show() } callback(gzhId); // 有数据时调用回调函数返回 gzhId }, complete: function () { } }); } if($('.content-select-gzh').length == 0){ if(!$('.content-select:visible').eq(0).hasClass('active')){ $('.content-select:visible').eq(0).addClass('active') } if($('.content-select:visible').eq(0).html()&&$('.content-select:visible').eq(0).html().trim()=='推荐'){ $('.content-artical-wrap').eq(0).show() }else if($('.content-select:visible').eq(0).html()&&$('.content-select:visible').eq(0).html().trim()=='频道'){ $('.other-artical-wrap').eq(0).show() } } let validGzhIds = []; // 存放有效的 gzh-id $('.content-select-gzh').each(function(){ let gzhId = $(this).data('gzh-id'); getGzhData(gzhId, function(gzhId) { validGzhIds.push(gzhId); // 将有效的 gzh-id 添加到数组中 // 如果需要在所有请求完成后返回,可以在此处执行相应逻辑 console.log(validGzhIds.length,$('.content-select-gzh').length); if (validGzhIds.length === $('.content-select-gzh').length) { if(!$('.content-select:visible').eq(0).hasClass('active')){ $('.content-select:visible').eq(0).addClass('active') } if($('.content-select:visible').eq(0).html()&&$('.content-select:visible').eq(0).html().trim()=='推荐'){ $('.content-artical-wrap').eq(0).show() }else if($('.content-select:visible').eq(0).html()&&$('.content-select:visible').eq(0).html().trim()=='频道'){ $('.other-artical-wrap').eq(0).show() }else{ $('.gzh-artical-wrap').eq(0).show() let gzhId = $('.content-select:visible').eq(0).data('gzh-id') let tabType = $('.content-select:visible').eq(0).data('tab-type') let tabIndex =$('.content-select:visible').eq(0).data('index') loadGzhData(gzhId, targetContainer,tabIndex) } } }); });

更多内容

本页围绕「乐竞app体育官方入口官方网站入口说明」梳理公开信息,便于对照栏目动态与后续阅读。 相关文章

移动端与电脑端入口保持一致。 相关文章如某条暂不可用,可改走栏目列表继续查找。

继续浏览时优先选择同栏目或相近主题,避免被站外镜像带偏。 继续了解

频道列表

房产 / 旅游景点 / 事业单位 / AI优惠 / 武汉保障房

正文、栏目列表与相关阅读构成完整路径,适合按主题持续查阅。