fix(drone-dock): 适配小程序收款码图片展示与重试
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
import Foundation
|
||||
|
||||
/// 张工的机巢套餐收款数据源;付款链接与收款记录不提供单笔支付状态查询。
|
||||
/// 张工的机巢套餐收款数据源;小程序收款码与收款记录不提供单笔支付状态查询。
|
||||
protocol DroneDockPaymentServing: Sendable {
|
||||
/// 获取当前景区可售套餐,无分页。
|
||||
@MainActor func projects(scenicID: Int) async throws -> [DroneDockProject]
|
||||
/// 获取指定套餐的付款链接;省略 price 时使用后端当前售价。
|
||||
/// 获取指定套餐的小程序收款码;省略 price 时使用后端当前售价。
|
||||
@MainActor func payCode(scenicID: Int, projectID: Int, price: String?) async throws -> DroneDockPayCode
|
||||
/// 获取本人当前景区的收款记录,默认日期与每页数量由后端决定。
|
||||
@MainActor func receipts(scenicID: Int, projectID: Int?, page: Int) async throws -> DroneDockReceiptsResponse
|
||||
}
|
||||
|
||||
/// 机巢套餐、付款链接及真实收款记录接口,复用统一登录凭证和业务错误处理。
|
||||
/// 机巢套餐、小程序收款码及真实收款记录接口,复用统一登录凭证和业务错误处理。
|
||||
@MainActor
|
||||
final class DroneDockPaymentAPI: DroneDockPaymentServing {
|
||||
private let client: APIClient
|
||||
@@ -32,7 +32,7 @@ final class DroneDockPaymentAPI: DroneDockPaymentServing {
|
||||
return projects
|
||||
}
|
||||
|
||||
/// 由后端生成完整付款链接;客户端不自行拼接金额、备注或身份参数。
|
||||
/// 由后端生成完整小程序收款码;客户端不自行拼接金额、备注或身份参数。
|
||||
func payCode(scenicID: Int, projectID: Int, price: String? = nil) async throws -> DroneDockPayCode {
|
||||
try validateScenic(scenicID)
|
||||
guard projectID > 0 else { throw APIError.networkFailed("请选择航拍套餐") }
|
||||
|
||||
Reference in New Issue
Block a user