7070b22b by yangjianbin

init

1 parent 1eaebc54
......@@ -156,8 +156,34 @@
layer_show('添加员工', '<?=site_url('perm/staffEdit');?>/'+id);
}
function reset() {
layer_show('重置密码', '<?=site_url('perm/reset');?>');
function reset(id) {
//layer_show('重置密码', '<?=site_url('perm/reset');?>');
layer.confirm('您确定要将密码重置为 123456 ?', {
btn: ['确认','取消'],
title: '重置密码',
icon: 3
}, function(){
$.ajax({
type: 'put',
url: apiBaseUrl + 'system/user/resetPassword/'+id+'?newPassword=' + 123456,
cache: false,
dataType: 'json',
data: JSON.stringify(data),
contentType: "application/json; charset=UTF-8",
success: function (data) {
if (data.msg) {
layer.alert(data.msg);
} else if (data.code != 0) {
layer.alert('操作失败');
} else {
layer.msg('重置成功');
}
},
error: function () {
layer.alert("请求失败")
}
})
});
}
function freeze(id) {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!