jquery layui 传递json格式到后台
jQuery 方式:
postdata.push({ "RoleId": Id, "FuncId": _funcId, "FuncCode": funccode, "FuncType": $(this).val(), "DeptIds":$(this).val() !== 2 && $(this).val() !=="2"?0:$("input[name=modeIds_" + _funcId + "]").val(), "ModeId": modeId }); $.post('/System/Role/AllotFuncPermssion', { rolePermissions: postdata}, function (res) { layer.msg("操作成功!"); });