Commit 8c2678be144c4b3fc612263bf1419bca555ae6ff

Authored by liushiyu
1 parent c44d078f

对之前存储的缓存进行清除

metaCode/Classes/Config/CNLiveConfigUserInfo.swift
... ... @@ -281,7 +281,7 @@ class StandSortManager: NSObject {
281 281 let standModel = item as! MineAuthListModel
282 282 let old_index = have_auths.index(of: standModel)
283 283 let new_index = have_id_auths.index(of: standModel.identityId)
284   - if old_index != new_index {
  284 + if old_index != new_index && have_auths.count == have_id_auths.count {
285 285 swap(&have_auths[new_index], &have_auths[old_index])
286 286 }
287 287 }
... ...
metaCode/Classes/Config/Database/CNLiveSaveAuthDB.swift
... ... @@ -47,6 +47,11 @@ class CNLiveSaveAuthDB : NSObject{
47 47 /// - Parameter objects: 数据组
48 48 func insertObjects(objects: [MineAuthListModel]) {
49 49  
  50 + do {
  51 + try FileManager.default.removeItem(atPath: userFileDir+"storage.plist")
  52 + } catch _ {}
  53 +
  54 +
50 55 var temp_dic = NSMutableDictionary.init(contentsOfFile: userFileDir+"storage.plist")
51 56 if (temp_dic == nil) {
52 57 temp_dic = NSMutableDictionary.init()
... ...
metaCode/Classes/Config/Database/CNLiveSaveStandDB.swift
... ... @@ -46,6 +46,10 @@ class CNLiveSaveStandDB: NSObject {
46 46 /// - Parameter objects: 数据组
47 47 func insertObjects(objects: [StandListModel]) {
48 48  
  49 + do {
  50 + try FileManager.default.removeItem(atPath: userFileDir+"storage.plist")
  51 + } catch _ {}
  52 +
49 53 var temp_dic = NSMutableDictionary.init(contentsOfFile: userFileDir+"storage.plist")
50 54 if (temp_dic == nil) {
51 55 temp_dic = NSMutableDictionary.init()
... ...
metaCode/Classes/Main/VideoPage/View/CNLiveShortVideoContentListView.swift
... ... @@ -249,8 +249,13 @@ class CNLiveShortVideoContentListTableViewCell: UITableViewCell {
249 249  
250 250 if listModel.product?.check == true {
251 251 if listModel.product?.albumProductType != "0" {
252   - tipView.isHidden = false
253   - tipView.image = UIImage(named: "short_video_free")
  252 + if listModel.product?.productType == "4" {
  253 + //这里表示可以进行试听
  254 + tipView.isHidden = true
  255 + } else {
  256 + tipView.isHidden = false
  257 + tipView.image = UIImage(named: "short_video_free")
  258 + }
254 259 }
255 260 } else {
256 261 if listModel.product?.productType == "4" {
... ...