|
@@ -248,12 +248,12 @@ Vue.component('keep-component', {
|
|
|
this.ajaxGetAllTags()
|
|
|
}
|
|
|
},
|
|
|
- ajaxFn: function (url, data, callback) {
|
|
|
+ ajaxFn: function (url, data, callback, type) {
|
|
|
return $.ajax({
|
|
|
type: 'post',
|
|
|
url: this.baseAjaxURL + url,
|
|
|
- contentType: "application/json;charset=utf-8",
|
|
|
- data: JSON.stringify(data),
|
|
|
+ contentType: type ? 'application/x-www-form-urlencoded' : "application/json;charset=utf-8",
|
|
|
+ data: type ? data : JSON.stringify(data),
|
|
|
dataType: "json",
|
|
|
success: typeof callback === 'function' ? callback.bind(this) : new Function()
|
|
|
})
|
|
@@ -344,7 +344,7 @@ Vue.component('keep-component', {
|
|
|
this.$toast(r.error_msg)
|
|
|
this.isAddLoading = false
|
|
|
}
|
|
|
- })
|
|
|
+ }, true)
|
|
|
}
|
|
|
}
|
|
|
})
|