/// <summary> /// 根据Id删除模块 /// </summary> /// <param name="ModuleId"></param> /// <param name="Token"></param> /// <returns></returns> public JObject DelModuleById(string ModuleId, UserInfo UserInfo) { var requests = new List <Object>(); requests.Add(new { method = "DELETE", path = "/mcm/api/module/" + ModuleId }); JArray ret = ComCloud.ajaxRequest(requests, UserInfo.Token); return(ComCloud.callBackData(ret)); }
/// <summary> /// 新增模块 /// </summary> /// <param name="Module"></param> /// <param name="Token"></param> /// <returns></returns> public JObject AddModule(JObject Module, UserInfo UserInfo) { var requests = new List <Object>(); requests.Add(new { method = "POST", path = "/mcm/api/module", body = Module }); JArray ret = ComCloud.ajaxRequest(requests, UserInfo.Token); return(ComCloud.callBackData(ret)); }
/// <summary> /// 修改模块 /// </summary> /// <param name="Module"></param> /// <param name="Token"></param> /// <returns></returns> public JObject EditModuleById(JObject Module, UserInfo UserInfo) { var requests = new List <Object>(); string Spath = "/mcm/api/module/" + Module["id"]; Module.Remove("id"); requests.Add(new { method = "PUT", path = Spath, body = Module }); JArray ret = ComCloud.ajaxRequest(requests, UserInfo.Token); return(ComCloud.callBackData(ret));; }