diff --git a/app/Http/Controllers/SakaiController.php b/app/Http/Controllers/SakaiController.php index 6aed61b0..3222b549 100755 --- a/app/Http/Controllers/SakaiController.php +++ b/app/Http/Controllers/SakaiController.php @@ -312,6 +312,9 @@ class SakaiController $s = "fire_toggle"; $s = "no 7"; $s = "openRe"; + $s = "del 1"; +// $s = "war 8"; +// $s = "no 9"; // $s = "detail__all 1"; // $s = "noRe"; // $s = "rag xxx"; diff --git a/app/Models/Book.php b/app/Models/Book.php index bf3b88f3..35598099 100755 --- a/app/Models/Book.php +++ b/app/Models/Book.php @@ -89,7 +89,8 @@ class Book extends Model if (!empty($oParentRag->sort)) { $aSort = explode("_", $oParentRag->sort); - self::where("path", $sPath)->where("is_del", $iIsDel); +// tomd($aSort, 1); +// self::where("path", $sPath)->where("is_del", $iIsDel); $oSelf = $oSelf->orWhere("path", $oParentRag->path); $oSelf = $oSelf->where($aSort[0], $aSort[1]); diff --git a/app/Services/TG/Hook/Mod/Book.php b/app/Services/TG/Hook/Mod/Book.php index 0a4899d0..b3b9b0f5 100644 --- a/app/Services/TG/Hook/Mod/Book.php +++ b/app/Services/TG/Hook/Mod/Book.php @@ -303,11 +303,13 @@ class Book extends Base { private function _kv($k, $v, $aNo) { - if (!$aNo) { - $aNo = $this->_getCheckedNo(); - } +// if (!$aNo) { +// $aNo = $this->_getCheckedNo(); +// } - $r = ModelBook::where("path", $this->sPath)->whereIn("no", $aNo)->update([$k => $v]); + $aId = $this->_noToId($aNo); + + $r = ModelBook::whereIn("id", $aId)->update([$k => $v]); return $r; } @@ -703,8 +705,10 @@ class Book extends Base { $oParentRag = $this->_getParentRag(); $this->aParentType = $this->_typeFormat($oParentRag->type); - if ($this->aParentType[0] == "todo") { -// $this->mRst[] = ["完", 22]; + if ($this->aParentType[0] == "dir") { +// $this->sPath = $oParentRag->path; +// $this->oRag->sort +// $oRag = ModelBook::_path(); } $oBook = ModelBook::_path($this->sPath, $this->iPageNo); @@ -1758,6 +1762,10 @@ class Book extends Base { private function _noToId($aNo = false) { + if ($this->oRag->type == "dir") { + $this->sPath = $this->oRag->path; + } + /// 是空认为是check 返回之 if (!$aNo) { $aId = $this->_idByChecked();