Commit 3ad19e16 authored by pete谢兆麟's avatar pete谢兆麟

去除服务中心多余代码

parent e0deb693
......@@ -239,27 +239,7 @@ extension YHServiceCenterMainViewController {
vc.orderID = orderId
vc.mobile = mobile
vc.loadData()
vc.block = {[weak self] type, count in
guard let self = self else {
return
}
if type == 0 {
arrItemTitles[0] = "全部(\(count))"
} else if type == 2 {
arrItemTitles[1] = "进行中(\(count))"
} else if type == 1 {
arrItemTitles[2] = "待开始(\(count))"
} else if type == 3 {
arrItemTitles[3] = "已完成(\(count))"
}
self.updata()
}
}
segmentedView.dataSource = segmentedDataSource
segmentedView.reloadData()
getStep()
}
}
......
......@@ -54,11 +54,6 @@ class YHProgressView: UIView {
}
func setProgress(_ progress: Float, animated: Bool) {
let animation = CABasicAnimation(keyPath: "strokeEnd")
animation.fromValue = progressLayer.strokeEnd
animation.toValue = progress
animation.duration = animated ? 1.0 : 0
progressLayer.strokeEnd = CGFloat(progress)
progressLayer.add(animation, forKey: "progressAnimation")
}
}
......@@ -255,6 +255,7 @@ extension YHServiceOrderProgressTableViewCell {
progressLabel.attributed.text = b + bb
}
if model.percentage == 0 {
progress.setProgress(0, animated: false)
progress.isHidden = true
} else {
progress.setProgress(Float(CGFloat(model.percentage))/100.0, animated: false)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment