Commit 9ee7d7a3 authored by David黄金龙's avatar David黄金龙

我的方案跳转

parent c54f30bc
...@@ -55,13 +55,9 @@ extension YHMineSchemeViewController: UITableViewDelegate, UITableViewDataSource ...@@ -55,13 +55,9 @@ extension YHMineSchemeViewController: UITableViewDelegate, UITableViewDataSource
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.row == 0 { if indexPath.row == 0 {
return 199 return 199
} } else if indexPath.row == 1 {
if indexPath.row == 1 {
return 251 return 251
} } else if indexPath.row == 2 {
if indexPath.row == 2 {
return 190 return 190
} }
return 0 return 0
......
...@@ -171,7 +171,7 @@ class YHSchemeTableHeadView: UIView { ...@@ -171,7 +171,7 @@ class YHSchemeTableHeadView: UIView {
button.setTitleColor(UIColor(hex:0xd48638), for: .normal) button.setTitleColor(UIColor(hex:0xd48638), for: .normal)
button.layer.cornerRadius = kCornerRadius4 button.layer.cornerRadius = kCornerRadius4
button.clipsToBounds = true button.clipsToBounds = true
// button.addTarget(self, action: #selector(goNext), for: .touchUpInside) button.addTarget(self, action: #selector(goNext), for: .touchUpInside)
return button return button
}() }()
addSubview(titleButton) addSubview(titleButton)
...@@ -230,4 +230,9 @@ class YHSchemeTableHeadView: UIView { ...@@ -230,4 +230,9 @@ class YHSchemeTableHeadView: UIView {
} }
} }
} }
@objc func goNext() {
UIViewController.current?.navigationController?.pushViewController(YHScoreDetailViewController())
}
} }
...@@ -112,7 +112,7 @@ class YHSchemeTableViewCell: UITableViewCell { ...@@ -112,7 +112,7 @@ class YHSchemeTableViewCell: UITableViewCell {
button.setTitleColor(UIColor(hex:0xd48638), for: .normal) button.setTitleColor(UIColor(hex:0xd48638), for: .normal)
button.layer.cornerRadius = kCornerRadius4 button.layer.cornerRadius = kCornerRadius4
button.clipsToBounds = true button.clipsToBounds = true
// button.addTarget(self, action: #selector(goNext), for: .touchUpInside) button.addTarget(self, action: #selector(goNext), for: .touchUpInside)
return button return button
}() }()
centerView.addSubview(titleButton) centerView.addSubview(titleButton)
...@@ -165,4 +165,16 @@ class YHSchemeTableViewCell: UITableViewCell { ...@@ -165,4 +165,16 @@ class YHSchemeTableViewCell: UITableViewCell {
mainMessageLabel.attributedText = newString mainMessageLabel.attributedText = newString
subMessageLabel.text = model.subMessage subMessageLabel.text = model.subMessage
} }
@objc func goNext() {
if let title = titleButton.titleLabel?.text {
if title.contains("资料清单") {
UIViewController.current?.navigationController?.pushViewController(YHFileListViewController())
} else if title.contains("文书写作") {
UIViewController.current?.navigationController?.pushViewController(YHMyDocumentsListViewController())
}
}
}
} }
...@@ -82,15 +82,18 @@ extension YHScoreDetailViewController { ...@@ -82,15 +82,18 @@ extension YHScoreDetailViewController {
private func loadData() { private func loadData() {
guard let orderId = orderId else { return} if let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") {
let param = ["order_id":orderId] let param = ["order_id":orderID]
serviceCenterMainReqVM.getMyScoreDetail(params: param) { success, error in serviceCenterMainReqVM.getMyScoreDetail(params: param) { success, error in
if success == true { if success == true {
} else { } else {
YHHUD.flash(message: error?.errorMsg ?? "发生错误,请重试") YHHUD.flash(message: error?.errorMsg ?? "发生错误,请重试")
}
self.homeTableView.reloadData()
} }
self.homeTableView.reloadData() } else {
YHHUD.flash(message: "订单号不存在")
} }
} }
......
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