diff --git a/YouerLiveVideo/YouerLiveVideo/controllers/TVStation/ExcellentTVViewController.swift b/YouerLiveVideo/YouerLiveVideo/controllers/TVStation/ExcellentTVViewController.swift index 241c539..3556089 100644 --- a/YouerLiveVideo/YouerLiveVideo/controllers/TVStation/ExcellentTVViewController.swift +++ b/YouerLiveVideo/YouerLiveVideo/controllers/TVStation/ExcellentTVViewController.swift @@ -320,6 +320,15 @@ class ExcellentTVInforViewCell: UICollectionViewCell{ @IBAction func playBtnClick(_ sender: UIButton) { AppDelegate.instance().httpServer.addHistoryView(parameters: ["f_ViewType":self.model!.f_ResourceType as AnyObject,"f_ViewId":self.model!.f_Id as AnyObject,"f_ViewName":self.model!.f_Title as AnyObject]) { (str, error) in } + AppDelegate.instance().httpServer.updatePv(parameters: ["f_id":self.model!.f_Id as AnyObject]) { (str, error) in + if error==nil { + if JSON.fromString(jsonString: str)!["status"].intValue == 1{ + //更新阅读量成功刷新页面 + self.model!.f_Pv = self.model!.f_Pv + 1 + self.playCount.text = "播放次数:" + "\(self.model!.f_Pv!)" + } + } + } let url = URL(string:self.model!.f_ResourceUrl) let player = AVPlayerViewController() player.player = AVPlayer(url: url!) -- libgit2 0.21.0