|
|
@ -340,6 +340,7 @@ function LiveSet() { |
|
|
|
var YClives = []; |
|
|
|
var YClives = []; |
|
|
|
} |
|
|
|
} |
|
|
|
if(YClives.length>0){ |
|
|
|
if(YClives.length>0){ |
|
|
|
|
|
|
|
let importnum = 0; |
|
|
|
let livefile = "hiker://files/rules/Src/Juying/live.txt"; |
|
|
|
let livefile = "hiker://files/rules/Src/Juying/live.txt"; |
|
|
|
let JYlive=fetch(livefile); |
|
|
|
let JYlive=fetch(livefile); |
|
|
|
if(JYlive){ |
|
|
|
if(JYlive){ |
|
|
@ -360,18 +361,20 @@ function LiveSet() { |
|
|
|
}else if(YClives[i].indexOf(',')>-1&&JYlives.indexOf(YClives[i])==-1&&YClives[i].trim()!=""){ |
|
|
|
}else if(YClives[i].indexOf(',')>-1&&JYlives.indexOf(YClives[i])==-1&&YClives[i].trim()!=""){ |
|
|
|
JYlives.splice(id, py, YClives[i]); |
|
|
|
JYlives.splice(id, py, YClives[i]); |
|
|
|
py++; |
|
|
|
py++; |
|
|
|
|
|
|
|
importnum++; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
var JYlives = YClives; |
|
|
|
var JYlives = YClives; |
|
|
|
|
|
|
|
importnum = JYlives.length; |
|
|
|
} |
|
|
|
} |
|
|
|
writeFile(livefile, JYlives.join('\n')); |
|
|
|
writeFile(livefile, JYlives.join('\n')); |
|
|
|
hideLoading(); |
|
|
|
hideLoading(); |
|
|
|
if(JYlives.length>0){ |
|
|
|
if(importnum>0){ |
|
|
|
putMyVar('isEdit','1'); |
|
|
|
putMyVar('isEdit','1'); |
|
|
|
} |
|
|
|
} |
|
|
|
return "toast://成功导入"+JYlives.length; |
|
|
|
return "toast://成功导入"+importnum; |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
return "toast://文件异常,导入失败"; |
|
|
|
return "toast://文件异常,导入失败"; |
|
|
|
} |
|
|
|
} |
|
|
|