Commit 565179fc by LJM

bug

parent c1d8a800
Showing with 8 additions and 6 deletions
......@@ -257,7 +257,7 @@ export default {
downOut() {
if (this.disabled) {
this.$message("正在导出中,请不要重复点击");
return
return false;
}
this.$http('post', "/api/spu/export_spu", {
spu_name: this.formParam.goods_name,
......@@ -268,18 +268,20 @@ export default {
keyword: this.formParam.keyword,
}).then(res => {
if (res.code == 0) {
this.disabled = true
this.$message("正在导出中,请耐心等待")
this.disabled = true;
this.$message({
message: '正在导出中,请耐心等待',
type: 'success'
});
this.timer = setInterval(() => {
if (!this.disabled) {
clearInterval(this.timer)
return
}
this.resultDown(res.data)
this.resultDown(res.msg)
}, 3000)
}
})
},
resultDown(id_) {
this.$http('get', "/api/export/get_export_data", {
......@@ -296,7 +298,7 @@ export default {
//导出失败
this.$message({
message: res.data,
type: 'warning'
type: 'error'
});
this.disabled = false
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment