diff --git a/shopxo/app/plugins/vr_ticket/service/SeatSkuService.php b/shopxo/app/plugins/vr_ticket/service/SeatSkuService.php index 4e31e37..7bae4d9 100644 --- a/shopxo/app/plugins/vr_ticket/service/SeatSkuService.php +++ b/shopxo/app/plugins/vr_ticket/service/SeatSkuService.php @@ -378,7 +378,7 @@ class SeatSkuService extends BaseService foreach ($rows as $seatLabel => $baseId) { // 从 seat_label 解析 seatId(如 "A排1座" → "A_1") // 格式: "{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]; $colNum = intval($m[3]); $seatId = $rowLabel . '_' . $colNum; diff --git a/shopxo/app/plugins/vr_ticket/view/goods/ticket_detail.html b/shopxo/app/plugins/vr_ticket/view/goods/ticket_detail.html index 6a8f661..119b269 100644 --- a/shopxo/app/plugins/vr_ticket/view/goods/ticket_detail.html +++ b/shopxo/app/plugins/vr_ticket/view/goods/ticket_detail.html @@ -413,7 +413,8 @@ var goodsParamsList = this.selectedSeats.map(function(seat, i) { // Plan A: 座位级 SKU(specBaseIdMap key 格式 = rowLabel_colNum,如 "A_1") // Plan B 回退: sessionSpecId(Zone 级别 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] || {}; return { goods_id: self.goodsId,