|  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $.ajax({ | 
|---|
|  |  |  | url: "/power/"+parent.roleId+"/auth", | 
|---|
|  |  |  | url: baseUrl+"/power/"+parent.roleId+"/auth", | 
|---|
|  |  |  | headers: {'token': localStorage.getItem('token')}, | 
|---|
|  |  |  | method: 'GET', | 
|---|
|  |  |  | async: false, | 
|---|
|  |  |  | 
|---|
|  |  |  | if (res.code === 200){ | 
|---|
|  |  |  | tree.setChecked('powerTree', res.data); | 
|---|
|  |  |  | } else if (res.code === 403){ | 
|---|
|  |  |  | top.location.href = "/"; | 
|---|
|  |  |  | top.location.href = baseUrl+"/"; | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | layer.msg(res.msg) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | param.push(one); | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | // console.log(JSON.stringify(param)); | 
|---|
|  |  |  | $.ajax({ | 
|---|
|  |  |  | url: "/power/auth", | 
|---|
|  |  |  | url: baseUrl+"/power/auth", | 
|---|
|  |  |  | traditional: true, | 
|---|
|  |  |  | headers: {'token': localStorage.getItem('token')}, | 
|---|
|  |  |  | data: { | 
|---|
|  |  |  | 
|---|
|  |  |  | if (res.code === 200){ | 
|---|
|  |  |  | parent.layer.closeAll(); | 
|---|
|  |  |  | } else if (res.code === 403){ | 
|---|
|  |  |  | top.location.href = "/"; | 
|---|
|  |  |  | top.location.href = baseUrl+"/"; | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | layer.msg(res.msg) | 
|---|
|  |  |  | } | 
|---|