书老大的书窝
清冷国师今天心动了吗

清冷国师今天心动了吗

月临书 未分类

198 章 1 阅读
开始阅读

最新:第4章 白狸自传 7 小时前更新

简介

双男主1V1架空古代(正文完,双洁超甜大启新帝萧衍,是个弑父造反的灾星继位那日,他于国师府中窥见神明后,便想将人占为己有于国师蘅芜而言,千年时光,他的情感早已淡漠,他以为心动这个词,远不会属于自己可这人却偏要自己对他生出情感明明手段强硬,偏偏又小心翼翼捧着一颗滚烫真心朝夕相伴,他竟也不可抑制地…动了心—其实,在这场...

目录

共 198 章

同类推荐

暂无正文 目录
$this->foot(); } /** 用户点开空章时当场抓一次正文;失败就退回排队状态,页面显示提示卡 */ private function fillOnDemand(array $c): array { $claim = Db::q('UPDATE chapters SET fetched = 2, updated_at = NOW() WHERE id = ? AND fetched = 0', [(int)$c['id']])->rowCount(); if (!$claim) { $fresh = Db::one('SELECT * FROM chapters WHERE id = ?', [(int)$c['id']]); return $fresh ?: $c; } $ok = false; try { $src = Db::one('SELECT * FROM sources WHERE id = ?', [(int)Db::val('SELECT source_id FROM books WHERE id = ?', [(int)$c['book_id']])]); if (!$src) throw new RuntimeException('source missing'); $src['rules'] = json_decode((string)$src['rules'], true) ?: []; $src['rules']['timeout'] = 8; // 前台等不了太久 $col = new Collector($src); $d = $col->parseChapter((string)$c['source_url'], (string)$c['title']); if (trim(strip_tags((string)$d['content'])) === '') throw new RuntimeException('empty content'); Db::q('UPDATE chapters SET content = ?, words = ?, fetched = 1, updated_at = NOW() WHERE id = ?', [$d['content'], (int)$d['words'], (int)$c['id']]); $c['content'] = $d['content']; $c['words'] = $d['words']; $c['fetched'] = 1; $ok = true; } catch (Throwable $e) { Db::q('UPDATE chapters SET fetched = 0, updated_at = NOW() WHERE id = ?', [(int)$c['id']]); } return $c; } private function read(int $bid, int $cid) { $b = Db::one('SELECT id,title,author,cover,category,chapter_count,updated_at FROM books WHERE id = ?', [$bid]); $c = Db::one('SELECT * FROM chapters WHERE id = ? AND book_id = ?', [$cid, $bid]); if (!$c) { // 容错:/read/书号/章序 也认 $c = Db::one('SELECT * FROM chapters WHERE book_id = ? AND idx = ?', [$bid, $cid]); } if (!$b || !$c) return $this->notFound(); // 点开即补:正文还没回填的章节,用户打开时当场抓一次(约 1 秒),抓不到再退回排队提示 if ((int)$c['fetched'] === 0 && trim((string)$c['source_url']) !== '') { $c = $this->fillOnDemand($c); } $prev = Db::one('SELECT id, title FROM chapters WHERE book_id = ? AND idx < ? ORDER BY idx DESC LIMIT 1', [$bid, (int)$c['idx']]); $next = Db::one('SELECT id, title FROM chapters WHERE book_id = ? AND idx > ? ORDER BY idx ASC LIMIT 1', [$bid, (int)$c['idx']]); $totalCh = max((int)$b['chapter_count'], (int)$c['idx']); $this->head($c['title'] . ' — ' . $b['title'], mb_substr(strip_tags((string)$c['content']), 0, 110), 'reading', '/og/' . $bid); $host = 'https://' . ($_SERVER['HTTP_HOST'] ?? 'shu.czi.me'); echo ''; ?>
清冷国师今天心动了吗 / 第 198 章

第4章 白狸自传


Warning: Undefined array key "content" in /www/wwwroot/shu.czi.me/app/Front.php on line 670

这一章的正文还在排队补全中。

目录和书目已经入库,正文由后台按顺序回填,通常几小时内就能读到。

返回目录 · 或者先看别的书

1 / 1

Warning: Undefined variable $prev in /www/wwwroot/shu.czi.me/app/Front.php on line 690
已是第一章 目录
Warning: Undefined variable $next in /www/wwwroot/shu.czi.me/app/Front.php on line 694
已是最后一章

Warning: Undefined variable $prev in /www/wwwroot/shu.czi.me/app/Front.php on line 700
上一章
Warning: Undefined variable $next in /www/wwwroot/shu.czi.me/app/Front.php on line 706
下一章

Warning: Undefined variable $next in /www/wwwroot/shu.czi.me/app/Front.php on line 712


Warning: Undefined array key "words" in /www/wwwroot/shu.czi.me/app/Front.php on line 752
0 字 · 内容整理自公开网络,仅供个人学习