优化代码

This commit is contained in:
pengxiaolong
2025-09-29 20:48:31 +08:00
parent 0a721e99f8
commit 0044f8f334
63 changed files with 667 additions and 137 deletions

View File

@@ -193,6 +193,7 @@ const _sfc_main = {
im.on(common_vendor.jo.IM_EVENT.PRIVATE_MESSAGE_RECEIVED, this.onPrivateMessageReceived);
im.on(common_vendor.jo.IM_EVENT.MESSAGE_READ, this.onMessageRead);
this.getscrollviewheight();
this.checkRecordPermission();
},
methods: {
//暂停所有播放
@@ -211,7 +212,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:494", "file uploading:", event);
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:496", "file uploading:", event);
}
//获取上传进度
});
@@ -224,7 +225,7 @@ const _sfc_main = {
},
//长按语音
voiceTouchstart() {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:506", "长按语音");
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:508", "长按语音");
this.voicepopUpstart = true;
this.recorderManager.start();
this.notplayVoice(false);
@@ -234,7 +235,7 @@ const _sfc_main = {
setTimeout(() => {
this.recorderManager.stop();
}, 100);
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:516", "松开语音");
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:518", "松开语音");
this.voicepopUpstart = false;
},
//移动语音
@@ -251,13 +252,12 @@ const _sfc_main = {
},
//中断语音
voiceTouchcancel() {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:532", "中断语音");
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:534", "中断语音");
this.voicepopUpstart = false;
this.voiceCancelOrSend = false;
},
//语音切换
onVoice(status) {
this.checkRecordPermission();
if (status) {
this.inputfocus = false;
this.MoreStatus = false;
@@ -410,14 +410,14 @@ const _sfc_main = {
});
setTimeout(() => {
this.chatList = [...this.MoreMessageList, ...this.chatList];
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:698", "获取更多聊天记录", this.chatList);
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:699", "获取更多聊天记录", 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:705", "1已读消息", message);
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:706", "1已读消息", message);
},
//监听接受消息
onPrivateMessageReceived(message) {
@@ -432,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:720", "已读对方的消息");
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:721", "已读对方的消息");
});
}
},
@@ -446,7 +446,7 @@ const _sfc_main = {
this.avatar,
this.nickname
).then((res) => {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:734", "发送成功", res);
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:735", "发送成功", res);
this.ElementPositioning = res.id = components_ChatId.generateId();
res.timestampStatus = this.checkInterval(res.timestamp);
this.chatList.push(res);
@@ -469,8 +469,8 @@ const _sfc_main = {
getIOSDeviceType() {
const systemInfo = common_vendor.index.getSystemInfoSync();
const model = systemInfo.model;
if (/iPhone X|iPhone11|iPhone12|iPhone13|iPhone14/i.test(model)) {
if (/iPhone X|iPhone XS|iPhone 11 Pro/i.test(model)) {
if (/iPhone X|iPhone11|iPhone12|iPhone13|iPhone14|iPhone15|iPhone16|iPhone15 Pro|iPhone15 Pro Max|iPhone14 Pro|iPhone14 Pro Max|iPhone13 Pro|iPhone13 Pro Max|iPhone12 Pro|iPhone12 Pro Max|iPhone11 Pro|iPhone11 Pro Max|iPhone13 mini|iPhone12 mini|iPhoneXS|iPhoneXS Max/i.test(model)) {
if (/iPhone X|iPhone XS|iPhone 11 Pro|iPhone 11 Pro Max|iPhone 12 Pro|iPhone 12 Pro Max|iPhone 13 Pro|iPhone 13 Pro Max|iPhone 14 Pro|iPhone 14 Pro Max|iPhone 15 Pro|iPhone 15 Pro Max|iPhone 16/i.test(model)) {
this.ioshide = 88;
} else if (/iPhone 12|iPhone 13|iPhone 14/i.test(model)) {
this.ioshide = 94;
@@ -524,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:814", "file uploading:", event);
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:815", "file uploading:", event);
}
//获取上传进度
});
@@ -558,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:844", "上传进度", event);
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:845", "上传进度", event);
}
//获取上传进度
});