From 6f6be77dfe53fd8dcaa18926f73857675523e2cb Mon Sep 17 00:00:00 2001 From: CaiHQ Date: Sun, 26 Jun 2022 17:54:29 +0800 Subject: [PATCH] front: support startMulitipoint with args fix: ContractClient missing arguments error update: @Router arguments format fix: ContractStatusRecorder null exception --- js/codeManage/operManage.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/js/codeManage/operManage.js b/js/codeManage/operManage.js index 9aae93a..b88f619 100644 --- a/js/codeManage/operManage.js +++ b/js/codeManage/operManage.js @@ -134,7 +134,7 @@ var startContractAtSlave = function() { $("#result")[0].innerHTML="正在启动,请稍候"; var request = {}; request.action = "startContractByYPK"; - if (createParam !='') { + if (createParam.value !='') { request.createParam = createParam.value; $("#createParam").css("color",""); if (autoConvertStr.value=='on') { @@ -144,6 +144,8 @@ var startContractAtSlave = function() { }catch(e){ console.log(e); $("#createParam").css("color","red"); + alert("Create Param not JSON Format"); + return; } }else{ } @@ -206,6 +208,22 @@ function startContractUnits(place) { } request.isPrivate = global.ypkIsPrivate; request.sponsorPeerID = global.peerID; //peerID of the node + if (createParam.value !='') { + request.createParam = createParam.value; + $("#createParam").css("color",""); + if (autoConvertStr.value=='on') { + try{ + request.createParam = JSON.parse(request.createParam); + $("#createParam").css("color",""); + }catch(e){ + console.log(e); + $("#createParam").css("color","red"); + alert("Create Param not JSON Format"); + return; + } + }else{ + } + } console.log(request); global.wssocket.send(JSON.stringify(request)); }