加入类型转换逻辑,防止解码失败
This commit is contained in:
@@ -762,14 +762,34 @@ new Vue({
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 处理图片
|
||||||
if (task.content_image) {
|
if (task.content_image) {
|
||||||
// 编辑时显示图片
|
|
||||||
const fileName = task.content_image.split('/').pop();
|
const fileName = task.content_image.split('/').pop();
|
||||||
this.imageList = [{
|
this.imageList = [{
|
||||||
name: '已上传图片',
|
name: '已上传图片',
|
||||||
url: `/static/uploads/${fileName}` // 显示时使用相对路径
|
url: `/static/uploads/${fileName}` // 显示时使用相对路径
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 处理语音
|
||||||
|
if (task.content_voice) {
|
||||||
|
const fileName = task.content_voice.split('/').pop();
|
||||||
|
this.voiceList = [{
|
||||||
|
name: '已上传语音',
|
||||||
|
url: `/static/uploads/${fileName}` // 显示时使用相对路径
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理视频
|
||||||
|
if (task.content_video) {
|
||||||
|
const fileName = task.content_video.split('/').pop();
|
||||||
|
this.videoList = [{
|
||||||
|
name: '已上传视频',
|
||||||
|
url: `/static/uploads/${fileName}` // 显示时使用相对路径
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
this.taskDialogVisible = true;
|
this.taskDialogVisible = true;
|
||||||
this.isEdit = true;
|
this.isEdit = true;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user