添加活动消息
This commit is contained in:
parent
e91b35d1e3
commit
a80c2e53b8
@ -11,6 +11,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<image src="/static/image/user/1.png"></image>
|
<image src="/static/image/user/1.png"></image>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="nav" @click="navtos()">
|
||||||
|
<text>活动消息</text>
|
||||||
|
<image src="/static/image/user/1.png"></image>
|
||||||
|
</view>
|
||||||
<view class="nav" @click="toOthersPage('fans')">
|
<view class="nav" @click="toOthersPage('fans')">
|
||||||
<text>我的粉丝</text>
|
<text>我的粉丝</text>
|
||||||
<image src="/static/image/user/1.png"></image>
|
<image src="/static/image/user/1.png"></image>
|
||||||
@ -68,6 +72,12 @@ export default {
|
|||||||
this.imService.connectIM()
|
this.imService.connectIM()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
navtos(){
|
||||||
|
console.log(1212)
|
||||||
|
this.$u.route({
|
||||||
|
url:"/pages/messages/list"
|
||||||
|
})
|
||||||
|
},
|
||||||
loginout(){
|
loginout(){
|
||||||
this.imService.disconnect()
|
this.imService.disconnect()
|
||||||
uni.clearStorage();
|
uni.clearStorage();
|
||||||
|
@ -784,6 +784,10 @@ IMService.prototype.initialWhenOnlineUserChange = function (whenOnlineUserChange
|
|||||||
IMService.prototype.listenerNewMessage = function () {
|
IMService.prototype.listenerNewMessage = function () {
|
||||||
|
|
||||||
this.im.on(GoEasyIM.EVENT.GROUP_MESSAGE_RECEIVED, (message) => {
|
this.im.on(GoEasyIM.EVENT.GROUP_MESSAGE_RECEIVED, (message) => {
|
||||||
|
console.log(message)
|
||||||
|
if(message.senderId == 0){
|
||||||
|
return ;
|
||||||
|
}
|
||||||
var content = JSON.parse(message.payload.text);
|
var content = JSON.parse(message.payload.text);
|
||||||
this.addNewMessage(message);
|
this.addNewMessage(message);
|
||||||
this.whenNewMessage(content);
|
this.whenNewMessage(content);
|
||||||
|
Loading…
Reference in New Issue
Block a user