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 常用编译命令

原文地址:http://www.5che2.com/

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

给TA打赏
共{{data.count}}人
人已打赏
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索