|
|
@@ -23,13 +23,13 @@ class ConsoleController extends BaseController
|
|
|
{
|
|
|
//试用期到期时间
|
|
|
$notice = [];
|
|
|
- $sj = $this->sj->attributes;
|
|
|
+ $sj = isset($this->sj) && !empty($this->sj) ? $this->sj->attributes : [];
|
|
|
$deadline = $sj['deadline'] ?? 0;
|
|
|
$current = time();
|
|
|
$remain = strtotime($deadline) - $current;
|
|
|
if ($remain <= 1296000) {
|
|
|
//是否有充值免费续期权限
|
|
|
- $hasRight = SjClass::hasRechargeRenewRight($this->sj->attributes, $this->sjExtend);
|
|
|
+ $hasRight = SjClass::hasRechargeRenewRight($sj, $this->sjExtend);
|
|
|
if ($hasRight) {
|
|
|
$title = '您的试用期已到,点击免费续期1年';
|
|
|
if ($remain > 0) {
|
|
|
@@ -96,7 +96,7 @@ class ConsoleController extends BaseController
|
|
|
public function actionInit()
|
|
|
{
|
|
|
$dict = dict::get();
|
|
|
- $shop = $this->shop->attributes;
|
|
|
+ $shop = isset($this->shop) && !empty($this->shop) ? $this->shop->attributes : [];
|
|
|
util::success(['dict' => $dict, 'shop' => $shop]);
|
|
|
}
|
|
|
|