From cf43493d7aa9c1a83cb1551c102f501f1dfde9b0 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期六, 06 六月 2020 13:23:39 +0800 Subject: [PATCH] # --- src/main/webapp/static/js/role/role.js | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main/webapp/static/js/role/role.js b/src/main/webapp/static/js/role/role.js index c053280..119e7f2 100644 --- a/src/main/webapp/static/js/role/role.js +++ b/src/main/webapp/static/js/role/role.js @@ -3,14 +3,14 @@ var powerTreeData; $(function (){ $.ajax({ - url: "/power/list/auth", + url: baseUrl+"/power/list/auth", headers: {'token': localStorage.getItem('token')}, method: 'GET', success: function (res) { if (res.code === 200){ powerTreeData = res.data; } else if (res.code === 403){ - top.location.href = "/"; + top.location.href = baseUrl; } else { layer.msg(res.msg) } @@ -29,7 +29,7 @@ tableIns = table.render({ elem: '#role', headers: {token: localStorage.getItem('token')}, - url: '/role/list/auth', + url: baseUrl+'/role/list/auth', page: true, limit: 16, toolbar: '#toolbar', @@ -61,7 +61,7 @@ }, done: function(res, curr, count) { if (res.code === 403) { - top.location.href = "/"; + top.location.href = baseUrl; } pageCurr=curr; limit(); @@ -83,7 +83,7 @@ }, done: function (res, curr, count) { if (res.code === 403) { - top.location.href = "/"; + top.location.href = baseUrl; } pageCurr=curr; limit(); @@ -128,7 +128,7 @@ } else { layer.confirm('纭畾鍒犻櫎'+(ids.length===1?'姝�':ids.length)+'鏉℃暟鎹悧', function(){ $.ajax({ - url: "/role/delete/auth", + url: baseUrl+"/role/delete/auth", headers: {'token': localStorage.getItem('token')}, data: {ids: ids}, method: 'POST', @@ -138,7 +138,7 @@ layer.closeAll(); tableReload(false); } else if (res.code === 403){ - top.location.href = "/"; + top.location.href = baseUrl; } else { layer.msg(res.msg) } @@ -166,7 +166,7 @@ 'fields': fields }; $.ajax({ - url: "/role/export/auth", + url: baseUrl+"/role/export/auth", headers: {'token': localStorage.getItem('token')}, data: JSON.stringify(param), dataType:'json', @@ -177,7 +177,7 @@ if (res.code === 200) { table.exportFile(titles,res.data,'xls'); } else if (res.code === 403) { - top.location.href = "/"; + top.location.href = baseUrl; } else { layer.msg(res.msg) } @@ -241,7 +241,7 @@ content: '../role/role_detail.html', success: function(layero, index){ $.ajax({ - url: "/role/"+ param +"/auth", + url: baseUrl+"/role/"+ param +"/auth", headers: {'token': localStorage.getItem('token')}, method: 'GET', success: function (res) { @@ -292,7 +292,7 @@ }; $.ajax({ - url: "/role/edit/auth", + url: baseUrl+"/role/edit/auth", headers: {'token': localStorage.getItem('token')}, data: top.reObject(data), method: 'POST', @@ -304,7 +304,7 @@ $(this).val(""); }); } else if (res.code === 403){ - top.location.href = "/"; + top.location.href = baseUrl; }else { layer.msg(res.msg) } @@ -348,7 +348,7 @@ }, done: function (res, curr, count) { if (res.code === 403) { - top.location.href = "/"; + top.location.href = baseUrl; } pageCurr=curr; if (res.data.length === 0 && count !== 0) { -- Gitblit v1.9.1