|
@@ -51,10 +51,10 @@ class AuthController extends BaseController
|
|
|
$this->supplierId = $this->request->hasMacro('supplierId') ? $this->request->supplierId() : 0;
|
|
|
$this->supplierInfo = $this->request->hasMacro('supplierInfo') ? $this->request->supplierInfo() : [];
|
|
|
$this->auth = $this->supplierInfo['rule'] ?? [];
|
|
|
- if (!$this->supplierInfo->status || !$this->supplierInfo->is_show) {
|
|
|
+ if ($this->supplierId && !$this->supplierInfo['status'] || !$this->supplierInfo['is_show']) {
|
|
|
throw new AdminException('您已被禁止登录!');
|
|
|
}
|
|
|
- if ($this->supplierInfo->valid_time > 0 && $this->supplierInfo->valid_time < time()) {
|
|
|
+ if ($this->supplierId && $this->supplierInfo['valid_time'] > 0 && $this->supplierInfo['valid_time'] < time()) {
|
|
|
throw new AdminException('供应商授权已到期,请联系客服!');
|
|
|
}
|
|
|
}
|