UNPKG

para-bridge-demo

Version:

a bridge api for js-ios/andriod rest

27 lines (23 loc) 533 B
``` tsx interface IContactItem { // 联系人姓名 contactName: string; // 联系人电话号码数组 phones: string[]; } interface IGetAllContactsResult { // 获取联系人状态, "0"成功|"1"获取失败 status: '0' | '1'; contactList: IContactItem[]; } import { getAllContacts } from '../../../plugins/user'; private getAllContacts = () => { getAllContacts().then(result => { this.setState({ payload: JSON.stringify(result), }); }).catch(err => { alert(JSON.stringify(err)); }); } ```