提交 279babfb authored 作者: lihuihui's avatar lihuihui

fix: 营销工具修改bug

上级 ac4cc578
......@@ -9,7 +9,7 @@ export function getReport() {
// 提交报告
export function submitReport(data) {
return httpRequest.post('/api/xtraining/api/v1/marketing/report', data, {
return httpRequest.post('/api/xtraining/api/v1/marketing/submit-report', data, {
headers: { 'Content-Type': 'application/json' }
})
}
......
......@@ -100,7 +100,9 @@ export default {
checkRecord() {
checkRecord(this.cases.id, 2)
.then(res => {
this.getReportDetail(res.data.items[0].id)
if (res.data.items.length) {
this.getReportDetail(res.data.items[0].id)
}
})
},
registerNextBtn() {
......@@ -134,8 +136,14 @@ export default {
this.$message({ message: '请完成当前步骤', type: 'warning' })
return false
}
const params = [{ type: 1, commit_report: this.form }]
submitReport({ reports: JSON.stringify(params) })
const params = {
reports: JSON.stringify({ type: 1, commit_report: [this.form] })
}
const id = this.$route.query.id
if (id) {
params.id = id
}
submitReport(params)
.then(res => {
this.$message({
message: '保存成功!你可以在作品展示中查看/编辑报告,查看成绩',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论