Update mysql.js

This commit is contained in:
Mr Chen
2023-12-14 00:12:56 +08:00
parent 9ea52e452a
commit 0ef35e1474
+15 -4
View File
@@ -496,7 +496,6 @@ function setRootPwd(type, pwd){
var rdata = $.parseJSON(data.data);
showMsg(rdata.msg,function(){
dbList();
$('.layui-layer-close1').click();
},{icon: rdata.status ? 1 : 2});
});
return;
@@ -508,7 +507,7 @@ function setRootPwd(type, pwd){
title: '修改数据库密码',
closeBtn: 1,
shift: 5,
btn:["提交","关闭"],
btn:["提交", "复制ROOT密码", "关闭"],
shadeClose: true,
content: "<form class='bt-form pd20' id='mod_pwd'>\
<div class='line'>\
@@ -518,8 +517,20 @@ function setRootPwd(type, pwd){
</div>\
</div>\
</form>",
yes:function(){
setRootPwd(1);
yes:function(layer, layero){
var password = $("#MyPassword").val();
myPost('set_root_pwd', {password:password}, function(data){
var rdata = $.parseJSON(data.data);
showMsg(rdata.msg,function(){
layer.close(layero);
dbList();
},{icon: rdata.status ? 1 : 2});
});
},
btn2:function(){
var password = $("#MyPassword").val();
copyText(password);
return false;
}
});
}