gdpaomg
This commit is contained in:
@@ -18,11 +18,11 @@
|
||||
<view id="information">
|
||||
<view class="information_dl" v-for="(item,index) in information_dl" :key="index" >
|
||||
<view>
|
||||
<image :src="item.url"></image>
|
||||
<image :src="item.avatar"></image>
|
||||
</view>
|
||||
<view class="title">{{item.title}}</view>
|
||||
<view class="contentes">{{item.contentes}}</view>
|
||||
<view class="times">{{item.title}}</view>
|
||||
<view class="title">{{item.name}}</view>
|
||||
<view class="contentes">{{item.text}}</view>
|
||||
<view class="times">{{item.time}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -91,13 +91,39 @@
|
||||
show: false
|
||||
};
|
||||
},
|
||||
onShow(){
|
||||
this.information_dl = this.imService.friends;
|
||||
this.imService.onFriendListChange=this.onFriendListChange;
|
||||
},
|
||||
onLoad() {
|
||||
// /消息模块的请求
|
||||
if (this.hasLogin) {
|
||||
this.messageIndex();
|
||||
}
|
||||
if (this.hasLogin) {
|
||||
this.messageIndex();
|
||||
}
|
||||
if(this.$store.state.hasLogin){
|
||||
const user = uni.getStorageSync('user_info');
|
||||
console.log(user)
|
||||
this.imService.login(user.member.member_id,user.member.member_nickname,user.member.member_avatar)
|
||||
this.imService.connectIM()
|
||||
let that = this
|
||||
setTimeout(function(){
|
||||
that.imService.disconnect()
|
||||
console.log("guanbi")
|
||||
},1000)
|
||||
setTimeout(function(){
|
||||
console.log("lianjie")
|
||||
that.imService.connectIM()
|
||||
},2000)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onFriendListChange(onlineFriends) {
|
||||
//todo:比较垃圾的处理方式,因为Uniapp的基于MAP的双向绑定在H5端不稳定,H5端偶尔会抽风
|
||||
// 下边这一行删掉,有时候页面可以更新,有时候不行,大家有优雅的方式,也欢迎跟我们沟通
|
||||
this.information_dl = this.imService.friends;
|
||||
|
||||
this.$forceUpdate();
|
||||
},
|
||||
// 选中某个复选框时,由checkbox时触发
|
||||
checkboxChange(e) {
|
||||
//console.log(e);
|
||||
|
||||
Reference in New Issue
Block a user