|
@@ -7,8 +7,14 @@
|
|
|
//
|
|
|
|
|
|
import UIKit
|
|
|
+import RxSwift
|
|
|
|
|
|
class OrderShopAndStatusTableViewCell: UITableViewCell {
|
|
|
+
|
|
|
+ let disposeBag = DisposeBag()
|
|
|
+
|
|
|
+ typealias ShopClosure = (_ orderModel: OrderModel) -> Void
|
|
|
+ var shopClosure : ShopClosure?
|
|
|
|
|
|
class func cellWith(tableView:UITableView,indexPath:IndexPath) -> OrderShopAndStatusTableViewCell {
|
|
|
let ID = "OrderShopAndStatusTableViewCell"
|
|
@@ -64,9 +70,24 @@ class OrderShopAndStatusTableViewCell: UITableViewCell {
|
|
|
shopButton.setTitleColor(k333333Color, for: UIControl.State.normal)
|
|
|
shopButton.titleLabel?.font = kRegularFont14
|
|
|
shopButton.setImage(kImage(name: "my_arrows_unfold"), for: UIControl.State.normal)
|
|
|
+ shopButton.rx.tap.subscribe(onNext: {
|
|
|
+ [weak self] (data) in
|
|
|
+ if self?.orderModel != nil {
|
|
|
+ if let shopClosure = self?.shopClosure {
|
|
|
+ shopClosure((self?.orderModel)!)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if self?.orderDetailModel != nil {
|
|
|
+ if let shopClosure = self?.shopClosure {
|
|
|
+ shopClosure((self?.orderDetailModel)!)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }).disposed(by: disposeBag)
|
|
|
return shopButton
|
|
|
}()
|
|
|
-
|
|
|
+
|
|
|
private lazy var statusLabel: UILabel = {
|
|
|
let statusLabel = UILabel()
|
|
|
statusLabel.font = kRegularFont14
|
|
@@ -83,6 +104,7 @@ class OrderShopAndStatusTableViewCell: UITableViewCell {
|
|
|
didSet {
|
|
|
shopButton.setTitle(orderModel?.shopName ?? "", for: UIControl.State.normal)
|
|
|
shopButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.right, imageTitleSpace: 5)
|
|
|
+
|
|
|
if orderModel?.feedbackStatus == 0 { //未维权
|
|
|
switch orderModel?.status {
|
|
|
case 0: //待付款
|