提交代码

This commit is contained in:
duan
2024-06-07 15:55:12 +08:00
parent 4ab5b59d7f
commit c8633827cc
4 changed files with 22 additions and 17 deletions

View File

@@ -230,17 +230,22 @@
},
onUnload() {
uni.switchTab({
url: '/pages/order/order'
})
uni.$off('getMessage')
this.ispws = false
},
onLoad(e) {
this.listinfo = JSON.parse(e.tablelist)
// 获取余额
// this.getAount()
// 获取用户信息,判断是否设置支付密码
this.getuserinfo()
},
onShow() {
// this.$store.dispatch("set_shopid"); //获取shapid
this.getAount()
@@ -300,20 +305,20 @@
}
},
handlemessage() {
console.log(this.socketTicket,'detail页面')
console.log(this.socketTicket, 'detail页面')
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)
this.socketTicket = new webSocketUtils(
`${uni.conf.baseUrlwws}`,
5000, {
tableId: uni.cache.get('tableCode'),
shopId: uni.cache.get('shopUser'),
userId: uni.cache.get('userInfo').id,
"type": "connect",
})
this.socketTicket = new webSocketUtils(
`${uni.conf.baseUrlwws}`,
5000, {
tableId: uni.cache.get('tableCode'),
shopId: uni.cache.get('shopUser'),
userId: uni.cache.get('userInfo').id,
"type": "connect",
})
},
// 数据处理