优化问题
This commit is contained in:
@@ -310,6 +310,8 @@
|
||||
})
|
||||
try {
|
||||
if (res.data) {
|
||||
let time = new Date
|
||||
console.log(time,'时间戳')
|
||||
uni.cache.set('shopUser', res.data)
|
||||
this.handlemessage()
|
||||
}
|
||||
@@ -398,11 +400,12 @@
|
||||
}
|
||||
},
|
||||
handlemessage() {
|
||||
this.socketTicket ? this.socketTicket.Close() : null //调用前先判断是否有socket正在进行 先关闭后链接
|
||||
console.log(this.socketTicket,'是否存在socketTicket1')
|
||||
// this.socketTicket ? this.socketTicket.Close() : null //调用前先判断是否有socket正在进行 先关闭后链接
|
||||
this.socketTicket = new webSocketUtils(
|
||||
`${uni.conf.baseUrlwws}/websocket/table/${uni.cache.get('tableCode')}/${uni.cache.get('shopUser')}/${uni.cache.get('userInfo').id}`,
|
||||
5000)
|
||||
|
||||
console.log(this.socketTicket,'是否存在socketTicket3')
|
||||
},
|
||||
// 数据处理
|
||||
socketSendMsg(data) {
|
||||
|
||||
Reference in New Issue
Block a user