diff --git a/src/App.vue b/src/App.vue index b6c17ed..9baabdb 100644 --- a/src/App.vue +++ b/src/App.vue @@ -54,25 +54,4 @@ a { text-decoration: none; color: #2055ca; } - -// 记录列表的样式 -.records { - margin-top: 30px; - border: 1px solid #ebeff1; - - .head { - display: flex; - justify-content: space-between; - align-items: center; - height: 80px; - padding: 0 32px; - border-bottom: 1px solid #ececec; - background: #FFFFFF; - - h2 { - font-size: 16px; - font-weight: 500; - } - } -} diff --git a/src/components/Pagination.vue b/src/components/Pagination.vue index e035723..afb6cf6 100644 --- a/src/components/Pagination.vue +++ b/src/components/Pagination.vue @@ -1,11 +1,12 @@ - diff --git a/src/store/index.ts b/src/store/index.ts index 7cdc1f3..654dae9 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -45,6 +45,9 @@ export default createStore({ }, maxHeight: (state: State): number => { return state.maxHeight + }, + symbol: (): string => { + return process.env.VUE_APP_MAIN_COIN_SYMBOL as string } }, mutations: { diff --git a/src/utils/filters.ts b/src/utils/filters.ts index 5748ac8..5bcae81 100644 --- a/src/utils/filters.ts +++ b/src/utils/filters.ts @@ -1,4 +1,5 @@ import { AssetType } from '@/types/block' +import store from '@/store' export const filterHash = (str: string, num?: number): string => { const length = num || 16 @@ -10,6 +11,6 @@ export const parseSymbol = (assets?: AssetType[]): string => { if (assets) { return assets[0].symbol } else { - return '' + return store.getters.symbol } } diff --git a/src/views/Address/index.vue b/src/views/Address/index.vue index f2d228e..b9b8786 100644 --- a/src/views/Address/index.vue +++ b/src/views/Address/index.vue @@ -2,53 +2,87 @@
- 地址 {{ balance.addr }} + 地址 {{ address }}
- 地址 {{ balance.balance }} + 余额 {{ balance.balance.toFixed(2) }} {{ store.getters.symbol }}
- 地址 {{ balance.currency }} + 总接收 {{ balance.reciver.toFixed(2) }} {{ store.getters.symbol }}
- 地址 {{ balance.frozen }} + 总发送 {{ sended.toFixed(2) }} {{ store.getters.symbol }} +
+
+ 数据量 {{ balance.txCount }} +
+
+ 冻结 {{ frozen.toFixed(2) }}
- + + + + + - + - + + + + + + - - - - + + + + +
@@ -57,44 +91,75 @@ diff --git a/src/views/Block/detail.vue b/src/views/Block/detail.vue index 9fa940f..9ab4496 100644 --- a/src/views/Block/detail.vue +++ b/src/views/Block/detail.vue @@ -1,6 +1,5 @@ - + diff --git a/src/views/Home/index.vue b/src/views/Home/index.vue index 2903dad..d05460a 100644 --- a/src/views/Home/index.vue +++ b/src/views/Home/index.vue @@ -71,7 +71,7 @@ interval.value = setInterval(() => { const getLastHeader = () => { block.getLastHeader().then(res => { - if (maxHeight.value < res.result.height) { + if (maxHeight.value !== res.result.height) { store.dispatch('setMaxHeight', res.result.height) getBlockList() } else { diff --git a/src/views/Trade/index.vue b/src/views/Trade/index.vue index 86073d0..f39fb36 100644 --- a/src/views/Trade/index.vue +++ b/src/views/Trade/index.vue @@ -2,36 +2,29 @@
- - - + + + - - - - - + + + + + +