Browse Source

Merge branch 'dev' of http://git.ycjcjy.com/SpaceOfCheng/admin into dev

wangfei 6 years ago
parent
commit
963410e1c2
2 changed files with 3 additions and 4 deletions
  1. 2
    3
      src/pages/system/newOrder/newOrderList/index.vue
  2. 1
    1
      src/util/ajax.js

+ 2
- 3
src/pages/system/newOrder/newOrderList/index.vue View File

@@ -257,11 +257,10 @@ export default {
257 257
     },
258 258
     initWebSocket () {
259 259
       // console.log(this.user)
260
-      const wsPath = this.$api.system.notify.newGoodsOrders.url
261
-      const wsRealPath = replaceURLParams(wsPath, { grps: caseid, id })
262
-
263 260
       let caseid = this.caseid
264 261
       let id = this.userInfo.UserId
262
+      const wsPath = this.$api.system.notify.newGoodsOrders.url
263
+      const wsRealPath = replaceURLParams(wsPath, { grps: caseid, id })
265 264
       const wsuri = `${window.location.origin.replace('http', 'ws')}${wsRealPath}?token=${localStorage.getItem('JWT')}`
266 265
       // const wsuri = `ws://192.168.0.11/api/guest/MQ/websocket/${caseid}/${id}`
267 266
       try {

+ 1
- 1
src/util/ajax.js View File

@@ -81,7 +81,7 @@ const ajax = (...args) => {
81 81
 
82 82
 export default ajax
83 83
 
84
-export function replaceURLParams(url, params) {
84
+export function replaceURLParams (url, params) {
85 85
   const args = { ...(params || {}), org: 'MQ' }
86 86
 
87 87
   return Object.keys(args).reduce((acc, k) => { // 此方法对每个元素进行处理