bug
This commit is contained in:
@@ -125,34 +125,37 @@ export default {
|
||||
return this.$u.toast('请选择类别')
|
||||
}
|
||||
|
||||
const imgs = []
|
||||
var imgs = []
|
||||
if (this.forms.fileIds) {
|
||||
this.forms.fileIds.map((e) => {
|
||||
imgs.push({ url: e.url, id: e.id })
|
||||
})
|
||||
}
|
||||
|
||||
this.flag = true
|
||||
console.log(222)
|
||||
this.$http.post(`/app/appcontentinfo/addOrUpdate`, {
|
||||
title: this.forms.title,
|
||||
areaId: this.forms.areaId,
|
||||
content: this.forms.content,
|
||||
files: imgs || [],
|
||||
id: this.id,
|
||||
moduleId: this.moduleId,
|
||||
categoryId: this.selectList[this.forms.selectIndex].id,
|
||||
categoryName: this.selectList[this.forms.selectIndex].categoryName,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
uni.$emit('update')
|
||||
this.$u.toast('发布成功')
|
||||
this.flag = false
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 600)
|
||||
}
|
||||
})
|
||||
title: this.forms.title,
|
||||
areaId: this.forms.areaId,
|
||||
content: this.forms.content,
|
||||
files: imgs || [],
|
||||
id: this.id,
|
||||
moduleId: this.moduleId,
|
||||
categoryId: this.selectList[this.forms.selectIndex].id,
|
||||
categoryName: this.selectList[this.forms.selectIndex].categoryName,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(333)
|
||||
if (res.code == 0) {
|
||||
uni.$emit('update')
|
||||
this.$u.toast('发布成功')
|
||||
this.flag = true
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 600)
|
||||
}
|
||||
}).catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
} else {
|
||||
this.$u.toast('失败')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user