You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
828 B

  1. <?php
  2. namespace api\controllers;
  3. use antgoods\goods\models\ars\Goods;
  4. use yii\filters\auth\HttpBearerAuth;
  5. use yii\helpers\ArrayHelper;
  6. use yii\rest\Controller;
  7. /**
  8. * @author iron
  9. * @email weiriron@gmail.com
  10. */
  11. class SiteController extends Controller
  12. {
  13. public function behaviors()
  14. {
  15. return ArrayHelper::merge(parent::behaviors(), [
  16. 'authenticatior' => [
  17. 'class' => HttpBearerAuth::className(),
  18. 'except' => [],
  19. ]
  20. ]);
  21. }
  22. public function actions()
  23. {
  24. return [
  25. 'error' => [
  26. 'class' => 'yii\web\ErrorAction',
  27. ],
  28. ];
  29. }
  30. public function actionIndex()
  31. {
  32. //TODO 首页信息
  33. \Yii::$app->visitor->DailyActive();
  34. return '首页所有数据';
  35. }
  36. }