fix: 修复systemConfig变量定义顺序导致的JS错误
This commit is contained in:
@@ -2261,6 +2261,17 @@ INDEX_TEMPLATE = '''
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script>
|
||||
const API_BASE = '/api';
|
||||
// 系统配置对象(必须在loadSystemConfig之前定义)
|
||||
let systemConfig = {
|
||||
aiUrl: '',
|
||||
aiKey: '',
|
||||
aiModel: 'qwen3.5-4b',
|
||||
checkInterval: 5,
|
||||
pageSize: 20,
|
||||
draftInterval: 5,
|
||||
showStats: true,
|
||||
showViews: true
|
||||
};
|
||||
let currentFilter = { type: '', status: '', starred: null, folder_id: null };
|
||||
let currentSort = { sort_by: '', sort_order: '' };
|
||||
let currentItems = []; // 保存当前显示的数据,用于切换显示模式时重新渲染
|
||||
@@ -4025,18 +4036,6 @@ function addTagToInput(inputId, tag) {
|
||||
|
||||
// ============ 系统配置功能 ============
|
||||
|
||||
// 系统配置对象
|
||||
let systemConfig = {
|
||||
aiUrl: '',
|
||||
aiKey: '',
|
||||
aiModel: 'qwen3.5-4b',
|
||||
checkInterval: 5,
|
||||
pageSize: 20,
|
||||
draftInterval: 5,
|
||||
showStats: true,
|
||||
showViews: true
|
||||
};
|
||||
|
||||
// 加载配置
|
||||
function loadSystemConfig() {
|
||||
const saved = localStorage.getItem('xianFavorConfig');
|
||||
|
||||
Reference in New Issue
Block a user