Commit 487b82beef178f2c07f10f725ec6dc01c36d440d

Authored by 左丞
1 parent 9bc76476
Exists in newLive

no message

YouerLiveVideo/YouerLiveVideo/Assets.xcassets/starLive.imageset/Contents.json
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 }, 6 },
7 { 7 {
8 "idiom" : "universal", 8 "idiom" : "universal",
9 - "filename" : "开始.png", 9 + "filename" : "bofang.png",
10 "scale" : "2x" 10 "scale" : "2x"
11 }, 11 },
12 { 12 {
YouerLiveVideo/YouerLiveVideo/Assets.xcassets/starLive.imageset/bofang.png 0 → 100644

2.54 KB

YouerLiveVideo/YouerLiveVideo/Assets.xcassets/starLive.imageset/开始.png

3.64 KB

YouerLiveVideo/YouerLiveVideo/controllers/TVStation/ExcellentTVViewController.swift
@@ -10,6 +10,8 @@ import UIKit @@ -10,6 +10,8 @@ import UIKit
10 import AVKit 10 import AVKit
11 class ExcellentTVViewController: UIViewController { 11 class ExcellentTVViewController: UIViewController {
12 12
  13 + @IBOutlet weak var collectionHeight: NSLayoutConstraint!
  14 + @IBOutlet weak var ContentSizeHeight: NSLayoutConstraint!
13 @IBOutlet weak var AllTitleView: UIView! 15 @IBOutlet weak var AllTitleView: UIView!
14 var isForbidScrollDelegate:Bool = true 16 var isForbidScrollDelegate:Bool = true
15 var startOffsetX:CGFloat = 0 17 var startOffsetX:CGFloat = 0
@@ -22,6 +24,7 @@ class ExcellentTVViewController: UIViewController { @@ -22,6 +24,7 @@ class ExcellentTVViewController: UIViewController {
22 var classSelectBtn:Int = 0 24 var classSelectBtn:Int = 0
23 override func viewDidLoad() { 25 override func viewDidLoad() {
24 super.viewDidLoad() 26 super.viewDidLoad()
  27 + self.automaticallyAdjustsScrollViewInsets = false
25 AppDelegate.instance().httpServer.getTelevisionStationCatagory(parameters: nil) { (str, error) in 28 AppDelegate.instance().httpServer.getTelevisionStationCatagory(parameters: nil) { (str, error) in
26 httpJsonResule(jsonString: str, error: error, successHandler: { (json) in 29 httpJsonResule(jsonString: str, error: error, successHandler: { (json) in
27 for item in json.contentData().arrayValue{ 30 for item in json.contentData().arrayValue{
@@ -211,6 +214,8 @@ extension ExcellentTVViewController:UICollectionViewDelegate,UICollectionViewDat @@ -211,6 +214,8 @@ extension ExcellentTVViewController:UICollectionViewDelegate,UICollectionViewDat
211 cell.datatSet.append(TVStationSubject(json: item)) 214 cell.datatSet.append(TVStationSubject(json: item))
212 } 215 }
213 cell.inforCollectionView.reloadData() 216 cell.inforCollectionView.reloadData()
  217 + let height = CGFloat(ceil(CGFloat(cell.datatSet.count)/2))*cell.cellHeight
  218 + self.collectionHeight.constant = height == 0 ? cell.cellHeight : height
214 }, failHandler: { (error) in 219 }, failHandler: { (error) in
215 220
216 }) 221 })
@@ -228,7 +233,6 @@ extension ExcellentTVViewController:UICollectionViewDelegate,UICollectionViewDat @@ -228,7 +233,6 @@ extension ExcellentTVViewController:UICollectionViewDelegate,UICollectionViewDat
228 233
229 func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { 234 func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
230 return CGSize(width: getScreenWidth(), height: collectionView.frame.size.height) 235 return CGSize(width: getScreenWidth(), height: collectionView.frame.size.height)
231 -  
232 } 236 }
233 } 237 }
234 238
@@ -238,7 +242,7 @@ class ExcellentTVViewCell: UICollectionViewCell,UICollectionViewDelegate,UIColl @@ -238,7 +242,7 @@ class ExcellentTVViewCell: UICollectionViewCell,UICollectionViewDelegate,UIColl
238 @IBOutlet weak var inforCollectionView: UICollectionView! 242 @IBOutlet weak var inforCollectionView: UICollectionView!
239 var datatSet:[TVStationSubject] = [] 243 var datatSet:[TVStationSubject] = []
240 var superNacigation:UINavigationController! 244 var superNacigation:UINavigationController!
241 - 245 + var cellHeight:CGFloat = 200
242 246
243 override func awakeFromNib() { 247 override func awakeFromNib() {
244 super.awakeFromNib() 248 super.awakeFromNib()
@@ -261,7 +265,7 @@ class ExcellentTVViewCell: UICollectionViewCell,UICollectionViewDelegate,UIColl @@ -261,7 +265,7 @@ class ExcellentTVViewCell: UICollectionViewCell,UICollectionViewDelegate,UIColl
261 } 265 }
262 266
263 func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { 267 func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
264 - return CGSize(width: (getScreenWidth()-30)/2, height: 200) 268 + return CGSize(width: (getScreenWidth()-30)/2, height: cellHeight)
265 } 269 }
266 270
267 271
YouerLiveVideo/YouerLiveVideo/controllers/TVStation/TVStation.storyboard
@@ -97,171 +97,204 @@ @@ -97,171 +97,204 @@
97 <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> 97 <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
98 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> 98 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
99 <subviews> 99 <subviews>
100 - <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Mhl-sd-KB9">  
101 - <rect key="frame" x="0.0" y="64" width="375" height="157"/>  
102 - <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>  
103 - <constraints>  
104 - <constraint firstAttribute="height" constant="157" id="UZ0-MV-VXA"/>  
105 - </constraints>  
106 - </view>  
107 - <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="89T-Tx-OBE">  
108 - <rect key="frame" x="0.0" y="272" width="375" height="51"/>  
109 - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>  
110 - <constraints>  
111 - <constraint firstAttribute="height" constant="51" id="Y6f-tb-9yg"/>  
112 - </constraints>  
113 - </view>  
114 - <searchBar contentMode="redraw" placeholder="搜索" translatesAutoresizingMaskIntoConstraints="NO" id="zGg-HQ-hQ6">  
115 - <rect key="frame" x="0.0" y="20" width="375" height="44"/>  
116 - <textInputTraits key="textInputTraits"/>  
117 - </searchBar>  
118 - <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" pagingEnabled="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="98q-Zu-qPj">  
119 - <rect key="frame" x="0.0" y="323" width="375" height="344"/>  
120 - <color key="backgroundColor" red="0.89713114500000002" green="0.89431768659999999" blue="0.90413767099999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>  
121 - <collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="0.0" minimumInteritemSpacing="0.0" id="Y8d-tF-Eyu">  
122 - <size key="itemSize" width="376" height="392"/>  
123 - <size key="headerReferenceSize" width="0.0" height="0.0"/>  
124 - <size key="footerReferenceSize" width="0.0" height="0.0"/>  
125 - <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>  
126 - </collectionViewFlowLayout>  
127 - <cells>  
128 - <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="cell" id="fGR-8c-fGE" customClass="ExcellentTVViewCell" customModule="YouerLiveVideo" customModuleProvider="target">  
129 - <rect key="frame" x="0.0" y="-24" width="376" height="392"/>  
130 - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>  
131 - <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">  
132 - <rect key="frame" x="0.0" y="0.0" width="376" height="392"/>  
133 - <autoresizingMask key="autoresizingMask"/>  
134 - <subviews>  
135 - <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="r6p-zi-d85">  
136 - <rect key="frame" x="0.0" y="0.0" width="376" height="392"/>  
137 - <color key="backgroundColor" red="0.89713114500000002" green="0.89431768659999999" blue="0.90413767099999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>  
138 - <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="cgF-Y1-nnf">  
139 - <size key="itemSize" width="170" height="262"/>  
140 - <size key="headerReferenceSize" width="0.0" height="0.0"/>  
141 - <size key="footerReferenceSize" width="0.0" height="0.0"/>  
142 - <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>  
143 - </collectionViewFlowLayout>  
144 - <cells>  
145 - <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="cell1" id="E1U-aK-U8z" customClass="ExcellentTVInforViewCell" customModule="YouerLiveVideo" customModuleProvider="target">  
146 - <rect key="frame" x="0.0" y="0.0" width="170" height="262"/>  
147 - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>  
148 - <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">  
149 - <rect key="frame" x="0.0" y="0.0" width="170" height="262"/>  
150 - <autoresizingMask key="autoresizingMask"/>  
151 - <subviews>  
152 - <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="fcz-OQ-94m">  
153 - <rect key="frame" x="0.0" y="0.0" width="170" height="134.5"/>  
154 - <constraints>  
155 - <constraint firstAttribute="width" secondItem="fcz-OQ-94m" secondAttribute="height" multiplier="81:64" id="BM3-Lc-rwo"/>  
156 - </constraints>  
157 - </imageView>  
158 - <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="v40-tv-azp">  
159 - <rect key="frame" x="0.0" y="134.5" width="170" height="127.5"/>  
160 - <subviews>  
161 - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VsV-Bf-hCY">  
162 - <rect key="frame" x="8" y="8" width="42" height="20.5"/>  
163 - <fontDescription key="fontDescription" type="system" pointSize="17"/>  
164 - <nil key="textColor"/>  
165 - <nil key="highlightedColor"/>  
166 - </label>  
167 - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9MF-Zt-fqc">  
168 - <rect key="frame" x="8" y="98.5" width="42" height="21"/>  
169 - <fontDescription key="fontDescription" type="system" pointSize="17"/>  
170 - <nil key="textColor"/>  
171 - <nil key="highlightedColor"/>  
172 - </label>  
173 - <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="R2I-qS-V0B">  
174 - <rect key="frame" x="116" y="49" width="46" height="30"/>  
175 - <state key="normal" title="Button"/>  
176 - <connections>  
177 - <action selector="playBtnClick:" destination="E1U-aK-U8z" eventType="touchUpInside" id="uuk-j5-fzl"/>  
178 - </connections>  
179 - </button>  
180 - </subviews>  
181 - <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>  
182 - <constraints>  
183 - <constraint firstItem="9MF-Zt-fqc" firstAttribute="leading" secondItem="v40-tv-azp" secondAttribute="leading" constant="8" id="2Kr-Vk-cl8"/>  
184 - <constraint firstAttribute="bottom" secondItem="9MF-Zt-fqc" secondAttribute="bottom" constant="8" id="Per-3M-nJ4"/>  
185 - <constraint firstAttribute="trailing" secondItem="R2I-qS-V0B" secondAttribute="trailing" constant="8" id="asC-Mg-7ac"/>  
186 - <constraint firstItem="VsV-Bf-hCY" firstAttribute="leading" secondItem="v40-tv-azp" secondAttribute="leading" constant="8" id="trW-Yh-6Yt"/>  
187 - <constraint firstItem="R2I-qS-V0B" firstAttribute="centerY" secondItem="v40-tv-azp" secondAttribute="centerY" id="ybv-GH-Lkg"/>  
188 - <constraint firstItem="VsV-Bf-hCY" firstAttribute="top" secondItem="v40-tv-azp" secondAttribute="top" constant="8" id="zLU-CS-C8S"/>  
189 - </constraints>  
190 - </view>  
191 - </subviews>  
192 - </view>  
193 - <constraints>  
194 - <constraint firstItem="v40-tv-azp" firstAttribute="top" secondItem="fcz-OQ-94m" secondAttribute="bottom" id="IHm-KI-Mgh"/>  
195 - <constraint firstAttribute="trailing" secondItem="fcz-OQ-94m" secondAttribute="trailing" id="YNR-ad-G4t"/>  
196 - <constraint firstItem="fcz-OQ-94m" firstAttribute="leading" secondItem="E1U-aK-U8z" secondAttribute="leading" id="dFl-og-rZ7"/>  
197 - <constraint firstAttribute="trailing" secondItem="v40-tv-azp" secondAttribute="trailing" id="gRV-Qv-d29"/>  
198 - <constraint firstItem="fcz-OQ-94m" firstAttribute="top" secondItem="E1U-aK-U8z" secondAttribute="top" id="roE-zo-bkK"/>  
199 - <constraint firstAttribute="bottom" secondItem="v40-tv-azp" secondAttribute="bottom" id="sT9-jY-pdA"/>  
200 - <constraint firstItem="v40-tv-azp" firstAttribute="leading" secondItem="E1U-aK-U8z" secondAttribute="leading" id="tdS-jP-AdZ"/>  
201 - </constraints>  
202 - <connections>  
203 - <outlet property="playCount" destination="9MF-Zt-fqc" id="iHW-0H-dJW"/>  
204 - <outlet property="subjectType" destination="VsV-Bf-hCY" id="jBF-p7-4zm"/>  
205 - <outlet property="tvStationLogo" destination="fcz-OQ-94m" id="aJ8-f4-qoh"/>  
206 - </connections>  
207 - </collectionViewCell>  
208 - </cells>  
209 - <connections>  
210 - <outlet property="dataSource" destination="fGR-8c-fGE" id="u36-wA-CKH"/>  
211 - <outlet property="delegate" destination="fGR-8c-fGE" id="IBZ-Vo-3of"/>  
212 - </connections>  
213 - </collectionView>  
214 - </subviews>  
215 - </view> 100 + <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="I5d-rQ-mbN">
  101 + <rect key="frame" x="0.0" y="20" width="375" height="647"/>
  102 + <subviews>
  103 + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zXX-de-diQ">
  104 + <rect key="frame" x="0.0" y="0.0" width="375" height="647"/>
  105 + <subviews>
  106 + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="beS-zl-5ku">
  107 + <rect key="frame" x="0.0" y="252" width="375" height="51"/>
  108 + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
  109 + <constraints>
  110 + <constraint firstAttribute="height" constant="51" id="CsW-m7-aCa"/>
  111 + </constraints>
  112 + </view>
  113 + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kGb-T7-Fzf">
  114 + <rect key="frame" x="0.0" y="201" width="375" height="51"/>
  115 + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
  116 + <constraints>
  117 + <constraint firstAttribute="height" constant="51" id="56p-A7-q9E"/>
  118 + </constraints>
  119 + </view>
  120 + <searchBar contentMode="redraw" placeholder="搜索" translatesAutoresizingMaskIntoConstraints="NO" id="D8L-US-h8q">
  121 + <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
  122 + <textInputTraits key="textInputTraits"/>
  123 + </searchBar>
  124 + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0j4-AN-Lgn">
  125 + <rect key="frame" x="0.0" y="44" width="375" height="157"/>
  126 + <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
  127 + <constraints>
  128 + <constraint firstAttribute="height" constant="157" id="X33-fj-VHm"/>
  129 + </constraints>
  130 + </view>
  131 + <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" pagingEnabled="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="fAv-jW-Nwz">
  132 + <rect key="frame" x="0.0" y="303" width="375" height="344"/>
  133 + <color key="backgroundColor" red="0.89713114500000002" green="0.89431768659999999" blue="0.90413767099999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
  134 + <constraints>
  135 + <constraint firstAttribute="height" constant="344" id="lO8-kE-zqe"/>
  136 + </constraints>
  137 + <collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="0.0" minimumInteritemSpacing="0.0" id="xIO-a0-DAd">
  138 + <size key="itemSize" width="376" height="392"/>
  139 + <size key="headerReferenceSize" width="0.0" height="0.0"/>
  140 + <size key="footerReferenceSize" width="0.0" height="0.0"/>
  141 + <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
  142 + </collectionViewFlowLayout>
  143 + <cells>
  144 + <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="cell" id="VJB-1R-iLv" customClass="ExcellentTVViewCell" customModule="YouerLiveVideo" customModuleProvider="target">
  145 + <rect key="frame" x="0.0" y="-24" width="376" height="392"/>
  146 + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
  147 + <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
  148 + <rect key="frame" x="0.0" y="0.0" width="376" height="392"/>
  149 + <autoresizingMask key="autoresizingMask"/>
  150 + <subviews>
  151 + <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="87C-SA-ne7">
  152 + <rect key="frame" x="0.0" y="0.0" width="376" height="392"/>
  153 + <color key="backgroundColor" red="0.89713114500000002" green="0.89431768659999999" blue="0.90413767099999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
  154 + <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="td3-ot-O0A">
  155 + <size key="itemSize" width="170" height="262"/>
  156 + <size key="headerReferenceSize" width="0.0" height="0.0"/>
  157 + <size key="footerReferenceSize" width="0.0" height="0.0"/>
  158 + <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
  159 + </collectionViewFlowLayout>
  160 + <cells>
  161 + <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="cell1" id="h38-NB-8y1" customClass="ExcellentTVInforViewCell" customModule="YouerLiveVideo" customModuleProvider="target">
  162 + <rect key="frame" x="0.0" y="0.0" width="170" height="262"/>
  163 + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
  164 + <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
  165 + <rect key="frame" x="0.0" y="0.0" width="170" height="262"/>
  166 + <autoresizingMask key="autoresizingMask"/>
  167 + <subviews>
  168 + <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="q0M-rc-EXR">
  169 + <rect key="frame" x="0.0" y="0.0" width="170" height="134.5"/>
  170 + <constraints>
  171 + <constraint firstAttribute="width" secondItem="q0M-rc-EXR" secondAttribute="height" multiplier="81:64" id="4QF-fC-lnx"/>
  172 + </constraints>
  173 + </imageView>
  174 + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6It-kH-Zwv">
  175 + <rect key="frame" x="0.0" y="134.5" width="170" height="127.5"/>
  176 + <subviews>
  177 + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AdV-R1-gWf">
  178 + <rect key="frame" x="8" y="8" width="42" height="20.5"/>
  179 + <fontDescription key="fontDescription" type="system" pointSize="17"/>
  180 + <nil key="textColor"/>
  181 + <nil key="highlightedColor"/>
  182 + </label>
  183 + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="v6H-KX-FQE">
  184 + <rect key="frame" x="8" y="98.5" width="42" height="21"/>
  185 + <fontDescription key="fontDescription" type="system" pointSize="17"/>
  186 + <nil key="textColor"/>
  187 + <nil key="highlightedColor"/>
  188 + </label>
  189 + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="h8e-iU-RLj">
  190 + <rect key="frame" x="132" y="49" width="30" height="30"/>
  191 + <state key="normal" backgroundImage="starLive"/>
  192 + <connections>
  193 + <action selector="playBtnClick:" destination="h38-NB-8y1" eventType="touchUpInside" id="Pgb-5q-Qcn"/>
  194 + </connections>
  195 + </button>
  196 + </subviews>
  197 + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  198 + <constraints>
  199 + <constraint firstItem="AdV-R1-gWf" firstAttribute="leading" secondItem="6It-kH-Zwv" secondAttribute="leading" constant="8" id="0yf-hR-rEU"/>
  200 + <constraint firstItem="h8e-iU-RLj" firstAttribute="centerY" secondItem="6It-kH-Zwv" secondAttribute="centerY" id="1a8-8d-Afp"/>
  201 + <constraint firstItem="AdV-R1-gWf" firstAttribute="top" secondItem="6It-kH-Zwv" secondAttribute="top" constant="8" id="Jnu-fO-TZo"/>
  202 + <constraint firstItem="v6H-KX-FQE" firstAttribute="leading" secondItem="6It-kH-Zwv" secondAttribute="leading" constant="8" id="YiO-cN-CEH"/>
  203 + <constraint firstAttribute="bottom" secondItem="v6H-KX-FQE" secondAttribute="bottom" constant="8" id="ZvT-ej-8MF"/>
  204 + <constraint firstAttribute="trailing" secondItem="h8e-iU-RLj" secondAttribute="trailing" constant="8" id="dxl-DA-IUE"/>
  205 + </constraints>
  206 + </view>
  207 + </subviews>
  208 + </view>
  209 + <constraints>
  210 + <constraint firstItem="6It-kH-Zwv" firstAttribute="leading" secondItem="h38-NB-8y1" secondAttribute="leading" id="6I0-Kb-Zvf"/>
  211 + <constraint firstAttribute="bottom" secondItem="6It-kH-Zwv" secondAttribute="bottom" id="7Td-xD-GLC"/>
  212 + <constraint firstItem="q0M-rc-EXR" firstAttribute="leading" secondItem="h38-NB-8y1" secondAttribute="leading" id="95s-ZM-FJ6"/>
  213 + <constraint firstItem="6It-kH-Zwv" firstAttribute="top" secondItem="q0M-rc-EXR" secondAttribute="bottom" id="P3N-QU-XgJ"/>
  214 + <constraint firstAttribute="trailing" secondItem="6It-kH-Zwv" secondAttribute="trailing" id="T2B-ph-CC8"/>
  215 + <constraint firstItem="q0M-rc-EXR" firstAttribute="top" secondItem="h38-NB-8y1" secondAttribute="top" id="tow-B8-NRU"/>
  216 + <constraint firstAttribute="trailing" secondItem="q0M-rc-EXR" secondAttribute="trailing" id="x8Q-dQ-IBl"/>
  217 + </constraints>
  218 + <connections>
  219 + <outlet property="playCount" destination="v6H-KX-FQE" id="Gmp-Hy-5ya"/>
  220 + <outlet property="subjectType" destination="AdV-R1-gWf" id="6UG-Dl-wmv"/>
  221 + <outlet property="tvStationLogo" destination="q0M-rc-EXR" id="gB6-hs-Ozb"/>
  222 + </connections>
  223 + </collectionViewCell>
  224 + </cells>
  225 + <connections>
  226 + <outlet property="dataSource" destination="VJB-1R-iLv" id="yd4-wv-GYI"/>
  227 + <outlet property="delegate" destination="VJB-1R-iLv" id="YwX-PI-A7C"/>
  228 + </connections>
  229 + </collectionView>
  230 + </subviews>
  231 + </view>
  232 + <constraints>
  233 + <constraint firstItem="87C-SA-ne7" firstAttribute="leading" secondItem="VJB-1R-iLv" secondAttribute="leading" id="7um-iD-Oam"/>
  234 + <constraint firstAttribute="bottom" secondItem="87C-SA-ne7" secondAttribute="bottom" id="IRV-Dh-rvw"/>
  235 + <constraint firstItem="87C-SA-ne7" firstAttribute="top" secondItem="VJB-1R-iLv" secondAttribute="top" id="d8C-qF-Bbg"/>
  236 + <constraint firstAttribute="trailing" secondItem="87C-SA-ne7" secondAttribute="trailing" id="fyF-GZ-Mc4"/>
  237 + </constraints>
  238 + <connections>
  239 + <outlet property="inforCollectionView" destination="87C-SA-ne7" id="UpF-9K-g4l"/>
  240 + </connections>
  241 + </collectionViewCell>
  242 + </cells>
  243 + <connections>
  244 + <outlet property="dataSource" destination="b8W-aX-LnV" id="mc0-fo-xS3"/>
  245 + <outlet property="delegate" destination="b8W-aX-LnV" id="OFh-hb-28W"/>
  246 + </connections>
  247 + </collectionView>
  248 + </subviews>
  249 + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
216 <constraints> 250 <constraints>
217 - <constraint firstItem="r6p-zi-d85" firstAttribute="leading" secondItem="fGR-8c-fGE" secondAttribute="leading" id="XnS-Y3-JXe"/>  
218 - <constraint firstAttribute="bottom" secondItem="r6p-zi-d85" secondAttribute="bottom" id="Zyh-g8-MW7"/>  
219 - <constraint firstAttribute="trailing" secondItem="r6p-zi-d85" secondAttribute="trailing" id="dK8-ok-Snv"/>  
220 - <constraint firstItem="r6p-zi-d85" firstAttribute="top" secondItem="fGR-8c-fGE" secondAttribute="top" id="iDI-iF-maj"/> 251 + <constraint firstAttribute="trailing" secondItem="0j4-AN-Lgn" secondAttribute="trailing" id="32n-uz-LhT"/>
  252 + <constraint firstAttribute="trailing" secondItem="kGb-T7-Fzf" secondAttribute="trailing" id="97n-jq-P7y"/>
  253 + <constraint firstItem="fAv-jW-Nwz" firstAttribute="leading" secondItem="zXX-de-diQ" secondAttribute="leading" id="9ft-O9-tVH"/>
  254 + <constraint firstItem="beS-zl-5ku" firstAttribute="top" secondItem="kGb-T7-Fzf" secondAttribute="bottom" id="Fsi-Db-hmv"/>
  255 + <constraint firstItem="D8L-US-h8q" firstAttribute="leading" secondItem="zXX-de-diQ" secondAttribute="leading" id="ImS-U2-gLx"/>
  256 + <constraint firstAttribute="trailing" secondItem="beS-zl-5ku" secondAttribute="trailing" id="KBm-fZ-b3c"/>
  257 + <constraint firstItem="fAv-jW-Nwz" firstAttribute="top" secondItem="beS-zl-5ku" secondAttribute="bottom" id="L6D-hm-v8r"/>
  258 + <constraint firstAttribute="trailing" secondItem="D8L-US-h8q" secondAttribute="trailing" id="Lv5-Oj-8Ac"/>
  259 + <constraint firstItem="kGb-T7-Fzf" firstAttribute="top" secondItem="0j4-AN-Lgn" secondAttribute="bottom" id="RYK-Jh-QLR"/>
  260 + <constraint firstItem="0j4-AN-Lgn" firstAttribute="top" secondItem="D8L-US-h8q" secondAttribute="bottom" id="VHQ-Mb-oRx"/>
  261 + <constraint firstItem="beS-zl-5ku" firstAttribute="top" secondItem="kGb-T7-Fzf" secondAttribute="bottom" id="Wz6-EX-3ve"/>
  262 + <constraint firstItem="fAv-jW-Nwz" firstAttribute="top" secondItem="beS-zl-5ku" secondAttribute="bottom" id="XjU-yQ-A7l"/>
  263 + <constraint firstItem="D8L-US-h8q" firstAttribute="top" secondItem="zXX-de-diQ" secondAttribute="top" id="Ywt-la-Wsv"/>
  264 + <constraint firstItem="kGb-T7-Fzf" firstAttribute="top" secondItem="0j4-AN-Lgn" secondAttribute="bottom" id="eYf-ac-1hI"/>
  265 + <constraint firstItem="0j4-AN-Lgn" firstAttribute="top" secondItem="D8L-US-h8q" secondAttribute="bottom" id="fZA-Kv-gaF"/>
  266 + <constraint firstAttribute="height" constant="647" id="hJt-hJ-igO"/>
  267 + <constraint firstItem="kGb-T7-Fzf" firstAttribute="leading" secondItem="zXX-de-diQ" secondAttribute="leading" id="hbu-An-hpo"/>
  268 + <constraint firstAttribute="trailing" secondItem="fAv-jW-Nwz" secondAttribute="trailing" id="ifZ-IO-lnF"/>
  269 + <constraint firstItem="0j4-AN-Lgn" firstAttribute="leading" secondItem="zXX-de-diQ" secondAttribute="leading" id="u3e-M1-wHJ"/>
  270 + <constraint firstItem="beS-zl-5ku" firstAttribute="leading" secondItem="zXX-de-diQ" secondAttribute="leading" id="uNE-5r-04p"/>
221 </constraints> 271 </constraints>
222 - <connections>  
223 - <outlet property="inforCollectionView" destination="r6p-zi-d85" id="XvH-nv-OHv"/>  
224 - </connections>  
225 - </collectionViewCell>  
226 - </cells>  
227 - <connections>  
228 - <outlet property="dataSource" destination="b8W-aX-LnV" id="CCT-nv-YZq"/>  
229 - <outlet property="delegate" destination="b8W-aX-LnV" id="1Cr-xP-bzP"/>  
230 - </connections>  
231 - </collectionView>  
232 - <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IdI-17-KVq">  
233 - <rect key="frame" x="0.0" y="221" width="375" height="51"/>  
234 - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> 272 + </view>
  273 + </subviews>
235 <constraints> 274 <constraints>
236 - <constraint firstAttribute="height" constant="51" id="unU-1q-P1u"/> 275 + <constraint firstItem="zXX-de-diQ" firstAttribute="centerX" secondItem="I5d-rQ-mbN" secondAttribute="centerX" id="AI7-Rb-64k"/>
  276 + <constraint firstItem="zXX-de-diQ" firstAttribute="top" secondItem="I5d-rQ-mbN" secondAttribute="top" id="Vew-O6-TEJ"/>
  277 + <constraint firstAttribute="trailing" secondItem="zXX-de-diQ" secondAttribute="trailing" id="b4T-PL-kjW"/>
  278 + <constraint firstItem="zXX-de-diQ" firstAttribute="leading" secondItem="I5d-rQ-mbN" secondAttribute="leading" id="gzp-vn-1Fh"/>
  279 + <constraint firstAttribute="bottom" secondItem="zXX-de-diQ" secondAttribute="bottom" id="vyh-Bm-4vf"/>
237 </constraints> 280 </constraints>
238 - </view> 281 + </scrollView>
239 </subviews> 282 </subviews>
240 <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> 283 <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
241 <constraints> 284 <constraints>
242 - <constraint firstItem="zGg-HQ-hQ6" firstAttribute="leading" secondItem="Gv8-KK-Axo" secondAttribute="leading" id="08r-BK-AYj"/>  
243 - <constraint firstAttribute="trailing" secondItem="IdI-17-KVq" secondAttribute="trailing" id="5vb-9d-uXn"/>  
244 - <constraint firstItem="IdI-17-KVq" firstAttribute="top" secondItem="Mhl-sd-KB9" secondAttribute="bottom" id="7rQ-6N-24t"/>  
245 - <constraint firstAttribute="trailing" secondItem="98q-Zu-qPj" secondAttribute="trailing" id="9fs-x7-fIS"/>  
246 - <constraint firstItem="IdI-17-KVq" firstAttribute="leading" secondItem="Gv8-KK-Axo" secondAttribute="leading" id="F2C-pE-qYZ"/>  
247 - <constraint firstItem="zGg-HQ-hQ6" firstAttribute="top" secondItem="4i9-Tx-rg9" secondAttribute="bottom" id="J68-Pn-0Bu"/>  
248 - <constraint firstAttribute="trailing" secondItem="Mhl-sd-KB9" secondAttribute="trailing" id="Lt7-n0-tWt"/>  
249 - <constraint firstItem="lho-df-W25" firstAttribute="top" secondItem="98q-Zu-qPj" secondAttribute="bottom" id="MIT-SW-TOS"/>  
250 - <constraint firstItem="89T-Tx-OBE" firstAttribute="leading" secondItem="Gv8-KK-Axo" secondAttribute="leading" id="NED-o8-Gz5"/>  
251 - <constraint firstItem="89T-Tx-OBE" firstAttribute="top" secondItem="IdI-17-KVq" secondAttribute="bottom" id="Pc7-DI-fyn"/>  
252 - <constraint firstAttribute="trailing" secondItem="zGg-HQ-hQ6" secondAttribute="trailing" id="WPf-27-9bg"/>  
253 - <constraint firstItem="Mhl-sd-KB9" firstAttribute="leading" secondItem="Gv8-KK-Axo" secondAttribute="leading" id="anA-G9-sCy"/>  
254 - <constraint firstItem="98q-Zu-qPj" firstAttribute="leading" secondItem="Gv8-KK-Axo" secondAttribute="leading" id="coP-ED-djd"/>  
255 - <constraint firstAttribute="trailing" secondItem="89T-Tx-OBE" secondAttribute="trailing" id="d3u-hS-Fv0"/>  
256 - <constraint firstItem="98q-Zu-qPj" firstAttribute="top" secondItem="89T-Tx-OBE" secondAttribute="bottom" id="vDI-ni-7Iu"/>  
257 - <constraint firstItem="Mhl-sd-KB9" firstAttribute="top" secondItem="zGg-HQ-hQ6" secondAttribute="bottom" id="zJx-8Q-hdK"/> 285 + <constraint firstItem="lho-df-W25" firstAttribute="top" secondItem="I5d-rQ-mbN" secondAttribute="bottom" id="GzF-3p-v7c"/>
  286 + <constraint firstItem="I5d-rQ-mbN" firstAttribute="top" secondItem="4i9-Tx-rg9" secondAttribute="bottom" id="QKa-qf-yK1"/>
  287 + <constraint firstItem="I5d-rQ-mbN" firstAttribute="leading" secondItem="Gv8-KK-Axo" secondAttribute="leading" id="SMU-ej-yfY"/>
  288 + <constraint firstAttribute="trailing" secondItem="I5d-rQ-mbN" secondAttribute="trailing" id="ZEH-qm-ZZ9"/>
258 </constraints> 289 </constraints>
259 </view> 290 </view>
260 <connections> 291 <connections>
261 - <outlet property="AllTitleView" destination="IdI-17-KVq" id="q4z-D9-yZi"/>  
262 - <outlet property="TVStationClass" destination="89T-Tx-OBE" id="ru3-Dy-X1Z"/>  
263 - <outlet property="collectionView" destination="98q-Zu-qPj" id="0J9-bV-tnM"/>  
264 - <outlet property="lunboView" destination="Mhl-sd-KB9" id="R0Q-io-hip"/> 292 + <outlet property="AllTitleView" destination="kGb-T7-Fzf" id="PrI-T6-wBZ"/>
  293 + <outlet property="ContentSizeHeight" destination="hJt-hJ-igO" id="TQl-dJ-JRW"/>
  294 + <outlet property="TVStationClass" destination="beS-zl-5ku" id="ZFh-Ll-feE"/>
  295 + <outlet property="collectionHeight" destination="lO8-kE-zqe" id="Iss-p6-ZBV"/>
  296 + <outlet property="collectionView" destination="fAv-jW-Nwz" id="hyw-DI-wgJ"/>
  297 + <outlet property="lunboView" destination="0j4-AN-Lgn" id="gFp-c9-mkM"/>
265 </connections> 298 </connections>
266 </viewController> 299 </viewController>
267 <placeholder placeholderIdentifier="IBFirstResponder" id="KWc-cP-YUd" userLabel="First Responder" sceneMemberID="firstResponder"/> 300 <placeholder placeholderIdentifier="IBFirstResponder" id="KWc-cP-YUd" userLabel="First Responder" sceneMemberID="firstResponder"/>
@@ -713,5 +746,6 @@ @@ -713,5 +746,6 @@
713 </scenes> 746 </scenes>
714 <resources> 747 <resources>
715 <image name="arrow" width="7" height="12"/> 748 <image name="arrow" width="7" height="12"/>
  749 + <image name="starLive" width="30" height="30"/>
716 </resources> 750 </resources>
717 </document> 751 </document>
YouerLiveVideo/YouerLiveVideo/controllers/User/Setting/ChangePassWordViewController.swift
@@ -10,23 +10,36 @@ import UIKit @@ -10,23 +10,36 @@ import UIKit
10 10
11 class ChangePassWordViewController: UIViewController { 11 class ChangePassWordViewController: UIViewController {
12 12
  13 + @IBOutlet weak var phoneViewHeight: NSLayoutConstraint!
13 @IBOutlet weak var scrollView: UIScrollView! 14 @IBOutlet weak var scrollView: UIScrollView!
14 @IBOutlet weak var scrollViewHeight: NSLayoutConstraint! 15 @IBOutlet weak var scrollViewHeight: NSLayoutConstraint!
15 @IBOutlet weak var contentSizeHeight: NSLayoutConstraint! 16 @IBOutlet weak var contentSizeHeight: NSLayoutConstraint!
16 17
  18 +
  19 + @IBOutlet weak var userPhoneTextFiled: UITextField!
  20 + @IBOutlet weak var phonrView: UIView!
17 @IBOutlet weak var passwordTextFiled: UITextField! 21 @IBOutlet weak var passwordTextFiled: UITextField!
18 @IBOutlet weak var agrenPasswordTextFiled: UITextField! 22 @IBOutlet weak var agrenPasswordTextFiled: UITextField!
19 @IBOutlet weak var userCodeTextFiled: UITextField! 23 @IBOutlet weak var userCodeTextFiled: UITextField!
20 24
21 25
22 - var scrollViewH:CGFloat!  
23 - 26 + var scrollViewH:CGFloat = 200
  27 + var user = AppDelegate.instance().accountManager
24 @IBAction func editKeyboard(_ sender: Any) { 28 @IBAction func editKeyboard(_ sender: Any) {
25 self.view.endEditing(true) 29 self.view.endEditing(true)
26 } 30 }
27 31
28 override func viewDidLoad() { 32 override func viewDidLoad() {
29 super.viewDidLoad() 33 super.viewDidLoad()
  34 + if user.isOnline() {
  35 + phonrView.isHidden=true
  36 + phoneViewHeight.constant=0
  37 + scrollViewH=150
  38 + }else{
  39 + phonrView.isHidden=false
  40 + phoneViewHeight.constant=50
  41 + scrollViewH=200
  42 + }
30 self.automaticallyAdjustsScrollViewInsets = false 43 self.automaticallyAdjustsScrollViewInsets = false
31 NotificationCenter.default.addObserver(self, selector: #selector(ChangePassWordViewController.keyboardWIllChange), name: NSNotification.Name.UIKeyboardWillChangeFrame, object: nil) 44 NotificationCenter.default.addObserver(self, selector: #selector(ChangePassWordViewController.keyboardWIllChange), name: NSNotification.Name.UIKeyboardWillChangeFrame, object: nil)
32 45
@@ -34,8 +47,8 @@ class ChangePassWordViewController: UIViewController { @@ -34,8 +47,8 @@ class ChangePassWordViewController: UIViewController {
34 } 47 }
35 48
36 override func viewWillAppear(_ animated: Bool) { 49 override func viewWillAppear(_ animated: Bool) {
37 - scrollViewHeight.constant = getScreenHeight() - 70 - 64  
38 - contentSizeHeight.constant = getScreenHeight() - 70 - 64 50 + scrollViewHeight.constant = scrollViewH
  51 + contentSizeHeight.constant = scrollViewH
39 scrollViewH = scrollViewHeight.constant 52 scrollViewH = scrollViewHeight.constant
40 } 53 }
41 54
@@ -45,11 +58,76 @@ class ChangePassWordViewController: UIViewController { @@ -45,11 +58,76 @@ class ChangePassWordViewController: UIViewController {
45 } 58 }
46 59
47 @IBAction func agrenChangePasswordBtnClick(_ sender: UIButton) { 60 @IBAction func agrenChangePasswordBtnClick(_ sender: UIButton) {
48 - 61 + var phone:String=""
  62 + //确认修改
  63 + if (agrenPasswordTextFiled.text?.characters.count)! <= 0 {
  64 + self.view.makeToast("密码不能为空")
  65 + return
  66 + }
  67 + if passwordTextFiled.text! != agrenPasswordTextFiled.text! {
  68 + self.view.makeToast("两次输入密码不一致")
  69 + return
  70 + }
  71 + if user.isOnline() {
  72 + phone=user.phone()
  73 + }else{
  74 + phone=passwordTextFiled.text!
  75 + }
  76 + SVProgressHUD.show(withStatus: "修改密码...")
  77 + SVProgressHUD.setDefaultMaskType(.black)
  78 + let parameters:Dictionary<String,AnyObject>=["f_Account":user.account() as AnyObject,
  79 + "f_Mobile":phone as AnyObject,
  80 + "f_UserPassword":passwordTextFiled.text! as AnyObject,
  81 + "f_VerCode":userCodeTextFiled.text! as AnyObject]
  82 + AppDelegate.instance().httpServer.getUpdatePassword(parameters: parameters) { (str, error) in
  83 + SVProgressHUD.dismiss()
  84 + if error==nil {
  85 + if JSON.fromString(jsonString: str)!["status"].intValue == 1{
  86 + httpJsonResule(jsonString: str, error: error, successHandler: { (json) in
  87 + if !self.user.isOnline() {
  88 + NotificationCenter.default.post(name: NSNotification.Name(rawValue: "refreshLoginUser"), object: self.passwordTextFiled.text!)
  89 + }
  90 + self.navigationController!.popViewController(animated: true)
  91 + AppDelegate.instance().window?.makeToast("修改成功")
  92 + }, failHandler: { (error) in
  93 + self.view.makeToast("修改失败")
  94 + })
  95 + }else{
  96 + self.view.makeToast("修改失败")
  97 + }
  98 + }
  99 + }
49 } 100 }
50 101
51 @IBAction func sendUserCodeBtnClick(_ sender: UIButton) { 102 @IBAction func sendUserCodeBtnClick(_ sender: UIButton) {
52 - 103 + self.view.endEditing(true)
  104 + var phone = ""
  105 + if user.isOnline(){
  106 + phone = user.phone()
  107 + }else{
  108 + phone = userPhoneTextFiled.text!
  109 + if !phone.isMobilePhoneNumber(){
  110 + self.view.makeToast("请输入正确的手机号码")
  111 + return
  112 + }
  113 + }
  114 + SVProgressHUD.show(withStatus: "获取验证码...")
  115 + SVProgressHUD.setDefaultMaskType(.black)
  116 + AppDelegate.instance().httpServer.getChangePhoneCaptcha(mobile: phone, completionHandler: { (str, error) in
  117 + SVProgressHUD.dismiss()
  118 + if error==nil {
  119 + if JSON.fromString(jsonString: str)!["status"].intValue == 1{
  120 + httpJsonResule(jsonString: str, error: error, successHandler: { (json) in
  121 + self.view.makeToast("验证码发送成功")
  122 + }, failHandler: { (error) in
  123 + self.view.makeToast("验证码发送失败:\(error.localizedDescription)")
  124 + })
  125 + }else{
  126 + self.view.makeToast("验证码发送失败")
  127 + }
  128 + }
  129 + })
  130 +
53 } 131 }
54 132
55 // MARK: - 输入密码点击return回收键盘 133 // MARK: - 输入密码点击return回收键盘
YouerLiveVideo/YouerLiveVideo/controllers/User/User.storyboard
@@ -272,9 +272,8 @@ @@ -272,9 +272,8 @@
272 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PPf-BI-ZxE"> 272 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PPf-BI-ZxE">
273 <rect key="frame" x="0.0" y="100" width="375" height="50"/> 273 <rect key="frame" x="0.0" y="100" width="375" height="50"/>
274 <subviews> 274 <subviews>
275 - <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请重复您输入的新密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Qzh-5W-Fdl"> 275 + <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请重复您输入的新密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Qzh-5W-Fdl">
276 <rect key="frame" x="20" y="16.5" width="335" height="17"/> 276 <rect key="frame" x="20" y="16.5" width="335" height="17"/>
277 - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>  
278 <nil key="textColor"/> 277 <nil key="textColor"/>
279 <fontDescription key="fontDescription" type="system" pointSize="14"/> 278 <fontDescription key="fontDescription" type="system" pointSize="14"/>
280 <textInputTraits key="textInputTraits"/> 279 <textInputTraits key="textInputTraits"/>
@@ -282,10 +281,12 @@ @@ -282,10 +281,12 @@
282 <outlet property="delegate" destination="HIn-e8-Pzh" id="3FT-zT-ACD"/> 281 <outlet property="delegate" destination="HIn-e8-Pzh" id="3FT-zT-ACD"/>
283 </connections> 282 </connections>
284 </textField> 283 </textField>
285 - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="g5c-gx-Rlr"> 284 + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="g5c-gx-Rlr">
286 <rect key="frame" x="16" y="49" width="343" height="1"/> 285 <rect key="frame" x="16" y="49" width="343" height="1"/>
287 - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>  
288 <color key="backgroundColor" red="0.93503493069999999" green="0.93562394380000002" blue="0.96585971120000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> 286 <color key="backgroundColor" red="0.93503493069999999" green="0.93562394380000002" blue="0.96585971120000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
  287 + <constraints>
  288 + <constraint firstAttribute="height" constant="1" id="qtU-9S-mwT"/>
  289 + </constraints>
289 <fontDescription key="fontDescription" type="system" pointSize="17"/> 290 <fontDescription key="fontDescription" type="system" pointSize="17"/>
290 <nil key="textColor"/> 291 <nil key="textColor"/>
291 <nil key="highlightedColor"/> 292 <nil key="highlightedColor"/>
@@ -293,15 +294,20 @@ @@ -293,15 +294,20 @@
293 </subviews> 294 </subviews>
294 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 295 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
295 <constraints> 296 <constraints>
  297 + <constraint firstItem="g5c-gx-Rlr" firstAttribute="leading" secondItem="PPf-BI-ZxE" secondAttribute="leading" constant="16" id="0dE-4O-cch"/>
  298 + <constraint firstAttribute="trailing" secondItem="g5c-gx-Rlr" secondAttribute="trailing" constant="16" id="4bP-Z2-YPd"/>
  299 + <constraint firstAttribute="bottom" secondItem="g5c-gx-Rlr" secondAttribute="bottom" id="V0t-gV-H0b"/>
  300 + <constraint firstItem="Qzh-5W-Fdl" firstAttribute="centerY" secondItem="PPf-BI-ZxE" secondAttribute="centerY" id="b3Q-Zu-FsL"/>
  301 + <constraint firstItem="Qzh-5W-Fdl" firstAttribute="leading" secondItem="PPf-BI-ZxE" secondAttribute="leading" constant="20" id="fxO-dt-wJP"/>
296 <constraint firstAttribute="height" constant="50" id="jT7-Bv-YA6"/> 302 <constraint firstAttribute="height" constant="50" id="jT7-Bv-YA6"/>
  303 + <constraint firstAttribute="trailing" secondItem="Qzh-5W-Fdl" secondAttribute="trailing" constant="20" id="ulj-vh-ubr"/>
297 </constraints> 304 </constraints>
298 </view> 305 </view>
299 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YjI-UW-Ova"> 306 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YjI-UW-Ova">
300 <rect key="frame" x="0.0" y="150" width="375" height="50"/> 307 <rect key="frame" x="0.0" y="150" width="375" height="50"/>
301 <subviews> 308 <subviews>
302 - <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入您收到的验证码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="dtg-hq-Nhp"> 309 + <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入您收到的验证码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="dtg-hq-Nhp">
303 <rect key="frame" x="20" y="17" width="147" height="17"/> 310 <rect key="frame" x="20" y="17" width="147" height="17"/>
304 - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>  
305 <nil key="textColor"/> 311 <nil key="textColor"/>
306 <fontDescription key="fontDescription" type="system" pointSize="14"/> 312 <fontDescription key="fontDescription" type="system" pointSize="14"/>
307 <textInputTraits key="textInputTraits" keyboardType="numberPad"/> 313 <textInputTraits key="textInputTraits" keyboardType="numberPad"/>
@@ -309,17 +315,18 @@ @@ -309,17 +315,18 @@
309 <outlet property="delegate" destination="HIn-e8-Pzh" id="Rk2-Rg-WTc"/> 315 <outlet property="delegate" destination="HIn-e8-Pzh" id="Rk2-Rg-WTc"/>
310 </connections> 316 </connections>
311 </textField> 317 </textField>
312 - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lFa-PY-Lg1"> 318 + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lFa-PY-Lg1">
313 <rect key="frame" x="16" y="49" width="343" height="1"/> 319 <rect key="frame" x="16" y="49" width="343" height="1"/>
314 - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>  
315 <color key="backgroundColor" red="0.93503493069999999" green="0.93562394380000002" blue="0.96585971120000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> 320 <color key="backgroundColor" red="0.93503493069999999" green="0.93562394380000002" blue="0.96585971120000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
  321 + <constraints>
  322 + <constraint firstAttribute="height" constant="1" id="lRU-vQ-Xdz"/>
  323 + </constraints>
316 <fontDescription key="fontDescription" type="system" pointSize="17"/> 324 <fontDescription key="fontDescription" type="system" pointSize="17"/>
317 <nil key="textColor"/> 325 <nil key="textColor"/>
318 <nil key="highlightedColor"/> 326 <nil key="highlightedColor"/>
319 </label> 327 </label>
320 - <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="i2a-hL-oad"> 328 + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="i2a-hL-oad">
321 <rect key="frame" x="274" y="10" width="85" height="30"/> 329 <rect key="frame" x="274" y="10" width="85" height="30"/>
322 - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>  
323 <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/> 330 <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/>
324 <state key="normal" title=" 获取验证码 "> 331 <state key="normal" title=" 获取验证码 ">
325 <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 332 <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
@@ -332,14 +339,21 @@ @@ -332,14 +339,21 @@
332 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 339 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
333 <constraints> 340 <constraints>
334 <constraint firstAttribute="height" constant="50" id="FXG-ec-5Cr"/> 341 <constraint firstAttribute="height" constant="50" id="FXG-ec-5Cr"/>
  342 + <constraint firstAttribute="trailing" secondItem="i2a-hL-oad" secondAttribute="trailing" constant="16" id="G4t-LR-wkT"/>
  343 + <constraint firstItem="i2a-hL-oad" firstAttribute="centerY" secondItem="YjI-UW-Ova" secondAttribute="centerY" id="Qy3-FK-b2B"/>
  344 + <constraint firstItem="i2a-hL-oad" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="dtg-hq-Nhp" secondAttribute="trailing" constant="8" id="Wxn-1V-gz8"/>
  345 + <constraint firstItem="dtg-hq-Nhp" firstAttribute="centerY" secondItem="YjI-UW-Ova" secondAttribute="centerY" id="a8d-eK-VXu"/>
  346 + <constraint firstItem="dtg-hq-Nhp" firstAttribute="leading" secondItem="YjI-UW-Ova" secondAttribute="leading" constant="20" id="bpj-hN-bZ1"/>
  347 + <constraint firstAttribute="trailing" secondItem="lFa-PY-Lg1" secondAttribute="trailing" constant="16" id="lvB-uj-jjc"/>
  348 + <constraint firstAttribute="bottom" secondItem="lFa-PY-Lg1" secondAttribute="bottom" id="oia-dc-3la"/>
  349 + <constraint firstItem="lFa-PY-Lg1" firstAttribute="leading" secondItem="YjI-UW-Ova" secondAttribute="leading" constant="16" id="xNe-X9-oY8"/>
335 </constraints> 350 </constraints>
336 </view> 351 </view>
337 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DSL-73-rUm"> 352 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DSL-73-rUm">
338 <rect key="frame" x="0.0" y="50" width="375" height="50"/> 353 <rect key="frame" x="0.0" y="50" width="375" height="50"/>
339 <subviews> 354 <subviews>
340 - <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入新密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="KOX-8X-bEC"> 355 + <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入新密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="KOX-8X-bEC">
341 <rect key="frame" x="20" y="17" width="335" height="17"/> 356 <rect key="frame" x="20" y="17" width="335" height="17"/>
342 - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>  
343 <nil key="textColor"/> 357 <nil key="textColor"/>
344 <fontDescription key="fontDescription" type="system" pointSize="14"/> 358 <fontDescription key="fontDescription" type="system" pointSize="14"/>
345 <textInputTraits key="textInputTraits"/> 359 <textInputTraits key="textInputTraits"/>
@@ -347,10 +361,12 @@ @@ -347,10 +361,12 @@
347 <outlet property="delegate" destination="HIn-e8-Pzh" id="JRe-kh-lW4"/> 361 <outlet property="delegate" destination="HIn-e8-Pzh" id="JRe-kh-lW4"/>
348 </connections> 362 </connections>
349 </textField> 363 </textField>
350 - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xNz-Dn-QcJ"> 364 + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xNz-Dn-QcJ">
351 <rect key="frame" x="16" y="49" width="343" height="1"/> 365 <rect key="frame" x="16" y="49" width="343" height="1"/>
352 - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>  
353 <color key="backgroundColor" red="0.93503493069999999" green="0.93562394380000002" blue="0.96585971120000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> 366 <color key="backgroundColor" red="0.93503493069999999" green="0.93562394380000002" blue="0.96585971120000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
  367 + <constraints>
  368 + <constraint firstAttribute="height" constant="1" id="cUP-wj-d6K"/>
  369 + </constraints>
354 <fontDescription key="fontDescription" type="system" pointSize="17"/> 370 <fontDescription key="fontDescription" type="system" pointSize="17"/>
355 <nil key="textColor"/> 371 <nil key="textColor"/>
356 <nil key="highlightedColor"/> 372 <nil key="highlightedColor"/>
@@ -358,7 +374,13 @@ @@ -358,7 +374,13 @@
358 </subviews> 374 </subviews>
359 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 375 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
360 <constraints> 376 <constraints>
  377 + <constraint firstItem="KOX-8X-bEC" firstAttribute="leading" secondItem="DSL-73-rUm" secondAttribute="leading" constant="20" id="2lh-H4-a6G"/>
361 <constraint firstAttribute="height" constant="50" id="6rp-3e-2Q1"/> 378 <constraint firstAttribute="height" constant="50" id="6rp-3e-2Q1"/>
  379 + <constraint firstItem="KOX-8X-bEC" firstAttribute="centerY" secondItem="DSL-73-rUm" secondAttribute="centerY" id="Tlz-js-G6P"/>
  380 + <constraint firstAttribute="trailing" secondItem="xNz-Dn-QcJ" secondAttribute="trailing" constant="16" id="W7W-hm-NV7"/>
  381 + <constraint firstAttribute="bottom" secondItem="xNz-Dn-QcJ" secondAttribute="bottom" id="Wan-Xm-oeb"/>
  382 + <constraint firstAttribute="trailing" secondItem="KOX-8X-bEC" secondAttribute="trailing" constant="20" id="kiw-vY-rHJ"/>
  383 + <constraint firstItem="xNz-Dn-QcJ" firstAttribute="leading" secondItem="DSL-73-rUm" secondAttribute="leading" constant="16" id="uKA-mK-RRJ"/>
362 </constraints> 384 </constraints>
363 </view> 385 </view>
364 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="b6X-Hs-kwP"> 386 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="b6X-Hs-kwP">
@@ -424,22 +446,26 @@ @@ -424,22 +446,26 @@
424 <constraint firstAttribute="height" constant="200" id="lBk-XC-8mQ"/> 446 <constraint firstAttribute="height" constant="200" id="lBk-XC-8mQ"/>
425 </constraints> 447 </constraints>
426 </scrollView> 448 </scrollView>
427 - <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="whH-Oe-owS"> 449 + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="whH-Oe-owS">
428 <rect key="frame" x="0.0" y="597" width="375" height="70"/> 450 <rect key="frame" x="0.0" y="597" width="375" height="70"/>
429 - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>  
430 <subviews> 451 <subviews>
431 - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kVt-8Z-dIm"> 452 + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kVt-8Z-dIm">
432 <rect key="frame" x="0.0" y="0.0" width="375" height="1"/> 453 <rect key="frame" x="0.0" y="0.0" width="375" height="1"/>
433 - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>  
434 <color key="backgroundColor" red="0.93503493069999999" green="0.93562394380000002" blue="0.96585971120000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> 454 <color key="backgroundColor" red="0.93503493069999999" green="0.93562394380000002" blue="0.96585971120000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
  455 + <constraints>
  456 + <constraint firstAttribute="height" constant="1" id="u7D-9M-FzQ"/>
  457 + </constraints>
435 <fontDescription key="fontDescription" type="system" pointSize="17"/> 458 <fontDescription key="fontDescription" type="system" pointSize="17"/>
436 <nil key="textColor"/> 459 <nil key="textColor"/>
437 <nil key="highlightedColor"/> 460 <nil key="highlightedColor"/>
438 </label> 461 </label>
439 - <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="a1z-OP-RVi"> 462 + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="a1z-OP-RVi">
440 <rect key="frame" x="50" y="11" width="274" height="48"/> 463 <rect key="frame" x="50" y="11" width="274" height="48"/>
441 - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>  
442 <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/> 464 <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/>
  465 + <constraints>
  466 + <constraint firstAttribute="height" constant="48" id="SZf-lH-weB"/>
  467 + <constraint firstAttribute="width" constant="274" id="cgT-8r-RsB"/>
  468 + </constraints>
443 <state key="normal" title="确认修改"> 469 <state key="normal" title="确认修改">
444 <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 470 <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
445 </state> 471 </state>
@@ -449,13 +475,24 @@ @@ -449,13 +475,24 @@
449 </button> 475 </button>
450 </subviews> 476 </subviews>
451 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 477 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  478 + <constraints>
  479 + <constraint firstItem="a1z-OP-RVi" firstAttribute="centerX" secondItem="whH-Oe-owS" secondAttribute="centerX" id="XHA-eg-Zww"/>
  480 + <constraint firstAttribute="height" constant="70" id="ajM-N2-2Sy"/>
  481 + <constraint firstItem="kVt-8Z-dIm" firstAttribute="leading" secondItem="whH-Oe-owS" secondAttribute="leading" id="izd-dc-pm1"/>
  482 + <constraint firstItem="a1z-OP-RVi" firstAttribute="centerY" secondItem="whH-Oe-owS" secondAttribute="centerY" id="vRa-94-ceb"/>
  483 + <constraint firstAttribute="trailing" secondItem="kVt-8Z-dIm" secondAttribute="trailing" id="x84-QB-PR0"/>
  484 + <constraint firstItem="kVt-8Z-dIm" firstAttribute="top" secondItem="whH-Oe-owS" secondAttribute="top" id="zBm-t8-09A"/>
  485 + </constraints>
452 </view> 486 </view>
453 </subviews> 487 </subviews>
454 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> 488 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
455 <constraints> 489 <constraints>
456 <constraint firstAttribute="trailing" secondItem="8Vd-3T-3CR" secondAttribute="trailing" id="AAa-wY-U8j"/> 490 <constraint firstAttribute="trailing" secondItem="8Vd-3T-3CR" secondAttribute="trailing" id="AAa-wY-U8j"/>
457 <constraint firstItem="8Vd-3T-3CR" firstAttribute="top" secondItem="bs0-1B-XZt" secondAttribute="top" id="bPf-qx-Igd"/> 491 <constraint firstItem="8Vd-3T-3CR" firstAttribute="top" secondItem="bs0-1B-XZt" secondAttribute="top" id="bPf-qx-Igd"/>
  492 + <constraint firstAttribute="trailing" secondItem="whH-Oe-owS" secondAttribute="trailing" id="eyo-EK-48R"/>
458 <constraint firstItem="8Vd-3T-3CR" firstAttribute="leading" secondItem="bs0-1B-XZt" secondAttribute="leading" id="laP-eB-Tfw"/> 493 <constraint firstItem="8Vd-3T-3CR" firstAttribute="leading" secondItem="bs0-1B-XZt" secondAttribute="leading" id="laP-eB-Tfw"/>
  494 + <constraint firstItem="whH-Oe-owS" firstAttribute="leading" secondItem="bs0-1B-XZt" secondAttribute="leading" id="wmd-9t-Wxu"/>
  495 + <constraint firstItem="Gxk-Dg-G3D" firstAttribute="top" secondItem="whH-Oe-owS" secondAttribute="bottom" id="zKQ-Mi-rVp"/>
459 </constraints> 496 </constraints>
460 <connections> 497 <connections>
461 <action selector="editKeyboard:" destination="HIn-e8-Pzh" eventType="touchUpInside" id="Gqe-4a-Nym"/> 498 <action selector="editKeyboard:" destination="HIn-e8-Pzh" eventType="touchUpInside" id="Gqe-4a-Nym"/>
@@ -463,9 +500,14 @@ @@ -463,9 +500,14 @@
463 </view> 500 </view>
464 <connections> 501 <connections>
465 <outlet property="agrenPasswordTextFiled" destination="Qzh-5W-Fdl" id="NIs-ap-xHZ"/> 502 <outlet property="agrenPasswordTextFiled" destination="Qzh-5W-Fdl" id="NIs-ap-xHZ"/>
  503 + <outlet property="contentSizeHeight" destination="lat-Tj-mho" id="3Ro-l4-uWu"/>
466 <outlet property="passwordTextFiled" destination="KOX-8X-bEC" id="Rd7-u2-mLM"/> 504 <outlet property="passwordTextFiled" destination="KOX-8X-bEC" id="Rd7-u2-mLM"/>
  505 + <outlet property="phoneViewHeight" destination="xsq-cP-2jd" id="yza-R9-2EJ"/>
  506 + <outlet property="phonrView" destination="b6X-Hs-kwP" id="PD1-FQ-MiT"/>
467 <outlet property="scrollView" destination="8Vd-3T-3CR" id="dEo-pi-u7a"/> 507 <outlet property="scrollView" destination="8Vd-3T-3CR" id="dEo-pi-u7a"/>
  508 + <outlet property="scrollViewHeight" destination="lBk-XC-8mQ" id="Rbt-h0-hd0"/>
468 <outlet property="userCodeTextFiled" destination="dtg-hq-Nhp" id="ZYP-US-SH2"/> 509 <outlet property="userCodeTextFiled" destination="dtg-hq-Nhp" id="ZYP-US-SH2"/>
  510 + <outlet property="userPhoneTextFiled" destination="bQy-pc-aag" id="Xto-1f-cQp"/>
469 </connections> 511 </connections>
470 </viewController> 512 </viewController>
471 <placeholder placeholderIdentifier="IBFirstResponder" id="kXj-Be-3l7" userLabel="First Responder" sceneMemberID="firstResponder"/> 513 <placeholder placeholderIdentifier="IBFirstResponder" id="kXj-Be-3l7" userLabel="First Responder" sceneMemberID="firstResponder"/>
YouerLiveVideo/YouerLiveVideo/controllers/User/UserViewController.swift
@@ -22,7 +22,7 @@ class UserViewController: UIViewController { @@ -22,7 +22,7 @@ class UserViewController: UIViewController {
22 override func viewDidLoad() { 22 override func viewDidLoad() {
23 super.viewDidLoad() 23 super.viewDidLoad()
24 self.configTheme() 24 self.configTheme()
25 - self.navigationItem.rightBarButtonItem = UIBarButtonItem(image: #imageLiteral(resourceName: "radio_s"), style: .plain, target: self, action: #selector(UserViewController.editBtnClick)) 25 + self.navigationItem.rightBarButtonItem = UIBarButtonItem(image: #imageLiteral(resourceName: "icon_setting"), style: .plain, target: self, action: #selector(UserViewController.editBtnClick))
26 self.automaticallyAdjustsScrollViewInsets = false 26 self.automaticallyAdjustsScrollViewInsets = false
27 setUserInfor() 27 setUserInfor()
28 // Do any additional setup after loading the view. 28 // Do any additional setup after loading the view.
YouerLiveVideo/YouerLiveVideo/util/account.swift
@@ -52,6 +52,12 @@ class AccountManager{ @@ -52,6 +52,12 @@ class AccountManager{
52 } 52 }
53 return "" 53 return ""
54 } 54 }
  55 + func account()->String{
  56 + if let info=rawUserInfo{
  57 + return info.contentData()["f_Account"].stringValue
  58 + }
  59 + return ""
  60 + }
55 func name()->String{ 61 func name()->String{
56 if let info=rawUserInfo{ 62 if let info=rawUserInfo{
57 return info.contentData()["nickname"].stringValue 63 return info.contentData()["nickname"].stringValue