(
self,
account_id: str,
request: CaptchaVerifyPayloadRequest,
*,
flow: FlowRun | None = None,
)
| 737 | f"preview 请求失败,第 {preview_round} 轮重试中", |
| 738 | ) |
| 739 | session = self.state_service.load_session(account_id) |
| 740 | continue |
| 741 | raw = result.raw |
| 742 | code = raw.get("code") |
| 743 | data = result.data if isinstance(result.data, dict) else {} |
| 744 | |
| 745 | biz_id = str(data.get("bizId") or "").strip() |
| 746 | attempt_info = { |
| 747 | "round": preview_round, |
| 748 | "code": code, |
| 749 | "biz_id": biz_id or None, |
| 750 | "sold_out": bool(data.get("soldOut")), |
| 751 | "msg": raw.get("msg") or "", |
| 752 | "ticket": ticket[:12] + "***" if ticket else "", |
| 753 | } |
| 754 | preview_attempts.append(attempt_info) |
| 755 | if len(preview_attempts) > 100: |
| 756 | preview_attempts.pop(0) |
| 757 | |
| 758 | preview = PreviewResult( |
| 759 | biz_id=biz_id, |
| 760 | third_party_amount=self._string_value(data, "thirdPartyAmount"), |
| 761 | sold_out=bool(data.get("soldOut")), |
| 762 | original_amount=self._string_value(data, "originalAmount"), |
no test coverage detected