From 0cc2f108508d5c1804de5fed9f747e5a39e596c8 Mon Sep 17 00:00:00 2001 From: koogua Date: Thu, 29 Apr 2021 17:22:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8F=90=E4=BA=A4=E6=96=87?= =?UTF-8?q?=E7=AB=A0=E5=90=8E=E8=B7=B3=E8=BD=AC=E5=88=B0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=B8=AD=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Home/Controllers/ArticleController.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/Http/Home/Controllers/ArticleController.php b/app/Http/Home/Controllers/ArticleController.php index c26603a1..ba081e4b 100644 --- a/app/Http/Home/Controllers/ArticleController.php +++ b/app/Http/Home/Controllers/ArticleController.php @@ -160,12 +160,9 @@ class ArticleController extends Controller { $service = new ArticleService(); - $article = $service->createArticle(); + $service->createArticle(); - $location = $this->url->get([ - 'for' => 'home.article.edit', - 'id' => $article->id, - ]); + $location = $this->url->get(['for' => 'home.uc.articles']); $content = [ 'location' => $location, @@ -184,7 +181,12 @@ class ArticleController extends Controller $service->updateArticle($id); - $content = ['msg' => '更新文章成功']; + $location = $this->url->get(['for' => 'home.uc.articles']); + + $content = [ + 'location' => $location, + 'msg' => '更新文章成功', + ]; return $this->jsonSuccess($content); }