diff --git a/plugins/mysql/js/mysql.js b/plugins/mysql/js/mysql.js index bfb8ea425..1d1e5c4d8 100755 --- a/plugins/mysql/js/mysql.js +++ b/plugins/mysql/js/mysql.js @@ -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: "
", - 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; } }); }