罗广聪

准备引入contact插件

... ... @@ -26,6 +26,25 @@ export default class Home extends Component {
post("/test/insurance/article", {}, res => {}, err => {});
}
getAllPhone() {
Contacts.getAll((err, contacts) => {
if(err && err.type === 'permissionDenied'){
} else {
let phones = [];
contacts.forEach((item, index) => {
item.phoneNumbers.forEach((phone, i) => {
phones.push(phone.number);
});
});
post('/spreader/rank/friends/contact', { contact: phones }, (res) => {
this.getRankData();
}, (resErr) => {
Toast.show(resErr.cnmsg, Toast.error);
});
}
});
}
render() {
const { navigate } = this.props.navigation;
return (
... ...
... ... @@ -58,9 +58,6 @@ export default class Discover extends Component {
}
});
}
// handleCopyPress(string) {
// Clipboard.setString(string);
// }
copyWords(string) {
const { goBack } = this.props.navigation;
Clipboard.setString(string);
... ...