添加 favicon;尝试从后台读出 blockList 到 Chain.vue
This commit is contained in:
@@ -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([
|
||||
]),
|
||||
|
||||
Reference in New Issue
Block a user