内网开发

This commit is contained in:
2023-10-26 21:02:51 +08:00
parent 368ca335fe
commit 4e190cec87
308 changed files with 7135 additions and 2175 deletions

View File

@@ -2,8 +2,7 @@ import http from '@/common/request'
import browser from '@/common/browser'
import store from '../store'
import pinyin from '@/common/pinyin.js';
import * as dayjs from 'dayjs'
import dayjs from "dayjs"
export default {
// 获取字典
@@ -327,7 +326,6 @@ export default {
},
//接收推送消息
getPush(resbody) {
console.log(resbody)
var pushType = resbody.pushType //推送类型
if (pushType == 'MSG') {
/*
@@ -457,7 +455,6 @@ export default {
if (msgType == 'TRTC_VIDEO_END') {
msgTypeLabel = '[视频通话]'
}
console.log(userId)
store.dispatch('createChatObj', {
userId: userId,
windowType: windowType,
@@ -471,7 +468,6 @@ export default {
var data2 = this.getKeyObjectStorage(store.state.userInfo.userId + '_' +
'chatlistData')
// var _num=data2[userId].num||
console.log("===========data2:",JSON.stringify(data2[userId]))
// 找到数组中对象属性值一样的对象并返回
function arrfindobject({
@@ -517,7 +513,7 @@ export default {
nickName: fromInfo.nickName,
portrait: fromInfo.portrait,
content: msgTypeLabel,
time: dayjs(time).format("YYYY/MM/DD HH:mm:ss"),
time: dayjs().format("YYYY/MM/DD HH:mm:ss"),
num: disturb == 'Y' ? 'dot' : (chatListInfo.num ? chatListInfo.num + 1 : 1),
windowType: windowType,
disturb: "N", //是否静默消息
@@ -683,6 +679,7 @@ export default {
// TODO
// 发送完成之后设置消息状态
//TODO
// msgSendType = 'error';
msgOffline.sendtype = msgSendType;
msgOffline.msgId = "1231"
@@ -1001,9 +998,19 @@ export default {
},
formatMessage(msg){
msg.pushType="MSG"
var msgType="TEXT"
const _data=JSON.parse(msg.messageBody)
// try{
// console.log("=======================formatMessage")
// console.log(_data)
// _data.content=JSON.parse(_data.content)
// msgType=_data.content.type
// }catch(e){
// console.error(e)
// //TODO handle the exception
// }
msg.msgContent={
msgType:"TEXT",
msgType:_data.msgType,
content:_data.content,
disturb:false,
top:false,