//
|
// NoteContentTCell.swift
|
// BrokerDriver
|
//
|
// Created by 无故事王国 on 2023/4/25.
|
//
|
|
import UIKit
|
import RxSwift
|
|
class NoteContentTCell: UITableViewCell {
|
|
@IBOutlet weak var label_content: UILabel!
|
var indexPath:IndexPath!
|
private var disposeBag:DisposeBag!
|
|
var contentModel:NoteContentModel?{
|
didSet{
|
label_content.text = contentModel?.describe ?? ""
|
}
|
}
|
override func awakeFromNib() {
|
super.awakeFromNib()
|
disposeBag = DisposeBag()
|
}
|
|
@IBAction func delAction(_ sender: UIButton) {
|
CommonAlertView.show(title: "Prompt!", content: "Confirm the deletion?", bt1: "Cancel", bt2: "Confirm") { [weak self] in
|
guard let weakSelf = self else { return }
|
Services.delOrderNote(id: weakSelf.contentModel!.id).subscribe(onNext: { data in
|
NotificationCenter.default.post(name: DetailNote_Noti, object: weakSelf.indexPath)
|
}) { error in
|
|
}.disposed(by: weakSelf.disposeBag)
|
}
|
}
|
}
|