From 70eda0256ea6afe4332c03a89d5416b8e6014083 Mon Sep 17 00:00:00 2001 From: panliang <1163816051@qq.com> Date: Mon, 11 Dec 2023 11:21:20 +0800 Subject: [PATCH] build:h5 --- app/Admin/Controllers/FeedbackController.php | 15 +++++++++++++-- app/Models/Feedback.php | 3 ++- lang/zh_CN/feedback.php | 2 ++ public/h5/index.html | 2 +- .../js/{index.d14f02e6.js => index.2d1c93b2.js} | 2 +- .../h5/static/js/pages-index-index.5a7a965d.js | 1 + .../h5/static/js/pages-index-index.74baf6d5.js | 1 - .../h5/static/js/pages-user-profile.24f3f757.js | 1 - .../h5/static/js/pages-user-profile.ecca6fa5.js | 1 + public/images/bit2.png | Bin 0 -> 5648 bytes 10 files changed, 21 insertions(+), 7 deletions(-) rename public/h5/static/js/{index.d14f02e6.js => index.2d1c93b2.js} (60%) create mode 100644 public/h5/static/js/pages-index-index.5a7a965d.js delete mode 100644 public/h5/static/js/pages-index-index.74baf6d5.js delete mode 100644 public/h5/static/js/pages-user-profile.24f3f757.js create mode 100644 public/h5/static/js/pages-user-profile.ecca6fa5.js create mode 100644 public/images/bit2.png diff --git a/app/Admin/Controllers/FeedbackController.php b/app/Admin/Controllers/FeedbackController.php index e4bc224..34ba6bd 100644 --- a/app/Admin/Controllers/FeedbackController.php +++ b/app/Admin/Controllers/FeedbackController.php @@ -5,6 +5,7 @@ namespace App\Admin\Controllers; use App\Admin\Services\FeedbackService; use Slowlyo\OwlAdmin\Controllers\AdminController; use Slowlyo\OwlAdmin\Renderers\Page; +use Slowlyo\OwlAdmin\Renderers\Form; class FeedbackController extends AdminController { @@ -17,13 +18,23 @@ class FeedbackController extends AdminController ->columnsTogglable(false) ->headerToolbar([]) ->columns([ - amisMake()->TableColumn()->name('id')->label(__('banner.id')), + amisMake()->TableColumn()->name('id')->label(__('feedback.id')), amisMake()->TableColumn()->name('content')->label(__('feedback.content')), $this->rowActions([ - $this->rowDeleteButton() + $this->rowShowButton(), + $this->rowDeleteButton(), ]), ]); return $this->baseList($crud); } + + public function detail(): Form + { + return $this->baseDetail()->title('')->body([ + amisMake()->TextControl()->name('id')->label(__('feedback.id'))->static(), + amisMake()->TextControl()->name('content')->label(__('feedback.content'))->static(), + amisMake()->TextControl()->name('created_at')->label(__('feedback.created_at'))->static(), + ]); + } } diff --git a/app/Models/Feedback.php b/app/Models/Feedback.php index ac24bae..3cd7a03 100644 --- a/app/Models/Feedback.php +++ b/app/Models/Feedback.php @@ -4,13 +4,14 @@ namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; +use App\Traits\HasDateTimeFormatter; /** * 书记信箱 */ class Feedback extends Model { - use HasFactory; + use HasFactory, HasDateTimeFormatter; protected $fillable = ['content']; } diff --git a/lang/zh_CN/feedback.php b/lang/zh_CN/feedback.php index 464f860..c42fac4 100644 --- a/lang/zh_CN/feedback.php +++ b/lang/zh_CN/feedback.php @@ -1,5 +1,7 @@ 'ID', 'content' => '内容', + 'created_at' => '创建时间', ]; diff --git a/public/h5/index.html b/public/h5/index.html index bb087c6..f6130cb 100644 --- a/public/h5/index.html +++ b/public/h5/index.html @@ -1,2 +1,2 @@