|
|
@ -3102,10 +3102,15 @@ function yundiskjiekou() { |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
var datalist = []; |
|
|
|
var datalist = []; |
|
|
|
} |
|
|
|
} |
|
|
|
datalist.push(newapi); |
|
|
|
let index = datalist.indexOf(datalist.filter(d=>d.name == name)[0]); |
|
|
|
writeFile(filepath, JSON.stringify(datalist)); |
|
|
|
if(index>-1){ |
|
|
|
back(true); |
|
|
|
return "toast://已存在-"+name; |
|
|
|
return "toast://已保存"; |
|
|
|
}else{ |
|
|
|
|
|
|
|
datalist.push(newapi); |
|
|
|
|
|
|
|
writeFile(filepath, JSON.stringify(datalist)); |
|
|
|
|
|
|
|
back(true); |
|
|
|
|
|
|
|
return "toast://已保存"; |
|
|
|
|
|
|
|
} |
|
|
|
}catch(e){ |
|
|
|
}catch(e){ |
|
|
|
return "toast://接口数据异常,请确认对象格式"; |
|
|
|
return "toast://接口数据异常,请确认对象格式"; |
|
|
|
} |
|
|
|
} |
|
|
@ -3183,7 +3188,7 @@ function yundiskjiekou() { |
|
|
|
|
|
|
|
|
|
|
|
datalist.forEach(item => { |
|
|
|
datalist.forEach(item => { |
|
|
|
d.push({ |
|
|
|
d.push({ |
|
|
|
title: item.name + " - " + item.erparse?"二解接口":"一解接口", |
|
|
|
title: item.name + " - " + (item.erparse?"二解接口":"一解接口"), |
|
|
|
url: $(["编辑", "删除"], 1).select((filepath,yundiskapi,data) => { |
|
|
|
url: $(["编辑", "删除"], 1).select((filepath,yundiskapi,data) => { |
|
|
|
if(input == "编辑"){ |
|
|
|
if(input == "编辑"){ |
|
|
|
return $('hiker://empty#noRecordHistory##noHistory#').rule((filepath,yundiskapi,data) => { |
|
|
|
return $('hiker://empty#noRecordHistory##noHistory#').rule((filepath,yundiskapi,data) => { |
|
|
|