const _api = string => { // 补全代码 if(string.includes('get?')){ return data } else { const query = string.split('to=')[1] data.forEach(item=> item.name = query) } }