Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
JDChain
Explorer
提交
0e05e229
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,发现更多精彩内容 >>
提交
0e05e229
编写于
10月 25, 2018
作者:
J
jinlong12
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
历史页面接口修改
上级
92042d44
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
27 addition
and
22 deletion
+27
-22
server/app.js
server/app.js
+5
-5
server/routes/ledgers.js
server/routes/ledgers.js
+5
-5
src/components/header/header.js
src/components/header/header.js
+4
-0
src/pages/history/blockHistory.js
src/pages/history/blockHistory.js
+1
-0
src/pages/history/container.js
src/pages/history/container.js
+3
-3
src/stores/ContractStore.js
src/stores/ContractStore.js
+1
-1
src/stores/HistoryStore.js
src/stores/HistoryStore.js
+8
-8
未找到文件。
server/app.js
浏览文件 @
0e05e229
...
...
@@ -40,11 +40,11 @@ const user = require('./routes/user');
app
.
use
(
'
/user
'
,
user
);
const
history
=
require
(
'
./routes/history
'
);
app
.
use
(
'
/history
'
,
history
);
app
.
use
(
'
/block
List
'
,
history
);
app
.
use
(
'
/block
Height
'
,
history
);
app
.
use
(
'
/block
Hash
'
,
history
);
app
.
use
(
'
/t
ransactionHash
'
,
history
);
app
.
use
(
'
/t
ransactionLis
t
'
,
history
);
app
.
use
(
'
/block
s
'
,
history
);
app
.
use
(
'
/block
/height/*
'
,
history
);
app
.
use
(
'
/block
/hash/*
'
,
history
);
app
.
use
(
'
/t
x/*
'
,
history
);
app
.
use
(
'
/t
xs/heigh
t
'
,
history
);
const
contract
=
require
(
'
./routes/contract
'
);
app
.
use
(
'
/contract
'
,
contract
);
const
ledgers
=
require
(
'
./routes/ledgers
'
);
...
...
server/routes/ledgers.js
浏览文件 @
0e05e229
...
...
@@ -827,7 +827,7 @@ router.get('/ledger/participants', function(req, res) {
});
});
// 区块列表
router
.
get
(
'
/block
List
'
,
function
(
req
,
res
)
{
router
.
get
(
'
/block
s
'
,
function
(
req
,
res
)
{
res
.
type
(
'
json
'
);
let
params
=
req
.
body
,
ret
=
{};
...
...
@@ -1093,7 +1093,7 @@ router.get('/blockList', function(req, res) {
});
});
// 区块高度
router
.
get
(
'
/block
HeightData
'
,
function
(
req
,
res
)
{
router
.
get
(
'
/block
/height/*
'
,
function
(
req
,
res
)
{
res
.
type
(
'
json
'
);
let
params
=
req
.
body
,
ret
=
{};
...
...
@@ -1194,7 +1194,7 @@ router.get('/blockHeightData', function(req, res) {
});
// 区块哈希
router
.
get
(
'
/block
Hash
'
,
function
(
req
,
res
)
{
router
.
get
(
'
/block
/hash/*
'
,
function
(
req
,
res
)
{
res
.
type
(
'
json
'
);
let
params
=
req
.
body
,
ret
=
{};
...
...
@@ -1295,7 +1295,7 @@ router.get('/blockHash', function(req, res) {
});
// 交易列表
router
.
get
(
'
/t
ransactionLis
t
'
,
function
(
req
,
res
)
{
router
.
get
(
'
/t
xs/heigh
t
'
,
function
(
req
,
res
)
{
res
.
type
(
'
json
'
);
let
params
=
req
.
body
,
ret
=
{};
...
...
@@ -1742,7 +1742,7 @@ router.get('/transactionList', function(req, res) {
});
// 交易哈希
router
.
get
(
'
/t
ransactionHash
'
,
function
(
req
,
res
)
{
router
.
get
(
'
/t
x/*
'
,
function
(
req
,
res
)
{
res
.
type
(
'
json
'
);
let
params
=
req
.
body
,
ret
=
{};
...
...
src/components/header/header.js
浏览文件 @
0e05e229
...
...
@@ -61,6 +61,10 @@ export default class Header extends Component {
this
.
defaultValue
=
this
.
optionData
[
e
].
value
?
this
.
optionData
[
e
].
value
:
''
;
}
getChildContext
()
{
return
{
color
:
'
red
'
};
}
@
autobind
onSelect
({
item
,
key
,
selectedKeys
})
{
location
.
href
=
'
/pages/page
'
+
key
+
'
.html
'
;
...
...
src/pages/history/blockHistory.js
浏览文件 @
0e05e229
...
...
@@ -20,6 +20,7 @@ export default class BlockHistory extends Component {
}
handleChangeHeight
=
(
e
)
=>
{
console
.
log
(
e
);
const
{
store
}
=
this
.
props
;
Promise
.
all
([
store
.
getBlockHeightData
()
...
...
src/pages/history/container.js
浏览文件 @
0e05e229
...
...
@@ -67,7 +67,7 @@ class DataTable extends Component {
if
(
this
.
inputValue
!=
''
)
{
if
(
this
.
radioValue
==
'
blockHeight
'
)
{
Promise
.
all
([
store
.
getBlockHeightData
()
store
.
getBlockHeightData
(
this
.
inputValue
)
]).
then
(
).
catch
((
err
)
=>
{
...
...
@@ -75,7 +75,7 @@ class DataTable extends Component {
});
}
else
if
(
this
.
radioValue
==
'
blockHash
'
)
{
Promise
.
all
([
store
.
getBlockHashData
()
store
.
getBlockHashData
(
this
.
inputValue
)
]).
then
(
).
catch
((
err
)
=>
{
...
...
@@ -83,7 +83,7 @@ class DataTable extends Component {
});
}
else
{
Promise
.
all
([
store
.
getTransactionHashData
()
store
.
getTransactionHashData
(
this
.
inputValue
)
]).
then
(
).
catch
((
err
)
=>
{
...
...
src/stores/ContractStore.js
浏览文件 @
0e05e229
...
...
@@ -17,7 +17,7 @@ export default class ContractStore {
@
autobind
@
action
getContractData
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
,
this
);
fetchData
(
`
${
G_WEB_DOMAIN
}
/ledgers/contract/
${
e
}
`
,
this
.
setContractData
,
''
,
{
...
...
src/stores/HistoryStore.js
浏览文件 @
0e05e229
...
...
@@ -169,7 +169,7 @@ export default class HistoryStore {
@
autobind
@
action
getBlockHistoryData
()
{
fetchData
(
`
${
G_WEB_DOMAIN
}
/ledgers/block
List
`
,
fetchData
(
`
${
G_WEB_DOMAIN
}
/ledgers/block
s
`
,
this
.
setBlockHistoryData
,
''
,
{
method
:
'
get
'
,}
).
catch
(
error
=>
{
...
...
@@ -188,8 +188,8 @@ export default class HistoryStore {
@
autobind
@
action
getBlockHeightData
()
{
fetchData
(
`
${
G_WEB_DOMAIN
}
/ledgers/block
HeightData
`
,
getBlockHeightData
(
e
)
{
fetchData
(
`
${
G_WEB_DOMAIN
}
/ledgers/block
/height/
${
e
}
`
,
this
.
setBlockHeightData
,
''
,
{
method
:
'
get
'
,}
).
catch
(
error
=>
{
...
...
@@ -209,8 +209,8 @@ export default class HistoryStore {
@
autobind
@
action
getBlockHashData
()
{
fetchData
(
`
${
G_WEB_DOMAIN
}
/ledgers/block
Hash
`
,
getBlockHashData
(
e
)
{
fetchData
(
`
${
G_WEB_DOMAIN
}
/ledgers/block
/hash/
${
e
}
`
,
this
.
setBlockHashData
,
''
,
{
method
:
'
get
'
,}
).
catch
(
error
=>
{
...
...
@@ -230,8 +230,8 @@ export default class HistoryStore {
@
autobind
@
action
getTransactionHashData
()
{
fetchData
(
`
${
G_WEB_DOMAIN
}
/ledgers/t
ransactionHash
`
,
getTransactionHashData
(
e
)
{
fetchData
(
`
${
G_WEB_DOMAIN
}
/ledgers/t
x/
${
e
}
`
,
this
.
setTransactionHashData
,
''
,
{
method
:
'
get
'
,}
).
catch
(
error
=>
{
...
...
@@ -265,7 +265,7 @@ export default class HistoryStore {
@
autobind
@
action
getTransactionList
()
{
fetchData
(
`
${
G_WEB_DOMAIN
}
/ledgers/t
ransactionLis
t`
,
fetchData
(
`
${
G_WEB_DOMAIN
}
/ledgers/t
xs/heigh
t`
,
this
.
setTransactionList
,
''
,
{
method
:
'
get
'
,}
).
catch
(
error
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录