题解 | #接口#
接口
https://www.nowcoder.com/practice/8f91b606181746558e8a398e513d1078
const _api = string => { // 补全代码 if(string.split('?')[0]==="get") { return data; } else { let s1=string.split('&')[1].toString(); let arr1=s1.split('=')[1].toString(); data.forEach(item=>{ item.name=arr1; }); return data; } }