修改网络相关

This commit is contained in:
chao.li
2019-01-03 03:48:24 +00:00
parent 6944326187
commit becc085215
6 changed files with 33 additions and 32 deletions

View File

@@ -1,4 +1,4 @@
import axios from 'axios'
import axios from 'axios'
export default {
namespaced: true,
@@ -13,10 +13,10 @@ export default {
],
itemList: [
{
height: '1',
timestamp: '2011-11-20',
type: '0',
hash: 'null',
height: 'loading',
timestamp: 'loading',
type: 'loading',
hash: 'loading',
},
],
fetching: false,

View File

@@ -1,4 +1,4 @@
import axios from 'axios'
import axios from 'axios'
export default {
namespaced: true,
@@ -7,17 +7,17 @@ export default {
pageEntity: [5, 10, 25],
headers: [
{ text: 'network.thIndex', value: 'index', align: 'center' },
{ text: 'network.thAddress', value: 'address', align: 'center' },
{ text: 'network.thAccessPoint', value: 'accessPoint', align: 'center' },
{ text: 'network.thOwnerAddress', value: 'ownerAddress', align: 'center' },
{ text: 'network.thStatus', value: 'status', align: 'center' },
{ text: 'network.thPeerOwnerAddress', value: 'peerOwnerAddress', align: 'center' },
],
itemList: [
// {
// index: '',
// address: '',
// status: '',
// peerOwnerAddress: '',
// },
{
index: 'loading',
accessPoint: 'loading',
ownerAddress: 'loading',
status: 'loading',
},
],
fetching: false,
filter: '',
@@ -42,7 +42,8 @@ export default {
actions: {
async updateNetInfo({ state, commit }) {
let result = await axios.post('Peer/sharePeer', {})
let result = await axios.post('Peer/getPeerList', {})
commit('setPeerNumber', (result && result.data) ? result.data.length : 0)
commit('setItemList', result.data || [])