From 3eaee9009af98e1e3e49e315a224196d1ebf13bc Mon Sep 17 00:00:00 2001 From: luyuan <1162963624@qq.com> Date: Mon, 10 Aug 2020 16:47:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=8A=E5=A4=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/details.vue | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/pages/index/details.vue b/pages/index/details.vue index 17762e6..3dc3c9a 100644 --- a/pages/index/details.vue +++ b/pages/index/details.vue @@ -196,7 +196,40 @@ export default { methods: { // 跳转详情页面 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) + 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) {