Add Payment and Wallet modules with home routing integration.
Introduce real payment collection and wallet screens to replace home menu placeholders, wire APIs through RootView, and support bank card OSS uploads plus QR code saving to the photo library. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -36,6 +36,9 @@ protocol OSSUploadServing {
|
||||
|
||||
/// 上传景区申请图片,并返回可访问的 OSS 文件 URL。
|
||||
func uploadScenicApplicationImage(data: Data, fileName: String, scenicId: Int, onProgress: @escaping (Int) -> Void) async throws -> String
|
||||
|
||||
/// 上传银行卡照片,并返回可访问的 OSS 文件 URL。
|
||||
func uploadBankCardImage(data: Data, fileName: String, scenicId: Int, onProgress: @escaping (Int) -> Void) async throws -> String
|
||||
}
|
||||
|
||||
@MainActor
|
||||
@ -84,6 +87,11 @@ final class OSSUploadService {
|
||||
try await uploadFile(data: data, fileName: fileName, fileType: 2, scenicId: scenicId, moduleType: "scenic_apply", onProgress: onProgress)
|
||||
}
|
||||
|
||||
/// 上传银行卡照片,并返回可访问的 OSS 文件 URL。
|
||||
func uploadBankCardImage(data: Data, fileName: String, scenicId: Int, onProgress: @escaping (Int) -> Void) async throws -> String {
|
||||
try await uploadFile(data: data, fileName: fileName, fileType: 2, scenicId: scenicId, moduleType: "bank_card", onProgress: onProgress)
|
||||
}
|
||||
|
||||
/// 执行通用 OSS 上传流程。
|
||||
private func uploadFile(
|
||||
data: Data,
|
||||
@ -188,6 +196,8 @@ enum OSSUploadPolicy {
|
||||
return "avatar/\(currentDate)/\(scenicId)/\(uploadId)_\(safeName)"
|
||||
case "real_name":
|
||||
return "real_name/\(currentDate)/\(scenicId)/\(uploadId)_\(safeName)"
|
||||
case "bank_card":
|
||||
return "bank_card/\(currentDate)/\(scenicId)/\(uploadId)_\(safeName)"
|
||||
default:
|
||||
return "task/\(currentDate)/\(scenicId)/\(uploadId)_\(safeName)"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user