Commit 3ec98a5ae1754617d3b786acbe4c8f9a694e3e12
1 parent
4559c164
Exists in
newLive
no message
Showing
1 changed file
with
9 additions
and
0 deletions
Show diff stats
YouerLiveVideo/YouerLiveVideo/controllers/TVStation/ExcellentTVViewController.swift
... | ... | @@ -320,6 +320,15 @@ class ExcellentTVInforViewCell: UICollectionViewCell{ |
320 | 320 | @IBAction func playBtnClick(_ sender: UIButton) { |
321 | 321 | 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 |
322 | 322 | } |
323 | + AppDelegate.instance().httpServer.updatePv(parameters: ["f_id":self.model!.f_Id as AnyObject]) { (str, error) in | |
324 | + if error==nil { | |
325 | + if JSON.fromString(jsonString: str)!["status"].intValue == 1{ | |
326 | + //更新阅读量成功刷新页面 | |
327 | + self.model!.f_Pv = self.model!.f_Pv + 1 | |
328 | + self.playCount.text = "播放次数:" + "\(self.model!.f_Pv!)" | |
329 | + } | |
330 | + } | |
331 | + } | |
323 | 332 | let url = URL(string:self.model!.f_ResourceUrl) |
324 | 333 | let player = AVPlayerViewController() |
325 | 334 | player.player = AVPlayer(url: url!) | ... | ... |