ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
1、找到”根目录\\include\\arc.listview.class.php”文件。 2、修改代码:在文件第770行处添加按weight排序判断代码。 ``` //排序方式 $ordersql = ''; if($orderby=="senddate" || $orderby=="id") { $ordersql=" ORDER BY arc.id $orderWay"; } else if($orderby=="hot" || $orderby=="click") { $ordersql = " ORDER BY arc.click $orderWay"; } else if($orderby=="lastpost") { $ordersql = " ORDER BY arc.lastpost $orderWay"; } else if($orderby=="weight") { $ordersql = " ORDER BY arc.weight $orderWay"; } else { $ordersql=" ORDER BY arc.sortrank $orderWay"; } ``` 3、再在第812行处找到此段代码 ```   //如果不用默认的sortrank或id排序,使用联合查询(数据量大时非常缓慢)   if(preg_match('/hot|click|lastpost|weight/', $orderby))   添加`|weight`修改为下面这样。 if(preg_match('/hot|click|lastpost|weight/', $orderby)) ``` 4、标签调用: ```\   {dede:list orderby='weight' orderway='asc'} ```