聯(lián)系官方銷售客服
1835022288
028-61286886
插件名稱 | 建站系統(tǒng) V3.17 |
插件作者 | 迅睿官方團隊 |
最近更新 | 2024-12-19 10:00:07 |
[高級版]針對達夢數(shù)據(jù)庫的搜索參數(shù)優(yōu)化 手機模板自動識別模式下,增加將平板端排除開關(guān) |
if(res.msg=='')要怎么結(jié)合list_data.html模板來寫
{module module=images order=updatetime page=1 pagesize=10 num=50 maxlimit=50 return=rs}
var Mpage=1; //滾動顯示更多 var scroll_get = true; //做個標志,不要反反復(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)容加截中,請稍候',{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模板來寫,否則會出現(xiàn)無限的加載了 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)標簽的生成工具,填寫參數(shù)就可以生成相關(guān)的代碼,每個參數(shù)后面都有用法解釋
他這個原理是判斷模板輸出有沒有某些字符,如果沒有就表示刷不出來內(nèi)容了,就結(jié)束了