mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
fix:订阅源网页编辑 数据转换错误
This commit is contained in:
@@ -76,14 +76,15 @@ function rule2json() {
|
||||
let RuleJSON = Container();
|
||||
// 转换base
|
||||
Object.keys(RuleJSON).forEach(key => {
|
||||
if (!key.startsWith("rule")) {
|
||||
RuleJSON[key] = $('#' + key).value;
|
||||
}
|
||||
});
|
||||
|
||||
//类型转换
|
||||
RuleJSON.lastUpdateTime = new Date().getTime();
|
||||
RuleJSON.customOrder = RuleJSON.customOrder == '' ? 0 : parseInt(RuleJSON.customOrder);
|
||||
RuleJSON.articleStyle = RuleJSON.articleStyle == '' ? 0 : parseInt(RuleJSON.articleStyle);
|
||||
RuleJSON.enabled = RuleJSON.enabled == '' || String(RuleJSON.enabled).toLocaleLowerCase().replace(/^\s*|\s*$/g, '') == 'true';
|
||||
RuleJSON.loadWithBaseUrl = RuleJSON.loadWithBaseUrl == '' || String(RuleJSON.loadWithBaseUrl).toLocaleLowerCase().replace(/^\s*|\s*$/g, '') == 'true';
|
||||
RuleJSON.enableJs = RuleJSON.enableJs == '' || String(RuleJSON.enableJs).toLocaleLowerCase().replace(/^\s*|\s*$/g, '') == 'true';
|
||||
return RuleJSON;
|
||||
}
|
||||
// 将源对象填充到源表单
|
||||
|
||||
Reference in New Issue
Block a user