修改了axios和socket接口地址

This commit is contained in:
Nova
2019-02-11 11:00:39 +08:00
parent f6f8eecff0
commit 75fb0788e2
3 changed files with 5 additions and 7 deletions

View File

@@ -1,9 +1,7 @@
import axios from 'axios'
// import app from './app'
// let baseURL = `${window.location.protocol}//${window.location.hostname}:${window.location.port}/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'
let baseURL = `${window.location.protocol}//${window.location.hostname}:8888/api/`
// 控制台应当默认访问控制台所在主机(localhost 或者 window.location.hostname)的 TIC后台或者让用户在控制台启动时自己设置一个节点主机。
axios.defaults.baseURL = baseURL
axios.defaults.socketUrl = socketUrl

View File

@@ -8,7 +8,7 @@ export default {
headers: [
{ text: 'chain.thHeight', value: 'height', 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' },
],
itemList: [

View File

@@ -89,10 +89,10 @@ import Vue from 'vue'
import store from '../store'
import VueSocketio from 'vue-socket.io'
import io from 'socket.io-client'
import axios from 'axios'
// import axios from 'axios'
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)