Common.php 959 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2017 https://www.sapixx.com All rights reserved.
  4. * @license Licensed (http://www.apache.org/licenses/LICENSE-2.0).
  5. * @author pillar<ltmn@qq.com>
  6. * 用户公共调用模块
  7. */
  8. namespace app\ais\controller;
  9. use app\common\controller\Manage;
  10. use app\ais\model\MemberUser;
  11. use app\ais\event\City;
  12. class Common extends Manage{
  13. public $mini_program = [];
  14. /**
  15. * 初始化当前应用管理员是不是联盟城市账户
  16. * @return void
  17. */
  18. public function initialize() {
  19. parent::initialize();
  20. $this->view->engine->layout('layout');
  21. $this->mini_program = ['member_miniapp_id' => $this->member_miniapp_id];
  22. }
  23. /**
  24. * 查看城市编码
  25. * @param integer $id 用户ID
  26. */
  27. public function cityCode(){
  28. $city = City::read();
  29. if($city){
  30. return enjson(200,'成功',$city);
  31. }
  32. return enjson(0);
  33. }
  34. }