Commit b5af9458 by gongyang

提交代码

parent 4301232c
Showing with 15 additions and 0 deletions
......@@ -33,6 +33,14 @@ class MessageApiController extends Controller
exit();
}
private function setJson()
{
header('Content-Type: application/json; charset=utf-8');
// 可选:禁止浏览器缓存 JSON 响应(接口场景推荐)
header('Cache-Control: no-cache, no-store, must-revalidate');
header('Pragma: no-cache');
header('Expires: 0');
}
//获取系统更新信息列表
private function systemUpdateList($request)
......@@ -106,6 +114,7 @@ class MessageApiController extends Controller
private function businessNoticeList($request)
{
$this->setJson();
$data = $request->all();
try{
$returnData = (new SystemNoticeLogic())->businessNoticeList($data);
......@@ -120,6 +129,7 @@ class MessageApiController extends Controller
//保存系统更新信息
private function saveBusinessNotice($request)
{
$this->setJson();
$data = $request->all();
try{
(new SystemNoticeLogic())->saveBusinessNotice($data);
......@@ -131,6 +141,8 @@ class MessageApiController extends Controller
private function showBusinessNotice($request)
{
$this->setJson();
$data = $request->all();
try{
(new SystemNoticeLogic())->showBusinessNotice($data);
......@@ -142,6 +154,8 @@ class MessageApiController extends Controller
private function delBusinessNotice($request)
{
$this->setJson();
$data = $request->all();
try{
(new SystemNoticeLogic())->delBusinessNotice($data);
......@@ -153,6 +167,7 @@ class MessageApiController extends Controller
private function topBusinessNotice($request)
{
$this->setJson();
$data = $request->all();
try{
(new SystemNoticeLogic())->delBusinessNotice($data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment