1.功能按钮事件参数 queryBody_ids:{data.ids} 前端会生成下划线后面的编码ids,并替换{data.ids} 2.后端建参数model 后端参数可以只包含前端返回的部分参数 [DataContract] public class UrlBodyData { ///
1.功能按钮事件参数
queryBody_ids:{data.ids}
前端会生成下划线后面的编码ids,并替换{data.ids}
2.后端建参数model
后端参数可以只包含前端返回的部分参数
[DataContract] public class UrlBodyData { /// <summary> /// 数据ids /// </summary> [DataMember(Name ="ids")] public string Ids { get; set; } /// <summary> /// url链接 /// </summary> [DataMember(Name = "ajaxUrl")] public string AjaxUrl { get; set; } /// <summary> /// 请求方式 /// </summary> [DataMember(Name = "method")] public string Method { get; set; } }
3.接口
[OperationContract(Action = "UseCaseDetailLogicalDelete")] [DynamicRest(HttpVerb = "POST", UrlTemplate = "UseCaseDetailLogicalDelete", InterceptAction = DynamicScriptAction.None, Description = "逻辑删除用例明细,多个id英文逗号分隔")] OperationResult UseCaseDetailLogicalDelete(UrlBodyData data);
4.实现
public OperationResult UseCaseDetailLogicalDelete(UrlBodyData data) { //code... }