Commit ed74e82ac599be6406bbb9e9c55bba164e581eff
1 parent
a1f13772
Exists in
newLive
no message
Showing
6 changed files
with
32 additions
and
4 deletions
Show diff stats
YouerLiveVideo/YouerLiveVideo/Base.lproj/Main.storyboard
| @@ -869,7 +869,7 @@ | @@ -869,7 +869,7 @@ | ||
| 869 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bvl-OP-Mho"> | 869 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bvl-OP-Mho"> |
| 870 | <rect key="frame" x="0.0" y="79" width="375" height="90"/> | 870 | <rect key="frame" x="0.0" y="79" width="375" height="90"/> |
| 871 | <subviews> | 871 | <subviews> |
| 872 | - <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="defphoto.png" translatesAutoresizingMaskIntoConstraints="NO" id="brI-5l-hmz"> | 872 | + <imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="defphoto.png" translatesAutoresizingMaskIntoConstraints="NO" id="brI-5l-hmz"> |
| 873 | <rect key="frame" x="16" y="20" width="47" height="50"/> | 873 | <rect key="frame" x="16" y="20" width="47" height="50"/> |
| 874 | <constraints> | 874 | <constraints> |
| 875 | <constraint firstAttribute="height" constant="50" id="VpN-jf-Kgx"/> | 875 | <constraint firstAttribute="height" constant="50" id="VpN-jf-Kgx"/> |
YouerLiveVideo/YouerLiveVideo/Info.plist
| @@ -56,7 +56,7 @@ | @@ -56,7 +56,7 @@ | ||
| 56 | </dict> | 56 | </dict> |
| 57 | </array> | 57 | </array> |
| 58 | <key>CFBundleVersion</key> | 58 | <key>CFBundleVersion</key> |
| 59 | - <string>4</string> | 59 | + <string>5</string> |
| 60 | <key>LSApplicationQueriesSchemes</key> | 60 | <key>LSApplicationQueriesSchemes</key> |
| 61 | <array> | 61 | <array> |
| 62 | <string>mqqopensdkapiV2</string> | 62 | <string>mqqopensdkapiV2</string> |
YouerLiveVideo/YouerLiveVideo/controllers/HomePage/MainHomeTableViewController.swift
| @@ -29,6 +29,7 @@ class MainHomeTableViewController: UITableViewController { | @@ -29,6 +29,7 @@ class MainHomeTableViewController: UITableViewController { | ||
| 29 | photo.sd_setImage(with: URL(string: user.photo()), placeholderImage: UIImage(named: "defphoto")) | 29 | photo.sd_setImage(with: URL(string: user.photo()), placeholderImage: UIImage(named: "defphoto")) |
| 30 | photo.layer.cornerRadius=35/2 | 30 | photo.layer.cornerRadius=35/2 |
| 31 | photo.layer.masksToBounds=true | 31 | photo.layer.masksToBounds=true |
| 32 | + photo.contentMode=UIViewContentMode.scaleAspectFill | ||
| 32 | let btn=UIButton(type: UIButtonType.custom) | 33 | let btn=UIButton(type: UIButtonType.custom) |
| 33 | btn.frame=CGRect(x: 0, y: 0, width: 35, height: 35) | 34 | btn.frame=CGRect(x: 0, y: 0, width: 35, height: 35) |
| 34 | btn.addTarget(self, action: #selector(MainHomeTableViewController.userInfo), for: UIControlEvents.touchUpInside) | 35 | btn.addTarget(self, action: #selector(MainHomeTableViewController.userInfo), for: UIControlEvents.touchUpInside) |
YouerLiveVideo/YouerLiveVideo/controllers/MicroCourse/MicroCourseViewController.swift
| @@ -272,5 +272,28 @@ class MicroCourseViewControllerTableViewCell:UITableViewCell{ | @@ -272,5 +272,28 @@ class MicroCourseViewControllerTableViewCell:UITableViewCell{ | ||
| 272 | player.player = AVPlayer(url: url!) | 272 | player.player = AVPlayer(url: url!) |
| 273 | player.videoGravity = AVLayerVideoGravityResizeAspect | 273 | player.videoGravity = AVLayerVideoGravityResizeAspect |
| 274 | self.superVC.present(player, animated: true, completion: nil) | 274 | self.superVC.present(player, animated: true, completion: nil) |
| 275 | + AppDelegate.instance().httpServer.updatePv(parameters: ["f_id":item.f_Id as AnyObject]) { (str, error) in | ||
| 276 | + if error==nil { | ||
| 277 | + if JSON.fromString(jsonString: str)!["status"].intValue == 1{ | ||
| 278 | + //更新阅读量成功刷新页面 | ||
| 279 | + self.superVC.currentPage=1 | ||
| 280 | + self.superVC.resourceData.removeAll() | ||
| 281 | + var p:Dictionary<String,AnyObject>=["type":0 as AnyObject,"orderby":1 as AnyObject,"pageIndex":self.superVC.currentPage as AnyObject,"pageSize":10 as AnyObject] | ||
| 282 | + if self.superVC.parameter != nil { | ||
| 283 | + self.superVC.parameter!.updateValue(self.superVC.currentPage as AnyObject, forKey: "pageIndex") | ||
| 284 | + p=self.superVC.parameter! | ||
| 285 | + } | ||
| 286 | + self.superVC.refreshLivesAction(parameters: p, completionHandler: { (success) in | ||
| 287 | + if success{ | ||
| 288 | + self.superVC.tableView.reloadData() | ||
| 289 | + } | ||
| 290 | + }) | ||
| 291 | + } | ||
| 292 | + } | ||
| 293 | + } | ||
| 294 | + AppDelegate.instance().httpServer.addHistoryView(parameters: ["f_ViewType":0 as AnyObject, | ||
| 295 | + "f_ViewId":item.f_Id as AnyObject, | ||
| 296 | + "f_ViewName":item.f_Title as AnyObject]) { (str, error) in | ||
| 297 | + } | ||
| 275 | } | 298 | } |
| 276 | } | 299 | } |
YouerLiveVideo/YouerLiveVideo/controllers/User/User.storyboard
| @@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
| 13 | <!--User Edit View Controller--> | 13 | <!--User Edit View Controller--> |
| 14 | <scene sceneID="pS1-j4-eWs"> | 14 | <scene sceneID="pS1-j4-eWs"> |
| 15 | <objects> | 15 | <objects> |
| 16 | - <viewController storyboardIdentifier="UserEditViewControllerVC" id="e3H-9T-9vN" customClass="UserEditViewController" customModule="YouerLiveVideo" customModuleProvider="target" sceneMemberID="viewController"> | 16 | + <viewController storyboardIdentifier="UserEditViewControllerVC" hidesBottomBarWhenPushed="YES" id="e3H-9T-9vN" customClass="UserEditViewController" customModule="YouerLiveVideo" customModuleProvider="target" sceneMemberID="viewController"> |
| 17 | <layoutGuides> | 17 | <layoutGuides> |
| 18 | <viewControllerLayoutGuide type="top" id="FSu-Pn-e9e"/> | 18 | <viewControllerLayoutGuide type="top" id="FSu-Pn-e9e"/> |
| 19 | <viewControllerLayoutGuide type="bottom" id="xWX-Qt-Zg4"/> | 19 | <viewControllerLayoutGuide type="bottom" id="xWX-Qt-Zg4"/> |
| @@ -107,7 +107,7 @@ | @@ -107,7 +107,7 @@ | ||
| 107 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uzU-Fp-mNB"> | 107 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uzU-Fp-mNB"> |
| 108 | <rect key="frame" x="0.0" y="0.0" width="375" height="140"/> | 108 | <rect key="frame" x="0.0" y="0.0" width="375" height="140"/> |
| 109 | <subviews> | 109 | <subviews> |
| 110 | - <imageView contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="MvT-1n-2RV"> | 110 | + <imageView contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="MvT-1n-2RV"> |
| 111 | <rect key="frame" x="147" y="29.5" width="80" height="80"/> | 111 | <rect key="frame" x="147" y="29.5" width="80" height="80"/> |
| 112 | <gestureRecognizers/> | 112 | <gestureRecognizers/> |
| 113 | <constraints> | 113 | <constraints> |
YouerLiveVideo/YouerLiveVideo/controllers/User/UserEditViewController.swift
| @@ -100,6 +100,8 @@ class UserEditViewController: UIViewController ,UIImagePickerControllerDelegate, | @@ -100,6 +100,8 @@ class UserEditViewController: UIViewController ,UIImagePickerControllerDelegate, | ||
| 100 | }else{ | 100 | }else{ |
| 101 | self.view.makeToast("头像修改失败") | 101 | self.view.makeToast("头像修改失败") |
| 102 | } | 102 | } |
| 103 | + }else{ | ||
| 104 | + self.view.makeToast("头像修改失败") | ||
| 103 | } | 105 | } |
| 104 | }) | 106 | }) |
| 105 | }, failHandler: { (error) in | 107 | }, failHandler: { (error) in |
| @@ -108,6 +110,8 @@ class UserEditViewController: UIViewController ,UIImagePickerControllerDelegate, | @@ -108,6 +110,8 @@ class UserEditViewController: UIViewController ,UIImagePickerControllerDelegate, | ||
| 108 | }else{ | 110 | }else{ |
| 109 | self.view.makeToast("图片上传失败") | 111 | self.view.makeToast("图片上传失败") |
| 110 | } | 112 | } |
| 113 | + }else{ | ||
| 114 | + self.view.makeToast("图片上传失败") | ||
| 111 | } | 115 | } |
| 112 | } | 116 | } |
| 113 | } | 117 | } |