申请证书前端添加等待效果,避免无法及时获取后端结果

This commit is contained in:
wsczx 2023-05-04 23:32:16 +08:00
parent 60095fbc9b
commit c63e4f33d5
1 changed files with 8 additions and 0 deletions

View File

@ -544,12 +544,20 @@ export default {
});
break;
case "letsCert":
var loading = this.$loading({
lock: true,
text: "证书申请中...",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
axios.post("/set/other/createcert", this.letsCert).then((resp) => {
var rdata = resp.data;
console.log(rdata);
if (rdata.code === 0) {
loading.close();
this.$message.success(rdata.msg);
} else {
loading.close();
this.$message.error(rdata.msg);
}
});