Files
EdgeAdmin/web/views/@default/servers/components/ssl/index.js
2020-10-02 17:22:24 +08:00

45 lines
976 B
JavaScript

Tea.context(function () {
// 上传证书
this.uploadCert = function () {
teaweb.popup("/servers/components/ssl/uploadPopup", {
height: "28em",
callback: function () {
teaweb.success("上传成功", function () {
window.location.reload()
})
}
})
}
// 删除证书
this.deleteCert = function (certId) {
let that = this
teaweb.confirm("确定要删除此证书吗?", function () {
that.$post("/servers/components/ssl/delete")
.params({
certId: certId
})
.refresh()
})
}
// 查看证书
this.viewCert = function (certId) {
teaweb.popup("/servers/components/ssl/certPopup?certId=" + certId, {
height: "28em",
width: "48em"
})
}
// 修改证书
this.updateCert = function (certId) {
teaweb.popup("/servers/components/ssl/updatePopup?certId=" + certId, {
height: "28em",
callback: function () {
teaweb.success("上传成功", function () {
window.location.reload()
})
}
})
}
})