Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
821938089 committed Dec 13, 2023
1 parent e008156 commit 535539e
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ class AnalyzeRule(
sourceRule.rule
} else {
// 键值直接访问
result[sourceRule.rule]?.toString()
result[sourceRule.rule]
}?.let {
replaceRegex(it, sourceRule)
replaceRegex(it.toString(), sourceRule)
}
} else {
for (sourceRule in ruleList) {
Expand Down
2 changes: 1 addition & 1 deletion modules/web/src/components/SourceTabForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
:label="name"
:key="name"
>
<el-form label-position="right" label-width="5em">
<el-form label-position="right" label-width="auto">
<el-form-item
v-for="{
type,
Expand Down
98 changes: 46 additions & 52 deletions modules/web/src/config/bookSourceEditConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ export default {
type: "String",
hint: "描述源作者和状态",
},
{
title: "书源变量",
id: "variableComment",
type: "String",
hint: "书源变量说明",
},
{
title: "登录地址",
id: "loginUrl",
Expand All @@ -66,16 +60,10 @@ export default {
hint: "封面解密js",
},
{
title: "并发率",
id: "concurrentRate",
type: "String",
hint: "并发率,如1000(访问间隔1000ms)或者1/1000(1000ms内访问1次)",
},
{
title: "js库",
id: "jsLib",
title: "链接验证",
id: "bookUrlPattern",
type: "String",
hint: "js库, 可填写js或者key-value object获取在线js文件",
hint: "书籍URL正则,当详情页URL与源URL的域名不一致时有效,用于添加网址",
},
{
title: "请求头",
Expand All @@ -84,10 +72,22 @@ export default {
hint: "客户端标识",
},
{
title: "链接验证",
id: "bookUrlPattern",
title: "变量说明",
id: "variableComment",
type: "String",
hint: "当详情页URL与源URL的域名不一致时有效,用于添加网址",
hint: "书源变量说明",
},
{
title: "并发率",
id: "concurrentRate",
type: "String",
hint: "并发率,如1000(访问间隔1000ms)或者1/1000(1000ms内访问1次)",
},
{
title: "js库",
id: "jsLib",
type: "String",
hint: "js库, 可填写js或者key-value object获取在线js文件",
},
],
},
Expand Down Expand Up @@ -181,12 +181,6 @@ export default {
type: "String",
hint: "单个发现格式<name>::<url>或者{url:<url>,title:<name>,style:...};前者用换行符或者&&连接,后者放在数组内;可用js动态生成",
},
{
title: "发现筛选",
id: "exploreScreen",
type: "String",
hint: "发现筛选规则",
},
{
title: "列表规则",
namespace: "ruleExplore",
Expand Down Expand Up @@ -319,26 +313,26 @@ export default {
hint: "选择书籍详情页网址 (规则结果为String类型的url, 与详情页相同时可省略)",
},
{
title: "下载URL",
title: "修改书籍",
namespace: "ruleBookInfo",
id: "downloadUrls",
id: "canReName",
type: "String",
hint: "文件类书源下载地址 (规则结果为String类型的url, 多个链接返回数组)",
hint: "允许修改书名作者(规则结果为String类型, 默认不允许)",
},
{
title: "修改书籍",
title: "下载URL",
namespace: "ruleBookInfo",
id: "canReName",
id: "downloadUrls",
type: "String",
hint: "允许修改书名作者(规则结果为String类型, 默认不允许)",
hint: "文件类书源下载地址 (规则结果为String类型的url, 多个链接返回数组)",
},
],
},
directory: {
name: "目录",
children: [
{
title: "预处理",
title: "更新前JS",
namespace: "ruleToc",
id: "preUpdateJs",
type: "String",
Expand Down Expand Up @@ -379,6 +373,13 @@ export default {
type: "String",
hint: "章节名称是否是卷名 (规则结果为Bool)",
},
{
title: "章节信息",
namespace: "ruleToc",
id: "updateTime",
type: "String",
hint: "选择章节信息(如更新时间) (规则结果为String)",
},
{
title: "收费标识",
namespace: "ruleToc",
Expand All @@ -393,13 +394,6 @@ export default {
type: "String",
hint: "章节是否为已购买 (规则结果为Bool)",
},
{
title: "章节信息",
namespace: "ruleToc",
id: "updateTime",
type: "String",
hint: "选择章节信息 (规则结果为String)",
},
{
title: "翻页规则",
namespace: "ruleToc",
Expand All @@ -412,13 +406,6 @@ export default {
content: {
name: "正文",
children: [
{
title: "脚本注入",
namespace: "ruleContent",
id: "webJs",
type: "String",
hint: "注入javascript,用于模拟鼠标点击等,必须有返回值,一般为String类型",
},
{
title: "正文规则",
namespace: "ruleContent",
Expand All @@ -440,6 +427,13 @@ export default {
type: "String",
hint: "选择下一分页(不是下一章)链接 (规则结果为String类型的Url)",
},
{
title: "脚本注入",
namespace: "ruleContent",
id: "webJs",
type: "String",
hint: "注入javascript,用于模拟鼠标点击等,必须有返回值,一般为String类型",
},
{
title: "资源正则",
namespace: "ruleContent",
Expand All @@ -462,18 +456,18 @@ export default {
hint: "FULL:铺满 不填:默认样式",
},
{
title: "购买操作",
title: "图片解密",
namespace: "ruleContent",
id: "payAction",
id: "imageDecode",
type: "String",
hint: "填写JavaScript 返回购买链接或者调用购买接口",
hint: "填写JavaScript 返回解密图片的bytes ",
},
{
title: "图片解密",
title: "购买操作",
namespace: "ruleContent",
id: "imageDecode",
id: "payAction",
type: "String",
hint: "填写JavaScript 返回解密图片的bytes ",
hint: "填写JavaScript 返回购买链接或者调用购买接口",
},
],
},
Expand Down Expand Up @@ -572,7 +566,7 @@ id: "deleteUrl",
// type: "Boolean",
// },
{
title: "Cookie",
title: "CookieJar",
id: "enabledCookieJar",
type: "Boolean",
},
Expand Down

0 comments on commit 535539e

Please sign in to comment.