Commit c6004983 authored by David黄金龙's avatar David黄金龙

添加 openUrlWithSafariSyn

parent c9d86b2d
...@@ -150,6 +150,9 @@ extension YHHomeBannerView: FSPagerViewDataSource, FSPagerViewDelegate { ...@@ -150,6 +150,9 @@ extension YHHomeBannerView: FSPagerViewDataSource, FSPagerViewDelegate {
//for test hjl 贤宇IP //for test hjl 贤宇IP
// model.skip_url = "http://192.168.23.35:10300/signatureQrcode/EcqtQYs%2Bxey7t6jLbn6JkQ%3D%3D" // model.skip_url = "http://192.168.23.35:10300/signatureQrcode/EcqtQYs%2Bxey7t6jLbn6JkQ%3D%3D"
// model.skip_url = "http://192.168.23.71:10300/superAppBridge.html#/double11-home"
//1.增加app token //1.增加app token
var url = "" var url = ""
if YHLoginManager.shared.isLogin() { if YHLoginManager.shared.isLogin() {
......
...@@ -18,6 +18,20 @@ class YHJsApi: NSObject { ...@@ -18,6 +18,20 @@ class YHJsApi: NSObject {
} }
extension YHJsApi { extension YHJsApi {
//21、使用safari WebView打开Url
@objc func openUrlWithSafariSyn(_ payUrl: String) {
DispatchQueue.main.async {
if !payUrl.isEmpty,let url = URL(string: payUrl) {
let safariViewController = SFSafariViewController(url: url)
safariViewController.dismissButtonStyle = .close
safariViewController.modalPresentationStyle = .fullScreen
UIViewController.current?.present(safariViewController, animated: true, completion: nil)
} else {
printLog("hjl : 这个url不合法 -- " + payUrl)
}
}
}
//20、导航栏上是否展示title //20、导航栏上是否展示title
@objc func hideNavigationTitleSyn(_ tag : Any) { @objc func hideNavigationTitleSyn(_ tag : Any) {
DispatchQueue.main.async { DispatchQueue.main.async {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment