diff --git a/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/UserInterfaceState.xcuserstate b/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/UserInterfaceState.xcuserstate
index 8c53974..9255778 100644
Binary files a/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/UserInterfaceState.xcuserstate and b/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
index 1c788b4..5f2a245 100644
--- a/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+++ b/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
@@ -688,38 +688,6 @@
landmarkType = "7">
-
-
-
-
-
-
-
-
@@ -2671,8 +2639,8 @@
filePath = "../../PodRepository/DDCategoryKit_Private/DDCategoryKit_Private/Classes/UIImage+DDCategory/UIImage+DDCategory.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "72"
- endingLineNumber = "72"
+ startingLineNumber = "73"
+ endingLineNumber = "73"
landmarkName = "-dd_compressWithQulitySize:"
landmarkType = "7">
diff --git a/OrderScheduling/Common/WebView/WebViewController.swift b/OrderScheduling/Common/WebView/WebViewController.swift
index b41df77..fb31840 100644
--- a/OrderScheduling/Common/WebView/WebViewController.swift
+++ b/OrderScheduling/Common/WebView/WebViewController.swift
@@ -113,7 +113,7 @@ extension WebViewController : WKScriptMessageHandler {
let params = dict?["params"] as? [String:Int]
let id = params?["id"] as? Int
if let supplierId = USER.supplierId,let userId = USER.userId, let id {
- WEBTOOL.open(name: .trainDocmentDetail, appending: "&supplierId=\(supplierId)&userId=\(userId)&id=\(id)")
+ WEBTOOL.open(name: .docmentDetail, appending: "&supplierId=\(supplierId)&userId=\(userId)&id=\(id)")
}
}
}
diff --git a/OrderScheduling/Common/WebView/WebViewTool.swift b/OrderScheduling/Common/WebView/WebViewTool.swift
index fdef71c..45ccf0e 100644
--- a/OrderScheduling/Common/WebView/WebViewTool.swift
+++ b/OrderScheduling/Common/WebView/WebViewTool.swift
@@ -30,7 +30,7 @@ open class WebViewTool : NSObject {
case supplySettlement = "补结算单"
case workOrderDetail = "工单详情"
case trainDocment = "培训文档"
- case trainDocmentDetail = "文档详情"
+ case docmentDetail = "详情"
case docmentList = "文档资料"
}
@@ -101,8 +101,8 @@ open class WebViewTool : NSObject {
case .trainDocment:
vc = WebViewController(showNavBar:false, title: WebViewNameEnum.trainDocment.rawValue, url: "\((h5Models?.trainDocment)!)?token=\((USER.token)!)"+(appending ?? ""))
break
- case .trainDocmentDetail:
- vc = WebViewController(showNavBar:true, title: WebViewNameEnum.trainDocment.rawValue, url: "https://crm1.sino-assist.com/res/training/training.html?source=supplierApp"+(appending ?? ""))
+ case .docmentDetail:
+ vc = WebViewController(showNavBar:true, title: WebViewNameEnum.docmentDetail.rawValue, url: "https://crm1.sino-assist.com/res/training/training.html?source=supplierApp"+(appending ?? ""))
break
case .docmentList:
vc = WebViewController(showNavBar:false, title: WebViewNameEnum.docmentList.rawValue, url: "\((h5Models?.docmentList)!)?token=\((USER.token)!)"+(appending ?? ""))
diff --git a/OrderScheduling/Main/Initial.swift b/OrderScheduling/Main/Initial.swift
index f15a747..52597d5 100644
--- a/OrderScheduling/Main/Initial.swift
+++ b/OrderScheduling/Main/Initial.swift
@@ -99,25 +99,15 @@ extension Initial : DDAlamofireDelegate {
func errorCodeHandler(response: AFDataResponse) -> AFDataResponse where T : Decodable {
if response.response?.statusCode == 401 && (USER.isLogin == true) {
NotificationCenter.default.post(name: NSNotification.Name(rawValue: Notification_logoutSuccessToLoginController), object: nil)
- }
-
- if let error = response.error {
+ }else if let data = response.data, let json = try? JSONSerialization.jsonObject(with: data, options: .mutableContainers),let dic = json as? Dictionary,let msg = dic["msg"] as? String {
+ DispatchQueue.main.async {
+ UIApplication.shared.dd_keyWindow.dd_makeToast(msg)
+ }
+ }else if let error = response.error {
DispatchQueue.main.async {
UIApplication.shared.dd_keyWindow.dd_makeToast(error.errorDescription)
}
}
-
- if let data = response.data {
- let json = try? JSONSerialization.jsonObject(with: data, options: .mutableContainers)
- let dic = json as? Dictionary
- let msg = dic?["msg"] as? String
- if let msg {
- DispatchQueue.main.async {
- UIApplication.shared.dd_keyWindow.dd_makeToast(msg)
- }
- }
- }
-
return response
}