使用flask-restful实现数据校验与序列化
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user