DefaultController.php 779 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace addons\WechatVideoShop\backend\controllers;
  3. use addons\WechatVideoShop\common\models\WechatVideoShop;
  4. use addons\WechatVideoShop\common\service\SettingService;
  5. use common\enums\StatusEnum;
  6. use Yii;
  7. use common\controllers\AddonsController;
  8. /**
  9. * 默认控制器
  10. *
  11. * Class DefaultController
  12. * @package addons\WechatVideoShop\backend\controllers
  13. */
  14. class DefaultController extends BaseController
  15. {
  16. public $enableCsrfValidation = false;
  17. /**
  18. * 首页
  19. *
  20. * @return string
  21. */
  22. public function actionIndex()
  23. {
  24. $cnt = WechatVideoShop::find()->where(['mall_id' => $this->mall_id])
  25. ->andWhere(['status' => StatusEnum::ENABLED])
  26. ->count();
  27. return $this->render('index', ['cnt' => $cnt]);
  28. }
  29. }