From 88259e2970c1e9443142c0d89786bdb6c553b9f3 Mon Sep 17 00:00:00 2001 From: hellcat <> Date: Tue, 10 Jun 2025 19:46:44 +0800 Subject: [PATCH] no message --- app/Http/Controllers/SakaiController.php | 4 ++++ app/Models/Book.php | 8 ++++++-- app/Services/TG/Hook/Mod/Book.php | 11 +++++++---- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/SakaiController.php b/app/Http/Controllers/SakaiController.php index b0e4ed58..ea248776 100755 --- a/app/Http/Controllers/SakaiController.php +++ b/app/Http/Controllers/SakaiController.php @@ -299,6 +299,10 @@ class SakaiController $s = "/hook#set /book#"; $s = "rag ss"; $s = "fire_toggle"; + $s = "type todo"; + $s = "toDone 123"; + $s = "optionSet todo_show_type 1"; + $s = "openRe"; // $s = "back"; // movetoId和like列表 diff --git a/app/Models/Book.php b/app/Models/Book.php index d379dcb1..43d5b908 100755 --- a/app/Models/Book.php +++ b/app/Models/Book.php @@ -94,8 +94,12 @@ class Book extends Model $aOrder = explode(",", $sTodoOrder); if ($iPage !== "all") { - $oSelf = $oSelf->where("rank", "!=", "done"); - $oSelf = $oSelf->where("rank", "!=", "block"); + + if (isset($aRagOption["todo_show_type"]) && $aRagOption["todo_show_type"] == 1) { + $oSelf = $oSelf->where("rank", "!=", "done"); + $oSelf = $oSelf->where("rank", "!=", "block"); + } + } $oSelf = $oSelf->orderByRaw("rank IS NULL, FIELD(rank, " . $sTodoOrder . ") ".$sOrderType); diff --git a/app/Services/TG/Hook/Mod/Book.php b/app/Services/TG/Hook/Mod/Book.php index c6d8b0b8..9b86b38a 100644 --- a/app/Services/TG/Hook/Mod/Book.php +++ b/app/Services/TG/Hook/Mod/Book.php @@ -43,7 +43,8 @@ class Book extends Base { $this->aRagOption = json_decode($this->oRag->option, true); } else { $this->aRagOption = []; - $this->aRagOption["fire_show"] = false; +// $this->aRagOption["fire_show"] = false; +// $this->aRagOption["todo_show_type"] = 1; } } @@ -275,6 +276,9 @@ class Book extends Base { if ($sType == "todo") { $oParentRag->order = "rank_todo"; + $oParentRag->option = json_encode([ + "todo_show_type" => 1 + ]); } $r = $oParentRag->save(); @@ -1576,7 +1580,6 @@ class Book extends Base { // fire倒计时列表 public function firel() { -// tomd(11, 1); $iLimit = ModelBookOption::_hit("fire_limit"); $oBookFire = ModelBook::where("fire", "!=", NULL)->orderBy("fire")->limit($iLimit)->get(); @@ -1952,7 +1955,7 @@ class Book extends Base { { $arr = []; -// tomd(@$arr["zz"]); + tomd($arr["zz"]); } //// 字符串生成 系列 private function bookToStr($oBook) @@ -2100,7 +2103,7 @@ class Book extends Base { $sStr .= ":".$this->_RankMap($oRag->rank); } // tomd($this->oRag->option, 1); - if ($this->aRagOption["fire_show"] == true && $oRag->fire) { + if ((isset($this->aRagOption["fire_show"]) && $this->aRagOption["fire_show"] == true) && $oRag->fire) { $iDayLine = ceil((strtotime($oRag->fire) - time()) / 86400);