|
|
|
@ -106,7 +106,7 @@ |
|
|
|
|
socketio() { |
|
|
|
|
let that = this; |
|
|
|
|
uni.connectSocket({ |
|
|
|
|
url: 'ws://139.159.177.244:9302/brest/WebSocket/' + app.globalData.userInfo.merchantStore.id |
|
|
|
|
url: app.globalData.wsssocket + app.globalData.userInfo.merchantStore.id |
|
|
|
|
}); |
|
|
|
|
uni.onSocketOpen(function(res) { |
|
|
|
|
console.log('WebSocket连接已打开!'); |
|
|
|
@ -119,13 +119,18 @@ |
|
|
|
|
uni.onSocketMessage(function(res) { |
|
|
|
|
let innerAudioContext = uni.createInnerAudioContext(); //创建音频文件 |
|
|
|
|
innerAudioContext.autoplay = false; //不自动播放 |
|
|
|
|
innerAudioContext.src = res.data; //音频文件链接 |
|
|
|
|
that.innerAudioContext = innerAudioContext; |
|
|
|
|
innerAudioContext.src = JSON.parse(res.data).voice; //音频文件链接 |
|
|
|
|
that.innerAudioContext = innerAudioContext; |
|
|
|
|
that.orderList = []; |
|
|
|
|
that.pageNum = 1; |
|
|
|
|
that.getGasOrderList(); |
|
|
|
|
that.startAudio(); |
|
|
|
|
console.log('收到服务器内容:' + res.data); |
|
|
|
|
console.log('收到服务器内容:' + JSON.parse(res.data).voice); |
|
|
|
|
}); |
|
|
|
|
uni.onSocketClose(function(res) { |
|
|
|
|
console.log('WebSocket 已关闭!'); |
|
|
|
|
uni.closeSocket(); |
|
|
|
|
that.socketio(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
//搜索条件 |
|
|
|
@ -249,7 +254,7 @@ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.counimgs { |
|
|
|
|
width: 60px; |
|
|
|
|
width: 60px; |
|
|
|
|
max-height: 60px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|