加入类型转换逻辑,防止解码失败
This commit is contained in:
@@ -736,7 +736,7 @@ new Vue({
|
||||
} else {
|
||||
this.taskForm.weekly_days = [];
|
||||
}
|
||||
|
||||
|
||||
// 处理链接内容
|
||||
if (task.content_link) {
|
||||
try {
|
||||
@@ -762,14 +762,34 @@ new Vue({
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// 处理图片
|
||||
if (task.content_image) {
|
||||
// 编辑时显示图片
|
||||
const fileName = task.content_image.split('/').pop();
|
||||
this.imageList = [{
|
||||
name: '已上传图片',
|
||||
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.isEdit = true;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user