This commit is contained in:
wangxulei 2025-01-11 16:02:31 +08:00
parent 038b056d4b
commit 6a0e09c90e
3 changed files with 5 additions and 39 deletions

View File

@ -3,7 +3,7 @@ ENV = 'production'
# base api
VUE_APP_BASE_API = 'http://8.146.211.120:8080'
VUE_APP_WEBSOCKET_API = 'ws://8.146.211.120:9326/'
# system name
VUE_APP_SYSTEM_NAME = 'DD STORE'

View File

@ -42,7 +42,8 @@
}
},
mounted(){
webSocketManager.connect('ws://192.168.10.98:9326/?authorId=8')
console.log(process.env.VUE_APP_WEBSOCKET_API)
webSocketManager.connect( process.env.VUE_APP_WEBSOCKET_API + '?authorId=8')
//
webSocketManager.onMessage((data) => {

View File

@ -9,48 +9,13 @@
name: 'Dashboard',
data() {
return {
user:{id:1,displayName:'June',avatar:''}
}
},
mounted(){
const { IMUI } = this.$refs;
//
//
const contacts = [{
id: 2,
displayName: '丽安娜',
avatar:'http://8.146.211.120:8080/upload/notes/note (6).jpg',
index: 'L',
unread: 0,
//
//lastContentRender file '[]', image '[]' text img,
lastContent: IMUI.lastContentRender({type:'text',content:'你在干嘛呢?'}),
//
lastSendTime: 1566047865417
}];
IMUI.initContacts(contacts);
},
methods: {
handleSend(message, next, file) {
console.log('发送了信息')
//next next({status:'failed'});
next();
},
handlePullMessages(contact, next) {
console.log('拉取信息')
//
const messages = [{
id: '唯一消息ID',
status: 'succeed',
type: 'text',
sendTime: 1566047865417,
content: '你什么才能对接完?',
toContactId: contact.id,
fromUser:this.user
}]
//true
next(messages,true);
},
}
}