更新 'SrcJySet.js'

pull/1/head
src48597962 2 years ago
parent 3052202f91
commit 8aec198a47
  1. 54
      SrcJySet.js

@ -1732,32 +1732,30 @@ function jiexi(lx,data) {
onChange: 'putMyVar("parseurl",input)' onChange: 'putMyVar("parseurl",input)'
} }
}); });
function selectfrom(lx,oldfrom){
let priorfrom = getMyVar('priorfrom', data&&data.priorfrom?data.priorfrom:""); addListener("onClose", $.toString(() => {
d.push({ clearMyVar('selectfrom');
title:'优先片源:' + priorfrom, }));
col_type: 'text_1',
url:$('hiker://empty#noRecordHistory##noHistory#').rule((priorfrom) => {
var d = []; var d = [];
d.push({ d.push({
title: '优先片源标识不为空时,优先级在上次优先之后', title: lx=="prior"?'优先片源标识不为空时,优先级在上次优先之后':'排除对应片源后,解析将不再调用',
col_type: "rich_text" col_type: "rich_text"
}); });
d.push({ d.push({
col_type: "line" col_type: "line"
}); });
d.push({ d.push({
title:'优先片源', title:lx=="prior"?'优先片源':'排除片源',
col_type: 'input', col_type: 'input',
desc: getMyVar('priorfrom',''), desc: getMyVar('selectfrom',oldfrom),
extra: { extra: {
titleVisible: false, titleVisible: false,
defaultValue: getMyVar('priorfrom', priorfrom), defaultValue: getMyVar('selectfrom', oldfrom),
onChange: 'putMyVar("priorfrom",input)' onChange: 'putMyVar("selectfrom",input)'
} }
}); });
d.push({ d.push({
title: '选择需要优先的片源标识>', title: '选择对应的片源标识>',
col_type: "rich_text" col_type: "rich_text"
}); });
d.push({ d.push({
@ -1776,10 +1774,10 @@ function jiexi(lx,data) {
title:froms[i], title:froms[i],
col_type:'text_4', col_type:'text_4',
url: $('#noLoading#').lazyRule((from)=>{ url: $('#noLoading#').lazyRule((from)=>{
let priorfrom = getMyVar('priorfrom','')?getMyVar('priorfrom','').replace(/,|,/g,",").split(','):[]; let selectfrom = getMyVar('selectfrom')?getMyVar('selectfrom','').replace(/,|,/g,",").split(','):[];
if(priorfrom.indexOf(from)==-1){ if(selectfrom.indexOf(from)==-1){
priorfrom.push(from); selectfrom.push(from);
var sm = '选择优先>'+from; var sm = '选择片源>'+from;
}else{ }else{
function removeByValue(arr, val) { function removeByValue(arr, val) {
for(var i = 0; i < arr.length; i++) { for(var i = 0; i < arr.length; i++) {
@ -1789,10 +1787,10 @@ function jiexi(lx,data) {
} }
} }
} }
removeByValue(priorfrom,from); removeByValue(selectfrom,from);
var sm = '删除优先>'+from; var sm = '删除片源>'+from;
} }
putMyVar('priorfrom',priorfrom.join(',')); putMyVar('selectfrom',selectfrom.join(','));
refreshPage(false); refreshPage(false);
return 'toast://'+sm; return 'toast://'+sm;
}, froms[i]) }, froms[i])
@ -1804,13 +1802,25 @@ function jiexi(lx,data) {
d.push({ d.push({
title:'选择好了,点此返回', title:'选择好了,点此返回',
col_type:'text_center_1', col_type:'text_center_1',
url: $('#noLoading#').lazyRule(()=>{ url: $('#noLoading#').lazyRule((lx)=>{
if(lx=="prior"){
putMyVar('priorfrom',getMyVar('selectfrom',''));
}else{
putMyVar('stopfrom',getMyVar('selectfrom',''));
}
back(true); back(true);
return "hiker://empty"; return "hiker://empty";
}) },lx)
}); });
setHomeResult(d); setHomeResult(d);
},priorfrom) }
let priorfrom = getMyVar('priorfrom', data&&data.priorfrom?data.priorfrom:"");
d.push({
title:'优先片源:' + priorfrom,
col_type: 'text_1',
url:$('hiker://empty#noRecordHistory##noHistory#').rule((selectfrom,lx,oldfrom) => {
selectfrom(lx,oldfrom);
},selectfrom,'prior',priorfrom)
}); });
let stopfrom = getMyVar('stopfrom', lx=="update"?data.stopfrom:""); let stopfrom = getMyVar('stopfrom', lx=="update"?data.stopfrom:"");
d.push({ d.push({

Loading…
Cancel
Save