This commit is contained in:
chaosBreaking
2019-10-04 17:53:49 +08:00
parent 49942c99bc
commit d094299226
6 changed files with 56 additions and 40 deletions

View File

@@ -94,7 +94,7 @@ import io from 'socket.io-client'
const { mapState, mapGetters, mapActions, mapMutations } = createNamespacedHelpers('chain')
const socketUrl = `ws://${location.hostname}:60000`
Vue.use(VueSocketio, io(socketUrl), store)
// Vue.use(VueSocketio, io(socketUrl), store)
export default {
name: 'Chain',
@@ -110,14 +110,14 @@ export default {
]),
...mapGetters([]),
},
sockets: {
connect() {
console.log('socket connected')
},
newBlock(msg) {
this.addNewBlock(msg)
},
},
// sockets: {
// connect() {
// console.log('socket connected')
// },
// newBlock(msg) {
// this.addNewBlock(msg)
// },
// },
methods: {
...mapActions([
@@ -133,7 +133,7 @@ export default {
},
mounted() {
this.queryBlockList()
// this.queryBlockList()
},
}