<section class="container overflow-hidden py-3 py-md-6 py-lg-7"> <div class="ListMoreInfos"> <!-- Post--> {qb:hy name="qun_wapindex_model004" type="company" mid="1" where="uid=$info.uid" order="id" by="desc" rows="8" } <article class="card card-horizontal card-hover mb-grid-gutter"><a class="card-img-top order-sm-2" href="{$rs.url}" style="background-image: url({:fun('Thumb@TT',$rs.picurl,475,345)});"></a> <div class="card-body order-sm-1"><a class="meta-link fs-sm mb-2" href="{$rs.sort_url}">{$rs.sort_name}</a> <h2 class="h4 nav-heading mb-4"><a href="{$rs.url}">{$rs.title}</a></h2> <p>{$rs.content|get_word=200}</p> </div> </article> {/qb:hy} </div> <div class="text-center"><button class="btn btn-primary" onclick="ShowMoreInfo()">查看更多</button ></div> <div style="height: 6rem;"></div> </section> <script type="text/javascript"> var morepage = 1; function ShowMoreInfo(){ morepage++; $.get('{qb:url name="qun_wapindex_model004" /}'+morepage,function(res){ if(res.code==0){ if(res.data==''){ layer.msg("已经显示完了!",{time:500}); }else{ $('.ListMoreInfos').append(res.data); } }else{ layer.msg(res.msg,{time:2500}); } }); } </script>
独立圈子模板的例表页,调用该圈子关联的conpany模块(通过复制cms而成)文章内容,调用没问题,但是点击“显示更多”则加载了CMS频道下更多与该圈子无关联的文章,这个js是不是有问题啊。
qb:url
换成
qb:hy_url