Commit 7e33d3f8 by qlintonger xeno

录制完毕初步+2

parent b51f8147
...@@ -85,6 +85,7 @@ export const alova = createAlova({ ...@@ -85,6 +85,7 @@ export const alova = createAlova({
} else { } else {
console.log('upload here', method, json); console.log('upload here', method, json);
if(method.url === '/admin/uploadMuFile') { if(method.url === '/admin/uploadMuFile') {
json.data.oURL = json.data.url
json.data.url = json.data.url.replace( json.data.url = json.data.url.replace(
json.data.url.substring(0, json.data.url.indexOf('/upload')), json.data.url.substring(0, json.data.url.indexOf('/upload')),
method.baseURL method.baseURL
......
...@@ -139,10 +139,16 @@ const getInitiatorInfo = (id) => { ...@@ -139,10 +139,16 @@ const getInitiatorInfo = (id) => {
} }
//预览文件 //预览文件
const previewRef = ref() const previewRef = ref()
function convertURL(string: string) {
return string.replace(
string.substring(0, string.indexOf('/upload')),
location.origin
)
}
const handlePreview = (file: any) => { const handlePreview = (file: any) => {
const content = JSON.parse(file.content) const content = JSON.parse(file.content)
const params = { const params = {
src: content.fileUrl, src: convertURL(content.fileUrl),
type: file.fileType type: file.fileType
} }
previewRef.value!.open(params) previewRef.value!.open(params)
......
...@@ -131,6 +131,13 @@ const uploadMuFile = (option: any, type: string) => { ...@@ -131,6 +131,13 @@ const uploadMuFile = (option: any, type: string) => {
) )
} }
function convertURL(string: string) {
return string.replace(
string.substring(0, string.indexOf('/upload')),
location.origin
)
}
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 {
...@@ -141,7 +148,7 @@ const mapChatMessageQueue = computed(function () { ...@@ -141,7 +148,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: convertURL(a.title?.fileUrl as string),
fileName: a.title?.fileName fileName: a.title?.fileName
} }
} }
......
...@@ -152,7 +152,7 @@ function initialPaintDone(blob: Blob) { ...@@ -152,7 +152,7 @@ function initialPaintDone(blob: Blob) {
.Post<any>('/admin/uploadMuFile', params, { meta: { isUpload: true } }) .Post<any>('/admin/uploadMuFile', params, { meta: { isUpload: true } })
.then((res) => { .then((res) => {
if (res.code == 200) { if (res.code == 200) {
AnyR?.agora.startMark(res.data.url) AnyR?.agora.startMark(res.data.oURL)
} }
}) })
} }
......
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