Commit 06885f880a931dc39ff704dae77d82778fc2b34d

Authored by liushiyu
1 parent 8c2678be

当第一次显示的时候没有排序时,把认证的提到最前面显示

metaCode/Classes/Config/CNLiveConfigUserInfo.swift
@@ -239,7 +239,17 @@ class StandSortManager: NSObject { @@ -239,7 +239,17 @@ class StandSortManager: NSObject {
239 static public func sortAllListData(stands: NSArray) -> NSArray { 239 static public func sortAllListData(stands: NSArray) -> NSArray {
240 let have_id_auths = StandSortManager.readStandSort() 240 let have_id_auths = StandSortManager.readStandSort()
241 if have_id_auths.count == 0 { 241 if have_id_auths.count == 0 {
242 - return stands 242 + //1.29 需求 如果第一次的时候没有进行排序,则把已经认证的放在第一位
  243 + let tempArray = NSMutableArray()
  244 + for item in stands.reverseObjectEnumerator().allObjects {
  245 + let listModel = item as! StandListModel
  246 + if listModel.auth {
  247 + tempArray.insert(listModel, at: 0)
  248 + } else {
  249 + tempArray.add(listModel)
  250 + }
  251 + }
  252 + return tempArray
243 } 253 }
244 print("allList接口里面===>\(have_id_auths)") 254 print("allList接口里面===>\(have_id_auths)")
245 let have_auths = NSMutableArray() 255 let have_auths = NSMutableArray()
metaCode/Classes/Main/MinePage/Controller/CNLiveMineViewController.swift
@@ -181,7 +181,8 @@ extension CNLiveMineViewController { @@ -181,7 +181,8 @@ extension CNLiveMineViewController {
181 181
182 if indexPath.section == 4 { 182 if indexPath.section == 4 {
183 if indexPath.row == 0 { 183 if indexPath.row == 0 {
184 - self.navigationController?.pushViewController(CNLiveShopOrderViewController.init(), animated: true) 184 +// self.navigationController?.pushViewController(CNLiveShopOrderViewController.init(), animated: true)
  185 + StandSortManager.removeStandSort()
185 } 186 }
186 if indexPath.row == 1 { 187 if indexPath.row == 1 {
187 self.navigationController?.pushViewController(CNLiveShopTransViewController.init(), animated: true) 188 self.navigationController?.pushViewController(CNLiveShopTransViewController.init(), animated: true)