标签:try reload org one turn list net res value
js
function upOne() { var check_val = []; var cId = document.getElementById("updateClassIdOne").value; console.log(cId); var UpdateClass = { id: cId, userId: $("#OneUpdate").val(), organId: cId, title: "学生" } check_val.push(UpdateClass); console.log(); $.ajax({ url: "/School/updateUserClass", data: { userModel: check_val }, type: "Post", dataType: ‘json‘,//必须 success: function (r) { alert(r.result.msg); location.reload(); }, }); }
后台
public async Task<JsonResult> updateUserClass(List<UserOrganEditDto> userModel) { try { await _organUserAppService.BatchUpdateUserOrgan(userModel); return Json(new { success = true, msg = "分班成功" }); } catch (Exception ex) { return Json(new { success = false, msg = "分班失败" }); } }
标签:try reload org one turn list net res value
原文地址:https://www.cnblogs.com/wangyinlon/p/12399096.html