mirror of
https://gitee.com/ulthon/ulthon_information.git
synced 2026-07-06 04:12:48 +08:00
feat(phone-image): 增加翻页预览与无封面图排版样式
- 为手机截图生成器添加翻页功能,支持在生成前预览各页内容 - 增加无封面图时的排版样式,使用装饰线条和居中布局 - 改进图片处理逻辑,清除内联样式并展平嵌套包装元素 - 修复 models.dev 同步接口,支持 GET 请求获取缓存数据 - 优化网络请求,添加直连失败后的本地代理重试机制
This commit is contained in:
@@ -107,10 +107,22 @@ class System extends Common
|
||||
|
||||
/**
|
||||
* 同步 models.dev 数据.
|
||||
*
|
||||
* GET: 返回缓存的供应商列表(不触发远程同步)
|
||||
* POST: 强制从 models.dev 远程同步
|
||||
*/
|
||||
public function syncModelsDev()
|
||||
{
|
||||
$sync = new \app\common\tools\ai\ModelsDevSync();
|
||||
|
||||
if ($this->request->isGet()) {
|
||||
$result = [
|
||||
'providers' => $sync->getProviders(),
|
||||
'models' => [],
|
||||
];
|
||||
return json(['code' => 0, 'msg' => 'ok', 'data' => $result]);
|
||||
}
|
||||
|
||||
try {
|
||||
$result = $sync->syncProviders();
|
||||
$count = count($result['providers'] ?? []);
|
||||
|
||||
Reference in New Issue
Block a user