更新代码
This commit is contained in:
@@ -181,7 +181,7 @@
|
||||
// 初始化表格
|
||||
table.render({
|
||||
elem: '#articleTable',
|
||||
url: '/admin/articles/articlelist',
|
||||
url: '/admin/article/articlelist',
|
||||
method: 'post',
|
||||
cols: [[
|
||||
{ field: 'id', title: 'ID', align: 'center', width: 80 },
|
||||
@@ -268,18 +268,18 @@
|
||||
}
|
||||
|
||||
function add() {
|
||||
window.location.href = '/admin/articles/add';
|
||||
window.location.href = '/admin/article/add';
|
||||
}
|
||||
|
||||
function edit(id) {
|
||||
window.location.href = '/admin/articles/edit?id=' + id;
|
||||
window.location.href = '/admin/article/edit?id=' + id;
|
||||
}
|
||||
|
||||
function del(id) {
|
||||
layer.confirm('确定要删除该文章吗?', {
|
||||
btn: ['确定', '取消']
|
||||
}, function () {
|
||||
$.post('/admin/articles/delete', { id: id }, function (res) {
|
||||
$.post('/admin/article/delete', { id: id }, function (res) {
|
||||
if (res.code == 0) {
|
||||
layer.msg(res.msg, { icon: 1 });
|
||||
setTimeout(function () {
|
||||
|
||||
@@ -416,7 +416,7 @@
|
||||
// 初始化分类列表
|
||||
that.initCategoryList = function () {
|
||||
$.ajax({
|
||||
url: '/admin/articles/articlecate',
|
||||
url: '/admin/article/articlecate',
|
||||
type: 'POST',
|
||||
success: function (res) {
|
||||
if (res.code === 0) {
|
||||
@@ -481,7 +481,7 @@
|
||||
|
||||
// 加载分类信息
|
||||
that.loadCategoryInfo = function (id) {
|
||||
$.get('/admin/articles/cateedit?id=' + id, function (res) {
|
||||
$.get('/admin/article/cateedit?id=' + id, function (res) {
|
||||
if (res.code === 0) {
|
||||
that.showCategoryForm(0, res.data);
|
||||
}
|
||||
@@ -507,7 +507,7 @@
|
||||
$select.empty().append('<option value="0">顶级分类</option>');
|
||||
// 获取所有分类作为父级选项
|
||||
$.ajax({
|
||||
url: '/admin/articles/articlecate',
|
||||
url: '/admin/article/articlecate',
|
||||
type: 'POST',
|
||||
async: false,
|
||||
success: function (res) {
|
||||
@@ -566,7 +566,7 @@
|
||||
|
||||
// 监听表单提交
|
||||
form.on('submit(saveCategory)', function (data) {
|
||||
var url = data.field.id ? '/admin/articles/cateedit' : '/admin/articles/cateadd';
|
||||
var url = data.field.id ? '/admin/article/cateedit' : '/admin/article/cateadd';
|
||||
$.post(url, data.field, function (res) {
|
||||
if (res.code === 0) {
|
||||
layer.msg(res.msg, { icon: 1 });
|
||||
@@ -584,7 +584,7 @@
|
||||
if (!id) return;
|
||||
|
||||
layer.confirm('确定要删除该分类吗?', function (index) {
|
||||
$.post('/admin/articles/catedel', { id: id }, function (res) {
|
||||
$.post('/admin/article/catedel', { id: id }, function (res) {
|
||||
if (res.code === 0) {
|
||||
layer.msg(res.msg, { icon: 1 });
|
||||
that.initCategoryList();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php /*a:2:{s:67:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\article\articlelist.php";i:1747385257;s:61:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\header.php";i:1746849526;}*/ ?>
|
||||
<?php /*a:2:{s:67:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\article\articlelist.php";i:1747642386;s:61:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\header.php";i:1746849526;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php /*a:2:{s:67:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\article\articlecate.php";i:1747387836;s:61:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\header.php";i:1746849526;}*/ ?>
|
||||
<?php /*a:2:{s:67:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\article\articlecate.php";i:1747642386;s:61:"E:\Demos\DemoOwns\PHP\yunzer\app\admin\view\public\header.php";i:1746849526;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
Reference in New Issue
Block a user