优化ajax的访问地址

This commit is contained in:
2022-03-20 13:48:44 +08:00
parent 2ee6cbac37
commit e40d273a42

View File

@@ -196,7 +196,7 @@
var form = layui.form
form.on('submit(postComment)', function (data) {
$.post('{:url("PostComment/save")}',
$.post('{:url("PostComment/save")->suffix(false)}',
data.field
, function (result) {
if (result.code == 0) {
@@ -220,7 +220,7 @@
var parent = $(item).closest('.post-item')
layer.confirm('确定要删除吗?', function () {
$.post('{:url("PostComment/delete")}', {
$.post('{:url("PostComment/delete")->suffix(false)}', {
id: $(parent).data('id')
}, function (result) {
if (result.code == 0) {