Просмотр исходного кода

修改app.webSocketUrl。新加一个测试连接!

release/210823_需求对对碰
王饶冀 3 лет назад
Родитель
Сommit
eda470042a
4 измененных файлов: 5 добавлений и 3 удалений
  1. 2
    0
      app.js
  2. 1
    1
      components/tabbar/tabbar.js
  3. 1
    1
      pages/msgModule/index.js
  4. 1
    1
      pages/msgModule/wechat2/wechat2.js

+ 2
- 0
app.js Просмотреть файл

@@ -105,4 +105,6 @@ App({
mangerUrl: "http://192.168.18.138",
// mangerUrl: "https://www.hhrchina.com",
// mangerUrlPath: "https://www.hhrchina.com",
webSocketUrl:"192.168.18.138",
// webSocketUrl:"test2.hhrchina.com",
})

+ 1
- 1
components/tabbar/tabbar.js Просмотреть файл

@@ -100,7 +100,7 @@ Component({
let customerId = this.data.customerId;
//建立连接
wx.connectSocket({
url: `ws://192.168.18.138/webSocket/{"userno":${customerId},"messageModule":"010"}`,//本地
url: `ws://` + app.webSocketUrl + `/webSocket/{"userno":${customerId},"messageModule":"010"}`,//本地
success: function () {
console.log('消息页-websocket连接成功~')
},

+ 1
- 1
pages/msgModule/index.js Просмотреть файл

@@ -48,7 +48,7 @@ Page({
// console.log()
//建立连接
wx.connectSocket({
url: `ws://192.168.18.138/webSocket/{"userno":${customerId},"messageModule":"010"}`,//本地
url: `ws://` + app.webSocketUrl + `/webSocket/{"userno":${customerId},"messageModule":"010"}`,//本地
success: function () {
console.log('消息页-websocket连接成功~')
},

+ 1
- 1
pages/msgModule/wechat2/wechat2.js Просмотреть файл

@@ -119,7 +119,7 @@ Page({
// console.log()
//建立连接
wx.connectSocket({
url: `ws://192.168.18.138/webSocket/{"userno":${receiveMemberId},"messageModule":"010"}`,//本地
url: `ws://` + app.webSocketUrl + `/webSocket/{"userno":${customerId},"messageModule":"010"}`,//本地
success: function () {
console.log('websocket连接成功~')
},

Загрузка…
Отмена
Сохранить