|
|
@@ -12,6 +12,7 @@ use bizHd\stat\services\StatUserService;
|
|
|
use common\components\dict;
|
|
|
use common\components\httpUtil;
|
|
|
use common\components\util;
|
|
|
+use Yii;
|
|
|
|
|
|
class ConsoleController extends BaseController
|
|
|
{
|
|
|
@@ -85,12 +86,23 @@ class ConsoleController extends BaseController
|
|
|
];
|
|
|
}
|
|
|
|
|
|
+ //已经关闭手册或注册满60天不显示
|
|
|
+ $cacheKey = 'close_book_' . $this->shopAdminId;
|
|
|
+ $hasClose = Yii::$app->redis->executeCommand('GET', [$cacheKey]);
|
|
|
+ $showBook = 1;
|
|
|
+ $shopAddTime = $this->shop->addTime;
|
|
|
+ $shopTime = strtotime($shopAddTime) + 60 * 24 * 60 * 60;
|
|
|
+ if (!empty($hasClose) || $shopTime < time()) {
|
|
|
+ $showBook = 0;
|
|
|
+ }
|
|
|
+
|
|
|
util::success([
|
|
|
'asset' => $shopInfo,
|
|
|
'notice' => $notice,
|
|
|
'todayData' => $todayData,
|
|
|
'incomeStat' => $incomeStat,
|
|
|
'menu' => $menu,
|
|
|
+ 'showBook' => $showBook,
|
|
|
]);
|
|
|
}
|
|
|
|