1
This commit is contained in:
parent
3d3564850c
commit
06effaee13
@ -9,3 +9,6 @@ VUE_APP_BASE_API = '/dev-api'
|
|||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
|
||||||
|
# websocket
|
||||||
|
VUE_APP_WEBSOCKET = 'ws://localhost:8099/ws/asset/'
|
||||||
|
@ -6,3 +6,6 @@ ENV = 'production'
|
|||||||
|
|
||||||
# 通告快接管理后台/生产环境
|
# 通告快接管理后台/生产环境
|
||||||
VUE_APP_BASE_API = 'https://www.ddtg.site/noticeApi'
|
VUE_APP_BASE_API = 'https://www.ddtg.site/noticeApi'
|
||||||
|
|
||||||
|
# websocket
|
||||||
|
VUE_APP_WEBSOCKET = 'ws://localhost:8099/ws/asset/'
|
||||||
|
@ -10,3 +10,6 @@ ENV = 'staging'
|
|||||||
|
|
||||||
# 成事达管理平台/测试环境
|
# 成事达管理平台/测试环境
|
||||||
VUE_APP_BASE_API = '/stage-api'
|
VUE_APP_BASE_API = '/stage-api'
|
||||||
|
|
||||||
|
# websocket
|
||||||
|
VUE_APP_WEBSOCKET = 'ws://localhost:8099/ws/asset/'
|
||||||
|
@ -22,7 +22,7 @@ export default {
|
|||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
const username = Cookies.get('username')
|
const username = Cookies.get('username')
|
||||||
this.$store.dispatch('websocket_init', "ws://localhost:8099/ws/asset/"+username)
|
this.$store.dispatch('websocket_init', process.env.VUE_APP_WEBSOCKET+username)
|
||||||
},
|
},
|
||||||
metaInfo() {
|
metaInfo() {
|
||||||
return {
|
return {
|
||||||
|
@ -49,7 +49,6 @@ Vue.prototype.selectDictLabel = selectDictLabel
|
|||||||
Vue.prototype.selectDictLabels = selectDictLabels
|
Vue.prototype.selectDictLabels = selectDictLabels
|
||||||
Vue.prototype.download = download
|
Vue.prototype.download = download
|
||||||
Vue.prototype.handleTree = handleTree
|
Vue.prototype.handleTree = handleTree
|
||||||
Vue.prototype.$websocket=websocket;
|
|
||||||
|
|
||||||
// 全局组件挂载
|
// 全局组件挂载
|
||||||
Vue.component('DictTag', DictTag)
|
Vue.component('DictTag', DictTag)
|
||||||
|
@ -189,7 +189,7 @@ export default {
|
|||||||
Cookies.remove('rememberMe')
|
Cookies.remove('rememberMe')
|
||||||
}
|
}
|
||||||
this.$store.dispatch('Login', this.loginForm).then(() => {
|
this.$store.dispatch('Login', this.loginForm).then(() => {
|
||||||
this.$store.dispatch('websocket_init', "ws://localhost:8099/ws/asset/"+this.loginForm.username)
|
this.$store.dispatch('websocket_init', process.env.VUE_APP_WEBSOCKET+this.loginForm.username)
|
||||||
listAllSite().then(response => {
|
listAllSite().then(response => {
|
||||||
if (response.data && response.data.length > 0) {
|
if (response.data && response.data.length > 0) {
|
||||||
response.data.map((item) => {
|
response.data.map((item) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user