Esempio n. 1
0
 /**
  * (void) actionTree : 树
  * @param string $id
  * @param $user_id 用户ID
  */
 public function actionTree($id = '@', $user_id)
 {
     $model = new MapUnit();
     if ($id == '#') {
         $id = '@';
     }
     $data = $model->getChildren($id, $user_id);
     Yii::$app->response->format = Response::FORMAT_JSON;
     echo json_encode($data);
 }