Browse Source

调整websocket连接地址

master
李磊 3 years ago
parent
commit
9a0487a24f
  1. 16
      .env.development
  2. 2
      .env.production
  3. 2
      .env.test
  4. 8
      src/store/modules/user.js

16
.env.development

@ -1,16 +1,16 @@
# 开发环境相关配置 # 开发环境相关配置
# 微服务IP # 项目名称
VUE_APP_SERVER_ADDRESS = 'test.sdma.mingansei.com' VUE_APP_PROJECT_NAME = 'SJJY'
# 省局数据后台IP # 微服务IP
VUE_APP_SJ_BASE_IP_ADDRESS = '192.168.1.130' VUE_APP_SERVER_ADDRESS = '192.168.1.130'
# 微服务地址 # 微服务地址
VUE_APP_SERVER_API = 'http://${VUE_APP_SERVER_ADDRESS}' VUE_APP_SERVER_API = 'http://${VUE_APP_SERVER_ADDRESS}:9100'
# 项目名称 # 省局数据后台IP
VUE_APP_PROJECT_NAME = 'SJJY' VUE_APP_SJ_BASE_IP_ADDRESS = '192.168.1.130'
# 业务后台访问地址 # 业务后台访问地址
VUE_APP_BASE_API = '${VUE_APP_SERVER_API}/sdma-manage/' VUE_APP_BASE_API = '${VUE_APP_SERVER_API}/sdma-manage/'
@ -25,4 +25,4 @@ VUE_APP_SJ_API = 'http://${VUE_APP_SJ_BASE_IP_ADDRESS}:9092/SJSE/'
VUE_APP_PREVIEW_API = '${VUE_APP_SERVER_API}/sdma-preview/' VUE_APP_PREVIEW_API = '${VUE_APP_SERVER_API}/sdma-preview/'
# websocket连接地址 # websocket连接地址
VUE_APP_WEBSOCKET = 'ws://${VUE_APP_SERVER_ADDRESS}:9100/sdma-manage/websocket/' VUE_APP_WEBSOCKET = 'ws://${VUE_APP_SERVER_ADDRESS}:9100/sdma-websocket/websocket/'

2
.env.production

@ -22,4 +22,4 @@ VUE_APP_SJ_API = 'http://${VUE_APP_SJ_BASE_IP_ADDRESS}:9092/SJSE/'
VUE_APP_PREVIEW_API = '${VUE_APP_SERVER_API}/sdma-preview/' VUE_APP_PREVIEW_API = '${VUE_APP_SERVER_API}/sdma-preview/'
# websocket连接地址 # websocket连接地址
VUE_APP_WEBSOCKET = 'ws://${VUE_APP_SERVER_ADDRESS}:9100/sdma-manage/websocket/' VUE_APP_WEBSOCKET = 'ws://${VUE_APP_SERVER_ADDRESS}:9100/sdma-websocket/websocket/'

2
.env.test

@ -22,4 +22,4 @@ VUE_APP_SJ_API = 'http://${VUE_APP_SJ_BASE_IP_ADDRESS}:9092/SJSE/'
VUE_APP_PREVIEW_API = '${VUE_APP_SERVER_API}/sdma-preview/' VUE_APP_PREVIEW_API = '${VUE_APP_SERVER_API}/sdma-preview/'
# websocket连接地址 # websocket连接地址
VUE_APP_WEBSOCKET = 'ws://${VUE_APP_SERVER_ADDRESS}:9100/sdma-manage/websocket/' VUE_APP_WEBSOCKET = 'ws://${VUE_APP_SERVER_ADDRESS}:9100/sdma-websocket/websocket/'

8
src/store/modules/user.js

@ -5,8 +5,8 @@ import global from '../../utils/common.js'
import store from '../../store' import store from '../../store'
import router, { resetRouter } from '../../router' import router, { resetRouter } from '../../router'
import Vue from 'vue' import Vue from 'vue'
import { getOwnList, getRenwuListByPath } from '@/api/renwu' // import { getOwnList, getRenwuListByPath } from '@/api/renwu'
import { getNeedRecordList } from '@/api/ysjl' // import { getNeedRecordList } from '@/api/ysjl'
const user = { const user = {
state: { state: {
@ -126,7 +126,7 @@ const user = {
setToken() setToken()
global.it = data.userVO.id global.it = data.userVO.id
// 查询相关待办条数 // 查询相关待办条数
const messagePush = [] /* const messagePush = []
const departmentId = user.state.departmentId const departmentId = user.state.departmentId
getOwnList({ // 我的任务 getOwnList({ // 我的任务
pageNum: 1, // 页码 pageNum: 1, // 页码
@ -263,7 +263,7 @@ const user = {
}) })
}) })
} }
user.state.messageCount = messagePush // 赋值要放在 set_user 后面,否则被冲刷掉了。 user.state.messageCount = messagePush*/ // 赋值要放在 set_user 后面否则被冲刷掉了
// 查询路由 // 查询路由
const asyncRouter = filterAsyncRouter(data.menuList) const asyncRouter = filterAsyncRouter(data.menuList)
asyncRouter.push({ path: '*', redirect: '/404', hidden: true }) asyncRouter.push({ path: '*', redirect: '/404', hidden: true })

Loading…
Cancel
Save