Open gclsoft opened 5 years ago
@action async getContats() { self.loading = true; var auth = await storage.get('auth'); var me = session.user.User; var seq=0; var response; for (let i=0;i<15;++i){ var response2 = await axios.get('/cgi-bin/mmwebwx-bin/webwxgetcontact', { params: { r: +new Date(), seq: seq, skey: auth.skey } }); // console.log("response2.data.MemberList=",response2.data.MemberList) if(i===0){ response=response2; } if(response2.data.Seq!=0){ seq=response2.data.Seq; if(i!=0){ response.data.MemberList = [ ...response.data.MemberList,...response2.data.MemberList] } }else{ if(i!=0){ response.data.MemberList = [ ...response.data.MemberList,...response2.data.MemberList] } break; } } // console.log("response.data.MemberList=",response.data.MemberList) // Remove all official account and brand account //debugger; self.memberList = response.data.MemberList.filter(e => helper.isContact(e) && !helper.isOfficial(e) && !helper.isBrand(e)).concat(me); self.memberList.map(e => { e.MemberList = []; return self.resolveUser(auth, e); });