使用flask-restful实现数据校验与序列化

This commit is contained in:
zhengxinonly
2021-06-26 03:17:29 +08:00
parent 8fba71c464
commit b8870d4c33
27 changed files with 273 additions and 533 deletions
+2 -2
View File
@@ -162,10 +162,10 @@
layer.close(index)
let loading = layer.load()
$.ajax({
url: 'delete',
url: 'upload',
data: { id: obj.data['id'] },
dataType: 'json',
type: 'POST',
type: 'delete',
success: function (res) {
layer.close(loading)
if (res.success) {
@@ -74,7 +74,7 @@
// 修改 avatar 字段
$.ajax({
method: 'put',
url: '/users/updateAvatar',
url: '/users/avatar',
data: JSON.stringify({ avatar: result.data }),
dataType: 'json',
contentType: 'application/json',