购物车reload标识

This commit is contained in:
张松
2025-11-28 15:54:34 +08:00
parent d741f252f6
commit 604d51360d

View File

@@ -77,25 +77,21 @@ class Base extends Model
if ($by_shop_id) {
$shopGroup = self::get_shopping_save_uid(self::$shop_id, 'all');
Log::info('群发213123->>>>>');
// 如果有在线的 再发
if($onl = Gateway::getClientIdCountByGroup($shopGroup)){
Log::info('群发->>>>>'.json_encode($params));
// 发送广播并将 self::$client_id 排除在外
// 排除收银机重复的client_id
$table_arr = [];
if(!empty(self::$table_code) && !empty($data_arr['type']) && $data_arr['type'] == 'shopping') {
// 是客户端小程序才排除同桌子的
$table_arr = Gateway::getClientIdByUid(self::$table_code);
}
// 排除自己
$new_client_id = array_merge($table_arr, [self::$client_id]);
// 去重
$new_client_id = array_unique($new_client_id);
$broadcast_arr['no_client_id'] = $new_client_id;
$broadcast_json = json_encode($broadcast_arr);
Gateway::sendToGroup($shopGroup, $broadcast_json, $new_client_id);
// 发送广播并将 self::$client_id 排除在外
// 排除收银机重复的client_id
$table_arr = [];
if(!empty(self::$table_code) && !empty($data_arr['type']) && $data_arr['type'] == 'shopping') {
// 是客户端小程序才排除同桌子的
$table_arr = Gateway::getClientIdByUid(self::$table_code);
}
// 排除自己
$new_client_id = array_merge($table_arr, [self::$client_id]);
// 去重
$new_client_id = array_unique($new_client_id);
$broadcast_arr['no_client_id'] = $new_client_id;
$broadcast_json = json_encode($broadcast_arr);
Gateway::sendToGroup($shopGroup, $broadcast_json, $new_client_id);
}
if(!$by_shop_id && !empty(self::$shop_id) && !empty($broadcast_arr['data']['table_code'])) {