|
|
@@ -9,8 +9,6 @@ use bizHd\stat\services\StatOrderService;
|
|
|
use bizHd\stat\services\StatUserService;
|
|
|
use bizHd\stat\services\StatVisitService;
|
|
|
use common\components\dict;
|
|
|
-use common\components\constant;
|
|
|
-use Yii;
|
|
|
use common\components\util;
|
|
|
|
|
|
class ConsoleController extends BaseController
|
|
|
@@ -20,9 +18,22 @@ class ConsoleController extends BaseController
|
|
|
public function actionProfile()
|
|
|
{
|
|
|
$asset = MerchantAssetService::getByMerchantId($this->sjId);
|
|
|
- $notice = [
|
|
|
- ['title' => '您的试用期还有7天,点击免费续期1年 ', 'action' => '详情', 'clickHint' => '请在手机上进行续费', 'url' => 'http://www.test.com', 'page' => 'page/notice/recharge'],
|
|
|
- ];
|
|
|
+
|
|
|
+ //试用期到期时间
|
|
|
+ $notice = [];
|
|
|
+ $sj = $this->sj;
|
|
|
+ $deadline = $sj['deadline'] ?? 0;
|
|
|
+ $current = time();
|
|
|
+ $remain = (strtotime($deadline) - $current);
|
|
|
+ if ($remain <= 1296000) {
|
|
|
+ $title = '您的试用期已到,点击免费续期1年';
|
|
|
+ if ($remain > 0) {
|
|
|
+ $num = ceil($remain / 86400);
|
|
|
+ $title = "您的试用期还有{$num}天,点击免费续期1年";
|
|
|
+ }
|
|
|
+ $notice = array_merge($notice, [['title' => $title, 'action' => '查看', 'page' => '/admin/recharge/renew']]);
|
|
|
+ }
|
|
|
+
|
|
|
//今天访客数
|
|
|
$todayVisit = StatVisitService::getTodayVisitNum($this->sjId);
|
|
|
//今天客户与粉丝数
|