Commit 24df412bcaec2f3c58154a7e760e269295a8facf
1 parent
4601c4a7
从我的数字资产页提交的身份,返回后返回到我的数字资产页 , 我的数字资产页-我的身份审核通过的优先展示
Showing
3 changed files
with
30 additions
and
3 deletions
metaCode/Classes/Main/HomePage/Controller/DigitalAuth/CNLiveDigitalAssetsController.swift
| @@ -40,6 +40,10 @@ class CNLiveDigitalAssetsController:CNLiveBaseViewController, UITableViewDataSou | @@ -40,6 +40,10 @@ class CNLiveDigitalAssetsController:CNLiveBaseViewController, UITableViewDataSou | ||
| 40 | return dataArray | 40 | return dataArray |
| 41 | }() | 41 | }() |
| 42 | 42 | ||
| 43 | + override func viewWillAppear(_ animated: Bool) { | ||
| 44 | + super.viewWillAppear(animated) | ||
| 45 | + self.loadData() | ||
| 46 | + } | ||
| 43 | override func viewDidLoad() { | 47 | override func viewDidLoad() { |
| 44 | super.viewDidLoad() | 48 | super.viewDidLoad() |
| 45 | navigationBarHidden = false | 49 | navigationBarHidden = false |
| @@ -85,6 +89,14 @@ class CNLiveDigitalAssetsController:CNLiveBaseViewController, UITableViewDataSou | @@ -85,6 +89,14 @@ class CNLiveDigitalAssetsController:CNLiveBaseViewController, UITableViewDataSou | ||
| 85 | if respStatue == .success { | 89 | if respStatue == .success { |
| 86 | let listBaseModel = result as! MineAuthListBaseModel | 90 | let listBaseModel = result as! MineAuthListBaseModel |
| 87 | if self != nil{ | 91 | if self != nil{ |
| 92 | + var arr = Array<MineAuthListModel>() | ||
| 93 | + listBaseModel.list.forEach { listMdl in | ||
| 94 | + if listMdl.userStatus == 1{ | ||
| 95 | + arr.insert(listMdl, at: 0) | ||
| 96 | + }else{ | ||
| 97 | + arr.append(listMdl) | ||
| 98 | + } | ||
| 99 | + } | ||
| 88 | self!.dataArray.addObjects(from: listBaseModel.list) | 100 | self!.dataArray.addObjects(from: listBaseModel.list) |
| 89 | self!.dataArray.add(MineAuthListModel()) | 101 | self!.dataArray.add(MineAuthListModel()) |
| 90 | self!.tableView.reloadData() | 102 | self!.tableView.reloadData() |
metaCode/Classes/Main/MinePage/Controller/CNLiveMineAuthResultViewController.swift
| @@ -240,9 +240,24 @@ class CNLiveMineAuthResultViewController: CNLiveBaseViewController { | @@ -240,9 +240,24 @@ class CNLiveMineAuthResultViewController: CNLiveBaseViewController { | ||
| 240 | } | 240 | } |
| 241 | 241 | ||
| 242 | @objc func sendInfoActionMothod() { | 242 | @objc func sendInfoActionMothod() { |
| 243 | - self.navigationController?.popToRootViewController(animated: true) | 243 | + self.popVC() |
| 244 | } | 244 | } |
| 245 | override func ClickBackBtn() { | 245 | override func ClickBackBtn() { |
| 246 | - self.navigationController?.popToRootViewController(animated: true) | 246 | + self.popVC() |
| 247 | + } | ||
| 248 | + | ||
| 249 | + func popVC(){ | ||
| 250 | + let controllers = self.navigationController?.viewControllers | ||
| 251 | + if controllers?.count ?? 0 > 2{ | ||
| 252 | + if controllers?[1] is CNLiveDigitalAssetsController{ | ||
| 253 | + let assetVC = controllers?[1] as! CNLiveDigitalAssetsController | ||
| 254 | + self.navigationController?.popToViewController(assetVC, animated: true) | ||
| 255 | + }else{ | ||
| 256 | + self.navigationController?.popToRootViewController(animated: true) | ||
| 257 | + } | ||
| 258 | + | ||
| 259 | + }else{ | ||
| 260 | + self.navigationController?.popToRootViewController(animated: true) | ||
| 261 | + } | ||
| 247 | } | 262 | } |
| 248 | } | 263 | } |
metaCode/Classes/Main/MinePage/ViewModel/CNLiveMineBaseModel.swift
| @@ -374,7 +374,7 @@ final class MineAuthListModel: BaseModel {//,TableCodable { | @@ -374,7 +374,7 @@ final class MineAuthListModel: BaseModel {//,TableCodable { | ||
| 374 | var authTime: Int = 0 | 374 | var authTime: Int = 0 |
| 375 | var code: String? = "" | 375 | var code: String? = "" |
| 376 | var identityId: Int = 0 | 376 | var identityId: Int = 0 |
| 377 | - var userStatus: Int = 0 | 377 | + var userStatus: Int = 0//0审核中 1审核成功 |
| 378 | 378 | ||
| 379 | // enum CodingKeys: String, CodingTableKey { | 379 | // enum CodingKeys: String, CodingTableKey { |
| 380 | // | 380 | // |