From 858bd6df13a6a6415d12d8e60141575574646f58 Mon Sep 17 00:00:00 2001
From: younger_times <841720330@qq.com>
Date: 星期一, 24 七月 2023 18:23:48 +0800
Subject: [PATCH] 新增

---
 WanPai/Root/Search/VC/CustomerListVC.swift |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/WanPai/Root/Search/VC/CustomerListVC.swift b/WanPai/Root/Search/VC/CustomerListVC.swift
index fab4036..9e34763 100644
--- a/WanPai/Root/Search/VC/CustomerListVC.swift
+++ b/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)
     }
 }
 

--
Gitblit v1.7.1