This commit is contained in:
luyuan 2020-08-10 16:47:27 +08:00
parent 75a4bbedbe
commit 3eaee9009a
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3

View File

@ -196,7 +196,40 @@ export default {
methods: { methods: {
// //
tochat(ID){ tochat(ID){
function Friend(uuid, name, avatar,time = "", text = "",date = "") {
this.uuid = uuid;
this.name = name;
this.avatar = avatar;
this.online = false;
this.unReadMessage = 0;
this.text = text;
this.time = time;
this.date = date
}
console.log(ID) console.log(ID)
const token = uni.getStorageSync('token');
let that = this
uni.request({
url:"https://dmmall.sdbairui.com/api/Specialci/getAtwillUserInfo",
data:{
userId: ID
},
method:"POST",
header:{
"Authorization" : 'Bearer' + " " + token
},
success(res){
console.log(res)
res = res.data
let user = new Friend(res.data.member_id,res.data.member_nickname,res.data.member_avatar)
that.$u.route({
url:"/pages/messages/privateChat",
params:{
id:JSON.stringify(user)
}
})
}
})
}, },
// 退 // 退
radioGroupChange(e) { radioGroupChange(e) {