mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-12-01 14:40:44 +00:00
feat: #10000 账号重新授权
This commit is contained in:
parent
cf910fa6ae
commit
a2eb9e27dd
@ -8,7 +8,6 @@ class Shop extends Model
|
|||||||
{
|
{
|
||||||
protected $hidden = [
|
protected $hidden = [
|
||||||
'access_token',
|
'access_token',
|
||||||
'expires_at',
|
|
||||||
'expires_in',
|
'expires_in',
|
||||||
'refresh_token',
|
'refresh_token',
|
||||||
'refresh_token_expires_at',
|
'refresh_token_expires_at',
|
||||||
@ -28,6 +27,9 @@ class Shop extends Model
|
|||||||
2 => '无需授权',
|
2 => '无需授权',
|
||||||
3 => '停用',
|
3 => '停用',
|
||||||
];
|
];
|
||||||
|
if (1 === (int)$value && ($this->attributes['expires_at'] - time()) / 3600 <= 72) {
|
||||||
|
return '重新授权';
|
||||||
|
}
|
||||||
|
|
||||||
return $map[$value];
|
return $map[$value];
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user