修改了axios和socket接口地址
This commit is contained in:
@@ -1,9 +1,7 @@
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
// import app from './app'
|
// import app from './app'
|
||||||
// let baseURL = `${window.location.protocol}//${window.location.hostname}:${window.location.port}/api/`
|
// let baseURL = `${window.location.protocol}//${window.location.hostname}:${window.location.port}/api/`
|
||||||
// let baseURL = `${window.location.protocol}//${window.location.hostname}:8888/api/`
|
let baseURL = `${window.location.protocol}//${window.location.hostname}:8888/api/`
|
||||||
let baseURL = `http://test-us.bittic.net:8888/api/`
|
|
||||||
let socketUrl = 'ws://test-us.bittic.net:8888'
|
|
||||||
// 控制台应当默认访问控制台所在主机(localhost 或者 window.location.hostname)的 TIC后台,或者让用户在控制台启动时,自己设置一个节点主机。
|
// 控制台应当默认访问控制台所在主机(localhost 或者 window.location.hostname)的 TIC后台,或者让用户在控制台启动时,自己设置一个节点主机。
|
||||||
axios.defaults.baseURL = baseURL
|
axios.defaults.baseURL = baseURL
|
||||||
axios.defaults.socketUrl = socketUrl
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export default {
|
|||||||
headers: [
|
headers: [
|
||||||
{ text: 'chain.thHeight', value: 'height', align: 'center' },
|
{ text: 'chain.thHeight', value: 'height', align: 'center' },
|
||||||
{ text: 'chain.thTimestamp', value: 'timestamp', align: 'center' },
|
{ text: 'chain.thTimestamp', value: 'timestamp', align: 'center' },
|
||||||
{ text: 'chain.thType', value: 'type', align: 'center' },
|
{ text: 'chain.thType', value: 'type', align: 'center', sortable: false },
|
||||||
{ text: 'chain.thHash', value: 'hash', align: 'center' },
|
{ text: 'chain.thHash', value: 'hash', align: 'center' },
|
||||||
],
|
],
|
||||||
itemList: [
|
itemList: [
|
||||||
|
|||||||
@@ -89,10 +89,10 @@ import Vue from 'vue'
|
|||||||
import store from '../store'
|
import store from '../store'
|
||||||
import VueSocketio from 'vue-socket.io'
|
import VueSocketio from 'vue-socket.io'
|
||||||
import io from 'socket.io-client'
|
import io from 'socket.io-client'
|
||||||
import axios from 'axios'
|
// import axios from 'axios'
|
||||||
|
|
||||||
const { mapState, mapGetters, mapActions, mapMutations } = createNamespacedHelpers('chain')
|
const { mapState, mapGetters, mapActions, mapMutations } = createNamespacedHelpers('chain')
|
||||||
const socketUrl = 'ws://test-us.bittic.net:8888'
|
const socketUrl = 'ws://localhost:8888'
|
||||||
|
|
||||||
Vue.use(VueSocketio, io(socketUrl), store)
|
Vue.use(VueSocketio, io(socketUrl), store)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user