wip:(重构接口实现方式5)

This commit is contained in:
zhengxinonly
2022-05-20 23:56:11 +08:00
parent 246ce3b3b7
commit d54eb4dc3e
10 changed files with 162 additions and 162 deletions
+1 -1
View File
@@ -182,7 +182,7 @@
layer.close(index)
let loading = layer.load()
$.ajax({
url: '/api/v1/roles/roles/role_power/' + obj.data['id'],
url: '/api/v1/roles/role_power/' + obj.data['id'],
dataType: 'json',
type: 'delete',
success: function (result) {
+1 -1
View File
@@ -68,7 +68,7 @@
form.on('submit(role-save)', function (data) {
$.ajax({
url: '/api/v1/roles/role/0',
url: '/api/v1/roles/role/',
data: JSON.stringify(data.field),
dataType: 'json',
contentType: 'application/json',
+1 -4
View File
@@ -75,9 +75,6 @@
{% block models_script %}
<script type="module">
import { ROLE_API } from '/static/api/http.js'
layui.use(['form', 'jquery'], function () {
let form = layui.form
let $ = layui.jquery
@@ -93,7 +90,7 @@
if (result.success) {
layer.msg(result.message, { icon: 1, time: 1000 }, function () {
parent.layer.close(parent.layer.getFrameIndex(window.name))//关闭当前页
parent.layui.table.reload('role-table')
parent.layui.table.reload('tables')
})
} else {
layer.msg(result.message, { icon: 2, time: 1000 })
+1
View File
@@ -284,6 +284,7 @@
$.ajax({
url: '/api/v1/users/user/' + obj.data['id'],
dataType: 'json',
contentType: 'application/json',
type: 'delete',
success: function (result) {
layer.close(loading)