From a2eb9e27ddee582b420fe4a13dadf1283b21db55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E4=B8=96=E7=95=8C?= <642747453@qq.com> Date: Thu, 11 Aug 2022 18:47:35 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20#10000=20=E8=B4=A6=E5=8F=B7=E9=87=8D?= =?UTF-8?q?=E6=96=B0=E6=8E=88=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/Shop.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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]; }