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

Loading…
Cancel
Save