|
|
@ -187,6 +187,7 @@ function jiekouapi(sourcefile, data) { |
|
|
|
clearMyVar('jiekoutype'); |
|
|
|
clearMyVar('jiekoutype'); |
|
|
|
clearMyVar('jiekouparse'); |
|
|
|
clearMyVar('jiekouparse'); |
|
|
|
clearMyVar('jiekouerparse'); |
|
|
|
clearMyVar('jiekouerparse'); |
|
|
|
|
|
|
|
clearMyVar('jiekoupublic'); |
|
|
|
clearMyVar('jiekouedit'); |
|
|
|
clearMyVar('jiekouedit'); |
|
|
|
})); |
|
|
|
})); |
|
|
|
if (data&&getMyVar('jiekouedit')!="1") { |
|
|
|
if (data&&getMyVar('jiekouedit')!="1") { |
|
|
@ -196,6 +197,7 @@ function jiekouapi(sourcefile, data) { |
|
|
|
putMyVar('jiekoutype', data.type||"漫画"); |
|
|
|
putMyVar('jiekoutype', data.type||"漫画"); |
|
|
|
storage0.putMyVar('jiekouparse', data.parse); |
|
|
|
storage0.putMyVar('jiekouparse', data.parse); |
|
|
|
storage0.putMyVar('jiekouerparse', data.erparse ? data.erparse : ""); |
|
|
|
storage0.putMyVar('jiekouerparse', data.erparse ? data.erparse : ""); |
|
|
|
|
|
|
|
storage0.putMyVar('jiekoupublic', data.public ? data.public : ""); |
|
|
|
} |
|
|
|
} |
|
|
|
let d = []; |
|
|
|
let d = []; |
|
|
|
d.push({ |
|
|
|
d.push({ |
|
|
@ -228,7 +230,7 @@ function jiekouapi(sourcefile, data) { |
|
|
|
titleVisible: false, |
|
|
|
titleVisible: false, |
|
|
|
type: "textarea", |
|
|
|
type: "textarea", |
|
|
|
highlight: true, |
|
|
|
highlight: true, |
|
|
|
height: 4, |
|
|
|
height: 3, |
|
|
|
onChange: $.toString(() => { |
|
|
|
onChange: $.toString(() => { |
|
|
|
if (/{|}/.test(input) || !input) { |
|
|
|
if (/{|}/.test(input) || !input) { |
|
|
|
storage0.putMyVar("jiekouparse", input) |
|
|
|
storage0.putMyVar("jiekouparse", input) |
|
|
@ -245,7 +247,7 @@ function jiekouapi(sourcefile, data) { |
|
|
|
titleVisible: false, |
|
|
|
titleVisible: false, |
|
|
|
type: "textarea", |
|
|
|
type: "textarea", |
|
|
|
highlight: true, |
|
|
|
highlight: true, |
|
|
|
height: 4, |
|
|
|
height: 3, |
|
|
|
onChange: $.toString(() => { |
|
|
|
onChange: $.toString(() => { |
|
|
|
if (/{|}/.test(input) || !input) { |
|
|
|
if (/{|}/.test(input) || !input) { |
|
|
|
storage0.putMyVar("jiekouerparse", input) |
|
|
|
storage0.putMyVar("jiekouerparse", input) |
|
|
@ -253,6 +255,23 @@ function jiekouapi(sourcefile, data) { |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
d.push({ |
|
|
|
|
|
|
|
title: '公共变量', |
|
|
|
|
|
|
|
col_type: 'input', |
|
|
|
|
|
|
|
desc: "公共变量, {}对象", |
|
|
|
|
|
|
|
extra: { |
|
|
|
|
|
|
|
defaultValue: storage0.getMyVar('jiekoupublic') || "", |
|
|
|
|
|
|
|
titleVisible: false, |
|
|
|
|
|
|
|
type: "textarea", |
|
|
|
|
|
|
|
highlight: true, |
|
|
|
|
|
|
|
height: 3, |
|
|
|
|
|
|
|
onChange: $.toString(() => { |
|
|
|
|
|
|
|
if (/{|}/.test(input) || !input) { |
|
|
|
|
|
|
|
storage0.putMyVar("jiekoupublic", input) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
d.push({ |
|
|
|
d.push({ |
|
|
|
title: '测试搜索', |
|
|
|
title: '测试搜索', |
|
|
|
col_type: 'text_2', |
|
|
|
col_type: 'text_2', |
|
|
@ -261,6 +280,7 @@ function jiekouapi(sourcefile, data) { |
|
|
|
let name = getMyVar('jiekouname'); |
|
|
|
let name = getMyVar('jiekouname'); |
|
|
|
let type = getMyVar('jiekoutype','漫画'); |
|
|
|
let type = getMyVar('jiekoutype','漫画'); |
|
|
|
let erparse = getMyVar('jiekouerparse'); |
|
|
|
let erparse = getMyVar('jiekouerparse'); |
|
|
|
|
|
|
|
let public = getMyVar('jiekoupublic'); |
|
|
|
if(!name || !erparse){ |
|
|
|
if(!name || !erparse){ |
|
|
|
return "toast://名称或搜索源接口不能为空"; |
|
|
|
return "toast://名称或搜索源接口不能为空"; |
|
|
|
} |
|
|
|
} |
|
|
@ -270,6 +290,9 @@ function jiekouapi(sourcefile, data) { |
|
|
|
type: type, |
|
|
|
type: type, |
|
|
|
erparse: erparse |
|
|
|
erparse: erparse |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(public){ |
|
|
|
|
|
|
|
source.public = public; |
|
|
|
|
|
|
|
} |
|
|
|
}catch(e){ |
|
|
|
}catch(e){ |
|
|
|
log(e.message); |
|
|
|
log(e.message); |
|
|
|
return "toast://搜索源接口有异常,看日志" |
|
|
|
return "toast://搜索源接口有异常,看日志" |
|
|
@ -314,6 +337,7 @@ function jiekouapi(sourcefile, data) { |
|
|
|
let type = getMyVar('jiekoutype','漫画'); |
|
|
|
let type = getMyVar('jiekoutype','漫画'); |
|
|
|
let parse = getMyVar('jiekouparse'); |
|
|
|
let parse = getMyVar('jiekouparse'); |
|
|
|
let erparse = getMyVar('jiekouerparse'); |
|
|
|
let erparse = getMyVar('jiekouerparse'); |
|
|
|
|
|
|
|
let public = getMyVar('jiekoupublic'); |
|
|
|
let newapi = { |
|
|
|
let newapi = { |
|
|
|
name: name, |
|
|
|
name: name, |
|
|
|
type: type |
|
|
|
type: type |
|
|
@ -336,6 +360,9 @@ function jiekouapi(sourcefile, data) { |
|
|
|
} |
|
|
|
} |
|
|
|
newapi['erparse'] = erparse; |
|
|
|
newapi['erparse'] = erparse; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (public) { |
|
|
|
|
|
|
|
newapi['public'] = public; |
|
|
|
|
|
|
|
} |
|
|
|
let sourcedata = fetch(sourcefile); |
|
|
|
let sourcedata = fetch(sourcefile); |
|
|
|
if (sourcedata != "") { |
|
|
|
if (sourcedata != "") { |
|
|
|
try { |
|
|
|
try { |
|
|
|