添加 favicon;尝试从后台读出 blockList 到 Chain.vue

This commit is contained in:
lulu
2018-10-23 11:48:40 +08:00
parent 8bae1ead24
commit 6a2eaaa175
8 changed files with 33 additions and 17 deletions

View File

@@ -90,6 +90,12 @@ const { mapState, mapGetters, mapActions, mapMutations } = createNamespacedHelpe
export default {
name: 'Chain',
data(){
return {
blockList:[],
}
},
computed: {
...mapState([
'headers',
@@ -102,6 +108,15 @@ export default {
...mapGetters([]),
},
created: async function(){
let result=await axios({
method:'post',
url:location.protocol+'//'+location.hostname+':6842/api/Block/getBlockList',
data: {config:{order:'height DESC'}}
})
this.blockList=result.data||[]
},
methods: {
...mapActions([
]),