聯(lián)系官方銷售客服
1835022288
028-61286886
插件名稱 | 建站系統(tǒng) V3.19 |
插件作者 | 迅睿官方團(tuán)隊(duì) |
最近更新 | 2025-04-24 15:41:23 |
[高級(jí)版]內(nèi)容聚合欄目,增加滾動(dòng)條效果 [高級(jí)版]module標(biāo)簽優(yōu)化catid查詢條件效率 修復(fù)多網(wǎng)站時(shí)偶爾存在其他站點(diǎn)緩存丟失的情況 |
if(res.msg=='')要怎么結(jié)合list_data.html模板來(lái)寫(xiě)
{module module=images order=updatetime page=1 pagesize=10 num=50 maxlimit=50 return=rs}
var Mpage=1; //滾動(dòng)顯示更多 var scroll_get = true; //做個(gè)標(biāo)志,不要反反復(fù)復(fù)的加載 $(document).ready(function () { $(window).scroll(function () { if (scroll_get==true && (400 + $(window).scrollTop())>($(document).height() - $(window).height())) { scroll_get = false; layer.msg('內(nèi)容加截中,請(qǐng)稍候',{time:1000}); dr_ajax_load_more(); } }); }); function dr_ajax_load_more(){ Mpage++; $.get('/index.php?s=api&c=api&m=template&name=index_data.html&format=json&page='+Mpage+'&'+Math.random(),function(res){ $('.footer-cont').hide(); if(res.code==1){ if(res.msg==''){ //這里的判斷條件需要結(jié)合list_data.html模板來(lái)寫(xiě),否則會(huì)出現(xiàn)無(wú)限的加載了 layer.msg("已經(jīng)顯示完了",{time:500}); }else{ $('#content_list').append(res.msg); scroll_get = true; } }else{ layer.msg(res.msg,{time:2500}); } }, 'json'); }
官方提醒:使用module內(nèi)容循環(huán)標(biāo)簽的生成工具,填寫(xiě)參數(shù)就可以生成相關(guān)的代碼,每個(gè)參數(shù)后面都有用法解釋
他這個(gè)原理是判斷模板輸出有沒(méi)有某些字符,如果沒(méi)有就表示刷不出來(lái)內(nèi)容了,就結(jié)束了