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',