<?php
/**
 * @copyright   Copyright (c) 2017 https://www.sapixx.com All rights reserved.
 * @license     Licensed (http://www.apache.org/licenses/LICENSE-2.0).
 * @author      pillar<ltmn@qq.com>
 * 用户公共调用模块
 */
namespace app\ais\controller;
use app\common\controller\Manage;
use app\ais\model\MemberUser;
use app\ais\event\City;
class Common extends Manage{

    public $mini_program   = []; 

    /**
     * 初始化当前应用管理员是不是联盟城市账户
     * @return void
     */
    public function initialize() {
        parent::initialize();
        $this->view->engine->layout('layout');
        $this->mini_program = ['member_miniapp_id' => $this->member_miniapp_id];
    }

   /**
     * 查看城市编码
     * @param integer $id 用户ID
     */
    public function cityCode(){
        $city = City::read();
        if($city){
            return enjson(200,'成功',$city);
        }
        return enjson(0);
    }
}