最近访客
百度未收录

Discuz修改默认排序为评论方法

首先下载 DiscuzQ 的 PC 和手机端源码

PC

找到 index.vue里面

sort: \'\', // 排序

修改为

sort: \'3\', // 排序

手机端 src/components/

H5 qui-page-home-h5/qui-page-home-h5.vue

找到

params = {
        page: this.pageNum,
        perPage: 10,
        filter: {
          sticky: 0,
          essence: this.threadEssence || 0,
          attention: this.threadFollow,
        },
      };

改成

params = {
        page: this.pageNum,
        perPage: 10,
        filter: {
          sticky: 0,
          sort: 3,
          essence: this.threadEssence || 0,
          attention: this.threadFollow,
        },
      };

有2处

小程序 qui-page-home/qui-page-home.vue

找到

const sun = {
        page: this.pageNum + 1,
        perPage: 10,
        filter: {
          sticky: 0,
          essence: this.threadEssence || 0,
          attention: this.threadFollow,
        },
      };

修改为

const sun = {
        page: this.pageNum + 1,
        perPage: 10,
        filter: {
          sticky: 0,
          sort: 3,
          essence: this.threadEssence || 0,
          attention: this.threadFollow,
        },
      };

有3处

改完编译上传就行了,discuzQ 常用编译命令

温馨提示: 本文最后更新于2022/10/19 22:44:38。若文章内容或图片失效,请 留言联系站长反馈!
!
也想出现在这里? 联系我们
创意广告
© 版权声明
THE END
点赞0赞赏 分享
评论 抢沙发

请登录后发表评论

    请登录后查看评论内容