From 05df92b65ebbb38a930f3388ca60f8bb8e321187 Mon Sep 17 00:00:00 2001 From: Wayne Date: Tue, 23 Jan 2024 15:54:10 +0800 Subject: [PATCH] bug fix #2 --- admin/src/pages/About/company/Index.vue | 3 ++- admin/src/pages/About/concept/Index.vue | 5 +++-- admin/src/pages/News/list/components/Form.vue | 1 + admin/src/pages/News/list/form.vue | 1 + admin/src/pages/Priv/adminLog/index.vue | 2 +- admin/src/pages/Product/list/form.vue | 1 + app/app/adminapi/controller/ArticleController.php | 2 +- app/app/functions.php | 1 + app/config/middleware.php | 6 +++--- 9 files changed, 14 insertions(+), 8 deletions(-) diff --git a/admin/src/pages/About/company/Index.vue b/admin/src/pages/About/company/Index.vue index d0b86c6..9787cd6 100644 --- a/admin/src/pages/About/company/Index.vue +++ b/admin/src/pages/About/company/Index.vue @@ -14,6 +14,7 @@ const editorConfig = ref({ // // Headers sent along with the XMLHttpRequest to the upload server. headers: { 'X-CSRF-TOKEN': 'CSFR-Token', + 'Authorization' : `${sessionStorage.getItem('token')}` } }, image: { @@ -100,6 +101,6 @@ const submitForm = async () => { } :deep(.ck-editor__editable_inline) { - height: 400px; + height: calc(100vh - 315px); } \ No newline at end of file diff --git a/admin/src/pages/About/concept/Index.vue b/admin/src/pages/About/concept/Index.vue index f1a0b63..eabcacd 100644 --- a/admin/src/pages/About/concept/Index.vue +++ b/admin/src/pages/About/concept/Index.vue @@ -14,6 +14,7 @@ const editorConfig = ref({ // // Headers sent along with the XMLHttpRequest to the upload server. headers: { 'X-CSRF-TOKEN': 'CSFR-Token', + 'Authorization' : `${sessionStorage.getItem('token')}` } }, image: { @@ -99,6 +100,6 @@ const submitForm = async () => { } :deep(.ck-editor__editable_inline) { - height: 400px; + height: calc(100vh - 315px); } - + \ No newline at end of file diff --git a/admin/src/pages/News/list/components/Form.vue b/admin/src/pages/News/list/components/Form.vue index c35cde1..a6f9b46 100644 --- a/admin/src/pages/News/list/components/Form.vue +++ b/admin/src/pages/News/list/components/Form.vue @@ -10,6 +10,7 @@ const editorConfig = ref({ // // Headers sent along with the XMLHttpRequest to the upload server. headers: { 'X-CSRF-TOKEN': 'CSFR-Token', + 'Authorization' : `${sessionStorage.getItem('token')}` } }, image: { diff --git a/admin/src/pages/News/list/form.vue b/admin/src/pages/News/list/form.vue index de0e65d..11d7b0f 100644 --- a/admin/src/pages/News/list/form.vue +++ b/admin/src/pages/News/list/form.vue @@ -13,6 +13,7 @@ const editorConfig = ref({ // // Headers sent along with the XMLHttpRequest to the upload server. headers: { 'X-CSRF-TOKEN': 'CSFR-Token', + 'Authorization' : `${sessionStorage.getItem('token')}` } }, image: { diff --git a/admin/src/pages/Priv/adminLog/index.vue b/admin/src/pages/Priv/adminLog/index.vue index 738d9fd..e68b613 100644 --- a/admin/src/pages/Priv/adminLog/index.vue +++ b/admin/src/pages/Priv/adminLog/index.vue @@ -96,7 +96,7 @@ const handleNextClick = (val) => {
- + diff --git a/admin/src/pages/Product/list/form.vue b/admin/src/pages/Product/list/form.vue index 56615a7..7c25296 100644 --- a/admin/src/pages/Product/list/form.vue +++ b/admin/src/pages/Product/list/form.vue @@ -15,6 +15,7 @@ const editorConfig = ref({ // // Headers sent along with the XMLHttpRequest to the upload server. headers: { 'X-CSRF-TOKEN': 'CSFR-Token', + 'Authorization' : `${sessionStorage.getItem('token')}` } }, image: { diff --git a/app/app/adminapi/controller/ArticleController.php b/app/app/adminapi/controller/ArticleController.php index 90ce28a..12d948e 100644 --- a/app/app/adminapi/controller/ArticleController.php +++ b/app/app/adminapi/controller/ArticleController.php @@ -101,7 +101,7 @@ class ArticleController extends BaseController ->where('cat_id',$params['id']) ->where('lang',$params['lang']) ->update($data); - + AdminLog($this->uid, '修改內容 [' . $params['id'] .']'); return $this->Success('操作成功'); diff --git a/app/app/functions.php b/app/app/functions.php index f756012..16c2983 100644 --- a/app/app/functions.php +++ b/app/app/functions.php @@ -14,6 +14,7 @@ function getUrl(){ } function AdminLog($admin_id, $content){ + if(!$admin_id){ $user_name = ''; }else{ diff --git a/app/config/middleware.php b/app/config/middleware.php index df2fc23..0fee503 100644 --- a/app/config/middleware.php +++ b/app/config/middleware.php @@ -13,7 +13,7 @@ */ return [ -// 'adminapi' => [ -// app\adminapi\middleware\AdminJwtCheck::class, -// ], + 'adminapi' => [ + app\adminapi\middleware\AdminJwtCheck::class, + ], ]; \ No newline at end of file