8e16632f by yangjianbin

Merge branch 'develop' of http://g.28ms.com:8000/yangjianbin/page into develop

2 parents 92a26a82 9e2d42b3
......@@ -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>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!