业务经理

微信扫描以上二维码

028-61286886

技术咨询

瀑布流无法控制数量,参考的官方文档和JS

迅睿框架 更新 2022-11-24 10:08:41 na


瀑布流加载


不能控制数量,滚动上去和滚动下来都一直显示,正在加载中,次数频繁,只有20个内容


<script type="text/javascript">

var obj = {

'shareTitle': '深咖系列_铭云陶瓷'

}

wx.miniProgram.postMessage({

data: obj

})

console.log(getUrlkey__(window.location.href))

</script></div>

<script>

    var Mpage=1;

    //滚动显示更多

    var scroll_get = true;  //做个标志,不要反反复复的加载

    $(document).ready(function () {

        $(window).scroll(function () {

            if (scroll_get==true &&  (400 + $(window).scrollTop())>($(document).height() - $(window).height())) {

                scroll_get = false;

                layer.msg('内容加载中,请稍候',{time:1000});

                dr_ajax_load_more();

            }

        });

    });


    function dr_ajax_load_more(){

        Mpage++;

        $.get('/index.php?s=api&c=api&m=template&name=list_data.html&module=image&catid=31&format=json&page='+Mpage+'&'+Math.random(),function(res){

            $('.footer-cont').hide();

            if(res.code==1){

                if(res.msg==''){

                    $('#is_ajax_btn').hide();

                    layer.msg("已经显示完了",{time:500});

                }else{

                    $('#content_list').append(res.msg);

                    scroll_get = true;

                }

            }else{

                layer.msg(res.msg,{time:2500});

            }

        }, 'json');

    }

</script>



<script type="text/javascript">

var obj = {

'shareTitle': '深咖系列_铭云陶瓷'

}

wx.miniProgram.postMessage({

data: obj

})

console.log(getUrlkey__(window.location.href))

</script></div>

<script>

    var Mpage=1;

    //滚动显示更多

    var scroll_get = true;  //做个标志,不要反反复复的加载

    $(document).ready(function () {

        $(window).scroll(function () {

            if (scroll_get==true &&  (400 + $(window).scrollTop())>($(document).height() - $(window).height())) {

                scroll_get = false;

                layer.msg('内容加载中,请稍候',{time:1000});

                dr_ajax_load_more();

            }

        });

    });


    function dr_ajax_load_more(){

        Mpage++;

        $.get('/index.php?s=api&c=api&m=template&name=list_data.html&module=image&catid=31&format=json&page='+Mpage+'&'+Math.random(),function(res){

            $('.footer-cont').hide();

            if(res.code==1){

                if(res.msg==''){

                    $('#is_ajax_btn').hide();

                    layer.msg("已经显示完了",{time:500});

                }else{

                    $('#content_list').append(res.msg);

                    scroll_get = true;

                }

            }else{

                layer.msg(res.msg,{time:2500});

            }

        }, 'json');

    }

</script>


方案

  • 迅睿框架技术-陈老师 #1 · 2022-11-24 07:50:57
    满意答案
    list_data.html 里面是什么内容
  • na #2 · 2022-11-24 10:08:41
    @迅睿框架技术-陈老师:{module module=image catid=$catid order=inputtime page=1 urlrule=$urlrule} {$t.title} {if $t.chanpinguige} {php $field = dr_field_options(17);}{$field[$t['chanpinguige']]} {/if} {if $t.cpmc} {$t.cpmc} {/if} {if $t.wenli} {php $field = dr_field_options(28);}{$field[$t['wenli']]} {/if} {if $t.zhongliang} {$t.zhongliang}kg/箱 {/if} {if $t.pianshu} {$t.pianshu}片/箱 {/if} {/module}这是list_data的内容,一直回复不了,这能这样了,哎

迅睿系统漏洞

AI文章生成器
AI文章生成器(2026-10-29)
任务插图设置数量
Bing站长数据
Bing站长数据(2026-10-29)
根据BING接口调整菜单 各个页面数据支持点击查看详情
泛解析站群系统
泛解析站群系统(2026-10-29)
AI队列增加清空按钮 表单提示语收敛 目录模式不接管主域名模板
自定义收款/捐款
自定义收款/捐款(2026-10-28)
自定义收款或捐款插件可以让用户快速创建付款或者捐款功能
全站模块搜索
全站模块搜索(2026-10-28)
实现全模块一次性搜索内容,一键搜索全站内容精准搜索全部模块:
PHPCMSV9数据转换
PHPCMSV9数据转换(2026-10-28)
PHPCMS转入迅睿CMS操作步骤:https://www.xunr...
域名授权系统
域名授权系统(2026-10-28)
后台增加前台访问地址链接
GeoSeo收录宝
GeoSeo收录宝(2026-10-28)
1 优化 BreadcrumbList 前端输出item细节 ...
自定义单页
自定义单页(2026-10-28)
增加批量设置url地址 URL规则和分页规则改为页面编辑界面 低...
邀请注册返现
邀请注册返现(2026-10-28)
本插件仅限于邀请注册会员充值时返现给邀请者,可查看邀请的关系列表如果...