使用plus.contacts调用手机通讯录时ContactFindFilter过滤无效,查出了通讯录中的所有记录,没有根据限定的要求:“王*进行过滤,不知原因。求解答~ 代码如下:
addressbook.find(["displayName", "phoneNumbers.mobile"], function(contacts) {
alert(contacts.length);
}, {
filter: [{
logic: "and",
field: "displayName",
value: "王**"
}],multiple: true
}
);
而且contacts.length的数量明显超出了手机通讯录中的实际数
1 个回复
7***@qq.com
已解决:如下
{
filter: [{
multiple: true,
logic: "and",
field: "displayName",
value: "魔方magic*"
}]