council(execute): BackendArchitect - Fix 2 bugs in P0-A/B/P1 implementations

Bug 1: SeatSkuService.php:381 - regex has syntax error
  '/^([A-Za-z]+)(\d+)排(\d+)座$/' → '/^([A-Za-z]+)(\d+)排(\d)座$/'
  The third capture group only needs single digit (col number 1-9).

Bug 2: ticket_detail.html:416 - frontend accesses specBaseIdMap as object
  but PHP returns flat integer: specBaseIdMap['A_1'] = 2001 (int), not {spec_base_id: 2001}.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
refactor/vr-ticket-20260416
Council 2026-04-15 20:09:22 +08:00
parent 5e9c111370
commit 96337bc840
2 changed files with 3 additions and 2 deletions

View File

@ -378,7 +378,7 @@ class SeatSkuService extends BaseService
foreach ($rows as $seatLabel => $baseId) { foreach ($rows as $seatLabel => $baseId) {
// 从 seat_label 解析 seatId如 "A排1座" → "A_1" // 从 seat_label 解析 seatId如 "A排1座" → "A_1"
// 格式: "{rowLabel}排{colNum}座" // 格式: "{rowLabel}排{colNum}座"
if (preg_match('/^([A-Za-z]+)(\d+)排(\d+)座$/', $seatLabel, $m)) { if (preg_match('/^([A-Za-z]+)(\d+)排(\d)座$/', $seatLabel, $m)) {
$rowLabel = $m[1]; $rowLabel = $m[1];
$colNum = intval($m[3]); $colNum = intval($m[3]);
$seatId = $rowLabel . '_' . $colNum; $seatId = $rowLabel . '_' . $colNum;

View File

@ -413,7 +413,8 @@
var goodsParamsList = this.selectedSeats.map(function(seat, i) { var goodsParamsList = this.selectedSeats.map(function(seat, i) {
// Plan A: 座位级 SKUspecBaseIdMap key 格式 = rowLabel_colNum如 "A_1" // Plan A: 座位级 SKUspecBaseIdMap key 格式 = rowLabel_colNum如 "A_1"
// Plan B 回退: sessionSpecIdZone 级别 SKU // Plan B 回退: sessionSpecIdZone 级别 SKU
var specBaseId = (self.specBaseIdMap[seat.seatKey] || {}).spec_base_id || self.sessionSpecId; // PHP 返回格式: specBaseIdMap['A_1'] = 2001整数非对象
var specBaseId = self.specBaseIdMap[seat.seatKey] || self.sessionSpecId;
var seatAttendee = attendeeData[i] || {}; var seatAttendee = attendeeData[i] || {};
return { return {
goods_id: self.goodsId, goods_id: self.goodsId,