优化余额支付返回,和长连接

This commit is contained in:
duan
2024-06-03 14:54:02 +08:00
parent 3d2fce5745
commit e2c096e65a
4 changed files with 85 additions and 25 deletions

View File

@@ -272,7 +272,7 @@
}
this.countScrollTitle(e.scrollTop);
},
async onLoad(e) {
onLoad(e) {
if (e.q) {
let tableCode = this.getQueryString(decodeURIComponent(e.q), 'code')
uni.cache.set('tableCode', tableCode)
@@ -409,7 +409,8 @@
handlemessage() {
// 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}`,
`${uni.conf.baseUrlwws}/websocket/table?tableId=${uni.cache.get('tableCode')}&shopId=${uni.cache.get('shopUser')}&userId=${uni.cache.get('userInfo').id}`,
// `${uni.conf.baseUrlwws}/websocket/table/${uni.cache.get('tableCode')}/${uni.cache.get('shopUser')}/${uni.cache.get('userInfo').id}`,
5000)
},
// 数据处理