buf fixed
This commit is contained in:
@@ -84,7 +84,5 @@ open class ApiList {
|
|||||||
|
|
||||||
public let onlineReminder = "/supplierAppV2/dispatchApp/alarm/onlineReminder"
|
public let onlineReminder = "/supplierAppV2/dispatchApp/alarm/onlineReminder"
|
||||||
|
|
||||||
public let onlineReminderRead = "/supplierAppV2/dispatchApp/alarm/onlineReminderRead"
|
|
||||||
|
|
||||||
public let vehicleMonitorInfo = "/supplierAppV2/dispatchApp/order/vehicleMonitorInfo"
|
public let vehicleMonitorInfo = "/supplierAppV2/dispatchApp/order/vehicleMonitorInfo"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -272,10 +272,6 @@ public struct OnlineReminderParameters : Encodable {
|
|||||||
var supplierId : Int?
|
var supplierId : Int?
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct OnlineReminderReadParameters : Encodable {
|
|
||||||
var id : Int?
|
|
||||||
}
|
|
||||||
|
|
||||||
public struct VehicleMonitorInfoParameters : Encodable {
|
public struct VehicleMonitorInfoParameters : Encodable {
|
||||||
var vehicleId : Int?
|
var vehicleId : Int?
|
||||||
var lon : String?
|
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)
|
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>?> {
|
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)
|
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?) {
|
convenience init(content: String?) {
|
||||||
self.init(frame: .zero)
|
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)
|
confirmButton.addTarget(self, action: #selector(confirmClick), for: .touchUpInside)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -149,16 +149,18 @@ extension RescueController {
|
|||||||
entryView.onConfirm = { [weak self] in
|
entryView.onConfirm = { [weak self] in
|
||||||
guard let self = self else { return }
|
guard let self = self else { return }
|
||||||
Entry.default.dismiss(name: "onlineVehiclesEntryView")
|
Entry.default.dismiss(name: "onlineVehiclesEntryView")
|
||||||
RQ.onlineReminderRead(parameters: OnlineReminderReadParameters(id: response?.data?.id))
|
if let id = response?.data?.id {
|
||||||
.observe(on: MainScheduler.instance)
|
RQ.readMessageReminder(parameters: ReadMessageReminderParameters(id: id))
|
||||||
.subscribe(onSuccess: {[weak self] readResponse in
|
.observe(on: MainScheduler.instance)
|
||||||
guard let self = self else { return }
|
.subscribe(onSuccess: {[weak self] readResponse in
|
||||||
if readResponse?.success == true {
|
guard let self = self else { return }
|
||||||
} else {
|
if readResponse?.success == true {
|
||||||
self.view.dd_makeToast(readResponse?.msg)
|
} else {
|
||||||
}
|
self.view.dd_makeToast(readResponse?.msg)
|
||||||
})
|
}
|
||||||
.disposed(by: self.disposeBag)
|
})
|
||||||
|
.disposed(by: self.disposeBag)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Entry.default.showOnlineVehiclesEntry(view: entryView, name: "onlineVehiclesEntryView")
|
Entry.default.showOnlineVehiclesEntry(view: entryView, name: "onlineVehiclesEntryView")
|
||||||
Tool.default.playVoiceWith(broadcast: content)
|
Tool.default.playVoiceWith(broadcast: content)
|
||||||
|
|||||||
Reference in New Issue
Block a user