Commit 66339398 by pangchong

Merge branch 'master' of 122.112.146.86:qlintonger/standalone-anyremote

parents b3a19c5b 16ee311e
...@@ -121,6 +121,16 @@ const uploadMuFile = (option: any, type: string) => { ...@@ -121,6 +121,16 @@ const uploadMuFile = (option: any, type: string) => {
onError(error) onError(error)
}) as any }) as any
} }
function replaceDomainAndPort(url: string, newDomainAndPort: string) {
if (!url) return ''
const urlObject = new URL(url);
urlObject.hostname = newDomainAndPort.split(':')[0];
urlObject.port = newDomainAndPort.split(':')[1];
return urlObject.toString();
}
const mapChatMessageQueue = computed(function () { const mapChatMessageQueue = computed(function () {
return chatChannelState.value.messageQueue.map(function (a: any) { return chatChannelState.value.messageQueue.map(function (a: any) {
return { return {
...@@ -131,7 +141,7 @@ const mapChatMessageQueue = computed(function () { ...@@ -131,7 +141,7 @@ const mapChatMessageQueue = computed(function () {
fromName: a.fromName, fromName: a.fromName,
sendTime: a.happened_time, sendTime: a.happened_time,
message: a.title, message: a.title,
src: a.title?.fileUrl, src: replaceDomainAndPort(a.title?.fileUrl, 'ifar.test.com:440'),
fileName: a.title?.fileName fileName: a.title?.fileName
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment