使用flask-restful实现数据校验与序列化3
This commit is contained in:
@@ -32,9 +32,9 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">状态</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="enable" {% if role.enable == 0 %}checked {% endif %}value="0"
|
||||
<input type="radio" name="enable" {% if role.enable == 1 %}checked {% endif %}value="0"
|
||||
title="开启">
|
||||
<input type="radio" name="enable" {% if role.enable == 1 %}checked {% endif %} value="1"
|
||||
<input type="radio" name="enable" {% if role.enable == 0 %}checked {% endif %} value="1"
|
||||
title="关闭">
|
||||
</div>
|
||||
</div>
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
form.on('submit(role-update)', function (data) {
|
||||
$.ajax({
|
||||
url: '/admin/role/update',
|
||||
url: '/admin/role/edit/' + data.field.roleId,
|
||||
data: JSON.stringify(data.field),
|
||||
dataType: 'json',
|
||||
contentType: 'application/json',
|
||||
@@ -96,6 +96,7 @@
|
||||
})
|
||||
return false
|
||||
})
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user