修改 用户管理 修改按钮弹框的问题,去掉 debugger
| | |
| | | }; |
| | | //从当前页面的url地址中获取参数数据 |
| | | function getRequest() { |
| | | debugger |
| | | var url = location.search; //获取url中"?"符后的字串 |
| | | var theRequest = new Object(); |
| | | if (url.indexOf("?") != -1) { |
| | |
| | | function permissionsInput(res,config) { |
| | | if(!strUtil.isEmpty(res)&&res.code==401){ |
| | | config.removeToken(); |
| | | console.log(res); |
| | | debugger |
| | | if(res.msg.includes("Access token expired")){ |
| | | layer.msg('登录过期11', {icon: 2, time: 1500}, function () { |
| | | layer.msg('登录过期', {icon: 2, time: 1500}, function () { |
| | | location.replace('/login.html'); |
| | | }, 5000); |
| | | }else{ |
| | | }else if(msg.includes("Invalid access token")){ |
| | | layer.msg('您的账号在其他地方登陆,请重新登录或修改密码', {icon: 2, time: 1500}, function () { |
| | | location.replace('/login.html'); |
| | | }, 5000); |
| | |
| | | config.removeToken(); |
| | | // var json=JSON.stringify(jsonRs) |
| | | // console.log(json,"jsonjsonjsonjsonjsonjsonjson") |
| | | debugger |
| | | var msg=jsonRs.msg; |
| | | if(msg.includes("Access token expired")){ |
| | | layer.msg('登录过期', {icon: 2, time: 1500}, function () { |
| | |
| | | location.replace('/login.html'); |
| | | }, 5000); |
| | | } |
| | | |
| | | return; |
| | | } else if (jsonRs.code == 403) { |
| | | layer.msg('没有权限', {icon: 2}); |
| | |
| | | // 表单提交事件 |
| | | form.on('submit(user-form-submit)', function (data) { |
| | | layer.load(2); |
| | | var datadto= data.field |
| | | admin.req('api-user/users/saveOrUpdate', JSON.stringify(data.field), function (data) { |
| | | layer.closeAll('loading'); |
| | | if (data.code == 0) { |
| | | layer.alert("用户添加成功,默认密码为:"+data.data.password, {icon: 1}); |
| | | if(datadto.id==null||datadto.id==''){ |
| | | layer.alert("用户添加成功,默认密码为:"+data.data.password); |
| | | } |
| | | admin.finishPopupCenter(); |
| | | } else { |
| | | layer.msg(data.msg, {icon: 2, time: 2000}); |