jsdw_ios/QuickLocation/Service/OrderService.swift

37 lines
1.1 KiB
Swift

//
// OrderService.swift
// QuickLocation
//
// Created by on 2026/6/17.
//
import RxSwift
import Moya
struct OrderService {
static let disposeBag = DisposeBag()
///
/// - Parameters:
/// - type: member
static func rechargeInfo(type: String) -> Observable<VipExpenseResponse> {
let api = OrderAPI.rechargeInfo(type: type).multiTarget
return APIProvider.request(token: api)
.map(VipExpenseResponse.self)
.asObservable()
}
///
/// - Parameters:
/// - goodsId: ID
/// - payType: alipayweixin
/// - source: center
/// - extra:
static func orderPayParams(goodsId: String, payType: String, source: String="center", extra: [String:Any]=[:]) -> Observable<ResponseModel> {
let api = OrderAPI.orderPayParams(goodsId: goodsId, payType: payType, source: source, extra: extra).multiTarget
return APIProvider.request(token: api)
.map(ResponseModel.self)
.asObservable()
}
}