[bug fix] 调用节点地址不能写死 http,不然https的节点就无法使用控制台了。改为 window.location.protocol//window.location.hostname:window.location.port
This commit is contained in:
@@ -89,10 +89,11 @@ import Vue from 'vue'
|
||||
import store from '../store'
|
||||
import VueSocketio from 'vue-socket.io'
|
||||
import io from 'socket.io-client'
|
||||
import axios from 'axios'
|
||||
|
||||
const { mapState, mapGetters, mapActions, mapMutations } = createNamespacedHelpers('chain')
|
||||
|
||||
Vue.use(VueSocketio, io(`http://${window.location.hostname}:8888/api/`), store) // todo: luk: 整个控制台应当依赖于同一个全局的节点地址变量。
|
||||
Vue.use(VueSocketio, io(axios.defaults.baseURL), store)
|
||||
|
||||
export default {
|
||||
name: 'Chain',
|
||||
|
||||
Reference in New Issue
Block a user