增加报错兼容

This commit is contained in:
aixianling
2023-05-26 14:07:59 +08:00
parent d93a658666
commit 68d122e38d

View File

@@ -219,8 +219,8 @@ export default {
this.isLoading = true
this.instance.post(`/app/appcourseinfo/addOrUpdate`, {
...this.form,
videoUrl: this.form.courseType === '1' ? this.form.videoUrl[0].url : '',
pictureUrl: this.form.pictureUrl.length ? this.form.pictureUrl[0].url : ''
videoUrl: this.form.courseType === '1' ? this.form.videoUrl[0]?.url : '',
pictureUrl: this.form.pictureUrl.length ? this.form.pictureUrl[0]?.url : ''
}).then(res => {
if (res.code == 0) {
this.$message.success('提交成功')