mirror of https://github.com/halo-dev/halo-admin
refactor: static pages generate and deploy method.
parent
4b47e2519a
commit
cab0dbef32
|
@ -85,20 +85,28 @@ export default {
|
||||||
handleGenerate() {
|
handleGenerate() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const hide = this.$message.loading('生成中...', 0)
|
const hide = this.$message.loading('生成中...', 0)
|
||||||
staticPageApi.generate().then(response => {
|
staticPageApi
|
||||||
hide()
|
.generate()
|
||||||
this.$message.success('生成成功!')
|
.then(response => {
|
||||||
this.loadStaticPageList()
|
this.$message.success('生成成功!')
|
||||||
})
|
})
|
||||||
|
.finally(response => {
|
||||||
|
this.loadStaticPageList()
|
||||||
|
hide()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleDeploy() {
|
handleDeploy() {
|
||||||
this.deployLoading = true
|
this.deployLoading = true
|
||||||
const hide = this.$message.loading('部署中...', 0)
|
const hide = this.$message.loading('部署中...', 0)
|
||||||
staticPageApi.deploy().then(response => {
|
staticPageApi
|
||||||
hide()
|
.deploy()
|
||||||
this.deployLoading = false
|
.then(response => {
|
||||||
this.$message.success('部署成功!')
|
this.$message.success('部署成功!')
|
||||||
})
|
})
|
||||||
|
.finally(response => {
|
||||||
|
this.deployLoading = false
|
||||||
|
hide()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue