public ActionResult GetRoleCode() { //判断是否是管理员 if (HomeBusiness.IsAdmin(LoginUser.UserId)) { return(Json("isadmin", JsonRequestBehavior.AllowGet)); } var list = JurisdictionBusiness.GetAllRoleCodeByUserid(LoginUser); if (list != null) { return(Json(list, JsonRequestBehavior.AllowGet)); } else { return(Json(string.Empty, JsonRequestBehavior.AllowGet)); } }