async handleSubmit() {
await this.handleSubmitReport() // 1
await this.handleSubmitEdit() // 2
this.showSuccess = true // 3
this.showSuccessText = '你已胜利提交查看后果!'
},
// 执行接口1
async handleSubmitReport() {
const { data } = await postAction(this.api.report, this.params.hiddenList)
if (data.success) {
return data.result
} else {
this.$message.error(data.message)
this.$tip.loaded()
return null
}
},
// 执行接口2
async handleSubmitEdit() {
const { data } = await postAction(this.api.edit, this.dataInfo)
if (data.success) {
return data.result
} else {
this.$message.error(data.message)
this.$tip.loaded()
return null
}
},
发表回复