优化代码

This commit is contained in:
pengxiaolong
2025-07-29 14:23:27 +08:00
parent 36005c9604
commit 3eddd94922
38 changed files with 4423 additions and 20192 deletions

View File

@@ -104,9 +104,12 @@ const _sfc_main = {
onHide() {
this.onPage = false;
},
onUnload() {
this.onPage = false;
},
onLoad(options) {
this.recorderManager.onStop((res) => {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:384", "录音结束", res);
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:387", "录音结束", res);
if (this.ioshide != 0) {
if (res.fileSize < 20 * 1024) {
common_vendor.index.showToast({
@@ -183,7 +186,7 @@ const _sfc_main = {
}).exec();
});
components_goEasyTool_tool.messageRead(this.$goeasy, this.userId).then((res) => {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:466", "已读对方的消息");
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:469", "已读对方的消息");
});
this.getIOSDeviceType();
var im = this.$goeasy.im;
@@ -208,7 +211,7 @@ const _sfc_main = {
data: { avatar: this.avatar, nickname: this.nickname }
},
onProgress: function(event) {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:491", "file uploading:", event);
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:494", "file uploading:", event);
}
//获取上传进度
});
@@ -221,7 +224,7 @@ const _sfc_main = {
},
//长按语音
voiceTouchstart() {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:503", "长按语音");
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:506", "长按语音");
this.voicepopUpstart = true;
this.recorderManager.start();
this.notplayVoice(false);
@@ -231,7 +234,7 @@ const _sfc_main = {
setTimeout(() => {
this.recorderManager.stop();
}, 100);
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:513", "松开语音");
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:516", "松开语音");
this.voicepopUpstart = false;
},
//移动语音
@@ -248,7 +251,7 @@ const _sfc_main = {
},
//中断语音
voiceTouchcancel() {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:529", "中断语音");
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:532", "中断语音");
this.voicepopUpstart = false;
this.voiceCancelOrSend = false;
},
@@ -407,14 +410,14 @@ const _sfc_main = {
});
setTimeout(() => {
this.chatList = [...this.MoreMessageList, ...this.chatList];
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:695", "获取更多聊天记录", this.chatList);
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:698", "获取更多聊天记录", this.chatList);
this.LastTime = this.chatList[0].timestamp;
this.ElementPositioning = this.Record;
}, 300);
},
//监听已读消息
onMessageRead(message) {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:702", "1已读消息", message);
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:705", "1已读消息", message);
},
//监听接受消息
onPrivateMessageReceived(message) {
@@ -429,7 +432,7 @@ const _sfc_main = {
this.chatList.push(message);
if (this.onPage) {
components_goEasyTool_tool.messageRead(this.$goeasy, this.userId).then((res) => {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:717", "已读对方的消息");
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:720", "已读对方的消息");
});
}
},
@@ -443,7 +446,7 @@ const _sfc_main = {
this.avatar,
this.nickname
).then((res) => {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:731", "发送成功", res);
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:734", "发送成功", res);
this.ElementPositioning = res.id = components_ChatId.generateId();
res.timestampStatus = this.checkInterval(res.timestamp);
this.chatList.push(res);
@@ -521,7 +524,7 @@ const _sfc_main = {
data: { avatar: this.avatar, nickname: this.nickname }
},
onProgress: function(event) {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:811", "file uploading:", event);
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:814", "file uploading:", event);
}
//获取上传进度
});
@@ -555,7 +558,7 @@ const _sfc_main = {
data: { avatar: this.avatar, nickname: this.nickname }
},
onProgress: function(event) {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:841", "上传进度", event);
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:844", "上传进度", event);
}
//获取上传进度
});