我有下一个 Observable 我试图过滤以使用户进入网络但 .mapTo(phone => verifyPhoneInNetwork(phone, country)) 返回 AjaxObservable 而不是 ajax 响应
function verifyInNetwork(contacts: any, country: string) {
const inNetworkOb = Observable
.from(contacts)
.map(contact => contact.phones)
.map(phone => verifyPhoneInNetwork(phone, country))
.first(({response}) => {
return !response.invalid && !response.exists;
})
.isEmpty()
.filter(empty => empty);