no message

This commit is contained in:
hellcat 2025-06-11 17:14:25 +08:00
parent f909f7eb2c
commit 7897be7e9b
4 changed files with 35 additions and 12 deletions

View File

@ -41,7 +41,7 @@ class CronController
$s = $v; $s = $v;
} }
$h = "00"; // $h = "00";
//// test end //// test end
if ($h == "00") { if ($h == "00") {

View File

@ -318,6 +318,7 @@ class SakaiController
$s = "/cron#test"; $s = "/cron#test";
$s = "/book#main"; $s = "/book#main";
$s = "/book#up__3"; $s = "/book#up__3";
$s = "/book#main";
// $s = "war 8"; // $s = "war 8";
// $s = "no 9"; // $s = "no 9";
// $s = "detail__all 1"; // $s = "detail__all 1";

View File

@ -126,18 +126,36 @@ class Book extends Model
// order // order
if ($oParentRag->order == "rank_todo") { if ($oParentRag->order == "rank_todo") {
$sTodoOrder = BookOption::_hit("order_rank_todo"); $sOrderRank = BookOption::_hit("order_rank_todo");
$aTodoOrder = explode(",", $sTodoOrder); // $aTodoOrder = explode(",", $sTodoOrder);
$sTodoOrder = implode(",", array_reverse($aTodoOrder)); // $sTodoOrder = implode(",", array_reverse($aTodoOrder));
//
// $oSelf = $oSelf->orderByRaw("FIELD(rank, " . $sTodoOrder . ") DESC, (rank IS NULL) ASC");
// $oSelf = $oSelf->orderByRaw("fire DESC, (fire IS NULL) ASC");
//
// $sOrder = "no";
// $sOrderType = "asc";
$oSelf = $oSelf->orderByRaw("FIELD(rank, " . $sTodoOrder . ") DESC, (rank IS NULL) ASC"); // 默认也rank排序
$oSelf = $oSelf->orderByRaw("fire DESC, (fire IS NULL) ASC"); } else {
$sOrder = "no"; $sOrderRank = BookOption::_hit("order_rank");
$sOrderType = "asc";
// tomd($sOrderRank, 1);
} }
// $sOrderRank = BookOption::_hit("order_rank_todo");
$aOrderRank = explode(",", $sOrderRank);
$sOrderRank = implode(",", array_reverse($aOrderRank));
$oSelf = $oSelf->orderByRaw("FIELD(rank, " . $sOrderRank . ") DESC, (rank IS NULL) ASC");
$oSelf = $oSelf->orderByRaw("fire DESC, (fire IS NULL) ASC");
$sOrder = "no";
$sOrderType = "asc";
$oSelf = $oSelf->orderBy($sOrder, $sOrderType); $oSelf = $oSelf->orderBy($sOrder, $sOrderType);
$oSelf = $oSelf->orderBy("updated_at", "desc"); $oSelf = $oSelf->orderBy("updated_at", "desc");

View File

@ -1848,17 +1848,21 @@ class Book extends Base {
$aMap = [ $aMap = [
"war" => "🔴", "war" => "🔴",
"red" => "🔴", "red" => "🔴",
"tip" => "🟣",
"gem" => "🟣", "gem" => "🟣",
"glod" => "🟡",
"iron" => "🟤",
"action" => "🟢", "action" => "🟢",
"wait" => "⚪️", "wait" => "⚪️",
// "block" => "⚫️",
"keep" => "🟡", "keep" => "🟡",
"tip" => "🟣", "glod" => "🟡",
"track" => "🟤", "track" => "🟤",
"iron" => "🟤",
"block" => "⚫️",
]; ];
// 'war','red','tip','gem','action','wait','keep','glod','track','iron','block',
// 'war','red','action','tip','keep','track','wait','none'
if (!empty($aMap[$sRank])) { if (!empty($aMap[$sRank])) {
$sRst = $aMap[$sRank]; $sRst = $aMap[$sRank];
} else { } else {