update
This commit is contained in:
Binary file not shown.
@@ -688,38 +688,6 @@
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
uuid = "E50CC4D6-65D6-42B1-A6C2-F21A7FE4C88C"
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "OrderScheduling/Main/Initial.swift"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "110"
|
||||
endingLineNumber = "110"
|
||||
landmarkName = "errorCodeHandler(response:)"
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
uuid = "BCFDA566-90F5-4EAA-B2A8-0BFB846EB5CD"
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "OrderScheduling/Main/Initial.swift"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "113"
|
||||
endingLineNumber = "113"
|
||||
landmarkName = "errorCodeHandler(response:)"
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
@@ -730,8 +698,8 @@
|
||||
filePath = "OrderScheduling/Main/Initial.swift"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "121"
|
||||
endingLineNumber = "121"
|
||||
startingLineNumber = "111"
|
||||
endingLineNumber = "111"
|
||||
landmarkName = "errorCodeHandler(response:)"
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
@@ -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">
|
||||
</BreakpointContent>
|
||||
|
||||
@@ -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)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 ?? ""))
|
||||
|
||||
@@ -99,25 +99,15 @@ extension Initial : DDAlamofireDelegate {
|
||||
func errorCodeHandler<T>(response: AFDataResponse<T>) -> AFDataResponse<T> 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<String, Any>,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<String, Any>
|
||||
let msg = dic?["msg"] as? String
|
||||
if let msg {
|
||||
DispatchQueue.main.async {
|
||||
UIApplication.shared.dd_keyWindow.dd_makeToast(msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user