buf fixed
This commit is contained in:
@@ -83,8 +83,6 @@ open class ApiList {
|
||||
public let saveAppeal = "/driverApp/task/saveAppeal"
|
||||
|
||||
public let onlineReminder = "/supplierAppV2/dispatchApp/alarm/onlineReminder"
|
||||
|
||||
public let onlineReminderRead = "/supplierAppV2/dispatchApp/alarm/onlineReminderRead"
|
||||
|
||||
|
||||
public let vehicleMonitorInfo = "/supplierAppV2/dispatchApp/order/vehicleMonitorInfo"
|
||||
}
|
||||
|
||||
@@ -272,10 +272,6 @@ public struct OnlineReminderParameters : Encodable {
|
||||
var supplierId : Int?
|
||||
}
|
||||
|
||||
public struct OnlineReminderReadParameters : Encodable {
|
||||
var id : Int?
|
||||
}
|
||||
|
||||
public struct VehicleMonitorInfoParameters : Encodable {
|
||||
var vehicleId : Int?
|
||||
var lon : String?
|
||||
|
||||
@@ -173,10 +173,6 @@ open class RequestList {
|
||||
return DDAF.get(urlString: HOST+API.onlineReminder,parameters: parameters,encoding: URLEncodedFormParameterEncoder.default,headers: [tokenHeader()],responseType: ResponseModel<MessageReminderListDataModel>.self)
|
||||
}
|
||||
|
||||
func onlineReminderRead<P:Encodable>(parameters:P) -> Single<ResponseModel<String>?> {
|
||||
return DDAF.get(urlString: HOST+API.onlineReminderRead,parameters: parameters,encoding: URLEncodedFormParameterEncoder.default,headers: [tokenHeader()],responseType: ResponseModel<String>.self)
|
||||
}
|
||||
|
||||
func vehicleMonitorInfo<P:Encodable>(parameters:P) -> Single<ResponseModel<VehicleMonitorInfoDataModel>?> {
|
||||
return DDAF.post(urlString: HOST+API.vehicleMonitorInfo,parameters: parameters,encoding: JSONParameterEncoder.default,headers: [tokenHeader()],responseType: ResponseModel<VehicleMonitorInfoDataModel>.self)
|
||||
}
|
||||
|
||||
@@ -81,7 +81,10 @@ final class OnlineVehiclesEntryView: UIView {
|
||||
|
||||
convenience init(content: String?) {
|
||||
self.init(frame: .zero)
|
||||
contentLabel.text = content
|
||||
let attribute = NSMutableAttributedString(string: content ?? "",attributes: [.foregroundColor: UIColor(hex: "#4C5361"),.font : UIFont.boldSystemFont(ofSize: 16)])
|
||||
attribute.append(NSMutableAttributedString(string: "\n\n为获取更多案件",attributes: [.foregroundColor: UIColor(hex: "#CE5F31"),.font : UIFont.boldSystemFont(ofSize: 21)]))
|
||||
attribute.append(NSMutableAttributedString(string: "\n请提醒在班的师傅登录APP并合理保持在线。",attributes: [.foregroundColor: UIColor(hex: "#4C5361"),.font : UIFont.boldSystemFont(ofSize: 16)]))
|
||||
contentLabel.attributedText = attribute
|
||||
confirmButton.addTarget(self, action: #selector(confirmClick), for: .touchUpInside)
|
||||
}
|
||||
|
||||
|
||||
@@ -149,16 +149,18 @@ extension RescueController {
|
||||
entryView.onConfirm = { [weak self] in
|
||||
guard let self = self else { return }
|
||||
Entry.default.dismiss(name: "onlineVehiclesEntryView")
|
||||
RQ.onlineReminderRead(parameters: OnlineReminderReadParameters(id: response?.data?.id))
|
||||
.observe(on: MainScheduler.instance)
|
||||
.subscribe(onSuccess: {[weak self] readResponse in
|
||||
guard let self = self else { return }
|
||||
if readResponse?.success == true {
|
||||
} else {
|
||||
self.view.dd_makeToast(readResponse?.msg)
|
||||
}
|
||||
})
|
||||
.disposed(by: self.disposeBag)
|
||||
if let id = response?.data?.id {
|
||||
RQ.readMessageReminder(parameters: ReadMessageReminderParameters(id: id))
|
||||
.observe(on: MainScheduler.instance)
|
||||
.subscribe(onSuccess: {[weak self] readResponse in
|
||||
guard let self = self else { return }
|
||||
if readResponse?.success == true {
|
||||
} else {
|
||||
self.view.dd_makeToast(readResponse?.msg)
|
||||
}
|
||||
})
|
||||
.disposed(by: self.disposeBag)
|
||||
}
|
||||
}
|
||||
Entry.default.showOnlineVehiclesEntry(view: entryView, name: "onlineVehiclesEntryView")
|
||||
Tool.default.playVoiceWith(broadcast: content)
|
||||
|
||||
Reference in New Issue
Block a user