Update config.js

This commit is contained in:
Mr Chen
2024-05-26 21:14:04 +08:00
parent 47b2f1b009
commit 70ee376958
+10 -22
View File
@@ -126,28 +126,16 @@ $('input[name="bind_ssl"]').click(function(){
yes: function(){
var cert_type = $('select[name=cert_type]').val();
if ( cert_type == 0 ){
$.post('/config/set_panel_local_ssl',{'cert_type':cert_type}, function(rdata){
// console.log(rdata);
var to_https = window.location.href.replace('http','https');
showMsg(rdata.msg,function(){
if (rdata.status){
window.location.href = to_https;
}
},{icon:rdata.status?1:2},5000);
},'json');
} else if (cert_type == 1){
$.post('/config/set_panel_acme_ssl',{'cert_type':cert_type}, function(rdata){
// console.log(rdata);
var to_https = window.location.href.replace('http','https');
showMsg(rdata.msg,function(){
if (rdata.status){
window.location.href = to_https;
}
},{icon:rdata.status?1:2},5000);
},'json');
}
$.post('/config/set_panel_local_ssl',{'cert_type':cert_type}, function(rdata){
// console.log(rdata);
var to_https = window.location.href.replace('http','https');
showMsg(rdata.msg,function(){
if (rdata.status){
window.location.href = to_https;
}
},{icon:rdata.status?1:2},5000);
},'json');
}
});
} else {