contract-java-example/front/html/index.html
2023-03-18 21:58:11 +08:00

29 lines
967 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<script src="./cryptico.iife.js"></script>
<script src="./sm2.js"></script>
<script src="./axios-fetch.iife.js"></script>
<script src="./axios.min.js"></script>
<script src="./bdcontract-sdk.iife.js"></script>
<script>
async function run(){
const url = 'http://127.0.0.1:21030/SCIDE';
var sm2Key = {"publicKey": "04180354fdb6507f8ab98ccfbe165ce11da74ba733f81af86ad6d32216b32cf4f797c559d50ceeefbf4c760c3483840471c67471b90acdffb388cd7d496d9a1610",
"privateKey": "1d4196947f59532db6f8f4055e58474a48db8f30b476ae3edc66406464521b3b"};
const client = new bdcontract.HttpClient(url, sm2Key);
const data = await client.executeContract(
'ContractExample',
'callHello',
'abc');
alert(data.data);
};
run();
</script>
<title>Example</title>
</head>
<body></body>
</html>