Compare commits

...

12 Commits

Author SHA1 Message Date
CaiHQ
222b254f07 fix duplicate import pubkey 2022-12-13 10:38:24 +08:00
CaiHQ
949572c5c3 optimize: use jquery 2.1.4.min
refactor: DOA Contract
update: use doip sdk 1.0.2
2021-12-22 22:07:51 +08:00
CaiHQ
99cb28eb95 fix typo 2021-11-02 17:19:35 +08:00
839972f77a change router 2021-09-07 10:30:48 +08:00
Frank.R.Wu
62fa349507 feat: change title
change title when changing applications
2021-08-09 21:34:06 +08:00
Frank.R.Wu
d0dc3f4e0b feat: change title
change title when changing nodes or applications
2021-08-09 21:08:23 +08:00
root
fe13a53e19 restore web-client 2021-07-26 16:48:22 +08:00
root
38e24d67f5 Merge branch 'proj/nanning' 2021-07-26 16:43:10 +08:00
root
3871b35652 feat: nanning ui 2021-07-26 16:38:09 +08:00
root
1797f006a7 feat:bdware ui 2021-07-26 16:33:22 +08:00
root
05ad562f1f feat: nanning ui 2021-07-26 16:23:22 +08:00
root
e973ba53f7 feat: nanning ui 2021-07-24 11:09:14 +08:00
6 changed files with 30 additions and 9228 deletions

View File

@ -2,14 +2,12 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Cache-Control" content="no-cache" />
<title>数瑞客户端</title>
<title>数瑞浏览器</title>
<script src="./js/createWS.js"></script>
<script src="./js/cryptico.js"></script>
<script src="./js/jquery-2.1.4.js"></script>
<script src="./js/bootstrap.min.js"></script>
<script src="./js/commonutil.js"></script>
<link href="./css/common.css" rel="stylesheet">
<link href="./css/bootstrap.min.css" rel="stylesheet">
<script src="./js/vue.js"></script>
@ -24,7 +22,7 @@
<a class="navbar-brand" href="#"> <img alt="Brand"
src="./img/logo-1.png" style="height: 30px">
</a><a class="navbar-brand">数瑞浏览器&nbsp;&nbsp; </a> <input id="urlInput"
type="text" class="form-control" placeholder="输入地址" style="display: none;">
type="text" class="form-control" placeho=lder="输入地址" style="display: none;">
<button class="btn btn-outline-secondary" type="button"
onclick="connectNode()" style="display: none;">GO</button>

View File

@ -2,7 +2,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Cache-Control" content="no-cache"/>
<title>数瑞客户端</title>
<title>数瑞浏览器</title>
<script src="./js/createWS.js"></script>
<script src="./js/cryptico.js"></script>
<script src="./js/jquery-2.1.4.js"></script>

0
img/logo-1.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -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));
}
@ -474,21 +476,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")) {
@ -528,8 +530,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);
@ -824,6 +826,8 @@ function getRequestParameters() {
}
}
function changeRender() {
if (global.urlparam["noRender"] === "true") {
global.urlparam["noRender"] = undefined;
@ -833,4 +837,4 @@ function changeRender() {
switchRenderBtn.innerHTML = "加载界面";
}
changeApp();
}
}

View File

@ -49,9 +49,15 @@ var initVue = function () {
newKey.id = this.sm2KeyList.length;
newKey.title = headerVue.shortName;
newKey.sm2Key = this.sm2KeyStr;
this.sm2KeyList.push(newKey);
var exist = false;
for (var i=0;i<this.sm2KeyList.length;i++){
var iterKey = this.sm2KeyList[i];
if (iterKey.sm2Key==newKey.sm2Key)
exist = true;
}
if (!exist)
this.sm2KeyList.push(newKey);
localStorage.setItem("PrivKeyList", JSON.stringify(this.sm2KeyList));
getSession();
listProjects("priv");
}

9214
js/jquery-2.1.4.js vendored

File diff suppressed because one or more lines are too long