Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨建斌
/
page
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
1
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
bbead40b
authored
2018-03-29 20:02:35 +0800
by
wang
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
init
1 parent
382b91d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
4 deletions
application/views/perm/roleEdit.php
application/views/perm/roleEdit.php
View file @
bbead40
...
...
@@ -2,9 +2,8 @@
<body>
<div
class=
"panel panel-default"
>
<form
action=
""
>
<form
action=
"
system/role/update"
id=
"edit
"
>
<input
type=
"hidden"
value=
"
<?=
$id
?>
"
name=
"id"
>
</form>
<div
class=
"panel-body"
>
<div
class=
"row cl"
>
<!--<div class="form-group col-sm-3 col-md-2">
...
...
@@ -37,7 +36,7 @@
<button
class=
"btn btn-warning btn-block"
onclick=
"layer_close()"
>
取消
</button>
</div>
</div>
</form>
<?php
$this
->
load
->
view
(
'common/footer'
);
?>
<script>
...
...
@@ -83,9 +82,43 @@
});
console
.
log
(
menuIds
);
var
targetUrl
=
$
(
"#edit"
)
.
attr
(
"action"
);
var
data
=
$
(
"#edit"
)
.
serializeJson
();
var
newData
=
{
nameZh
:
data
[
'nameZh'
],
id
:
data
[
'id'
],
menuIds
:
menuIds
};
$
.
ajax
({
type
:
'post'
,
url
:
apiBaseUrl
+
targetUrl
,
cache
:
false
,
data
:
JSON
.
stringify
(
newData
),
dataType
:
'json'
,
contentType
:
"application/json; charset=UTF-8"
,
success
:
function
(
data
)
{
// console.log(data);
if
(
data
.
msg
)
{
layer
.
alert
(
data
.
msg
);
}
else
if
(
data
.
code
!=
0
)
{
layer
.
alert
(
'操作失败'
);
}
else
{
layer
.
msg
(
'操作成功'
);
}
if
(
data
.
code
)
{
setTimeout
(
function
()
{
window
.
parent
.
reload
();
layer_close
();
},
500
);
}
},
error
:
function
()
{
layer
.
alert
(
"操作失败"
)
}
})
// layer_close();
}
</
script
>
</
body
>
<
html
>
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment