Commit c44d078f70b4b47c442859985991c9983da54805
Merge branch 'master' of http://bj.gitlab.cnlive.com/ios-team/CNLiveMateCode
Showing
3 changed files
with
11 additions
and
3 deletions
metaCode/Classes/Common/Util/CNLiveIntegralAlertTool.swift
| @@ -333,14 +333,13 @@ class CNLiveIntegralAlertTool:NSObject{ | @@ -333,14 +333,13 @@ class CNLiveIntegralAlertTool:NSObject{ | ||
| 333 | navigationViewController().pushViewController(CNLiveMineQuestViewController(checkModel: self.checkInModel!), animated: pushAnimated) | 333 | navigationViewController().pushViewController(CNLiveMineQuestViewController(checkModel: self.checkInModel!), animated: pushAnimated) |
| 334 | 334 | ||
| 335 | }else if self.currentIntegralPayStatus == .paying{ | 335 | }else if self.currentIntegralPayStatus == .paying{ |
| 336 | - self.integralStatusChangedBlock!(.paying) | 336 | + |
| 337 | }else if self.currentIntegralPayStatus == .paySuccess{ | 337 | }else if self.currentIntegralPayStatus == .paySuccess{ |
| 338 | self.hiddenIntegralAlert() | 338 | self.hiddenIntegralAlert() |
| 339 | - self.integralStatusChangedBlock!(.paySuccess) | 339 | + |
| 340 | }else if self.currentIntegralPayStatus == .payFailed{ | 340 | }else if self.currentIntegralPayStatus == .payFailed{ |
| 341 | self.currentIntegralPayStatus = .integralEnough | 341 | self.currentIntegralPayStatus = .integralEnough |
| 342 | self.initUI() | 342 | self.initUI() |
| 343 | - self.integralStatusChangedBlock!(.payFailed) | ||
| 344 | }else{ | 343 | }else{ |
| 345 | 344 | ||
| 346 | } | 345 | } |
| @@ -348,6 +347,7 @@ class CNLiveIntegralAlertTool:NSObject{ | @@ -348,6 +347,7 @@ class CNLiveIntegralAlertTool:NSObject{ | ||
| 348 | // MARK: - 积分付费接口 | 347 | // MARK: - 积分付费接口 |
| 349 | func postOrderVideoByPoint(){ | 348 | func postOrderVideoByPoint(){ |
| 350 | self.currentIntegralPayStatus = .paying | 349 | self.currentIntegralPayStatus = .paying |
| 350 | + self.integralStatusChangedBlock!(.paying) | ||
| 351 | self.initUI() | 351 | self.initUI() |
| 352 | //付费接口 | 352 | //付费接口 |
| 353 | CNLiveHomePageViewModel.orderVideoByPoint(prdId: self.productId) { result, status in | 353 | CNLiveHomePageViewModel.orderVideoByPoint(prdId: self.productId) { result, status in |
| @@ -357,6 +357,7 @@ class CNLiveIntegralAlertTool:NSObject{ | @@ -357,6 +357,7 @@ class CNLiveIntegralAlertTool:NSObject{ | ||
| 357 | self.initUI() | 357 | self.initUI() |
| 358 | //刷新短剧首页数据 | 358 | //刷新短剧首页数据 |
| 359 | self.homePageNeedReloadActionBlock!() | 359 | self.homePageNeedReloadActionBlock!() |
| 360 | + self.integralStatusChangedBlock!(.paySuccess) | ||
| 360 | }else{ | 361 | }else{ |
| 361 | //购买失败 | 362 | //购买失败 |
| 362 | if self.point > Int(self.integralCount)!{ | 363 | if self.point > Int(self.integralCount)!{ |
| @@ -369,6 +370,7 @@ class CNLiveIntegralAlertTool:NSObject{ | @@ -369,6 +370,7 @@ class CNLiveIntegralAlertTool:NSObject{ | ||
| 369 | self.initUI() | 370 | self.initUI() |
| 370 | let errMsg = result as! String | 371 | let errMsg = result as! String |
| 371 | showMessage(message: errMsg) | 372 | showMessage(message: errMsg) |
| 373 | + self.integralStatusChangedBlock!(.payFailed) | ||
| 372 | } | 374 | } |
| 373 | } | 375 | } |
| 374 | 376 |
metaCode/Classes/Main/HomePage/View/VerticalViews/DownSlide/CNLiveDownSlideRecommendCell.swift
| @@ -31,6 +31,7 @@ class CNLiveDownSlideRecommendCell: UITableViewCell { | @@ -31,6 +31,7 @@ class CNLiveDownSlideRecommendCell: UITableViewCell { | ||
| 31 | super.init(style: style, reuseIdentifier: reuseIdentifier) | 31 | super.init(style: style, reuseIdentifier: reuseIdentifier) |
| 32 | self.selectionStyle = .none | 32 | self.selectionStyle = .none |
| 33 | contentView.backgroundColor = HexColor(kCNDownSlideBackgroundColorHex) | 33 | contentView.backgroundColor = HexColor(kCNDownSlideBackgroundColorHex) |
| 34 | + contentView.clipsToBounds = true | ||
| 34 | } | 35 | } |
| 35 | 36 | ||
| 36 | required init?(coder: NSCoder) { | 37 | required init?(coder: NSCoder) { |
| @@ -58,6 +59,8 @@ class CNLiveDownSlideRecommendCell: UITableViewCell { | @@ -58,6 +59,8 @@ class CNLiveDownSlideRecommendCell: UITableViewCell { | ||
| 58 | let imageView = UIImageView(frame: CGRectMake(DownSlideRecommendLeftGap, CGFloat(hangIndex-1)*DownSlideRecommendWH+DownSlideRecommendLeftGap*CGFloat(hangIndex-1), CGFloat(DownSlideRecommendWH), CGFloat(DownSlideRecommendWH))) | 59 | let imageView = UIImageView(frame: CGRectMake(DownSlideRecommendLeftGap, CGFloat(hangIndex-1)*DownSlideRecommendWH+DownSlideRecommendLeftGap*CGFloat(hangIndex-1), CGFloat(DownSlideRecommendWH), CGFloat(DownSlideRecommendWH))) |
| 59 | imageView.kf.setImage(with: URL(string:contentMdl.poster!)) | 60 | imageView.kf.setImage(with: URL(string:contentMdl.poster!)) |
| 60 | imageView.tag = i | 61 | imageView.tag = i |
| 62 | + imageView.layer.cornerRadius = 14 | ||
| 63 | + imageView.clipsToBounds = true | ||
| 61 | imageView.isUserInteractionEnabled = true | 64 | imageView.isUserInteractionEnabled = true |
| 62 | imageView.addGestureRecognizer(UITapGestureRecognizer.init(target: self, action: #selector(pushWebAction))) | 65 | imageView.addGestureRecognizer(UITapGestureRecognizer.init(target: self, action: #selector(pushWebAction))) |
| 63 | contentView.addSubview(imageView) | 66 | contentView.addSubview(imageView) |
| @@ -68,6 +71,8 @@ class CNLiveDownSlideRecommendCell: UITableViewCell { | @@ -68,6 +71,8 @@ class CNLiveDownSlideRecommendCell: UITableViewCell { | ||
| 68 | let imageView = UIImageView(frame: CGRectMake(CGFloat(DownSlideRecommendLeftGap*2)+CGFloat(DownSlideRecommendWH), CGFloat(hangIndex-1)*DownSlideRecommendWH+DownSlideRecommendLeftGap*CGFloat(hangIndex-1), CGFloat(DownSlideRecommendWH), CGFloat(DownSlideRecommendWH))) | 71 | let imageView = UIImageView(frame: CGRectMake(CGFloat(DownSlideRecommendLeftGap*2)+CGFloat(DownSlideRecommendWH), CGFloat(hangIndex-1)*DownSlideRecommendWH+DownSlideRecommendLeftGap*CGFloat(hangIndex-1), CGFloat(DownSlideRecommendWH), CGFloat(DownSlideRecommendWH))) |
| 69 | imageView.kf.setImage(with: URL(string:contentMdl.poster!)) | 72 | imageView.kf.setImage(with: URL(string:contentMdl.poster!)) |
| 70 | imageView.tag = i | 73 | imageView.tag = i |
| 74 | + imageView.layer.cornerRadius = 14 | ||
| 75 | + imageView.clipsToBounds = true | ||
| 71 | imageView.isUserInteractionEnabled = true | 76 | imageView.isUserInteractionEnabled = true |
| 72 | imageView.addGestureRecognizer(UITapGestureRecognizer.init(target: self, action: #selector(pushWebAction))) | 77 | imageView.addGestureRecognizer(UITapGestureRecognizer.init(target: self, action: #selector(pushWebAction))) |
| 73 | contentView.addSubview(imageView) | 78 | contentView.addSubview(imageView) |
metaCode/Classes/Main/HomePage/View/VerticalViews/DownSlide/CNLiveDownSlideTodayRecommendCell.swift
| @@ -32,6 +32,7 @@ class CNLiveDownSlideTodayRecommendCell: UITableViewCell { | @@ -32,6 +32,7 @@ class CNLiveDownSlideTodayRecommendCell: UITableViewCell { | ||
| 32 | super.init(style: style, reuseIdentifier: reuseIdentifier) | 32 | super.init(style: style, reuseIdentifier: reuseIdentifier) |
| 33 | self.selectionStyle = .none | 33 | self.selectionStyle = .none |
| 34 | contentView.backgroundColor = HexColor(kCNDownSlideBackgroundColorHex) | 34 | contentView.backgroundColor = HexColor(kCNDownSlideBackgroundColorHex) |
| 35 | + contentView.clipsToBounds = true | ||
| 35 | } | 36 | } |
| 36 | 37 | ||
| 37 | required init?(coder: NSCoder) { | 38 | required init?(coder: NSCoder) { |