Commit 565179fc by LJM

bug

parent c1d8a800
Showing with 8 additions and 6 deletions
...@@ -257,7 +257,7 @@ export default { ...@@ -257,7 +257,7 @@ export default {
downOut() { downOut() {
if (this.disabled) { if (this.disabled) {
this.$message("正在导出中,请不要重复点击"); this.$message("正在导出中,请不要重复点击");
return return false;
} }
this.$http('post', "/api/spu/export_spu", { this.$http('post', "/api/spu/export_spu", {
spu_name: this.formParam.goods_name, spu_name: this.formParam.goods_name,
...@@ -268,18 +268,20 @@ export default { ...@@ -268,18 +268,20 @@ export default {
keyword: this.formParam.keyword, keyword: this.formParam.keyword,
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.disabled = true this.disabled = true;
this.$message("正在导出中,请耐心等待") this.$message({
message: '正在导出中,请耐心等待',
type: 'success'
});
this.timer = setInterval(() => { this.timer = setInterval(() => {
if (!this.disabled) { if (!this.disabled) {
clearInterval(this.timer) clearInterval(this.timer)
return return
} }
this.resultDown(res.data) this.resultDown(res.msg)
}, 3000) }, 3000)
} }
}) })
}, },
resultDown(id_) { resultDown(id_) {
this.$http('get', "/api/export/get_export_data", { this.$http('get', "/api/export/get_export_data", {
...@@ -296,7 +298,7 @@ export default { ...@@ -296,7 +298,7 @@ export default {
//导出失败 //导出失败
this.$message({ this.$message({
message: res.data, message: res.data,
type: 'warning' type: 'error'
}); });
this.disabled = false 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