Commit 51f2c30f authored by David黄金龙's avatar David黄金龙

代码优化

parent af7aaf0e
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
import Foundation import Foundation
import UIKit import UIKit
import SafariServices
typealias JSCallback = (String, Bool)->Void typealias JSCallback = (String, Bool)->Void
typealias JSDicCallback = ([String : Any],Bool)->Void typealias JSDicCallback = ([String : Any],Bool)->Void
...@@ -17,6 +18,23 @@ class YHJsApi: NSObject { ...@@ -17,6 +18,23 @@ class YHJsApi: NSObject {
} }
extension YHJsApi { extension YHJsApi {
//16、招行聚合支付
@objc func cmbPaySyn(_ payUrl : String) {
DispatchQueue.main.async {
// let tUrl = "https://test-sign.galaxy-immi.com/webPayConfirm?id=dXlHS3RRQUV4QmZ2KzRwM0phRTVyMXdWUnVjUjJvRHdmQmNWVDV0UW1Zbz0="//测试环境
// let tUrl = "https://beta-sign.galaxy-immi.com/webPayConfirm?id=Qk9sbUlzenp0OGFOdVZ4ekphQXJGWnJ0ODdBS3gxdWNJcURrOHBLbm4xND0%3D"//正式环境
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)
}
}
}
//15、登录带token刷新 //15、登录带token刷新
@objc func loginAndRefeshWithTokenSyn(_ tag : Any) { @objc func loginAndRefeshWithTokenSyn(_ tag : Any) {
DispatchQueue.main.async { DispatchQueue.main.async {
......
...@@ -402,31 +402,19 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource { ...@@ -402,31 +402,19 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
case .myActivity: case .myActivity:
printLog("我的活动") printLog("我的活动")
// let vc = YHActivityListViewController() let vc = YHActivityListViewController()
// vc.type = 1 vc.type = 1
// self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
//vc.url = ""//测试环境
// let tUrl = "https://test-sign.galaxy-immi.com/webPayConfirm?id=dXlHS3RRQUV4QmZ2KzRwM0phRTVyMXdWUnVjUjJvRHdmQmNWVDV0UW1Zbz0="//测试环境
let tUrl = "https://beta-sign.galaxy-immi.com/webPayConfirm?id=Qk9sbUlzenp0OGFOdVZ4ekphQXJGWnJ0ODdBS3gxdWNJcURrOHBLbm4xND0%3D"//正式环境
if let url = URL(string: tUrl) {
let safariViewController = SFSafariViewController(url: url)
safariViewController.dismissButtonStyle = .close
safariViewController.modalPresentationStyle = .fullScreen
UIViewController.current?.present(safariViewController, animated: true, completion: nil)
}//for test hjl
case .aboutUs: case .aboutUs:
// let vc = YHAboutGalaxyViewController() let vc = YHAboutGalaxyViewController()
// self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
let vc = YHH5WebViewVC() // let vc = YHH5WebViewVC()
vc.url = "https://beta-sign.galaxy-immi.com/webPayConfirm?id=Qk9sbUlzenp0OGFOdVZ4ekphQXJGWnJ0ODdBS3gxdWNJcURrOHBLbm4xND0%3D"//正式环境 // vc.url = "https://beta-sign.galaxy-immi.com/webPayConfirm?id=Qk9sbUlzenp0OGFOdVZ4ekphQXJGWnJ0ODdBS3gxdWNJcURrOHBLbm4xND0%3D"//正式环境
// vc.url = "https://test-sign.galaxy-immi.com/webPayConfirm?id=dXlHS3RRQUV4QmZ2KzRwM0phRTVyMXdWUnVjUjJvRHdmQmNWVDV0UW1Zbz0="//测试环境 //// vc.url = "https://test-sign.galaxy-immi.com/webPayConfirm?id=dXlHS3RRQUV4QmZ2KzRwM0phRTVyMXdWUnVjUjJvRHdmQmNWVDV0UW1Zbz0="//测试环境
vc.isFullScreenFlag = false // vc.isFullScreenFlag = false
vc.isSupportWebviewInterBackFlag = true // vc.isSupportWebviewInterBackFlag = true
UIViewController.current?.navigationController?.pushViewController(vc)//for test hjl // UIViewController.current?.navigationController?.pushViewController(vc)//for test hjl
case .myOrder: case .myOrder:
//我的订单 //我的订单
if let token = YHLoginManager.shared.userModel?.token,token.count > 5 { if let token = YHLoginManager.shared.userModel?.token,token.count > 5 {
......
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