This commit is contained in:
魏啾
2024-05-28 16:24:42 +08:00
parent c6c2680993
commit 219dce9b2f

View File

@@ -289,6 +289,9 @@
}); });
}, },
onUnload() { onUnload() {
this.socketSendMsg({ //定义socket数据传参
"type": "close", //“addcart:添加购物车create0rder:生成订单clearCart:庆康购物车”,
})
this.socketTicket.Close() this.socketTicket.Close()
uni.$off('message') uni.$off('message')
}, },
@@ -297,7 +300,7 @@
if (uni.cache.get('token') && uni.cache.get('tableCode')) { if (uni.cache.get('token') && uni.cache.get('tableCode')) {
this.productqueryShopIdByTableCode() //获取shop User id this.productqueryShopIdByTableCode() //获取shop User id
} }
}, 1000) }, 500)
}, },
methods: { methods: {
// 单独获取他的shopUserid // 单独获取他的shopUserid
@@ -321,6 +324,9 @@
icon: "none", icon: "none",
}) })
if (msg.msg == '桌码不存在') { //卓码不存在直接退出 if (msg.msg == '桌码不存在') { //卓码不存在直接退出
this.socketSendMsg({ //定义socket数据传参
"type": "close", //“addcart:添加购物车create0rder:生成订单clearCart:庆康购物车”,
})
this.socketTicket.Close() this.socketTicket.Close()
uni.$off('message') uni.$off('message')
uni.navigateBack() uni.navigateBack()