修复资源用mvc

This commit is contained in:
2025-05-19 11:24:10 +08:00
parent f4f4bc600b
commit a7b82e1e26
21 changed files with 1871 additions and 444 deletions
+5 -5
View File
@@ -322,7 +322,7 @@
// 初始化分类列表
that.initCategoryList = function () {
$.ajax({
url: '/admin/article/articlecate',
url: '/admin/articles/articlecate',
type: 'POST',
success: function (res) {
if (res.code === 0) {
@@ -387,7 +387,7 @@
// 加载分类信息
that.loadCategoryInfo = function (id) {
$.get('/admin/article/cateedit?id=' + id, function (res) {
$.get('/admin/articles/cateedit?id=' + id, function (res) {
if (res.code === 0) {
that.showCategoryForm(0, res.data);
}
@@ -413,7 +413,7 @@
$select.empty().append('<option value="0">顶级分类</option>');
// 获取所有分类作为父级选项
$.ajax({
url: '/admin/article/articlecate',
url: '/admin/articles/articlecate',
type: 'POST',
async: false,
success: function (res) {
@@ -472,7 +472,7 @@
// 监听表单提交
form.on('submit(saveCategory)', function (data) {
var url = data.field.id ? '/admin/article/cateedit' : '/admin/article/cateadd';
var url = data.field.id ? '/admin/articles/cateedit' : '/admin/articles/cateadd';
$.post(url, data.field, function (res) {
if (res.code === 0) {
layer.msg(res.msg, { icon: 1 });
@@ -490,7 +490,7 @@
if (!id) return;
layer.confirm('确定要删除该分类吗?', function (index) {
$.post('/admin/article/catedel', { id: id }, function (res) {
$.post('/admin/articles/catedel', { id: id }, function (res) {
if (res.code === 0) {
layer.msg(res.msg, { icon: 1 });
that.initCategoryList();