initWebSocket() { | initWebSocket() { | ||||
let _this = this; | let _this = this; | ||||
let customerId = this.data.customerId; | let customerId = this.data.customerId; | ||||
let url = encodeURI(`ws://` + app.webSocketUrl + `/webSocket/{"userno":${customerId},"messageModule":"010"}`); | |||||
let url = encodeURI(app.webSocketUrl + `/webSocket/{"userno":${customerId},"messageModule":"010"}`); | |||||
//建立连接 | //建立连接 | ||||
wx.connectSocket({ | wx.connectSocket({ | ||||
url,//本地 | url,//本地 |
initWebSocket: function () { | initWebSocket: function () { | ||||
var _this = this; | var _this = this; | ||||
let { customerId } = _this.data; | let { customerId } = _this.data; | ||||
let url = encodeURI(`ws://` + app.webSocketUrl + `/webSocket/{"userno":${customerId},"messageModule":"010"}`); | |||||
let url = encodeURI(app.webSocketUrl + `/webSocket/{"userno":${customerId},"messageModule":"010"}`); | |||||
//建立连接 | //建立连接 | ||||
wx.connectSocket({ | wx.connectSocket({ | ||||
url,//本地 | url,//本地 |