Commit 8b74d4b6e94f858ec8490033a8c656079881a3d9
1 parent
9f0d941a
Exists in
newLive
no message
Showing
4 changed files
with
87 additions
and
55 deletions
Show diff stats
YouerLiveVideo/YouerLiveVideo/controllers/TVStation/TVStation.storyboard
... | ... | @@ -38,7 +38,7 @@ |
38 | 38 | <rect key="frame" x="0.0" y="0.0" width="180" height="180"/> |
39 | 39 | <autoresizingMask key="autoresizingMask"/> |
40 | 40 | <subviews> |
41 | - <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="x1d-Bc-juB"> | |
41 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="x1d-Bc-juB"> | |
42 | 42 | <rect key="frame" x="0.0" y="0.0" width="180" height="135"/> |
43 | 43 | <constraints> |
44 | 44 | <constraint firstAttribute="width" secondItem="x1d-Bc-juB" secondAttribute="height" multiplier="4:3" id="UyF-Ua-iSP"/> |
... | ... | @@ -129,7 +129,7 @@ |
129 | 129 | <rect key="frame" x="0.0" y="0.0" width="170" height="209"/> |
130 | 130 | <autoresizingMask key="autoresizingMask"/> |
131 | 131 | <subviews> |
132 | - <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="q0M-rc-EXR"> | |
132 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="q0M-rc-EXR"> | |
133 | 133 | <rect key="frame" x="0.0" y="0.0" width="170" height="127.5"/> |
134 | 134 | <constraints> |
135 | 135 | <constraint firstAttribute="width" secondItem="q0M-rc-EXR" secondAttribute="height" multiplier="4:3" id="4QF-fC-lnx"/> |
... | ... | @@ -206,7 +206,7 @@ |
206 | 206 | <constraint firstAttribute="height" constant="51" id="56p-A7-q9E"/> |
207 | 207 | </constraints> |
208 | 208 | </view> |
209 | - <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0j4-AN-Lgn"> | |
209 | + <view clipsSubviews="YES" contentMode="scaleAspectFill" translatesAutoresizingMaskIntoConstraints="NO" id="0j4-AN-Lgn"> | |
210 | 210 | <rect key="frame" x="0.0" y="0.0" width="375" height="157"/> |
211 | 211 | <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/> |
212 | 212 | <constraints> |
... | ... | @@ -333,7 +333,7 @@ |
333 | 333 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9Yk-8z-nas"> |
334 | 334 | <rect key="frame" x="8" y="4" width="359" height="75.5"/> |
335 | 335 | <subviews> |
336 | - <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="IYQ-S7-ka2"> | |
336 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="IYQ-S7-ka2"> | |
337 | 337 | <rect key="frame" x="8" y="14" width="80" height="48"/> |
338 | 338 | <constraints> |
339 | 339 | <constraint firstAttribute="width" constant="80" id="XKV-mN-TaH"/> |
... | ... | @@ -479,7 +479,7 @@ |
479 | 479 | <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> |
480 | 480 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
481 | 481 | <subviews> |
482 | - <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="mAy-et-NIv"> | |
482 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="mAy-et-NIv"> | |
483 | 483 | <rect key="frame" x="16" y="36" width="343" height="214"/> |
484 | 484 | <constraints> |
485 | 485 | <constraint firstAttribute="height" constant="214" id="J56-0C-e1L"/> |
... | ... | @@ -606,7 +606,7 @@ |
606 | 606 | <rect key="frame" x="0.0" y="0.0" width="160" height="176"/> |
607 | 607 | <autoresizingMask key="autoresizingMask"/> |
608 | 608 | <subviews> |
609 | - <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="1ZJ-ao-hBx"> | |
609 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="1ZJ-ao-hBx"> | |
610 | 610 | <rect key="frame" x="0.0" y="0.0" width="160" height="120"/> |
611 | 611 | <color key="backgroundColor" red="0.090196078431372548" green="0.70196078431372544" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
612 | 612 | <constraints> | ... | ... |
YouerLiveVideo/YouerLiveVideo/controllers/TVStation/TVStationViewController.swift
... | ... | @@ -223,20 +223,20 @@ class TVStationViewControllerCollectionCell:UICollectionViewCell{ |
223 | 223 | |
224 | 224 | class TVStationInfor { |
225 | 225 | var f_SchoolType:String! |
226 | - var f_Id:String! //标识字段,Guid标识 , | |
227 | - var f_DeleteMark:Bool = false //删除标识,1-已删除 , | |
228 | - var f_CreatorTime:String!//创建时间 , | |
229 | - var f_CreatorUserId:String!//创建人员ID , | |
230 | - var f_LastModifyTime:String! //最近一次编辑时间 , | |
231 | - var f_LastModifyUserId:String! //最近一次编辑人员 , | |
232 | - var f_DeleteTime:String! //删除时间 , | |
233 | - var f_DeleteUserId:String! //删除人员 , | |
234 | - var f_SchoolName:String! //学校名称 , | |
235 | - var f_SchoolTypeId:String!// 学校类型 , | |
236 | - var f_Logo:String! //校徽 , | |
237 | - var f_IsTopTen:Bool = false //是否十佳校园电视台 , | |
238 | - var f_IsExcellent:Bool = false //是否优秀校园电视台 , | |
239 | - var f_Url:String!// 机构地址 | |
226 | + var f_Id:String! //标识字段,Guid标识 , | |
227 | + var f_DeleteMark:Bool = false //删除标识,1-已删除 , | |
228 | + var f_CreatorTime:String! //创建时间 , | |
229 | + var f_CreatorUserId:String! //创建人员ID , | |
230 | + var f_LastModifyTime:String! //最近一次编辑时间 , | |
231 | + var f_LastModifyUserId:String! //最近一次编辑人员 , | |
232 | + var f_DeleteTime:String! //删除时间 , | |
233 | + var f_DeleteUserId:String! //删除人员 , | |
234 | + var f_SchoolName:String! //学校名称 , | |
235 | + var f_SchoolTypeId:String! // 学校类型 , | |
236 | + var f_Logo:String! //校徽 , | |
237 | + var f_IsTopTen:Bool = false //是否十佳校园电视台 , | |
238 | + var f_IsExcellent:Bool = false //是否优秀校园电视台 , | |
239 | + var f_Url:String! // 机构地址 | |
240 | 240 | |
241 | 241 | init(json:JSON){ |
242 | 242 | f_SchoolType = json["f_SchoolType"].stringValue |
... | ... | @@ -269,35 +269,35 @@ class TVStationSubject { |
269 | 269 | var f_ChapterName:String! |
270 | 270 | var f_TopicName:String! |
271 | 271 | var f_TestName:String! |
272 | - var f_Id:String!// 标识字段,Guid标识 , | |
273 | - var f_DeleteMark:Bool = false // 删除标识,1-已删除 , | |
274 | - var f_CreatorTime:String!// 创建时间 , | |
275 | - var f_CreatorUserId:String!// 创建人员ID , | |
276 | - var f_LastModifyTime:String!// 最近一次编辑时间 , | |
277 | - var f_LastModifyUserId:String!//最近一次编辑人员 , | |
278 | - var f_DeleteTime:String!//删除时间 , | |
279 | - var f_DeleteUserId:String!// 删除人员 , | |
280 | - var f_Img :String!//课件图标/微课封面 , | |
281 | - var f_Title:String!//课件名称 , | |
282 | - var f_CreatorName:String!// 上传人员昵称 , | |
283 | - var f_Pv:Int!// 浏览量 , | |
284 | - var f_DownloadSum:Int!// 下载量 , | |
285 | - var f_LoveSum:Int!// 点赞量 , | |
286 | - var f_Price:Int!// 价格 , | |
287 | - var f_WaveId:String!// 所属教材ID , | |
288 | - var f_ChapterId:String!// 所属章节 , | |
289 | - var f_TopicId:String!//所属知识点 , | |
290 | - var f_TestId:String!//所属考点 , | |
291 | - var f_SchoolId:String!// 上传老师的学校ID , | |
292 | - var f_IsExamine:Int!// 审核状态:0-未审核,1-审核通过,2-审核不通过 , | |
293 | - var f_ExamineUserId :String!//审核人ID , | |
294 | - var f_ExamineName:String!//审核人姓名 , | |
295 | - var f_ExamineDatetime :String!// 审核日期 , | |
296 | - var f_ResourceType:Int!// 资源类型 0-微课 1-资源 2-电视台 , | |
297 | - var f_ResourceUrl:String!// 资源地址 , | |
298 | - var f_IsOpen:Bool = false // 是否公开 , | |
299 | - var f_Detail :String!// 资源简介 , | |
300 | - var f_TelevisionId :String!//电视台目录 | |
272 | + var f_Id:String! // 标识字段,Guid标识 , | |
273 | + var f_DeleteMark:Bool = false // 删除标识,1-已删除 , | |
274 | + var f_CreatorTime:String! // 创建时间 , | |
275 | + var f_CreatorUserId:String! // 创建人员ID , | |
276 | + var f_LastModifyTime:String! // 最近一次编辑时间 , | |
277 | + var f_LastModifyUserId:String! //最近一次编辑人员 , | |
278 | + var f_DeleteTime:String! //删除时间 , | |
279 | + var f_DeleteUserId:String! // 删除人员 , | |
280 | + var f_Img :String! //课件图标/微课封面 , | |
281 | + var f_Title:String! //课件名称 , | |
282 | + var f_CreatorName:String! // 上传人员昵称 , | |
283 | + var f_Pv:Int! // 浏览量 , | |
284 | + var f_DownloadSum:Int! // 下载量 , | |
285 | + var f_LoveSum:Int! // 点赞量 , | |
286 | + var f_Price:Int! // 价格 , | |
287 | + var f_WaveId:String! // 所属教材ID , | |
288 | + var f_ChapterId:String! // 所属章节 , | |
289 | + var f_TopicId:String! //所属知识点 , | |
290 | + var f_TestId:String! //所属考点 , | |
291 | + var f_SchoolId:String! // 上传老师的学校ID , | |
292 | + var f_IsExamine:Int! // 审核状态:0-未审核,1-审核通过,2-审核不通过 , | |
293 | + var f_ExamineUserId :String! //审核人ID , | |
294 | + var f_ExamineName:String! //审核人姓名 , | |
295 | + var f_ExamineDatetime :String! // 审核日期 , | |
296 | + var f_ResourceType:Int! // 资源类型 0-微课 1-资源 2-电视台 , | |
297 | + var f_ResourceUrl:String! // 资源地址 , | |
298 | + var f_IsOpen:Bool = false // 是否公开 , | |
299 | + var f_Detail :String! // 资源简介 , | |
300 | + var f_TelevisionId :String! //电视台目录 | |
301 | 301 | init(json:JSON){ |
302 | 302 | f_Url = json["f_Url"].stringValue |
303 | 303 | f_WaveTitle = json["f_WaveTitle"].stringValue | ... | ... |
YouerLiveVideo/YouerLiveVideo/controllers/User/HistoryViewController.swift
... | ... | @@ -12,7 +12,7 @@ class HistoryViewController: UIViewController { |
12 | 12 | |
13 | 13 | @IBOutlet weak var collectionView: UICollectionView! |
14 | 14 | |
15 | - var datatSet:[TVStationSubject] = [] | |
15 | + var datatSet:[HistoryView] = [] | |
16 | 16 | var type:Int = 0// 资源类型 0-微课 1-资源 |
17 | 17 | var isHistory:Int = 0 |
18 | 18 | override func viewDidLoad() { |
... | ... | @@ -21,7 +21,7 @@ class HistoryViewController: UIViewController { |
21 | 21 | AppDelegate.instance().httpServer.getHistroyView(parameters: ["f_ViewType":type as AnyObject,"pageIndex":1 as AnyObject]) { (str, error) in |
22 | 22 | httpJsonResule(jsonString: str, error: error, successHandler: { (json) in |
23 | 23 | for item in json.contentData()["resultData"].arrayValue{ |
24 | - self.datatSet.append(TVStationSubject(json: item)) | |
24 | + self.datatSet.append(HistoryView(json: item)) | |
25 | 25 | } |
26 | 26 | self.collectionView.reloadData() |
27 | 27 | }, failHandler: { (error) in |
... | ... | @@ -32,7 +32,7 @@ class HistoryViewController: UIViewController { |
32 | 32 | AppDelegate.instance().httpServer.getHistroyView(parameters: ["f_ViewType":type as AnyObject,"pageIndex":1 as AnyObject]) { (str, error) in |
33 | 33 | httpJsonResule(jsonString: str, error: error, successHandler: { (json) in |
34 | 34 | for item in json.contentData()["resultData"].arrayValue{ |
35 | - self.datatSet.append(TVStationSubject(json: item)) | |
35 | + self.datatSet.append(HistoryView(json: item)) | |
36 | 36 | } |
37 | 37 | self.collectionView.reloadData() |
38 | 38 | }, failHandler: { (error) in |
... | ... | @@ -103,10 +103,41 @@ class TVStationClassCell: UICollectionViewCell { |
103 | 103 | |
104 | 104 | @IBOutlet weak var name: UILabel! |
105 | 105 | @IBOutlet weak var photo: UIImageView! |
106 | - var model:TVStationSubject?{ | |
106 | + var model:HistoryView?{ | |
107 | 107 | didSet{ |
108 | - name.text = model!.f_Title | |
108 | + name.text = model!.f_ViewName | |
109 | 109 | photo.sd_setImage(with: URL(string:model!.f_Img), placeholderImage: #imageLiteral(resourceName: "placeholder")) |
110 | 110 | } |
111 | 111 | } |
112 | 112 | } |
113 | + | |
114 | +class HistoryView{ | |
115 | + var f_Img:String! // (string, optional), | |
116 | + var f_Id:String! // (string, optional): 标识字段,Guid标识 , | |
117 | + var f_DeleteMark:Bool! // (boolean, optional): 删除标识,1-已删除 , | |
118 | + var f_CreatorTime:String! // (string, optional): 创建时间 , | |
119 | + var f_CreatorUserId:String! // (string, optional): 创建人员ID , | |
120 | + var f_LastModifyTime:String! // (string, optional): 最近一次编辑时间 , | |
121 | + var f_LastModifyUserId:String! // (string, optional): 最近一次编辑人员 , | |
122 | + var f_DeleteTime:String! // (string, optional): 删除时间 , | |
123 | + var f_DeleteUserId:String! // (string, optional): 删除人员 , | |
124 | + var f_ViewType:Int! // (integer, optional): 观看类型,0-课件,1-微课,2-电视台节目 , | |
125 | + var f_ViewId:String! // (string, optional): 对应的课件/微课/电视台节目ID , | |
126 | + var f_ViewName:String! // (string, optional): 标题 | |
127 | + | |
128 | + init(json:JSON) { | |
129 | + f_Img = json["f_Img"].stringValue | |
130 | + f_Id = json["f_Id"].stringValue | |
131 | + f_DeleteMark = json["f_DeleteMark"].boolValue | |
132 | + f_CreatorTime = json["f_CreatorTime"].stringValue | |
133 | + f_CreatorUserId = json["f_CreatorUserId"].stringValue | |
134 | + f_LastModifyTime = json["f_LastModifyTime"].stringValue | |
135 | + f_LastModifyUserId = json["f_LastModifyUserId"].stringValue | |
136 | + f_DeleteTime = json["f_DeleteTime"].stringValue | |
137 | + f_DeleteUserId = json["f_DeleteUserId"].stringValue | |
138 | + f_ViewType = json["f_ViewType"].intValue | |
139 | + f_ViewId = json["f_ViewId"].stringValue | |
140 | + f_ViewName = json["f_ViewName"].stringValue | |
141 | + } | |
142 | + | |
143 | +} | ... | ... |
YouerLiveVideo/YouerLiveVideo/controllers/User/User.storyboard
... | ... | @@ -570,7 +570,7 @@ |
570 | 570 | <rect key="frame" x="0.0" y="0.0" width="178" height="213"/> |
571 | 571 | <autoresizingMask key="autoresizingMask"/> |
572 | 572 | <subviews> |
573 | - <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="92W-L6-BhN"> | |
573 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="92W-L6-BhN"> | |
574 | 574 | <rect key="frame" x="0.0" y="0.0" width="178" height="159"/> |
575 | 575 | <constraints> |
576 | 576 | <constraint firstAttribute="width" secondItem="92W-L6-BhN" secondAttribute="height" multiplier="178:159" id="2My-SZ-9FI"/> |
... | ... | @@ -590,6 +590,7 @@ |
590 | 590 | <constraints> |
591 | 591 | <constraint firstItem="3Lx-WS-Jds" firstAttribute="centerY" secondItem="dZx-RX-5Ft" secondAttribute="centerY" id="8xZ-RF-Xo9"/> |
592 | 592 | <constraint firstItem="3Lx-WS-Jds" firstAttribute="centerX" secondItem="dZx-RX-5Ft" secondAttribute="centerX" id="Iyc-ze-CXx"/> |
593 | + <constraint firstItem="3Lx-WS-Jds" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="dZx-RX-5Ft" secondAttribute="leading" constant="8" id="pyZ-bc-KPN"/> | |
593 | 594 | </constraints> |
594 | 595 | </view> |
595 | 596 | </subviews> | ... | ... |