Merge branch 'master' of https://phabricator.internetapi.cn/source/bdcontract-web-client into proj/nanning
# Conflicts: # BaaSClient.html # bdwareclient.html
This commit is contained in:
		
						commit
						cdce5f0a9d
					
				
							
								
								
									
										0
									
								
								img/logo-1.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										0
									
								
								img/logo-1.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							| Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB | 
| @ -313,6 +313,7 @@ function displayOutput(obj) { | ||||
| 
 | ||||
| function initWSocket() { | ||||
|     let host = $("#urlInput")[0].value; | ||||
|     document.title = `数瑞浏览器(${host})` | ||||
|     if (!host.startsWith("ws")) { | ||||
|         if (location.href.startsWith("https")) { | ||||
|             host = "wss://" + host; | ||||
| @ -375,6 +376,7 @@ function changeApp() { | ||||
|         return; | ||||
|     } | ||||
|     console.log(global.currentContract); | ||||
|     document.title = `数瑞浏览器(${global.currentContract.name} - ${$("#urlInput")[0].value})` | ||||
|     changeAppInternal(needRender(global.currentContract)); | ||||
| } | ||||
| 
 | ||||
| @ -483,21 +485,21 @@ function triggerExecuteCurrentContract() { | ||||
|     console.log(funNode); | ||||
|     const argInput = $("#argInput"); | ||||
|     var contract = global.currentContract; | ||||
|     var gas = $("#gasInput")[0].value/1; | ||||
|     executeContractWithGas(contract.id, funNode.functionName, argInput[0].value,gas, | ||||
|     var gas = $("#gasInput")[0].value / 1; | ||||
|     executeContractWithGas(contract.id, funNode.functionName, argInput[0].value, gas, | ||||
|         fillResultInternal, executeContractAsDebug.checked); | ||||
|     var iHtml = "/SCIDE/SCManager?action=executeContract&contractID=" | ||||
|         + global.currentContract.name + "&operation=" | ||||
|         + funNode.functionName + "&arg=" + argInput[0].value; | ||||
| 
 | ||||
|     var toSign = global.currentContract.name + "|" + funNode.functionName + "|" | ||||
|         + argInput[0].value ; | ||||
|     if (gas>0){ | ||||
|       toSign+="|"+gas; | ||||
|       iHtml+="&gasLimit="+gas; | ||||
|         + argInput[0].value; | ||||
|     if (gas > 0) { | ||||
|         toSign += "|" + gas; | ||||
|         iHtml += "&gasLimit=" + gas; | ||||
|     } | ||||
|     iHtml+= "&pubkey=" + global.sm2Key.publicKey + "&signature="; | ||||
|     toSign+= "|" + global.sm2Key.publicKey; | ||||
|     iHtml += "&pubkey=" + global.sm2Key.publicKey + "&signature="; | ||||
|     toSign += "|" + global.sm2Key.publicKey; | ||||
|     const signature = sm2.doSignature(toSign, global.sm2Key.privateKey, {hash: true, der: true}); | ||||
|     let urlPre = $("#urlInput")[0].value; | ||||
|     if (urlPre.startsWith("ws")) { | ||||
| @ -537,8 +539,8 @@ function fillResultInternal(result, data) { | ||||
|     global.responseCollector[data.responseID].push(data); | ||||
|     $("#statusSpan")[0].innerHTML = result.status; | ||||
|     $("#timeSpan")[0].innerHTML = "调用耗时:" + data.executeTime + "(ms)"; | ||||
|     if (data.executionGas !=undefined && data.executionGas>0) | ||||
|      $("#timeSpan")[0].innerHTML+="<br> "+data.executionGas+"(gas)"; | ||||
|     if (data.executionGas != undefined && data.executionGas > 0) | ||||
|         $("#timeSpan")[0].innerHTML += "<br> " + data.executionGas + "(gas)"; | ||||
|     $("#timeSpan")[0].innerHTML | ||||
|     if (result.result instanceof Object) { | ||||
|         $("#responseArea")[0].value = JSON.stringify(result.result); | ||||
| @ -833,6 +835,9 @@ function getRequestParameters() { | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| function | ||||
| 
 | ||||
| 
 | ||||
| function changeRender() { | ||||
|     if (global.urlparam["noRender"] === "true") { | ||||
|         global.urlparam["noRender"] = undefined; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user