buf fixed

This commit is contained in:
ddisfriend
2025-10-21 11:44:48 +08:00
parent df788d150a
commit 27a0535b68
5 changed files with 17 additions and 22 deletions

View File

@@ -84,7 +84,5 @@ open class ApiList {
public let onlineReminder = "/supplierAppV2/dispatchApp/alarm/onlineReminder"
public let onlineReminderRead = "/supplierAppV2/dispatchApp/alarm/onlineReminderRead"
public let vehicleMonitorInfo = "/supplierAppV2/dispatchApp/order/vehicleMonitorInfo"
}

View File

@@ -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?

View File

@@ -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)
}

View File

@@ -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)
}

View File

@@ -149,7 +149,8 @@ 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))
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 }
@@ -160,6 +161,7 @@ extension RescueController {
})
.disposed(by: self.disposeBag)
}
}
Entry.default.showOnlineVehiclesEntry(view: entryView, name: "onlineVehiclesEntryView")
Tool.default.playVoiceWith(broadcast: content)
} else {