younger_times
2023-07-24 858bd6df13a6a6415d12d8e60141575574646f58
WanPai/Root/Search/VC/CustomerListVC.swift
@@ -97,8 +97,26 @@
    }
    @objc func callPhoneAction(){
        let url = URL(string: "tell://18111223301")!
        UIApplication.shared.open(url)
        Services.customerPhone().subscribe(onNext: {[weak self] data in
            guard let weakSelf = self else { return }
            if let strings = data.data{
                let vc = UIAlertController(title: "联系客服", message: nil, preferredStyle: .actionSheet)
                for str in strings{
                    vc.addAction(UIAlertAction(title: str, style: .default, handler: { _ in
                        UIApplication.shared.open(URL(string: "tell://\(str)")!, options: [:], completionHandler: nil)
                    }))
                }
                vc.addAction(UIAlertAction(title: "取消", style: .cancel))
                vc.show()
            }
        }).disposed(by: disposeBag)
//        let url = URL(string: "tell://18111223301")!
//        UIApplication.shared.open(url)
    }
}