diff --git a/app/Models/Shop.php b/app/Models/Shop.php index f45960b..5140a13 100644 --- a/app/Models/Shop.php +++ b/app/Models/Shop.php @@ -8,7 +8,6 @@ class Shop extends Model { protected $hidden = [ 'access_token', - 'expires_at', 'expires_in', 'refresh_token', 'refresh_token_expires_at', @@ -28,6 +27,9 @@ class Shop extends Model 2 => '无需授权', 3 => '停用', ]; + if (1 === (int)$value && ($this->attributes['expires_at'] - time()) / 3600 <= 72) { + return '重新授权'; + } return $map[$value]; }