Get the App
SLTechnology News&Howtos  ›  Development  › 

How to pass parameters to the background in the form of list in javascript

Shulou Source: shulou.com Published: 2022-06-03 11:53:53 11月15日 Update

This article introduces how to transmit parameters to the background by list in javascript. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.

Pass the parameter @ ApiOperation to the background as a list (value = "batch update Onsiteptw2aqzyd details", notes = "update the object based on its id And update the Onsiteptw2aqzyd details in the collection according to the Onsiteptw2aqzyd information passed in the collection ") @ ApiImplicitParams ({@ ApiImplicitParam (name =" pojoList ", value =" updated object ", required = true, dataType =" List ")}) @ PutMapping (" / v1/onsiteptw2aqzyd/batchupdate ") public Response updateOnsiteptw2aqzyd (@ RequestBody List pojoList) {.} var fields2obj = [] For (I = 0; I < chacks2Val.length; var create_by +) {console.debug (chacks2Val [I]); var fields2 = {}; var aqzydtype = chacks2Val [I]; var isneedaqzyd = 'yes'; var create_by =''; fields2 ["id"] = chacks2Id [I]; fields2 ["aqzydtype"] = aqzydtype; fields2 ["isneedaqzyd"] = isneedaqzyd Fields2 ["onsiteptw"] = obj ["onsiteptw"]; fields2obj.push (fields2);} pojoList2 = JSON.stringify (fields2obj) $.ajax ({url: url2, data:pojoList2, type: "put", dataType: "json", headers: {Authorization: authtoken,}, contentType: "application/json", success: function (result) {console.debug ('success:'+JSON.stringify (result)) Mui.toast ("OK");}, error:function (e) {console.debug ('error:'+JSON.stringify (e));}}). This is all about how to transmit parameters to the backend in a list in javascript. I hope the above content can be helpful to you and learn more. If you think the article is good, you can share it for more people to see.

Tags: Updates background methods information objects content more help good interest guys buddies articles knowledge articles references Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Shulou Technology Huawei macOS Apple