-
-
Save Hawksbillcat/389ca61bc720d9da2d14adca0a64edb4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get_data(){ | |
let irislist_copy:Array<any>; | |
let irislist_recopy:Array<any>=[]; | |
irislist_copy=this.dp.get_array(); | |
irislist_copy.map((currentValue,index)=>{ | |
return new Promise((resolve,reject)=>{ | |
return this.htttp.get("http://"+irislist_copy[index].No_IP+"/cgi-bin/iris.cgi?name=").subscribe(res=>{ | |
irislist_recopy.push({No_IP:irislist_copy[index].No_IP, | |
title:res["name"]+"Q", | |
room: res["room"]+"Q", | |
room_idx:irislist_copy[index].room_idx | |
}); | |
console.log("irislist_recopy "+JSON.stringify(irislist_recopy)) | |
resolve(irislist_recopy) | |
}) | |
}); | |
}) | |
return irislist_recopy; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment