//
|
// MineWithdrawalRecordCell.swift
|
// OKProject
|
//
|
// Created by alvin_y on 2020/7/3.
|
// Copyright © 2020 yangwang. All rights reserved.
|
//
|
|
import UIKit
|
|
class MineWithdrawalRecordCell: UITableViewCell {
|
|
/// 备注
|
@IBOutlet weak var label_remark: UILabel!
|
|
/// 类型
|
@IBOutlet weak var label_type: UILabel!
|
|
/// 金额
|
@IBOutlet weak var label_money: UILabel!
|
|
/// 状态
|
@IBOutlet weak var label_state: UILabel!
|
|
/// 时间
|
@IBOutlet weak var label_date: UILabel!
|
|
var model: WithdrawalRecordModel!{
|
didSet{
|
label_date.text = model.insertTime
|
label_money.attributedText = AttributedStringbuilder.build()
|
.add(string: "提现金额:", withFont: UIFont.systemFont(ofSize: 12), withColor: UIColor.color(hexString: "#333333"))
|
.add(string: "\(model.money.remain2Digits())元", withFont: UIFont.init(name: Medium, size: 12)!, withColor: UIColor.color(hexString: "#333333"))
|
.mutableAttributedString
|
label_type.attributedText = AttributedStringbuilder.build()
|
.add(string: "提现方式:", withFont: UIFont.systemFont(ofSize: 12), withColor: UIColor.color(hexString: "#333333"))
|
.add(string: "\(model.name)", withFont: UIFont.init(name: Medium, size: 12)!, withColor: UIColor.color(hexString: "#333333"))
|
.mutableAttributedString
|
label_remark.attributedText = AttributedStringbuilder.build()
|
.add(string: "备注:", withFont: UIFont.systemFont(ofSize: 12), withColor: UIColor.color(hexString: "#333333"))
|
.add(string: model.remark == "" ? "无" : model.remark, withFont: UIFont.init(name: Medium, size: 12)!, withColor: UIColor.color(hexString: "#333333"))
|
.mutableAttributedString
|
// 提现状态(1=待处理,2=成功,3=失败
|
switch model.state {
|
case 1:
|
label_state.text = "处理中"
|
label_state.textColor = ThemeColor
|
break
|
case 2:
|
label_state.text = "已提现"
|
label_state.textColor = ThemeColor
|
break
|
case 3:
|
label_state.text = "提现失败"
|
label_state.textColor = UIColor.color(light: UIColor.color(hexString: "#333333"), dark: UIColor.color(hexString: "#333333"))
|
break
|
default:
|
break
|
}
|
}
|
}
|
|
override func awakeFromNib() {
|
super.awakeFromNib()
|
// Initialization code
|
}
|
|
override func setSelected(_ selected: Bool, animated: Bool) {
|
super.setSelected(selected, animated: animated)
|
|
// Configure the view for the selected state
|
}
|
|
}
|