Merge pull request 'xbx' (#151) from xbx into master

Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/151
This commit was merged in pull request #151.
This commit is contained in:
2020-08-11 10:26:19 +08:00
5 changed files with 97 additions and 12 deletions

View File

@@ -3,14 +3,14 @@
<u-navbar :is-back="false" :title-size="36" title="消息">
<view class="slot-wrap">
<image src="../../static/pageD/info(3).png" @click="delMessage()"></image>
<image src="../../static/pageD/info(2).png"></image>
<image src="../../static/pageD/info(2).png" @click="kefu()"></image>
</view>
</u-navbar>
<view class="content">
<!-- 正文内容 -->
</view>
<!-- <view class="sousuo"></view> -->
<view class="backes">
<view class="backes" style="border-bottom: 1px #ececec solid;">
<titles :information="information_dles"></titles>
</view>
<!-- 消息通知 -->
@@ -105,6 +105,49 @@
},
methods: {
kefu(){
if(!this.$store.state.hasLogin){
this.$refs.uToast.show({
title: "请先登录",
type: 'warning'
})
}else{
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
}
const token = uni.getStorageSync('token');
let that = this
uni.request({
url:"https://dmmall.sdbairui.com/api/Specialci/getAtwillUserInfo",
data:{
userId: 1
},
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:"/pageD/privateChat/privateChat",
params:{
id:JSON.stringify(user)
}
})
}
})
}
},
gochat(id){
this.$u.route({
url:"/pageD/privateChat/privateChat",