Commit ab380ebb6e4e57bee87174f5d1652ff021411e14
Exists in
newLive
Merge branch 'newLive' of http://git.shunzhi.net/iosgroup/newlive into newLive
Showing
3 changed files
with
327 additions
and
22 deletions
Show diff stats
YouerLiveVideo/YouerLiveVideo/controllers/TVStation/SearchTVStationListViewController.swift
@@ -10,6 +10,9 @@ import UIKit | @@ -10,6 +10,9 @@ import UIKit | ||
10 | 10 | ||
11 | class SearchTVStationListViewController: UIViewController { | 11 | class SearchTVStationListViewController: UIViewController { |
12 | var alList:[String] = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"] | 12 | var alList:[String] = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"] |
13 | + | ||
14 | + @IBOutlet weak var selectView: UIView! | ||
15 | + | ||
13 | override func viewDidLoad() { | 16 | override func viewDidLoad() { |
14 | super.viewDidLoad() | 17 | super.viewDidLoad() |
15 | // Do any additional setup after loading the view. | 18 | // Do any additional setup after loading the view. |
@@ -39,7 +42,7 @@ extension SearchTVStationListViewController:UITableViewDataSource,UITableViewDel | @@ -39,7 +42,7 @@ extension SearchTVStationListViewController:UITableViewDataSource,UITableViewDel | ||
39 | } | 42 | } |
40 | 43 | ||
41 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | 44 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { |
42 | - return 3 | 45 | + return 1 |
43 | } | 46 | } |
44 | 47 | ||
45 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | 48 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { |
YouerLiveVideo/YouerLiveVideo/controllers/TVStation/TVStation.storyboard
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16A323" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> | 2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16A323" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> |
3 | <device id="retina4_7" orientation="portrait"> | 3 | <device id="retina4_7" orientation="portrait"> |
4 | <adaptation id="fullscreen"/> | 4 | <adaptation id="fullscreen"/> |
5 | </device> | 5 | </device> |
6 | <dependencies> | 6 | <dependencies> |
7 | - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/> | 7 | + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/> |
8 | <capability name="Aspect ratio constraints" minToolsVersion="5.1"/> | 8 | <capability name="Aspect ratio constraints" minToolsVersion="5.1"/> |
9 | <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | 9 | <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
10 | </dependencies> | 10 | </dependencies> |
@@ -89,37 +89,200 @@ | @@ -89,37 +89,200 @@ | ||
89 | <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | 89 | <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> |
90 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | 90 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
91 | <subviews> | 91 | <subviews> |
92 | - <searchBar contentMode="redraw" translatesAutoresizingMaskIntoConstraints="NO" id="ChK-me-hP6"> | 92 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="LO5-7p-BlF"> |
93 | + <rect key="frame" x="0.0" y="92" width="375" height="575"/> | ||
94 | + <subviews> | ||
95 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pA5-mr-wp5"> | ||
96 | + <rect key="frame" x="0.0" y="0.0" width="375" height="48"/> | ||
97 | + <subviews> | ||
98 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fd9-K0-dbd"> | ||
99 | + <rect key="frame" x="0.0" y="0.0" width="375" height="48"/> | ||
100 | + <state key="normal" title="Button"/> | ||
101 | + </button> | ||
102 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Unb-Qo-FiA"> | ||
103 | + <rect key="frame" x="16" y="0.0" width="343" height="0.0"/> | ||
104 | + <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/> | ||
105 | + <constraints> | ||
106 | + <constraint firstAttribute="height" id="BI9-34-fQB"/> | ||
107 | + </constraints> | ||
108 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
109 | + <nil key="textColor"/> | ||
110 | + <nil key="highlightedColor"/> | ||
111 | + </label> | ||
112 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="小学" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rF3-mJ-pPr"> | ||
113 | + <rect key="frame" x="169.5" y="13" width="35" height="21"/> | ||
114 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
115 | + <nil key="textColor"/> | ||
116 | + <nil key="highlightedColor"/> | ||
117 | + </label> | ||
118 | + </subviews> | ||
119 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
120 | + <constraints> | ||
121 | + <constraint firstAttribute="bottom" secondItem="fd9-K0-dbd" secondAttribute="bottom" id="6rw-GD-06f"/> | ||
122 | + <constraint firstItem="rF3-mJ-pPr" firstAttribute="centerY" secondItem="pA5-mr-wp5" secondAttribute="centerY" id="Ncu-FL-IUg"/> | ||
123 | + <constraint firstItem="fd9-K0-dbd" firstAttribute="top" secondItem="pA5-mr-wp5" secondAttribute="top" id="S2u-C5-cpE"/> | ||
124 | + <constraint firstAttribute="trailing" secondItem="Unb-Qo-FiA" secondAttribute="trailing" constant="16" id="Wee-qc-CcZ"/> | ||
125 | + <constraint firstAttribute="trailing" secondItem="fd9-K0-dbd" secondAttribute="trailing" id="Wz9-N2-5FD"/> | ||
126 | + <constraint firstAttribute="height" constant="48" id="YGb-kx-Bvs"/> | ||
127 | + <constraint firstItem="Unb-Qo-FiA" firstAttribute="leading" secondItem="pA5-mr-wp5" secondAttribute="leading" constant="16" id="eAi-qh-uTW"/> | ||
128 | + <constraint firstItem="fd9-K0-dbd" firstAttribute="leading" secondItem="pA5-mr-wp5" secondAttribute="leading" id="lsn-sl-gUI"/> | ||
129 | + <constraint firstItem="rF3-mJ-pPr" firstAttribute="centerX" secondItem="pA5-mr-wp5" secondAttribute="centerX" id="sKe-eU-InU"/> | ||
130 | + <constraint firstItem="Unb-Qo-FiA" firstAttribute="top" secondItem="pA5-mr-wp5" secondAttribute="top" id="zmH-Rb-P8G"/> | ||
131 | + </constraints> | ||
132 | + </view> | ||
133 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pKJ-J9-5CR"> | ||
134 | + <rect key="frame" x="0.0" y="48" width="375" height="48"/> | ||
135 | + <subviews> | ||
136 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="veE-AU-inD"> | ||
137 | + <rect key="frame" x="0.0" y="0.0" width="375" height="48"/> | ||
138 | + <state key="normal" title="Button"/> | ||
139 | + </button> | ||
140 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ma4-Vs-Ai5"> | ||
141 | + <rect key="frame" x="16" y="0.0" width="343" height="0.0"/> | ||
142 | + <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/> | ||
143 | + <constraints> | ||
144 | + <constraint firstAttribute="height" id="jyL-SO-bbs"/> | ||
145 | + </constraints> | ||
146 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
147 | + <nil key="textColor"/> | ||
148 | + <nil key="highlightedColor"/> | ||
149 | + </label> | ||
150 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="初中" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FLD-Vw-eZ9"> | ||
151 | + <rect key="frame" x="169.5" y="13" width="35" height="21"/> | ||
152 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
153 | + <nil key="textColor"/> | ||
154 | + <nil key="highlightedColor"/> | ||
155 | + </label> | ||
156 | + </subviews> | ||
157 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
158 | + <constraints> | ||
159 | + <constraint firstItem="ma4-Vs-Ai5" firstAttribute="top" secondItem="pKJ-J9-5CR" secondAttribute="top" id="Em3-dK-r7A"/> | ||
160 | + <constraint firstItem="veE-AU-inD" firstAttribute="top" secondItem="pKJ-J9-5CR" secondAttribute="top" id="FHs-Rr-oDw"/> | ||
161 | + <constraint firstItem="FLD-Vw-eZ9" firstAttribute="centerX" secondItem="pKJ-J9-5CR" secondAttribute="centerX" id="MaF-vn-NFk"/> | ||
162 | + <constraint firstItem="FLD-Vw-eZ9" firstAttribute="centerY" secondItem="pKJ-J9-5CR" secondAttribute="centerY" id="OSS-PS-lIG"/> | ||
163 | + <constraint firstAttribute="trailing" secondItem="ma4-Vs-Ai5" secondAttribute="trailing" constant="16" id="TK9-u0-NYJ"/> | ||
164 | + <constraint firstAttribute="trailing" secondItem="veE-AU-inD" secondAttribute="trailing" id="he0-3w-aKO"/> | ||
165 | + <constraint firstItem="ma4-Vs-Ai5" firstAttribute="leading" secondItem="pKJ-J9-5CR" secondAttribute="leading" constant="16" id="hvr-W0-KtG"/> | ||
166 | + <constraint firstItem="veE-AU-inD" firstAttribute="leading" secondItem="pKJ-J9-5CR" secondAttribute="leading" id="iIG-ef-wiQ"/> | ||
167 | + <constraint firstAttribute="bottom" secondItem="veE-AU-inD" secondAttribute="bottom" id="nnX-Fn-UsA"/> | ||
168 | + <constraint firstAttribute="height" constant="48" id="zHI-3d-Hhy"/> | ||
169 | + </constraints> | ||
170 | + </view> | ||
171 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="jQ0-hJ-LW9"> | ||
172 | + <rect key="frame" x="0.0" y="96" width="375" height="48"/> | ||
173 | + <subviews> | ||
174 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rrk-re-JuF"> | ||
175 | + <rect key="frame" x="0.0" y="0.0" width="375" height="48"/> | ||
176 | + <state key="normal" title="Button"/> | ||
177 | + </button> | ||
178 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TwL-7i-SFE"> | ||
179 | + <rect key="frame" x="16" y="0.0" width="343" height="0.0"/> | ||
180 | + <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/> | ||
181 | + <constraints> | ||
182 | + <constraint firstAttribute="height" id="wf7-2t-CcQ"/> | ||
183 | + </constraints> | ||
184 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
185 | + <nil key="textColor"/> | ||
186 | + <nil key="highlightedColor"/> | ||
187 | + </label> | ||
188 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="高中" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bx3-SK-e4z"> | ||
189 | + <rect key="frame" x="169.5" y="13" width="35" height="21"/> | ||
190 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
191 | + <nil key="textColor"/> | ||
192 | + <nil key="highlightedColor"/> | ||
193 | + </label> | ||
194 | + </subviews> | ||
195 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
196 | + <constraints> | ||
197 | + <constraint firstAttribute="bottom" secondItem="rrk-re-JuF" secondAttribute="bottom" id="1aG-FJ-kgi"/> | ||
198 | + <constraint firstItem="rrk-re-JuF" firstAttribute="top" secondItem="jQ0-hJ-LW9" secondAttribute="top" id="4mU-tH-19D"/> | ||
199 | + <constraint firstItem="rrk-re-JuF" firstAttribute="leading" secondItem="jQ0-hJ-LW9" secondAttribute="leading" id="8FP-Fd-szb"/> | ||
200 | + <constraint firstAttribute="trailing" secondItem="TwL-7i-SFE" secondAttribute="trailing" constant="16" id="FJF-cd-6MQ"/> | ||
201 | + <constraint firstItem="TwL-7i-SFE" firstAttribute="top" secondItem="jQ0-hJ-LW9" secondAttribute="top" id="HJS-18-xud"/> | ||
202 | + <constraint firstAttribute="height" constant="48" id="L2i-9Z-Zje"/> | ||
203 | + <constraint firstItem="TwL-7i-SFE" firstAttribute="leading" secondItem="jQ0-hJ-LW9" secondAttribute="leading" constant="16" id="WjE-rt-bZ1"/> | ||
204 | + <constraint firstAttribute="trailing" secondItem="rrk-re-JuF" secondAttribute="trailing" id="ech-I6-0JJ"/> | ||
205 | + <constraint firstItem="bx3-SK-e4z" firstAttribute="centerX" secondItem="jQ0-hJ-LW9" secondAttribute="centerX" id="l2K-Ec-fBQ"/> | ||
206 | + <constraint firstItem="bx3-SK-e4z" firstAttribute="centerY" secondItem="jQ0-hJ-LW9" secondAttribute="centerY" id="yXB-yv-iX2"/> | ||
207 | + </constraints> | ||
208 | + </view> | ||
209 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PdH-vs-Gjn"> | ||
210 | + <rect key="frame" x="0.0" y="144" width="375" height="48"/> | ||
211 | + <subviews> | ||
212 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bqH-ub-Nyu"> | ||
213 | + <rect key="frame" x="0.0" y="0.0" width="375" height="48"/> | ||
214 | + <state key="normal" title="Button"/> | ||
215 | + </button> | ||
216 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BGW-tg-2H6"> | ||
217 | + <rect key="frame" x="16" y="0.0" width="343" height="0.0"/> | ||
218 | + <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/> | ||
219 | + <constraints> | ||
220 | + <constraint firstAttribute="height" id="eIc-hV-0qY"/> | ||
221 | + </constraints> | ||
222 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
223 | + <nil key="textColor"/> | ||
224 | + <nil key="highlightedColor"/> | ||
225 | + </label> | ||
226 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="全部学段" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VfQ-qt-gdx"> | ||
227 | + <rect key="frame" x="152.5" y="13" width="69.5" height="21"/> | ||
228 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
229 | + <nil key="textColor"/> | ||
230 | + <nil key="highlightedColor"/> | ||
231 | + </label> | ||
232 | + </subviews> | ||
233 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
234 | + <constraints> | ||
235 | + <constraint firstItem="BGW-tg-2H6" firstAttribute="leading" secondItem="PdH-vs-Gjn" secondAttribute="leading" constant="16" id="46b-DV-o1H"/> | ||
236 | + <constraint firstAttribute="trailing" secondItem="bqH-ub-Nyu" secondAttribute="trailing" id="8sC-if-wSg"/> | ||
237 | + <constraint firstAttribute="height" constant="48" id="Kcs-Jq-OVL"/> | ||
238 | + <constraint firstItem="VfQ-qt-gdx" firstAttribute="centerY" secondItem="PdH-vs-Gjn" secondAttribute="centerY" id="OqZ-vB-B5C"/> | ||
239 | + <constraint firstAttribute="trailing" secondItem="BGW-tg-2H6" secondAttribute="trailing" constant="16" id="Rw7-eI-JeT"/> | ||
240 | + <constraint firstItem="VfQ-qt-gdx" firstAttribute="centerX" secondItem="PdH-vs-Gjn" secondAttribute="centerX" id="UYW-un-bnL"/> | ||
241 | + <constraint firstItem="bqH-ub-Nyu" firstAttribute="leading" secondItem="PdH-vs-Gjn" secondAttribute="leading" id="gA6-4E-cUz"/> | ||
242 | + <constraint firstAttribute="bottom" secondItem="bqH-ub-Nyu" secondAttribute="bottom" id="kIr-4b-3GM"/> | ||
243 | + <constraint firstItem="BGW-tg-2H6" firstAttribute="top" secondItem="PdH-vs-Gjn" secondAttribute="top" id="waV-La-z9s"/> | ||
244 | + <constraint firstItem="bqH-ub-Nyu" firstAttribute="top" secondItem="PdH-vs-Gjn" secondAttribute="top" id="z5F-fk-r4o"/> | ||
245 | + </constraints> | ||
246 | + </view> | ||
247 | + </subviews> | ||
248 | + <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/> | ||
249 | + <constraints> | ||
250 | + <constraint firstItem="pKJ-J9-5CR" firstAttribute="top" secondItem="pA5-mr-wp5" secondAttribute="bottom" id="As5-CP-OI8"/> | ||
251 | + <constraint firstItem="PdH-vs-Gjn" firstAttribute="leading" secondItem="LO5-7p-BlF" secondAttribute="leading" id="EiX-RE-2mV"/> | ||
252 | + <constraint firstItem="pA5-mr-wp5" firstAttribute="leading" secondItem="LO5-7p-BlF" secondAttribute="leading" id="NGc-W1-gFS"/> | ||
253 | + <constraint firstItem="jQ0-hJ-LW9" firstAttribute="top" secondItem="pKJ-J9-5CR" secondAttribute="bottom" id="Rxs-mm-zbn"/> | ||
254 | + <constraint firstItem="jQ0-hJ-LW9" firstAttribute="leading" secondItem="LO5-7p-BlF" secondAttribute="leading" id="SBR-LH-mkw"/> | ||
255 | + <constraint firstItem="PdH-vs-Gjn" firstAttribute="top" secondItem="jQ0-hJ-LW9" secondAttribute="bottom" id="gRO-D5-TbH"/> | ||
256 | + <constraint firstItem="pKJ-J9-5CR" firstAttribute="leading" secondItem="LO5-7p-BlF" secondAttribute="leading" id="krW-ip-UgT"/> | ||
257 | + <constraint firstAttribute="trailing" secondItem="pA5-mr-wp5" secondAttribute="trailing" id="n92-8Z-2xl"/> | ||
258 | + <constraint firstAttribute="trailing" secondItem="PdH-vs-Gjn" secondAttribute="trailing" id="nWt-wP-1JQ"/> | ||
259 | + <constraint firstItem="pA5-mr-wp5" firstAttribute="top" secondItem="LO5-7p-BlF" secondAttribute="top" id="nsI-me-a5D"/> | ||
260 | + <constraint firstAttribute="trailing" secondItem="pKJ-J9-5CR" secondAttribute="trailing" id="pqL-tc-0qy"/> | ||
261 | + <constraint firstAttribute="trailing" secondItem="jQ0-hJ-LW9" secondAttribute="trailing" id="yc8-tE-p0i"/> | ||
262 | + </constraints> | ||
263 | + </view> | ||
264 | + <searchBar contentMode="redraw" placeholder="搜索" translatesAutoresizingMaskIntoConstraints="NO" id="ChK-me-hP6"> | ||
93 | <rect key="frame" x="0.0" y="0.0" width="375" height="44"/> | 265 | <rect key="frame" x="0.0" y="0.0" width="375" height="44"/> |
94 | <constraints> | 266 | <constraints> |
95 | <constraint firstAttribute="height" constant="44" id="wzh-nF-6vU"/> | 267 | <constraint firstAttribute="height" constant="44" id="wzh-nF-6vU"/> |
96 | </constraints> | 268 | </constraints> |
97 | <textInputTraits key="textInputTraits"/> | 269 | <textInputTraits key="textInputTraits"/> |
98 | </searchBar> | 270 | </searchBar> |
99 | - <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="E6Y-S5-ZKk"> | ||
100 | - <rect key="frame" x="0.0" y="44" width="46" height="30"/> | ||
101 | - <constraints> | ||
102 | - <constraint firstAttribute="height" constant="30" id="M1h-gI-79A"/> | ||
103 | - <constraint firstAttribute="width" constant="46" id="rQm-Xx-7cb"/> | ||
104 | - </constraints> | ||
105 | - <state key="normal" title="Button"/> | ||
106 | - </button> | ||
107 | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DWH-iG-AGA"> | 271 | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DWH-iG-AGA"> |
108 | - <rect key="frame" x="46" y="44" width="329" height="30"/> | 272 | + <rect key="frame" x="0.0" y="44" width="375" height="48"/> |
109 | <constraints> | 273 | <constraints> |
110 | - <constraint firstAttribute="height" constant="30" id="ikm-dk-mzG"/> | 274 | + <constraint firstAttribute="height" constant="48" id="ikm-dk-mzG"/> |
111 | </constraints> | 275 | </constraints> |
112 | - <state key="normal" title="Button"/> | ||
113 | </button> | 276 | </button> |
114 | <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="123" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="o4U-1y-nqL"> | 277 | <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="123" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="o4U-1y-nqL"> |
115 | - <rect key="frame" x="0.0" y="74" width="375" height="593"/> | 278 | + <rect key="frame" x="0.0" y="92" width="375" height="575"/> |
116 | <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | 279 | <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
117 | <prototypes> | 280 | <prototypes> |
118 | <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="123" id="MMn-tR-I0v"> | 281 | <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="123" id="MMn-tR-I0v"> |
119 | <rect key="frame" x="0.0" y="28" width="375" height="123"/> | 282 | <rect key="frame" x="0.0" y="28" width="375" height="123"/> |
120 | <autoresizingMask key="autoresizingMask"/> | 283 | <autoresizingMask key="autoresizingMask"/> |
121 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="MMn-tR-I0v" id="H7d-Zz-WAS"> | 284 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="MMn-tR-I0v" id="H7d-Zz-WAS"> |
122 | - <rect key="frame" x="0.0" y="0.0" width="375" height="122"/> | 285 | + <rect key="frame" x="0.0" y="0.0" width="375" height="123"/> |
123 | <autoresizingMask key="autoresizingMask"/> | 286 | <autoresizingMask key="autoresizingMask"/> |
124 | <subviews> | 287 | <subviews> |
125 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9Yk-8z-nas"> | 288 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9Yk-8z-nas"> |
@@ -166,20 +329,24 @@ | @@ -166,20 +329,24 @@ | ||
166 | <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | 329 | <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
167 | <constraints> | 330 | <constraints> |
168 | <constraint firstAttribute="trailing" secondItem="o4U-1y-nqL" secondAttribute="trailing" id="6aw-Wu-lvQ"/> | 331 | <constraint firstAttribute="trailing" secondItem="o4U-1y-nqL" secondAttribute="trailing" id="6aw-Wu-lvQ"/> |
169 | - <constraint firstItem="DWH-iG-AGA" firstAttribute="leading" secondItem="E6Y-S5-ZKk" secondAttribute="trailing" id="853-mG-r6G"/> | ||
170 | - <constraint firstItem="E6Y-S5-ZKk" firstAttribute="top" secondItem="ChK-me-hP6" secondAttribute="bottom" id="8CV-HS-WH8"/> | 332 | + <constraint firstItem="LO5-7p-BlF" firstAttribute="leading" secondItem="cjj-7m-eAq" secondAttribute="leading" id="NYD-jI-WGE"/> |
171 | <constraint firstItem="DWH-iG-AGA" firstAttribute="top" secondItem="ChK-me-hP6" secondAttribute="bottom" id="OJG-ox-1L1"/> | 333 | <constraint firstItem="DWH-iG-AGA" firstAttribute="top" secondItem="ChK-me-hP6" secondAttribute="bottom" id="OJG-ox-1L1"/> |
172 | - <constraint firstItem="DWH-iG-AGA" firstAttribute="leading" secondItem="E6Y-S5-ZKk" secondAttribute="trailing" id="QwD-fz-uia"/> | 334 | + <constraint firstItem="DWH-iG-AGA" firstAttribute="leading" secondItem="cjj-7m-eAq" secondAttribute="leading" id="TKP-Gf-d9n"/> |
335 | + <constraint firstItem="14l-HJ-g5s" firstAttribute="top" secondItem="LO5-7p-BlF" secondAttribute="bottom" id="VFT-qT-lpJ"/> | ||
336 | + <constraint firstAttribute="trailing" secondItem="LO5-7p-BlF" secondAttribute="trailing" id="Vi7-T1-ipE"/> | ||
173 | <constraint firstItem="ChK-me-hP6" firstAttribute="top" secondItem="cjj-7m-eAq" secondAttribute="top" id="dpW-I0-30v"/> | 337 | <constraint firstItem="ChK-me-hP6" firstAttribute="top" secondItem="cjj-7m-eAq" secondAttribute="top" id="dpW-I0-30v"/> |
174 | <constraint firstItem="14l-HJ-g5s" firstAttribute="top" secondItem="o4U-1y-nqL" secondAttribute="bottom" id="fSk-oc-iab"/> | 338 | <constraint firstItem="14l-HJ-g5s" firstAttribute="top" secondItem="o4U-1y-nqL" secondAttribute="bottom" id="fSk-oc-iab"/> |
175 | <constraint firstAttribute="trailing" secondItem="DWH-iG-AGA" secondAttribute="trailing" id="hha-QC-DTt"/> | 339 | <constraint firstAttribute="trailing" secondItem="DWH-iG-AGA" secondAttribute="trailing" id="hha-QC-DTt"/> |
176 | <constraint firstItem="o4U-1y-nqL" firstAttribute="leading" secondItem="cjj-7m-eAq" secondAttribute="leading" id="j5g-by-76o"/> | 340 | <constraint firstItem="o4U-1y-nqL" firstAttribute="leading" secondItem="cjj-7m-eAq" secondAttribute="leading" id="j5g-by-76o"/> |
341 | + <constraint firstItem="LO5-7p-BlF" firstAttribute="top" secondItem="DWH-iG-AGA" secondAttribute="bottom" id="om1-z7-AYr"/> | ||
177 | <constraint firstAttribute="trailing" secondItem="ChK-me-hP6" secondAttribute="trailing" id="pC3-2b-J0P"/> | 342 | <constraint firstAttribute="trailing" secondItem="ChK-me-hP6" secondAttribute="trailing" id="pC3-2b-J0P"/> |
178 | <constraint firstItem="ChK-me-hP6" firstAttribute="leading" secondItem="cjj-7m-eAq" secondAttribute="leading" id="uMH-Xr-Czy"/> | 343 | <constraint firstItem="ChK-me-hP6" firstAttribute="leading" secondItem="cjj-7m-eAq" secondAttribute="leading" id="uMH-Xr-Czy"/> |
179 | <constraint firstItem="o4U-1y-nqL" firstAttribute="top" secondItem="DWH-iG-AGA" secondAttribute="bottom" id="zEQ-6J-fPf"/> | 344 | <constraint firstItem="o4U-1y-nqL" firstAttribute="top" secondItem="DWH-iG-AGA" secondAttribute="bottom" id="zEQ-6J-fPf"/> |
180 | - <constraint firstItem="E6Y-S5-ZKk" firstAttribute="leading" secondItem="cjj-7m-eAq" secondAttribute="leading" id="zYQ-nv-0ym"/> | ||
181 | </constraints> | 345 | </constraints> |
182 | </view> | 346 | </view> |
347 | + <connections> | ||
348 | + <outlet property="selectView" destination="LO5-7p-BlF" id="BCJ-8J-krQ"/> | ||
349 | + </connections> | ||
183 | </viewController> | 350 | </viewController> |
184 | <placeholder placeholderIdentifier="IBFirstResponder" id="aje-z7-dD9" userLabel="First Responder" sceneMemberID="firstResponder"/> | 351 | <placeholder placeholderIdentifier="IBFirstResponder" id="aje-z7-dD9" userLabel="First Responder" sceneMemberID="firstResponder"/> |
185 | </objects> | 352 | </objects> |
YouerLiveVideo/YouerLiveVideo/util/network.swift
@@ -93,6 +93,7 @@ final class HTTPServer{ | @@ -93,6 +93,7 @@ final class HTTPServer{ | ||
93 | 93 | ||
94 | static let URL_OAUTH_TOKEN=HOST+"/OAuth/Token" //登录 | 94 | static let URL_OAUTH_TOKEN=HOST+"/OAuth/Token" //登录 |
95 | 95 | ||
96 | + //MARK:-Account(url) | ||
96 | static let URL_ACCOUNTPHONECAPTCHA=HOST+"/api/Account/PhoneCaptcha" //获取验证码 | 97 | static let URL_ACCOUNTPHONECAPTCHA=HOST+"/api/Account/PhoneCaptcha" //获取验证码 |
97 | static let URL_ACCOUNTCREATEUSER=HOST+"/api/Account/CreateUser" //游客注册 | 98 | static let URL_ACCOUNTCREATEUSER=HOST+"/api/Account/CreateUser" //游客注册 |
98 | static let URL_ACCOUNTUPDATEPASSWORD=HOST+"/api/Account/UpdatePassword" //重设密码 | 99 | static let URL_ACCOUNTUPDATEPASSWORD=HOST+"/api/Account/UpdatePassword" //重设密码 |
@@ -101,6 +102,7 @@ final class HTTPServer{ | @@ -101,6 +102,7 @@ final class HTTPServer{ | ||
101 | static let URL_ACCOUNTUPDATEUSER=HOST+"/api/Account/Updateuser" //修改用户信息 | 102 | static let URL_ACCOUNTUPDATEUSER=HOST+"/api/Account/Updateuser" //修改用户信息 |
102 | static let URL_ACCOUNTADDUSER=HOST+"/api/Account/AddUser" // | 103 | static let URL_ACCOUNTADDUSER=HOST+"/api/Account/AddUser" // |
103 | 104 | ||
105 | + //MARK:-Common(url) | ||
104 | static let URL_COMMONGETCOURSEWAREVERSIONS=HOST+"/api/Common/GetCourseWareVersions" //获取所有的教材版本 | 106 | static let URL_COMMONGETCOURSEWAREVERSIONS=HOST+"/api/Common/GetCourseWareVersions" //获取所有的教材版本 |
105 | static let URL_COMMONGETSUBJECTS=HOST+"/api/Common/GetSubjects" //获取学科 | 107 | static let URL_COMMONGETSUBJECTS=HOST+"/api/Common/GetSubjects" //获取学科 |
106 | static let URL_COMMONGETSCHOOLTYPES=HOST+"/api/Common/GetSchoolTypes" //获取学段 | 108 | static let URL_COMMONGETSCHOOLTYPES=HOST+"/api/Common/GetSchoolTypes" //获取学段 |
@@ -109,6 +111,7 @@ final class HTTPServer{ | @@ -109,6 +111,7 @@ final class HTTPServer{ | ||
109 | static let URL_COMMONGETCOURSEWAVES=HOST+"/api/Common/GetCourseWaves" //获取教材 | 111 | static let URL_COMMONGETCOURSEWAVES=HOST+"/api/Common/GetCourseWaves" //获取教材 |
110 | static let URL_UPLOAD_FILE=HOST+"/api/Common/UploadFile" //文件上传接口,接受图片(gif,jpg,jpeg,png,bmp)、视频(flv,mp4)、音频(mp3,aac) | 112 | static let URL_UPLOAD_FILE=HOST+"/api/Common/UploadFile" //文件上传接口,接受图片(gif,jpg,jpeg,png,bmp)、视频(flv,mp4)、音频(mp3,aac) |
111 | 113 | ||
114 | + //MARK:-Course(url) | ||
112 | static let URL_COURSEGETHOTRESCOURSE=HOST+"/api/Course/GetHotRescourse" //获取热门微课/课件/电视台节目 | 115 | static let URL_COURSEGETHOTRESCOURSE=HOST+"/api/Course/GetHotRescourse" //获取热门微课/课件/电视台节目 |
113 | static let URL_COURSEGETRESOURCECOUNT=HOST+"/api/Course/GetResourceCount" //获取微课/课件/电视台节目的总数量 | 116 | static let URL_COURSEGETRESOURCECOUNT=HOST+"/api/Course/GetResourceCount" //获取微课/课件/电视台节目的总数量 |
114 | static let URL_COURSEGETTOPTENSCHOOL=HOST+"/api/Course/GetTopTenSchool" //获取十佳校园电视台 | 117 | static let URL_COURSEGETTOPTENSCHOOL=HOST+"/api/Course/GetTopTenSchool" //获取十佳校园电视台 |
@@ -121,6 +124,31 @@ final class HTTPServer{ | @@ -121,6 +124,31 @@ final class HTTPServer{ | ||
121 | static let URL_COURSEGETTESTCATAGORY=HOST+"/api/Course/GetTestCatagory" //获取考点目录(已初始化成ztree所要求的格式) | 124 | static let URL_COURSEGETTESTCATAGORY=HOST+"/api/Course/GetTestCatagory" //获取考点目录(已初始化成ztree所要求的格式) |
122 | static let URL_COURSEGETTELEVISIONSTATIONCATAGORY=HOST+"/api/Course/GetTelevisionStationCatagory" //获取电视台目录 | 125 | static let URL_COURSEGETTELEVISIONSTATIONCATAGORY=HOST+"/api/Course/GetTelevisionStationCatagory" //获取电视台目录 |
123 | 126 | ||
127 | + //MARK:-DataStatistics(url) | ||
128 | + static let URL_DATASTATISTICGETSCHOOLGENERAL=HOST+"/api/DataStatistics/GetSchoolGeneral" //获取前十学校的综合排行 | ||
129 | + static let URL_DATASTATISTICGETSCHOOLPV=HOST+"/api/DataStatistics/GetSchoolPv" //获取前十学校的阅读量排行 | ||
130 | + static let URL_DATASTATISTICGETSCHOOLDOWNLOADS=HOST+"/api/DataStatistics/GetSchoolDownloads" //获取排行前十学校的下载量 | ||
131 | + static let URL_DATASTATISTICGETSCHOOLUPLOAD=HOST+"/api/DataStatistics/GetSchoolUpload" //获取排行前十学校的上传数 | ||
132 | + static let URL_DATASTATISTICGETTEACHERGENERALS=HOST+"/api/DataStatistics/GetTeacherGenerals" //获取排行前十的教师的综合数 | ||
133 | + static let URL_DATASTATISTICGETTEACHERPVS=HOST+"/api/DataStatistics/GetTeacherPvs" //获取排名前十的教师发的资源的阅读量 | ||
134 | + static let URL_DATASTATISTICGETTEACHERDOWNLOAD=HOST+"/api/DataStatistics/GetTeacherDownload" //获取排名前十的资源的下载量 | ||
135 | + static let URL_DATASTATISTICGETTEACHERUPLOAD=HOST+"/api/DataStatistics/GetTeacherUpload" //获取排名前十的教师的上传量 | ||
136 | + static let URL_DATASTATISTICGETGETRANKSBYPAGE=HOST+"/api/DataStatistics/GetRanksByPage" //分页获取排行榜 | ||
137 | + | ||
138 | + //MARK:-UserCenter(url) | ||
139 | + static let URL_USERCENTERGETMYALLRESOURCES=HOST+"/api/UserCenter/GetMyAllResources" //获取我的资源 | ||
140 | + static let URL_USERCENTERGETALLRESOURCES=HOST+"/api/UserCenter/GetAllResources" //获取校本资源 | ||
141 | + static let URL_USERCENTERGETADDRESOURCE=HOST+"/api/UserCenter/AddResource" //上传资源/微课/校园电视台 | ||
142 | + static let URL_USERCENTERGETUPDATERESOURCE=HOST+"/api/UserCenter/UpdateResource" //修改资源/微课/校园电视台 | ||
143 | + static let URL_USERCENTERGETEXAMINERESOURCE=HOST+"/api/UserCenter/ExamineResource" //审核资源/微课/校园电视台 | ||
144 | + static let URL_USERCENTERGETDELETERESOURCE=HOST+"/api/UserCenter/DeleteResource" //删除资源/微课/校园电视台 | ||
145 | + static let URL_USERCENTERGETHIDERESOURCE=HOST+"/api/UserCenter/HideResource" //隐藏资源/微课/校园电视台 | ||
146 | + static let URL_USERCENTERGETUPDATEDOWNLOADSUM=HOST+"/api/UserCenter/UpdateDownloadSum" //资源下载时更新下载量 | ||
147 | + static let URL_USERCENTERGETGETHISTORYVIEW=HOST+"/api/UserCenter/GetHistroyView" //历史记录 | ||
148 | + static let URL_USERCENTERGETADDHISTORYVIEW=HOST+"/api/UserCenter/AddHistoryView" //添加历史记录 | ||
149 | + static let URL_USERCENTERGETGETMYUSER=HOST+"/api/UserCenter/GetMyUser" //已开设账号 | ||
150 | + static let URL_USERCENTERGETADDUSER=HOST+"/api/UserCenter/AddUser" //开设学生账号 | ||
151 | + | ||
124 | 152 | ||
125 | var token:String?{ | 153 | var token:String?{ |
126 | return accountManager.token | 154 | return accountManager.token |
@@ -261,9 +289,116 @@ final class HTTPServer{ | @@ -261,9 +289,116 @@ final class HTTPServer{ | ||
261 | func getTelevisionStationCatagory(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ | 289 | func getTelevisionStationCatagory(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ |
262 | KHttp.GET(url: HTTPServer.URL_COURSEGETTELEVISIONSTATIONCATAGORY, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) | 290 | KHttp.GET(url: HTTPServer.URL_COURSEGETTELEVISIONSTATIONCATAGORY, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) |
263 | } | 291 | } |
292 | + | ||
293 | + | ||
264 | //MARK:-DataStatistics | 294 | //MARK:-DataStatistics |
295 | + //获取前十学校的综合排行 | ||
296 | + func getSchoolGeneral(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ | ||
297 | + KHttp.GET(url: HTTPServer.URL_DATASTATISTICGETSCHOOLGENERAL, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) | ||
298 | + } | ||
299 | + | ||
300 | + //获取前十学校的阅读量排行 | ||
301 | + func getSchoolPv(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ | ||
302 | + KHttp.GET(url: HTTPServer.URL_DATASTATISTICGETSCHOOLPV, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) | ||
303 | + } | ||
304 | + | ||
305 | + //获取排行前十学校的下载量 | ||
306 | + func getSchoolDownloads(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ | ||
307 | + KHttp.GET(url: HTTPServer.URL_DATASTATISTICGETSCHOOLDOWNLOADS, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) | ||
308 | + } | ||
309 | + | ||
310 | + //获取排行前十学校的上传数 | ||
311 | + func getSchoolUpload(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ | ||
312 | + KHttp.GET(url: HTTPServer.URL_DATASTATISTICGETSCHOOLUPLOAD, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) | ||
313 | + } | ||
314 | + | ||
315 | + //获取排行前十的教师的综合数 | ||
316 | + func getTeacherGenerals(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ | ||
317 | + KHttp.GET(url: HTTPServer.URL_DATASTATISTICGETTEACHERGENERALS, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) | ||
318 | + } | ||
319 | + | ||
320 | + //获取排名前十的教师发的资源的阅读量 | ||
321 | + func getTeacherPvs(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ | ||
322 | + KHttp.GET(url: HTTPServer.URL_DATASTATISTICGETTEACHERPVS, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) | ||
323 | + } | ||
324 | + | ||
325 | + //获取排名前十的资源的下载量 | ||
326 | + func getTeacherDownload(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ | ||
327 | + KHttp.GET(url: HTTPServer.URL_DATASTATISTICGETTEACHERDOWNLOAD, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) | ||
328 | + } | ||
329 | + | ||
330 | + //获取排名前十的教师的上传量 | ||
331 | + func getTeacherUpload(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ | ||
332 | + KHttp.GET(url: HTTPServer.URL_DATASTATISTICGETTEACHERUPLOAD, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) | ||
333 | + } | ||
334 | + | ||
335 | + //分页获取排行榜 | ||
336 | + func getRanksByPage(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ | ||
337 | + KHttp.POST(url: HTTPServer.URL_DATASTATISTICGETGETRANKSBYPAGE, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) | ||
338 | + } | ||
339 | + | ||
340 | + | ||
265 | //MARK:-UserCenter | 341 | //MARK:-UserCenter |
266 | - | 342 | + //获取我的资源 |
343 | + func getMyAllResources(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ | ||
344 | + KHttp.POST(url: HTTPServer.URL_USERCENTERGETMYALLRESOURCES, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) | ||
345 | + } | ||
346 | + | ||
347 | + //获取校本资源 | ||
348 | + func getAllResources(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ | ||
349 | + KHttp.POST(url: HTTPServer.URL_USERCENTERGETALLRESOURCES, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) | ||
350 | + } | ||
351 | + | ||
352 | + //上传资源/微课/校园电视台 | ||
353 | + func addResource(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ | ||
354 | + KHttp.POST(url: HTTPServer.URL_USERCENTERGETADDRESOURCE, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) | ||
355 | + } | ||
356 | + | ||
357 | + //修改资源/微课/校园电视台 | ||
358 | + func updateResource(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ | ||
359 | + KHttp.POST(url: HTTPServer.URL_USERCENTERGETUPDATERESOURCE, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) | ||
360 | + } | ||
361 | + | ||
362 | + //审核资源/微课/校园电视台 | ||
363 | + func examineResource(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ | ||
364 | + KHttp.GET(url: HTTPServer.URL_USERCENTERGETEXAMINERESOURCE, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) | ||
365 | + } | ||
366 | + | ||
367 | + //删除资源/微课/校园电视台 | ||
368 | + func deleteResource(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ | ||
369 | + KHttp.GET(url: HTTPServer.URL_USERCENTERGETDELETERESOURCE, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) | ||
370 | + } | ||
371 | + | ||
372 | + //隐藏资源/微课/校园电视台 | ||
373 | + func hideResource(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ | ||
374 | + KHttp.GET(url: HTTPServer.URL_USERCENTERGETHIDERESOURCE, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) | ||
375 | + } | ||
376 | + | ||
377 | + //资源下载时更新下载量 | ||
378 | + func updateDownloadSum(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ | ||
379 | + KHttp.GET(url: HTTPServer.URL_USERCENTERGETUPDATEDOWNLOADSUM, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) | ||
380 | + } | ||
381 | + | ||
382 | + //历史记录 | ||
383 | + func getHistroyView(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ | ||
384 | + KHttp.POST(url: HTTPServer.URL_USERCENTERGETGETHISTORYVIEW, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) | ||
385 | + } | ||
386 | + | ||
387 | + //添加历史记录 | ||
388 | + func addHistoryView(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ | ||
389 | + KHttp.POST(url: HTTPServer.URL_USERCENTERGETADDHISTORYVIEW, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) | ||
390 | + } | ||
391 | + | ||
392 | + //已开设账号 | ||
393 | + func getMyUser(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ | ||
394 | + KHttp.POST(url: HTTPServer.URL_USERCENTERGETGETMYUSER, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) | ||
395 | + } | ||
396 | + | ||
397 | + //开设学生账号 | ||
398 | + func addUser(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ | ||
399 | + KHttp.POST(url: HTTPServer.URL_USERCENTERGETADDUSER, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) | ||
400 | + } | ||
401 | + | ||
267 | 402 | ||
268 | } | 403 | } |
269 | let SERVER_MESSAGE=393939 | 404 | let SERVER_MESSAGE=393939 |