This commit is contained in:
2023-10-29 13:17:28 +08:00
parent dee9051652
commit 336bcc662b
29 changed files with 3077 additions and 169 deletions

View File

@@ -63,21 +63,49 @@
}
]
this.list=this.$fc.sortList({list:list,key:'name'})
console.log(customHttp)
console.log("================开始请求通讯录列表")
// 局部修改配置,局部配置优先级高于全局配置
customHttp.customHttp.post('/api/im/app/addressList', {userName: 'name', password: '123456'}, {
customHttp.customHttp.get('/api/im/app/addressList', {
params: {}, /* 会加在url上 */
header: {}, /* 会与全局header合并如有同名属性局部覆盖全局 */
dataType: 'json',
// 注如果局部custom与全局custom有同名属性则后面的属性会覆盖前面的属性相当于Object.assign(全局,局部)
custom: {target: "znzq"} // 可以加一些自定义参数在拦截器等地方使用。比如这里我加了一个auth可在拦截器里拿到如果true就传token
custom: {target: "znzq"} , // 可以加一些自定义参数在拦截器等地方使用。比如这里我加了一个auth可在拦截器里拿到如果true就传token
}).then(res => {
console.log("=========获取到数据")
console.log(res)
if(res.statusCode==200){
if(res.data.code==200){
var list=[]
res.data.result.records.map((item)=>{
console.log(item)
list.push({
name:item.realname,
avatar:item.portrait,
userId:item.userId,
userType:1,
chatNo:item.userId
})
})
this.list=this.$fc.sortList({list:list,key:'name'})
}
}
}).catch(err => {
})
/*
this.$http.request({
url: '/friend/friendList',
method: 'POST',
@@ -99,7 +127,8 @@
this.list=this.$fc.sortList({list:list,key:'name'})
}
}
});
});
*/
},
},
onNavigationBarButtonTap(e) {