mirror of
https://gitee.com/ulthon/ulthon_information.git
synced 2026-07-08 18:22:48 +08:00
feat(phone-image): 增加翻页预览与无封面图排版样式
- 为手机截图生成器添加翻页功能,支持在生成前预览各页内容 - 增加无封面图时的排版样式,使用装饰线条和居中布局 - 改进图片处理逻辑,清除内联样式并展平嵌套包装元素 - 修复 models.dev 同步接口,支持 GET 请求获取缓存数据 - 优化网络请求,添加直连失败后的本地代理重试机制
This commit is contained in:
@@ -305,9 +305,27 @@
|
||||
fontSize: fontSize
|
||||
});
|
||||
var pages = PhoneImageEngine.render();
|
||||
updatePageInfo();
|
||||
layer.msg('排版完成,共 ' + pages.length + ' 页');
|
||||
}
|
||||
|
||||
function updatePageInfo() {
|
||||
var current = PhoneImageEngine.getCurrentPageIndex() + 1;
|
||||
var total = PhoneImageEngine.getPages().length;
|
||||
$('#page-info').text('第 ' + current + ' 页 / 共 ' + total + ' 页');
|
||||
}
|
||||
|
||||
// 翻页
|
||||
$('#prev-page').click(function () {
|
||||
PhoneImageEngine.prevPage();
|
||||
updatePageInfo();
|
||||
});
|
||||
|
||||
$('#next-page').click(function () {
|
||||
PhoneImageEngine.nextPage();
|
||||
updatePageInfo();
|
||||
});
|
||||
|
||||
// 生成并保存
|
||||
$('#btn-generate').click(function () {
|
||||
var btn = $(this);
|
||||
|
||||
@@ -283,7 +283,7 @@
|
||||
var channels = [];
|
||||
|
||||
// 读取页面内嵌的已配置渠道数据(通过模板变量)
|
||||
{:php}
|
||||
{php}
|
||||
$allConfig = get_system_config();
|
||||
$defaultProvider = get_system_config('ai_default_provider', '');
|
||||
$configured = [];
|
||||
@@ -494,7 +494,7 @@
|
||||
|
||||
// 编辑渠道
|
||||
window.editChannel = function (providerId) {
|
||||
{:php}
|
||||
{php}
|
||||
echo 'var providerConfigs = {};';
|
||||
if (is_array($allConfig)) {
|
||||
foreach ($configured as $ch) {
|
||||
|
||||
Reference in New Issue
Block a user