迅睿框架 版主:迅睿框架研发组
有什么办法能实现栏目页的统计浏览量吗
类型:迅睿CMS 更新时间:2025-12-23 19:48:51 自定义字段 dr_show_hits

有什么办法能实现栏目页的统计浏览量吗?系统默认是内容页记录点击数

{dr_show_hits($id)}次

或者

<script type="text/javascript">

    $(document).ready(function(){

        $.ajax({

            type: "GET",

            url: "/index.php?s=api&c=module&siteid={SITE_ID}&app={MOD_DIR}&m=hits&id={$id}&gx=1&qx=1",

            dataType: "jsonp",

            success: function (data) {

                if (data.code) {

                    $(".dr_show_hits_{$id}").html(data.msg);

                } else {

                    dr_tips(0, data.msg);

                }

            }

        });

    });

</script>

<span class="dr_show_hits_{$id}">0</span>

如果我在栏目里添加个自定义字段 hits ,怎么样也能实现打开栏目就统计浏览数+1呢?