diff --git a/library/think/Model.php b/library/think/Model.php index 49819f4c..3e102fc8 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -733,4 +733,12 @@ abstract class Model implements \JsonSerializable, \ArrayAccess return call_user_func_array([self::db(), $method], $params); } + /** + * 解序列化后处理 + */ + public function __wakeup() + { + $this->initialize(); + } + }