qxzhan / 腾讯EO Pages随机图API
0 Lajky
0 Forky
1 Soubory
Naposledy aktivní 2 months ago
| 1 | // 缓存图片数据,减少重复请求 |
| 2 | let cachedPictures = null; |
| 3 | let cacheTimestamp = 0; |
| 4 | const CACHE_TTL = 43200000; // 缓存12小时(12×60×60×1000毫秒) |
| 5 | |
| 6 | export async function onRequest(context) { |
| 7 | const { request } = context; |
| 8 | |
| 9 | try { |
| 10 | // 使用缓存数据(如果有效) |
qxzhan / Joe再续前缘魔改铺垫(二)
0 Lajky
0 Forky
1 Soubory
Naposledy aktivní 2 months ago
友链状态检测 flink_count.json 适配
| 1 | <?php |
| 2 | require_once dirname(__FILE__) . '/../config.inc.php'; |
| 3 | $db = \Typecho\Db::get(); |
| 4 | try { |
| 5 | $query = $db->select('title', 'url', 'logo', 'description') |
| 6 | ->from('table.friends') |
| 7 | ->where('status = ?', 1); |
| 8 | $rows = $db->fetchAll($query); |
| 9 | $link_list = []; |
| 10 | foreach ($rows as $row) { |
qxzhan / Joe再续前缘魔改铺垫(一)
0 Lajky
0 Forky
1 Soubory
Naposledy aktivní 2 months ago
朋友圈精简版 friend.json 适配
| 1 | <?php |
| 2 | require_once dirname(__FILE__) . '/../config.inc.php'; |
| 3 | $db = \Typecho\Db::get(); |
| 4 | try { |
| 5 | $query = $db->select('title', 'url', 'logo') |
| 6 | ->from('table.friends') |
| 7 | ->where('status = ?', 1); |
| 8 | $rows = $db->fetchAll($query); |
| 9 | $friends = []; |
| 10 | foreach ($rows as $row) { |
Novější
Starší