update SrcJySet.js.

pull/1/head
src48597962 3 years ago committed by Gitee
parent 394bb0d93c
commit c8c5e6fd8e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
  1. 177
      SrcJySet.js

@ -1034,119 +1034,122 @@ function SRCSet() {
d.push({
col_type: "line"
});
if(getMyVar('guanlicz')=="4"){
if(getMyVar('guanlicz','0')!="0"){
d.push({
title: "批量删除",
url: $('#noLoading#').lazyRule(()=>{
let duoselect = getMyVar('duoselect','')?getMyVar('duoselect','').split(','):[];
if(duoselect.length>0){
if(getMyVar('guanli', 'jk')=="jk"){
var filepath = "hiker://files/rules/Src/Juying/jiekou.json";
var sm = "确定删除选定的"+duoselect.length+"个接口吗?";
}else if(getMyVar('guanli', 'jk')=="jx"){
var filepath = "hiker://files/rules/Src/Juying/myjiexi.json";
var sm = "确定删除选定的"+duoselect.length+"个解析吗?";
}
return $(sm).confirm((duoselect, filepath)=>{
var datafile = fetch(filepath);
eval("var datalist=" + datafile+ ";");
for(var i=0;i<datalist.length;i++){
if(duoselect.indexOf(datalist[i].url?datalist[i].url:datalist[i].parse)>-1){
datalist.splice(i,1);
}
title: "🔍",
url: $.toString((guanlidata,datalist) => {
if(datalist.length>0){
deleteItemByCls('guanlidatalist');
var lists = datalist.filter(item => {
if(item.url){
return item.name.includes(input) || item.url.includes(input);
}else{
return item.name.includes(input) || item.parse.includes(input);
}
writeFile(filepath, JSON.stringify(datalist));
refreshPage(false);
return "toast://已批量删除解析"+duoselect.length;
}, duoselect, filepath)
}else{
return "toast://请选择";
})
let gldatalist = guanlidata(lists);
addItemBefore('guanliloading', gldatalist);
}
}),
col_type: "scroll_button"
return "hiker://empty";
},guanlidata,datalist),
desc: "搜你想要的...",
col_type: "input",
extra: {
titleVisible: true
}
});
if(getMyVar('guanli', 'jk')=="jk"){
if(getMyVar('guanlicz')=="4"){
d.push({
title: "调整分组",
title: "批量删除",
url: $('#noLoading#').lazyRule(()=>{
let duoselect = getMyVar('duoselect','')?getMyVar('duoselect','').split(','):[];
if(duoselect.length>0){
return $("","选定的"+duoselect.length+"个接口新分组名").input((duoselect)=>{
if(getMyVar('guanli', 'jk')=="jk"){
var filepath = "hiker://files/rules/Src/Juying/jiekou.json";
var datafile = fetch(filepath);
eval("var datalist=" + datafile+ ";");
for(var i=0;i<datalist.length;i++){
if(duoselect.indexOf(datalist[i].url)>-1){
if(input){
datalist[i].group = input;
}else{
delete datalist[i].group;
}
delete datalist[i].failnum;
}
}
writeFile(filepath, JSON.stringify(datalist));
refreshPage(false);
return "toast://已批量调整接口分组";
}, duoselect)
}else{
return "toast://请选择";
}
}),
col_type: "scroll_button"
});
}else{
d.push({
title: "重置排除",
url: $('#noLoading#').lazyRule(()=>{
let duoselect = getMyVar('duoselect','')?getMyVar('duoselect','').split(','):[];
if(duoselect.length>0){
return $("确定重置选定的"+duoselect.length+"个解析排除片源记录吗?").confirm((duoselect)=>{
var sm = "确定删除选定的"+duoselect.length+"个接口吗?";
}else if(getMyVar('guanli', 'jk')=="jx"){
var filepath = "hiker://files/rules/Src/Juying/myjiexi.json";
var sm = "确定删除选定的"+duoselect.length+"个解析吗?";
}
return $(sm).confirm((duoselect, filepath)=>{
var datafile = fetch(filepath);
eval("var datalist=" + datafile+ ";");
for(var i=0;i<datalist.length;i++){
if(duoselect.indexOf(datalist[i].parse)>-1){
datalist[i].stopfrom = [];
if(duoselect.indexOf(datalist[i].url?datalist[i].url:datalist[i].parse)>-1){
datalist.splice(i,1);
}
}
writeFile(filepath, JSON.stringify(datalist));
refreshPage(false);
return "toast://已批量重置选定解析的排除片源记录";
}, duoselect)
return "toast://已批量删除解析"+duoselect.length;
}, duoselect, filepath)
}else{
return "toast://请选择";
}
}),
col_type: "scroll_button"
});
}
}
if(getMyVar('guanlicz','0')!="0"){
d.push({
title: "🔍",
url: $.toString((guanlidata,datalist) => {
if(datalist.length>0){
deleteItemByCls('guanlidatalist');
var lists = datalist.filter(item => {
if(item.url){
return item.name.includes(input) || item.url.includes(input);
if(getMyVar('guanli', 'jk')=="jk"){
d.push({
title: "调整分组",
url: $('#noLoading#').lazyRule(()=>{
let duoselect = getMyVar('duoselect','')?getMyVar('duoselect','').split(','):[];
if(duoselect.length>0){
return $("","选定的"+duoselect.length+"个接口新分组名").input((duoselect)=>{
var filepath = "hiker://files/rules/Src/Juying/jiekou.json";
var datafile = fetch(filepath);
eval("var datalist=" + datafile+ ";");
for(var i=0;i<datalist.length;i++){
if(duoselect.indexOf(datalist[i].url)>-1){
if(input){
datalist[i].group = input;
}else{
delete datalist[i].group;
}
delete datalist[i].failnum;
}
}
writeFile(filepath, JSON.stringify(datalist));
refreshPage(false);
return "toast://已批量调整接口分组";
}, duoselect)
}else{
return item.name.includes(input) || item.parse.includes(input);
return "toast://请选择";
}
})
let gldatalist = guanlidata(lists);
addItemBefore('guanliloading', gldatalist);
}
return "hiker://empty";
},guanlidata,datalist),
desc: "搜你想要的...",
col_type: "input",
extra: {
titleVisible: true
}),
col_type: "scroll_button"
});
}else{
d.push({
title: "重置排除",
url: $('#noLoading#').lazyRule(()=>{
let duoselect = getMyVar('duoselect','')?getMyVar('duoselect','').split(','):[];
if(duoselect.length>0){
return $("确定重置选定的"+duoselect.length+"个解析排除片源记录吗?").confirm((duoselect)=>{
var filepath = "hiker://files/rules/Src/Juying/myjiexi.json";
var datafile = fetch(filepath);
eval("var datalist=" + datafile+ ";");
for(var i=0;i<datalist.length;i++){
if(duoselect.indexOf(datalist[i].parse)>-1){
datalist[i].stopfrom = [];
}
}
writeFile(filepath, JSON.stringify(datalist));
refreshPage(false);
return "toast://已批量重置选定解析的排除片源记录";
}, duoselect)
}else{
return "toast://请选择";
}
}),
col_type: "scroll_button"
});
}
});
d.push({
col_type: "line"
});
}
if(getMyVar('guanli', 'jk')=="jk"){
let grouplist = datalist.map((list)=>{
return list.group||list.type;

Loading…
Cancel
Save