购物车reload标识

This commit is contained in:
张松
2025-11-28 15:20:30 +08:00
parent d52d96469a
commit 23c7ecd848
7 changed files with 34 additions and 8 deletions

View File

@@ -189,6 +189,7 @@ class Events
if(!empty($message['table_code'])) {
// 绑定shopid和table_code 便于推送多端购物车同步 和 锁单
$group = Base::get_shopping_save_uid($message['shop_id'], $message['table_code']);
if(!empty($_SESSION[$client_id])) {
// 绑定之前必须先删除此client_id下的其他分组
Gateway::leaveGroup($client_id, $_SESSION[$client_id]);
@@ -196,6 +197,9 @@ class Events
Gateway::joinGroup($client_id, $group);
$_SESSION[$client_id] = $group;
}
// 店铺组
$shopGroup = Base::get_shopping_save_uid($message['shop_id'], 'all');
Gateway::joinGroup($client_id, $shopGroup);
// 绑定shopid推送商品更新信息
Gateway::joinGroup($client_id, 'product_update' . $message['shop_id']);
}