Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
JDChain
Explorer
提交
32374a5b
E
Explorer
项目概览
JDChain
/
Explorer
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
Explorer
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
32374a5b
编写于
6月 20, 2019
作者:
W
wangzhe18
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'wz' of
http://git.jd.com/jd-blockchain/explorer
into develop
上级
e22553c4
4bd3696c
变更
9
展开全部
隐藏空白更改
内联
并排
Showing
9 changed file
with
44 addition
and
16 deletion
+44
-16
dist/web/20190101/account.chunk.js
dist/web/20190101/account.chunk.js
+2
-2
dist/web/20190101/app.js
dist/web/20190101/app.js
+1
-1
dist/web/20190101/block.chunk.js
dist/web/20190101/block.chunk.js
+2
-2
dist/web/20190101/contract.chunk.js
dist/web/20190101/contract.chunk.js
+1
-1
dist/web/20190101/search.chunk.js
dist/web/20190101/search.chunk.js
+2
-2
dist/web/20190101/user.chunk.js
dist/web/20190101/user.chunk.js
+1
-1
src/utils/util.js
src/utils/util.js
+13
-5
src/web/components/transactionInfo/transactionInfo.js
src/web/components/transactionInfo/transactionInfo.js
+21
-1
src/web/components/transactionInfo/transactionInfo.t.html
src/web/components/transactionInfo/transactionInfo.t.html
+1
-1
未找到文件。
dist/web/20190101/account.chunk.js
浏览文件 @
32374a5b
此差异已折叠。
点击以展开。
dist/web/20190101/app.js
浏览文件 @
32374a5b
此差异已折叠。
点击以展开。
dist/web/20190101/block.chunk.js
浏览文件 @
32374a5b
此差异已折叠。
点击以展开。
dist/web/20190101/contract.chunk.js
浏览文件 @
32374a5b
此差异已折叠。
点击以展开。
dist/web/20190101/search.chunk.js
浏览文件 @
32374a5b
此差异已折叠。
点击以展开。
dist/web/20190101/user.chunk.js
浏览文件 @
32374a5b
此差异已折叠。
点击以展开。
src/utils/util.js
浏览文件 @
32374a5b
...
...
@@ -129,10 +129,10 @@ export function stringToBase58(value) {
bytes
[
0
]
+=
ALPHABET_MAP
[
c
];
let
carry
=
0
;
for
(
j
=
0
;
j
<
bytes
.
length
;
++
j
)
{
bytes
[
j
]
+=
carry
;
carry
=
bytes
[
j
]
>>
8
;
// 0xff --> 11111111
bytes
[
j
]
&=
0xff
;
bytes
[
j
]
+=
carry
;
carry
=
bytes
[
j
]
>>
8
;
// 0xff --> 11111111
bytes
[
j
]
&=
0xff
;
}
while
(
carry
)
{
bytes
.
push
(
carry
&
0xff
);
...
...
@@ -201,7 +201,15 @@ export function Bytes2Str(arr)
return
str
;
}
export
function
Int32ToStr
(
bytes
)
{
let
value
;
for
(
var
i
=
0
;
i
<
4
;
i
++
)
{
value
=
value
|
((
bytes
[
i
]
&
0xFF
)
<<
(
8
*
(
3
-
i
)));
}
return
value
;
}
export
function
consensusProtocolFormat
(
flag
)
{
var
str
=
""
;
...
...
src/web/components/transactionInfo/transactionInfo.js
浏览文件 @
32374a5b
...
...
@@ -6,7 +6,7 @@ import nj from 'nornj';
import
{
registerTmpl
}
from
'
nornj-react
'
;
import
{
autobind
}
from
'
core-decorators
'
;
import
{
Drawer
}
from
'
antd
'
;
import
{
tranBase58
,
stringToBase58
,
byteToLong
,
byteToString
,
Bytes2Str
}
from
'
../../../utils/util
'
;
import
{
tranBase58
,
stringToBase58
,
byteToLong
,
byteToString
,
Bytes2Str
,
Int32ToStr
}
from
'
../../../utils/util
'
;
import
{
BlockCollapse
,
BlockCollapseSmall
,
BlockCollapsePanel
}
from
'
../../components/blockCollapse
'
;
import
styles
from
'
./transactionInfo.m.scss
'
;
import
tmpls
from
'
./transactionInfo.t.html
'
;
...
...
@@ -25,6 +25,7 @@ export default class TransactionInfo extends Component {
formatData
(
type
,
data
){
data
=
data
&&
data
.
value
&&
data
.
value
||
''
;
let
result
=
''
;
switch
(
type
.
toUpperCase
())
{
case
'
INT64
'
:
...
...
@@ -43,6 +44,10 @@ export default class TransactionInfo extends Component {
let
hex
=
stringToBase58
(
data
);
result
=
Bytes2Str
(
hex
);
break
;
case
'
INT32
'
:
let
int32
=
stringToBase58
(
data
);
result
=
Int32ToStr
(
int32
);
break
;
default
:
result
=
data
;
break
;
...
...
@@ -50,6 +55,21 @@ export default class TransactionInfo extends Component {
return
result
;
}
argsToList
(
data
){
let
json
=
[];
if
(
data
&&
data
.
values
&&
data
.
values
.
length
>
0
){
for
(
let
i
=
0
;
i
<
data
.
values
.
length
;
i
++
)
{
json
.
push
({
type
:
data
.
values
[
i
].
type
,
value
:
this
.
formatData
(
data
.
values
[
i
].
type
,
data
.
values
[
i
].
value
),
});
}
var
str
=
JSON
.
stringify
(
json
);
return
str
;
}
}
render
()
{
const
{
data
,
visible
}
=
this
.
props
;
return
tmpls
.
container
({
...
...
src/web/components/transactionInfo/transactionInfo.t.html
浏览文件 @
32374a5b
...
...
@@ -80,7 +80,7 @@
<table
style=
"line-height:41px;"
>
<tr>
<td>
合约参数:
</td>
<td>
{{
this.args
}}
</td>
<td>
{{
argsToList(this.args)
}}
</td>
</tr>
<tr>
<td>
合约地址:
</td>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录