From 8b5da64be6f98f8aa824a8fc57183e9390a85fc6 Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Thu, 8 Feb 2024 13:06:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'SrcJuPublic.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SrcJuPublic.js | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/SrcJuPublic.js b/SrcJuPublic.js index 66014550..8b18acf7 100644 --- a/SrcJuPublic.js +++ b/SrcJuPublic.js @@ -82,27 +82,29 @@ function getListData(lx, selectType) { //封装选择主页源方法 function selectSource(selectType) { let sourcenames = []; - /* - getListData("yi",selectType).forEach(it=>{ - if(sourcenames.indexOf(it.name)==-1){ - if(Juconfig[runMode+'sourcename'] == it.name){ - it.name = '‘‘’’'+it.name+''; - } - sourcenames.push(it.name); - } - }) - */ - let selectIndex = -1; - getListData("yi",selectType).forEach((it,i)=>{ - if(sourcenames.indexOf(it.name)==-1){ - if(Juconfig[runMode+'sourcename'] == it.name){ - it.name = it.name + '√'; - selectIndex = i; + + if((MY_NAME=="海阔视界"&&getAppVersion()>=4706)){ + getListData("yi",selectType).forEach((it,i)=>{ + if(sourcenames.indexOf(it.name)==-1){ + if(Juconfig[runMode+'sourcename'] == it.name){ + it.name = it.name + '√'; + selectIndex = i; + } + sourcenames.push({title: it.name, icon: it.img}); } - sourcenames.push({title: it.name, icon: it.img}); - } - }) + }) + }else{ + getListData("yi",selectType).forEach(it=>{ + if(sourcenames.indexOf(it.name)==-1){ + if(Juconfig[runMode+'sourcename'] == it.name){ + it.name = '‘‘’’'+it.name+''; + } + sourcenames.push(it.name); + } + }) + } + if(sourcenames.length==0){ return "toast://当前分类无接口" }