7070b22b by yangjianbin

init

1 parent 1eaebc54
...@@ -156,8 +156,34 @@ ...@@ -156,8 +156,34 @@
156 layer_show('添加员工', '<?=site_url('perm/staffEdit');?>/'+id); 156 layer_show('添加员工', '<?=site_url('perm/staffEdit');?>/'+id);
157 } 157 }
158 158
159 function reset() { 159 function reset(id) {
160 layer_show('重置密码', '<?=site_url('perm/reset');?>'); 160 //layer_show('重置密码', '<?=site_url('perm/reset');?>');
161 layer.confirm('您确定要将密码重置为 123456 ?', {
162 btn: ['确认','取消'],
163 title: '重置密码',
164 icon: 3
165 }, function(){
166 $.ajax({
167 type: 'put',
168 url: apiBaseUrl + 'system/user/resetPassword/'+id+'?newPassword=' + 123456,
169 cache: false,
170 dataType: 'json',
171 data: JSON.stringify(data),
172 contentType: "application/json; charset=UTF-8",
173 success: function (data) {
174 if (data.msg) {
175 layer.alert(data.msg);
176 } else if (data.code != 0) {
177 layer.alert('操作失败');
178 } else {
179 layer.msg('重置成功');
180 }
181 },
182 error: function () {
183 layer.alert("请求失败")
184 }
185 })
186 });
161 } 187 }
162 188
163 function freeze(id) { 189 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!