From 03104468a0b91ebe87b43a531d8d92bdf7998e4e Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Tue, 1 Apr 2025 13:53:55 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9=E9=99=84?= =?UTF-8?q?=E4=BB=B6=E4=B8=8B=E8=BD=BD=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/model/v1/AttachmentModel.php | 6 ------ app/common/model/AttachmentBaseModel.php | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/app/admin/model/v1/AttachmentModel.php b/app/admin/model/v1/AttachmentModel.php index f6b15846..21a6006d 100644 --- a/app/admin/model/v1/AttachmentModel.php +++ b/app/admin/model/v1/AttachmentModel.php @@ -21,12 +21,6 @@ class AttachmentModel extends AttachmentBaseModel protected $json = ['attach']; // 设置JSON数据返回数组 protected $jsonAssoc = true; - // JSON字段属性类型 - protected $jsonType = [ - 'attach[*]->file_path' => 'string', - 'attach[*]->file_ext' => 'string', - 'attach[*]->btn_name' => 'string', - ]; // 关联附件分类模型 public function category() diff --git a/app/common/model/AttachmentBaseModel.php b/app/common/model/AttachmentBaseModel.php index 4154ab59..49ba9c3c 100644 --- a/app/common/model/AttachmentBaseModel.php +++ b/app/common/model/AttachmentBaseModel.php @@ -25,7 +25,7 @@ class AttachmentBaseModel extends BaseModel 'image' => 'string', 'applicable_to' => 'string', 'support_platform' => 'string', - 'attach' => 'string', + 'attach' => 'json', 'sort' => 'int', 'recommend' => 'int', 'status' => 'int',