46 lines
1.1 KiB
Swift
46 lines
1.1 KiB
Swift
//
|
|
// PromotionalActivitiesVC.swift
|
|
// QuickLocation
|
|
//
|
|
// Created by 八条 on 2026/7/3.
|
|
//
|
|
|
|
import UIKit
|
|
import RxSwift
|
|
import RxCocoa
|
|
import RxDataSources
|
|
|
|
class PromotionalActivitiesVC: BaseViewController {
|
|
|
|
fileprivate var rootView: PromotionalActivitiesView!
|
|
var onDismiss: (() -> Void)?
|
|
|
|
override func loadView() {
|
|
rootView = PromotionalActivitiesView(frame: UIScreen.main.bounds)
|
|
view = rootView
|
|
}
|
|
|
|
override func viewDidLoad() {
|
|
super.viewDidLoad()
|
|
|
|
// Do any additional setup after loading the view.
|
|
requestRechargeInfo()
|
|
}
|
|
|
|
override func viewDidDisappear(_ animated: Bool) {
|
|
super.viewDidDisappear(animated)
|
|
if isMovingFromParent {
|
|
onDismiss?()
|
|
}
|
|
}
|
|
|
|
// MARK: - API
|
|
private func requestRechargeInfo() {
|
|
DLToast.showLoading()
|
|
OrderService.rechargeInfo(type: "member").subscribe(onNext: { [weak self] response in
|
|
guard let self = self else { return }
|
|
self.rootView.startCountdown(endTime: 1769875199)
|
|
}).disposed(by: disposeBag)
|
|
}
|
|
}
|