Commit e919abec authored by DavidHuang's avatar DavidHuang

放入主线程

parent 55a8d4fa
...@@ -146,14 +146,13 @@ extension YHJsApi { ...@@ -146,14 +146,13 @@ extension YHJsApi {
//21、使用safari WebView打开Url //21、使用safari WebView打开Url
@objc func openUrlWithSafariSyn(_ payUrl: String) { @objc func openUrlWithSafariSyn(_ payUrl: String) {
DispatchQueue.main.async {
let dic: [AnyHashable : Any] = [ let dic: [AnyHashable : Any] = [
"function" : "openUrlWithSafariSyn", "function" : "openUrlWithSafariSyn",
"payUrl" : payUrl "payUrl" : payUrl
] ]
YHAliYunLogManager.shared.addModuleName(.h5InteractionType, remark: dic) YHAliYunLogManager.shared.addModuleName(.h5InteractionType, remark: dic)
DispatchQueue.main.async {
if !payUrl.isEmpty,let url = URL(string: payUrl) { if !payUrl.isEmpty,let url = URL(string: payUrl) {
let safariViewController = SFSafariViewController(url: url) let safariViewController = SFSafariViewController(url: url)
safariViewController.dismissButtonStyle = .close safariViewController.dismissButtonStyle = .close
...@@ -184,12 +183,10 @@ extension YHJsApi { ...@@ -184,12 +183,10 @@ extension YHJsApi {
//19、返回时刷新界面 //19、返回时刷新界面
@objc func reloadwebVeiwSyn(_ tag : Any) { @objc func reloadwebVeiwSyn(_ tag : Any) {
DispatchQueue.main.async {
let dic: [AnyHashable : Any] = [ let dic: [AnyHashable : Any] = [
"function" : "reloadwebVeiwSyn"] "function" : "reloadwebVeiwSyn"]
YHAliYunLogManager.shared.addModuleName(.h5InteractionType, remark: dic) YHAliYunLogManager.shared.addModuleName(.h5InteractionType, remark: dic)
DispatchQueue.main.async {
if let delegate = self.delegate as? YHH5WebViewVC { if let delegate = self.delegate as? YHH5WebViewVC {
delegate.reloadwebVeiwSyn() delegate.reloadwebVeiwSyn()
} }
...@@ -451,13 +448,12 @@ extension YHJsApi { ...@@ -451,13 +448,12 @@ extension YHJsApi {
//7、跳转 首页-生活 tab //7、跳转 首页-生活 tab
@objc func goHomeLifeTabSyn(_ fake : Any) { @objc func goHomeLifeTabSyn(_ fake : Any) {
DispatchQueue.main.async {
let dic: [AnyHashable : Any] = [ let dic: [AnyHashable : Any] = [
"function" : "goHomeLifeTabSyn", "function" : "goHomeLifeTabSyn",
] ]
YHAliYunLogManager.shared.addModuleName(.h5InteractionType, remark: dic) YHAliYunLogManager.shared.addModuleName(.h5InteractionType, remark: dic)
DispatchQueue.main.async {
UIViewController.current?.navigationController?.popToRootViewController(animated: false) UIViewController.current?.navigationController?.popToRootViewController(animated: false)
goTabBarBy(tabType: .home) goTabBarBy(tabType: .home)
NotificationCenter.default.post(name: YhConstant.YhNotification.didJumpToHomePageLifeTabNotification, object: nil) NotificationCenter.default.post(name: YhConstant.YhNotification.didJumpToHomePageLifeTabNotification, object: nil)
...@@ -546,12 +542,12 @@ extension YHJsApi { ...@@ -546,12 +542,12 @@ extension YHJsApi {
//5、返回App上一个界面 //5、返回App上一个界面
@objc func backToAppPreView(_ fake : Any) { @objc func backToAppPreView(_ fake : Any) {
DispatchQueue.main.async {
let dic: [AnyHashable : Any] = [ let dic: [AnyHashable : Any] = [
"function" : "backToAppPreView", "function" : "backToAppPreView",
] ]
YHAliYunLogManager.shared.addModuleName(.h5InteractionType, remark: dic) YHAliYunLogManager.shared.addModuleName(.h5InteractionType, remark: dic)
DispatchQueue.main.async {
if let delegate = self.delegate as? YHH5WebViewVC { if let delegate = self.delegate as? YHH5WebViewVC {
delegate.backToAppPreView() delegate.backToAppPreView()
} }
......
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