杨锴
2024-11-07 62a24b3c7cf92919a93ee575e9460037e1a53816
XQMuse/Root/Me/VC/WalletRechargeVC.swift
@@ -25,6 +25,11 @@
        super.viewDidLoad()
        title = "疗愈币充值"
        btn_handle.isEnabled = false
        btn_handle.alpha = 0.6
        view.backgroundColor = .white
        for v in 0...5{
            productList.insert("com.XQMuse.p.\(v)")
        }
@@ -50,6 +55,10 @@
    override func setUI() {
        view.backgroundColor = UIColor(hexString: "f6f6f6")
    }
    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()
        btn_handle.jq_gradientNibColor(colorArr:  [UIColor(hexStr: "#8EA47A").cgColor,UIColor(hexStr: "#AFCA98").cgColor], cornerRadius: 20)
    }
@@ -61,7 +70,10 @@
        let product = products[selectIndexPath.row]
        InPurchaseManager.purchaseProduct(ID: product.productIdentifier, applicationUsername: userId.string) { model in
            if model.status == 0{
                //需要后端监听推送后,才会更新金额,可能延迟
                NotificationCenter.default.post(name: Refreh_PaymentWallet_Noti, object: nil)
            }
        } errorClouse: { error in
            alertError(msg: error.localizedDescription)
        }
@@ -84,6 +96,10 @@
        cell.selectAt(indexPath == selectIndexPath)
        let product = products[indexPath.row]
        cell.lable_title.text = product.localizedTitle
        btn_handle.isEnabled = true
        btn_handle.alpha = 1.0
        return cell
    }
}