更新后端

This commit is contained in:
云泽网
2025-05-19 00:46:05 +08:00
parent 4c6f7277b0
commit 11fe0b4357
28 changed files with 4644 additions and 134 deletions
+17
View File
@@ -7,6 +7,7 @@ use app\admin\controller\Base;
use think\facade\Db;
use think\facade\View;
use think\facade\Request;
use app\common\service\LogService;
class Article extends Base
{
@@ -411,4 +412,20 @@ class Article extends Base
}
return json(['code' => 0, 'msg' => '删除成功', 'data' => []]);
}
//统计文章数量
public function counts() {
$total = Db::table('yz_article')
->where('delete_time', null)
->where('status', '<>', 3)
->count();
return json([
'code' => 0,
'msg' => '获取成功',
'data' => [
'total' => $total
]
]);
}
}