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
8e16632f
authored
2018-03-29 20:30:50 +0800
by
yangjianbin
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'develop' of
http://g.28ms.com:8000/yangjianbin/page
into develop
2 parents
92a26a82
9e2d42b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
3 deletions
application/views/perm/roleEdit.php
application/views/perm/roleEdit.php
View file @
8e16632
...
...
@@ -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">
...
...
@@ -27,6 +26,7 @@
</div>
</div>
</div>
</form>
</div>
<div
class=
"row cl pt-20 pb-20 col-sm-12"
>
...
...
@@ -38,8 +38,10 @@
</div>
</div>
<?php
$this
->
load
->
view
(
'common/footer'
);
?>
<script>
var setting = {
async: {
...
...
@@ -83,9 +85,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
:
'put'
,
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