Commit 7e33d3f8 by qlintonger xeno

录制完毕初步+2

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