|
@@ -53,7 +53,8 @@ export default {
|
|
|
brief: '',
|
|
|
look: '',
|
|
|
cJson: [],
|
|
|
- cJson2: []
|
|
|
+ cJson2: [],
|
|
|
+ loading:false
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -416,13 +417,18 @@ export default {
|
|
|
]
|
|
|
// console.log(this.tid)
|
|
|
// return console.log('publish发布', params)
|
|
|
+
|
|
|
+ if(this.loading)return;
|
|
|
+ this.loading = true;
|
|
|
if (this.tid) {
|
|
|
addTestWorks2(params)
|
|
|
.then(res => {
|
|
|
this.$message.success('提交成功')
|
|
|
+ this.loading = false;
|
|
|
this.back()
|
|
|
})
|
|
|
.catch(err => {
|
|
|
+ this.loading = false;
|
|
|
console.error(err)
|
|
|
})
|
|
|
} else {
|
|
@@ -432,9 +438,11 @@ export default {
|
|
|
.then(res => {
|
|
|
this.$message.success('提交成功')
|
|
|
this.back()
|
|
|
+ this.loading = false;
|
|
|
})
|
|
|
.catch(err => {
|
|
|
console.error(err)
|
|
|
+ this.loading = false;
|
|
|
})
|
|
|
}
|
|
|
}
|