Commit e919abec authored by DavidHuang's avatar DavidHuang

放入主线程

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