小小马
小小马
  • 发布:2015-10-14 12:03
  • 更新:2015-10-19 10:22
  • 阅读:1520

请问:我想读取手机联系人中,公司名称不为空的,在filter里怎么设置?

分类:HTML5+
plus.contacts.getAddressBook( plus.contacts.ADDRESSBOOK_SIM, function( addressbook ) {  
    console.log(1);  
    addressbook.find(["organizations","displayName","phoneNumbers","addresses","photos"],function(contacts){  

        console.log(phoneContacts.length);  

    }, function () {  
        alert("error");  
    },{  
        filter: [  
            {  
                logic: "and",  
                field: "phoneNumbers",  
                value: "???????*"  
            },  
            {  
                logic: "not",  
                field: "organizations.name",  
                value: "?"  
            },{  
                logic: "and",  
                field: "displayName",  
                value: "??*"  
            }  

        ]  
        ,multiple:true  
    });  
}, function ( e ) {  
    alert( "Get address book failed: " + e.message );  
} );
2015-10-14 12:03 负责人:无 分享
已邀请:
dxjdeveloper

dxjdeveloper

            {  
                logic: "not",  
                field: "organizations.name",  
                value: "*"  
            }

这样似乎可以

该问题目前已经被锁定, 无法添加新回复