fix(miniapp): 接单大厅分类数量取真实数据,抢单失败不再伪造订单

- 分类 chip 的 12/4/3 写死数量改为按真实订单统计

- 雷达页抢单失败时删除「自动落盘创建订单」兜底(原逻辑会伪造一笔 buyerId=2001 的订单并提示成功),改为如实提示已被抢/状态不可接/未认证

- 抢单使用当前登录身份(userId 由服务端 token 覆盖),成功后刷新列表

- 110 套件/730 用例全绿
这个提交包含在:
xcbyy
2026-10-21 14:55:01 +08:00
父节点 68e41ca962
当前提交 5538d8ce7e
共有 3 个文件被更改,包括 29 次插入 和 34 次删除

查看文件

@@ -386,12 +386,14 @@ onUnmounted(() => {
});
const categories = ref([
{ key: 'all', name: '全部可接', count: 12, icon: ICONS.gridAll },
{ key: 'food', name: '同城美食', count: 4, icon: ICONS.utensils },
{ key: 'drink', name: '清吧咖啡', count: 3, icon: ICONS.coffee },
{ key: 'sing', name: 'KTV麦霸', count: 2, icon: ICONS.micVocal },
{ key: 'game', name: '线上电竞', count: 3, icon: ICONS.gameCrosshair }
const countByType = (cls: string) => orders.value.filter((o: any) => o.typeClass === cls).length;
const categories = computed(() => [
{ key: 'all', name: '全部可接', count: orders.value.length, icon: ICONS.gridAll },
{ key: 'food', name: '同城美食', count: countByType('cat-food'), icon: ICONS.utensils },
{ key: 'drink', name: '清吧咖啡', count: countByType('cat-drink'), icon: ICONS.coffee },
{ key: 'sing', name: 'KTV麦霸', count: countByType('cat-sing'), icon: ICONS.micVocal },
{ key: 'game', name: '线上电竞', count: countByType('cat-game'), icon: ICONS.gameCrosshair }
]);
const orders = ref([]);