public function change_micro_fansAction() { $conn = $this->get('we_data_access'); $conn_im = $this->get('we_data_access_im'); $userinfo = $this->get('security.context')->getToken()->getUser(); $logger = $this->get("logger"); $request = $this->getRequest(); $login_account = $userinfo->getUsername(); $MicroAccountMgr = new MicroAccountMgr($conn, $conn_im, $userinfo, $logger, $this->container); $micro_number = $request->get("micro_number"); $obj = $request->get("obj"); $obj_type = $request->get("obj_type"); $array["success"] = 0; $array["login_account"] = array(); switch ($obj_type) { case "friend": $dataexec = $MicroAccountMgr->micro_fans_friend($micro_number, $obj); $array["success"] = $dataexec["success"]; $array["login_account"] = $dataexec["login_account"]; break; case "group": $dataexec = $MicroAccountMgr->micro_fans_group($micro_number, $obj); $array["success"] = $dataexec["success"]; $array["login_account"] = $dataexec["login_account"]; break; case "circle": $dataexec = $MicroAccountMgr->micro_fans_circle($micro_number, $obj); $array["success"] = $dataexec["success"]; $array["login_account"] = $dataexec["login_account"]; break; case "enterprise": $dataexec = $MicroAccountMgr->micro_fans_enterprise($micro_number, $obj); $array["success"] = $dataexec["success"]; $array["login_account"] = $dataexec["login_account"]; break; default: $array["success"] = $MicroAccountMgr->micro_fans_attention($micro_number, $login_account); break; } $returnstring = "{success:" . $array["success"] . ",login_account:'" . json_encode($array["login_account"]) . "'}"; return $this->res($returnstring, 'json'); }