RegionController.php 942 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace addons\WechatVideoShop\backend\controllers;
  3. use addons\WechatVideoShop\common\models\WechatVideoShopRegion;
  4. class RegionController extends BaseController
  5. {
  6. public $enableCsrfValidation = false;
  7. public function actionDiff()
  8. {
  9. if (\Yii::$app->request->isAjax) {
  10. if (\Yii::$app->request->isPost) {
  11. }
  12. if (\Yii::$app->request->isGet) {
  13. $regions = WechatVideoShopRegion::lists([
  14. 'where' => [
  15. ['local_id' => 0],
  16. ['<', 'level', 4],
  17. ],
  18. 'order' => 'id asc'
  19. ]);
  20. // 本地地区
  21. return $this->success('获取成功', [
  22. 'list' => $regions,
  23. 'local_list' => []
  24. ]);
  25. }
  26. }
  27. return $this->render('diff');
  28. }
  29. }