// 按节点查询Type public ActionResult ShowTypeByMac(string mac) { ADevice device = new ADevice(); var rs = device.returnType(mac); if (rs != null) { return(Content(JsonConvert.SerializeObject(new { code = 1, des = "查询成功", data = rs, }))); } else { return(Content(JsonConvert.SerializeObject(new { code = 0, des = "查询失败", }))); } }