diff --git a/YouerLiveVideo/YouerLiveVideo.xcodeproj/project.pbxproj b/YouerLiveVideo/YouerLiveVideo.xcodeproj/project.pbxproj index 7b02ced..1d11c15 100644 --- a/YouerLiveVideo/YouerLiveVideo.xcodeproj/project.pbxproj +++ b/YouerLiveVideo/YouerLiveVideo.xcodeproj/project.pbxproj @@ -130,6 +130,7 @@ BF25E0171DDAAF73003EC0C1 /* SVProgressHUD.bundle in Resources */ = {isa = PBXBuildFile; fileRef = BF25E0101DDAAF73003EC0C1 /* SVProgressHUD.bundle */; }; BF25E0181DDAAF73003EC0C1 /* SVProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = BF25E0121DDAAF73003EC0C1 /* SVProgressHUD.m */; }; BF25E0191DDAAF73003EC0C1 /* SVRadialGradientLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = BF25E0141DDAAF73003EC0C1 /* SVRadialGradientLayer.m */; }; + BF29F9081ED6ACC2004667AF /* NewLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF29F9071ED6ACC2004667AF /* NewLoginViewController.swift */; }; BF3E4A771E2F30B700D90659 /* 观看人数.png in Resources */ = {isa = PBXBuildFile; fileRef = BF3E4A721E2F30B700D90659 /* 观看人数.png */; }; BF3E4A781E2F30B700D90659 /* 礼物数量.png in Resources */ = {isa = PBXBuildFile; fileRef = BF3E4A731E2F30B700D90659 /* 礼物数量.png */; }; BF3E4A791E2F30B700D90659 /* 上传封面.png in Resources */ = {isa = PBXBuildFile; fileRef = BF3E4A741E2F30B700D90659 /* 上传封面.png */; }; @@ -463,6 +464,7 @@ BF25E0121DDAAF73003EC0C1 /* SVProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVProgressHUD.m; sourceTree = "<group>"; }; BF25E0131DDAAF73003EC0C1 /* SVRadialGradientLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVRadialGradientLayer.h; sourceTree = "<group>"; }; BF25E0141DDAAF73003EC0C1 /* SVRadialGradientLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVRadialGradientLayer.m; sourceTree = "<group>"; }; + BF29F9071ED6ACC2004667AF /* NewLoginViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NewLoginViewController.swift; sourceTree = "<group>"; }; BF3E4A721E2F30B700D90659 /* 观看人数.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "观看人数.png"; sourceTree = "<group>"; }; BF3E4A731E2F30B700D90659 /* 礼物数量.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "礼物数量.png"; sourceTree = "<group>"; }; BF3E4A741E2F30B700D90659 /* 上传封面.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "上传封面.png"; sourceTree = "<group>"; }; @@ -1234,6 +1236,7 @@ children = ( BFBB83DD1ECC445D008B404B /* LoginViewController.swift */, BFBB83E01ECC445D008B404B /* RegisterViewController.swift */, + BF29F9071ED6ACC2004667AF /* NewLoginViewController.swift */, BFBB83E11ECC445D008B404B /* Login.storyboard */, ); path = UserCenter; @@ -1557,6 +1560,7 @@ BF7B759C1E305A6D0011D5C7 /* MJRefreshAutoNormalFooter.m in Sources */, 5904FC4F1ECA8B8C00E631FF /* SearchTVStationListViewController.swift in Sources */, BFC076781E3445F3008BAC79 /* DownLoad.swift in Sources */, + BF29F9081ED6ACC2004667AF /* NewLoginViewController.swift in Sources */, 59AE3DFF1ECFDAFD003E2C62 /* TVStationChannelViewController.swift in Sources */, BF25DFE71DDAA36A003EC0C1 /* MultipartFormData.swift in Sources */, 5989394D1ED4016D005DA462 /* HistoryViewController.swift in Sources */, diff --git a/YouerLiveVideo/YouerLiveVideo/Assets.xcassets/z_NewIcon/User/Contents.json b/YouerLiveVideo/YouerLiveVideo/Assets.xcassets/z_NewIcon/User/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/YouerLiveVideo/YouerLiveVideo/Assets.xcassets/z_NewIcon/User/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/YouerLiveVideo/YouerLiveVideo/Assets.xcassets/z_NewIcon/User/login_account.imageset/3.png b/YouerLiveVideo/YouerLiveVideo/Assets.xcassets/z_NewIcon/User/login_account.imageset/3.png new file mode 100644 index 0000000..6f6c4eb Binary files /dev/null and b/YouerLiveVideo/YouerLiveVideo/Assets.xcassets/z_NewIcon/User/login_account.imageset/3.png differ diff --git a/YouerLiveVideo/YouerLiveVideo/Assets.xcassets/z_NewIcon/User/login_account.imageset/Contents.json b/YouerLiveVideo/YouerLiveVideo/Assets.xcassets/z_NewIcon/User/login_account.imageset/Contents.json new file mode 100644 index 0000000..41771cf --- /dev/null +++ b/YouerLiveVideo/YouerLiveVideo/Assets.xcassets/z_NewIcon/User/login_account.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "3.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/YouerLiveVideo/YouerLiveVideo/Assets.xcassets/z_NewIcon/User/login_password.imageset/2.png b/YouerLiveVideo/YouerLiveVideo/Assets.xcassets/z_NewIcon/User/login_password.imageset/2.png new file mode 100644 index 0000000..9a8805b Binary files /dev/null and b/YouerLiveVideo/YouerLiveVideo/Assets.xcassets/z_NewIcon/User/login_password.imageset/2.png differ diff --git a/YouerLiveVideo/YouerLiveVideo/Assets.xcassets/z_NewIcon/User/login_password.imageset/Contents.json b/YouerLiveVideo/YouerLiveVideo/Assets.xcassets/z_NewIcon/User/login_password.imageset/Contents.json new file mode 100644 index 0000000..b17e27b --- /dev/null +++ b/YouerLiveVideo/YouerLiveVideo/Assets.xcassets/z_NewIcon/User/login_password.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "2.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/YouerLiveVideo/YouerLiveVideo/Base.lproj/Main.storyboard b/YouerLiveVideo/YouerLiveVideo/Base.lproj/Main.storyboard index e505bcc..c900993 100644 --- a/YouerLiveVideo/YouerLiveVideo/Base.lproj/Main.storyboard +++ b/YouerLiveVideo/YouerLiveVideo/Base.lproj/Main.storyboard @@ -1,5 +1,5 @@ -<?xml version="1.0" encoding="UTF-8"?> -<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" initialViewController="fhe-aI-EYq"> +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="15G1217" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="fhe-aI-EYq"> <device id="retina4_7" orientation="portrait"> <adaptation id="fullscreen"/> </device> @@ -81,7 +81,7 @@ <rect key="frame" x="0.0" y="0.0" width="375" height="139"/> <autoresizingMask key="autoresizingMask"/> <subviews> - <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon" translatesAutoresizingMaskIntoConstraints="NO" id="fqH-Ro-Yhh"> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon" translatesAutoresizingMaskIntoConstraints="NO" id="fqH-Ro-Yhh"> <rect key="frame" x="8" y="25" width="90" height="90"/> <constraints> <constraint firstAttribute="width" constant="90" id="1QK-QU-Ukp"/> @@ -423,7 +423,7 @@ <rect key="frame" x="0.0" y="0.0" width="207" height="193"/> <autoresizingMask key="autoresizingMask"/> <subviews> - <imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon" translatesAutoresizingMaskIntoConstraints="NO" id="5g9-CD-vXa"> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon" translatesAutoresizingMaskIntoConstraints="NO" id="5g9-CD-vXa"> <rect key="frame" x="0.0" y="0.0" width="207" height="93.5"/> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/> @@ -569,7 +569,7 @@ <rect key="frame" x="0.0" y="0.0" width="147" height="246"/> <autoresizingMask key="autoresizingMask"/> <subviews> - <imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon" translatesAutoresizingMaskIntoConstraints="NO" id="bUk-R1-5gT"> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon" translatesAutoresizingMaskIntoConstraints="NO" id="bUk-R1-5gT"> <rect key="frame" x="0.0" y="0.0" width="147" height="147"/> <constraints> <constraint firstAttribute="width" secondItem="bUk-R1-5gT" secondAttribute="height" multiplier="1:1" id="MTe-oF-wJF"/> @@ -736,7 +736,7 @@ <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/> <nil key="highlightedColor"/> </label> - <imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ZWf-Th-UTw"> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ZWf-Th-UTw"> <rect key="frame" x="0.0" y="0.0" width="128" height="128"/> <constraints> <constraint firstAttribute="width" secondItem="ZWf-Th-UTw" secondAttribute="height" multiplier="1:1" id="u0O-8v-OqH"/> @@ -799,24 +799,6 @@ </objects> <point key="canvasLocation" x="-1839.2" y="2112.5937031484259"/> </scene> - <!--New Login View Controller--> - <scene sceneID="6BI-o5-Qja"> - <objects> - <viewController storyboardIdentifier="NewLoginViewController" id="QvS-Na-sKF" customClass="NewLoginViewController" sceneMemberID="viewController"> - <layoutGuides> - <viewControllerLayoutGuide type="top" id="czg-Be-gUk"/> - <viewControllerLayoutGuide type="bottom" id="EYT-SF-CDG"/> - </layoutGuides> - <view key="view" contentMode="scaleToFill" id="JVV-Bc-g56"> - <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> - <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> - </view> - </viewController> - <placeholder placeholderIdentifier="IBFirstResponder" id="7Vp-aM-FMN" userLabel="First Responder" sceneMemberID="firstResponder"/> - </objects> - <point key="canvasLocation" x="-904.79999999999995" y="2794.4527736131936"/> - </scene> <!--用户--> <scene sceneID="8Ie-AH-DJ4"> <objects> @@ -1489,7 +1471,7 @@ <rect key="frame" x="0.0" y="0.0" width="375" height="139"/> <autoresizingMask key="autoresizingMask"/> <subviews> - <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon" translatesAutoresizingMaskIntoConstraints="NO" id="qia-pR-e6p"> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon" translatesAutoresizingMaskIntoConstraints="NO" id="qia-pR-e6p"> <rect key="frame" x="8" y="24" width="90" height="90"/> <constraints> <constraint firstAttribute="width" secondItem="qia-pR-e6p" secondAttribute="height" multiplier="1:1" id="6Zi-MO-Pqe"/> diff --git a/YouerLiveVideo/YouerLiveVideo/controllers/LeadViewController.swift b/YouerLiveVideo/YouerLiveVideo/controllers/LeadViewController.swift index d5eb77b..589b7ef 100644 --- a/YouerLiveVideo/YouerLiveVideo/controllers/LeadViewController.swift +++ b/YouerLiveVideo/YouerLiveVideo/controllers/LeadViewController.swift @@ -13,11 +13,12 @@ class LeadViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() LeadViewController.instance=self - if AppDelegate.instance().accountManager.isOnline() { - showMain() - }else{ - showLogin() - } + showMain() +// if AppDelegate.instance().accountManager.isOnline() { +// showMain() +// }else{ +// showLogin() +// } } func showMain() { removeAll() @@ -26,7 +27,7 @@ class LeadViewController: UIViewController { } func showLogin() { removeAll() - let vc=Story.instantiateViewControllerWithIdentifier("LoginViewControllerVC", storyName: "Login") as! LoginViewController + let vc=Story.instantiateViewControllerWithIdentifier("NewLoginViewControllerVC", storyName: "Login") as! NewLoginViewController displayContentController(content: vc) } override func didReceiveMemoryWarning() { diff --git a/YouerLiveVideo/YouerLiveVideo/controllers/Resource/FilterListViewController.swift b/YouerLiveVideo/YouerLiveVideo/controllers/Resource/FilterListViewController.swift index aeae9b5..75f3a40 100644 --- a/YouerLiveVideo/YouerLiveVideo/controllers/Resource/FilterListViewController.swift +++ b/YouerLiveVideo/YouerLiveVideo/controllers/Resource/FilterListViewController.swift @@ -49,6 +49,8 @@ class FilterListViewController: UIViewController,UITableViewDelegate,UITableView for item in JSON.fromString(jsonString: str)!["data"].arrayValue { self.dataSet.append(filterListModel(j: item)) } + self.currentItem=filterListModel(array: self.dataSet) + self.tableView.reloadData() }, failHandler: { (error) in self.view.makeToast("获取知识点目录失败:\(error.localizedDescription)") }) @@ -67,6 +69,8 @@ class FilterListViewController: UIViewController,UITableViewDelegate,UITableView for item in JSON.fromString(jsonString: str)!["data"].arrayValue { self.dataSet.append(filterListModel(j: item)) } + self.currentItem=filterListModel(array: self.dataSet) + self.tableView.reloadData() }, failHandler: { (error) in self.view.makeToast("获取考点目录失败:\(error.localizedDescription)") }) diff --git a/YouerLiveVideo/YouerLiveVideo/controllers/User/Setting/ChangePassWordViewController.swift b/YouerLiveVideo/YouerLiveVideo/controllers/User/Setting/ChangePassWordViewController.swift index 2ebd3d5..f44df31 100644 --- a/YouerLiveVideo/YouerLiveVideo/controllers/User/Setting/ChangePassWordViewController.swift +++ b/YouerLiveVideo/YouerLiveVideo/controllers/User/Setting/ChangePassWordViewController.swift @@ -36,6 +36,7 @@ class ChangePassWordViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() if user.isOnline() { + self.title="密码修改" self.navigationItem.rightBarButtonItem=nil phonrView.isHidden=true phoneViewHeight.constant=0 diff --git a/YouerLiveVideo/YouerLiveVideo/controllers/User/UserCenter/Login.storyboard b/YouerLiveVideo/YouerLiveVideo/controllers/User/UserCenter/Login.storyboard index 483c534..4956e0a 100644 --- a/YouerLiveVideo/YouerLiveVideo/controllers/User/UserCenter/Login.storyboard +++ b/YouerLiveVideo/YouerLiveVideo/controllers/User/UserCenter/Login.storyboard @@ -69,16 +69,19 @@ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> <nil key="highlightedColor"/> </label> - <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="userId.png" translatesAutoresizingMaskIntoConstraints="NO" id="1xZ-bM-AMz"> - <rect key="frame" x="8" y="12.5" width="20" height="31"/> + <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="login_account" translatesAutoresizingMaskIntoConstraints="NO" id="1xZ-bM-AMz"> + <rect key="frame" x="0.0" y="0.5" width="44" height="55"/> <constraints> - <constraint firstAttribute="width" constant="20" id="3hd-Sx-hPC"/> - <constraint firstAttribute="width" secondItem="1xZ-bM-AMz" secondAttribute="height" multiplier="9:14" id="DCg-L0-4Lx"/> + <constraint firstAttribute="width" constant="44" id="3hd-Sx-hPC"/> + <constraint firstAttribute="width" secondItem="1xZ-bM-AMz" secondAttribute="height" multiplier="44:55" id="DCg-L0-4Lx"/> </constraints> </imageView> <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入账号" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="IzH-dB-I9H"> - <rect key="frame" x="36" y="18.5" width="339" height="19"/> - <fontDescription key="fontDescription" type="system" pointSize="15"/> + <rect key="frame" x="52" y="10.5" width="323" height="35"/> + <constraints> + <constraint firstAttribute="height" constant="35" id="adv-Na-JHi"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="16"/> <textInputTraits key="textInputTraits" keyboardType="numberPad"/> <connections> <outlet property="delegate" destination="fvc-9c-Gca" id="l7n-F4-FsF"/> @@ -91,7 +94,7 @@ <constraint firstAttribute="height" constant="56" id="Ff7-2n-071"/> <constraint firstItem="IzH-dB-I9H" firstAttribute="leading" secondItem="1xZ-bM-AMz" secondAttribute="trailing" constant="8" id="Mi3-ud-m0O"/> <constraint firstItem="IzH-dB-I9H" firstAttribute="centerY" secondItem="EAC-sg-BLE" secondAttribute="centerY" id="Ud1-tF-ivz"/> - <constraint firstItem="1xZ-bM-AMz" firstAttribute="leading" secondItem="EAC-sg-BLE" secondAttribute="leading" constant="8" id="Z77-MJ-BF0"/> + <constraint firstItem="1xZ-bM-AMz" firstAttribute="leading" secondItem="EAC-sg-BLE" secondAttribute="leading" id="Z77-MJ-BF0"/> <constraint firstAttribute="bottom" secondItem="NJW-yg-XQM" secondAttribute="bottom" id="i3N-yW-fre"/> <constraint firstAttribute="trailing" secondItem="NJW-yg-XQM" secondAttribute="trailing" constant="8" id="ued-ca-1l3"/> <constraint firstItem="1xZ-bM-AMz" firstAttribute="centerY" secondItem="EAC-sg-BLE" secondAttribute="centerY" id="xd6-hf-JPu"/> @@ -111,16 +114,19 @@ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> <nil key="highlightedColor"/> </label> - <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="userPassword.png" translatesAutoresizingMaskIntoConstraints="NO" id="oON-zY-4HS"> - <rect key="frame" x="8" y="15" width="20" height="26"/> + <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="login_password" translatesAutoresizingMaskIntoConstraints="NO" id="oON-zY-4HS"> + <rect key="frame" x="0.0" y="0.5" width="44" height="55"/> <constraints> - <constraint firstAttribute="width" secondItem="oON-zY-4HS" secondAttribute="height" multiplier="31:41" id="hSc-3U-3kl"/> - <constraint firstAttribute="width" constant="20" id="vb3-Wd-N14"/> + <constraint firstAttribute="width" secondItem="oON-zY-4HS" secondAttribute="height" multiplier="44:55" id="hSc-3U-3kl"/> + <constraint firstAttribute="width" constant="44" id="vb3-Wd-N14"/> </constraints> </imageView> <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入密码" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="nVn-EA-yWM"> - <rect key="frame" x="36" y="18.5" width="339" height="19"/> - <fontDescription key="fontDescription" type="system" pointSize="15"/> + <rect key="frame" x="52" y="10.5" width="323" height="35"/> + <constraints> + <constraint firstAttribute="height" constant="35" id="TLP-I4-ADu"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="16"/> <textInputTraits key="textInputTraits" secureTextEntry="YES"/> <connections> <outlet property="delegate" destination="fvc-9c-Gca" id="tMS-9N-o09"/> @@ -129,7 +135,7 @@ </subviews> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <constraints> - <constraint firstItem="oON-zY-4HS" firstAttribute="leading" secondItem="xba-Rv-jIe" secondAttribute="leading" constant="8" id="6sV-zB-qIs"/> + <constraint firstItem="oON-zY-4HS" firstAttribute="leading" secondItem="xba-Rv-jIe" secondAttribute="leading" id="6sV-zB-qIs"/> <constraint firstItem="nVn-EA-yWM" firstAttribute="centerY" secondItem="xba-Rv-jIe" secondAttribute="centerY" id="HaD-wa-ZFb"/> <constraint firstAttribute="trailing" secondItem="BcZ-u5-RFA" secondAttribute="trailing" id="KDU-ei-Izn"/> <constraint firstItem="nVn-EA-yWM" firstAttribute="leading" secondItem="oON-zY-4HS" secondAttribute="trailing" constant="8" id="LHP-bs-Kee"/> @@ -175,8 +181,8 @@ <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pzO-1N-Vrz"> <rect key="frame" x="16" y="182" width="343" height="30"/> <subviews> - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="忘记密码或找回密码" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="v6n-Br-sBy"> - <rect key="frame" x="0.0" y="0.0" width="119.5" height="30"/> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="忘记密码" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="v6n-Br-sBy"> + <rect key="frame" x="0.0" y="0.0" width="53.5" height="30"/> <fontDescription key="fontDescription" type="system" pointSize="13"/> <nil key="highlightedColor"/> </label> @@ -250,14 +256,14 @@ <constraint firstItem="eXd-TY-qlW" firstAttribute="top" secondItem="tqb-X5-ujR" secondAttribute="top" id="uPt-SF-Tbq"/> </constraints> </view> - <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="login_bottom2" translatesAutoresizingMaskIntoConstraints="NO" id="w9T-jY-F3e"> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="login_bottom2" translatesAutoresizingMaskIntoConstraints="NO" id="w9T-jY-F3e"> <rect key="frame" x="0.0" y="520" width="375" height="147"/> <constraints> <constraint firstAttribute="width" secondItem="w9T-jY-F3e" secondAttribute="height" multiplier="636:249" id="HLo-XG-7PS"/> </constraints> </imageView> </subviews> - <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> + <color key="backgroundColor" red="0.96862745098039216" green="0.96862745098039216" blue="0.96862745098039216" alpha="1" colorSpace="calibratedRGB"/> <gestureRecognizers/> <constraints> <constraint firstAttribute="trailing" secondItem="rfv-aY-7Su" secondAttribute="trailing" id="2JQ-xt-IcS"/> @@ -585,12 +591,12 @@ <constraint firstAttribute="width" constant="93" id="tn3-0t-fnt"/> </constraints> <fontDescription key="fontDescription" type="system" pointSize="15"/> - <state key="normal" title=" 发送验证码 "> + <state key="normal" title="获取验证码"> <color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </state> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> - <integer key="value" value="15"/> + <integer key="value" value="5"/> </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/> </userDefinedRuntimeAttributes> @@ -673,7 +679,7 @@ </view> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="R1Y-16-Th7"> <rect key="frame" x="62.5" y="444" width="250" height="40"/> - <color key="backgroundColor" red="0.10980392160000001" green="0.63529411759999999" blue="1" alpha="1" colorSpace="calibratedRGB"/> + <color key="backgroundColor" red="0.10980392156862745" green="0.63529411764705879" blue="1" alpha="1" colorSpace="calibratedRGB"/> <constraints> <constraint firstAttribute="height" constant="40" id="Kvn-w3-Juc"/> </constraints> @@ -782,12 +788,251 @@ </objects> <point key="canvasLocation" x="-2162.4000000000001" y="1533.2833583208396"/> </scene> + <!--New Login View Controller--> + <scene sceneID="j0h-zV-7K8"> + <objects> + <viewController storyboardIdentifier="NewLoginViewControllerVC" id="7YD-gA-dLJ" customClass="NewLoginViewController" customModule="YouerLiveVideo" customModuleProvider="target" sceneMemberID="viewController"> + <layoutGuides> + <viewControllerLayoutGuide type="top" id="Hx8-x7-gQe"/> + <viewControllerLayoutGuide type="bottom" id="eS2-l5-mzB"/> + </layoutGuides> + <view key="view" contentMode="scaleToFill" id="U95-dB-O8D"> + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <subviews> + <imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="login_bottom2" translatesAutoresizingMaskIntoConstraints="NO" id="zyE-vu-SeI"> + <rect key="frame" x="0.0" y="543" width="375" height="124"/> + </imageView> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="eHe-yf-D8O"> + <rect key="frame" x="0.0" y="89" width="375" height="450"/> + <subviews> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qaQ-kA-93Q"> + <rect key="frame" x="0.0" y="0.0" width="375" height="150"/> + <subviews> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="教育视频云" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ec7-mI-K9h"> + <rect key="frame" x="150" y="0.0" width="225" height="150"/> + <fontDescription key="fontDescription" type="system" pointSize="20"/> + <color key="textColor" red="0.10980392160000001" green="0.63529411759999999" blue="1" alpha="1" colorSpace="calibratedRGB"/> + <nil key="highlightedColor"/> + </label> + <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon" translatesAutoresizingMaskIntoConstraints="NO" id="gDj-kE-hGr"> + <rect key="frame" x="82" y="45" width="60" height="60"/> + <constraints> + <constraint firstAttribute="width" constant="60" id="PKK-Q1-8Jn"/> + <constraint firstAttribute="width" secondItem="gDj-kE-hGr" secondAttribute="height" multiplier="1:1" id="xKA-m4-vuJ"/> + </constraints> + </imageView> + </subviews> + <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstItem="gDj-kE-hGr" firstAttribute="centerY" secondItem="qaQ-kA-93Q" secondAttribute="centerY" id="8ha-Wn-OjW"/> + <constraint firstItem="ec7-mI-K9h" firstAttribute="width" secondItem="qaQ-kA-93Q" secondAttribute="width" multiplier="3:5" id="9uF-4e-KSo"/> + <constraint firstItem="ec7-mI-K9h" firstAttribute="top" secondItem="qaQ-kA-93Q" secondAttribute="top" id="WPI-Og-MpZ"/> + <constraint firstAttribute="trailing" secondItem="ec7-mI-K9h" secondAttribute="trailing" id="bw9-GP-aMX"/> + <constraint firstAttribute="bottom" secondItem="ec7-mI-K9h" secondAttribute="bottom" id="rbZ-zR-cZY"/> + <constraint firstItem="ec7-mI-K9h" firstAttribute="leading" secondItem="gDj-kE-hGr" secondAttribute="trailing" constant="8" id="t1g-EG-T2Y"/> + </constraints> + </view> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="45M-7w-dCo"> + <rect key="frame" x="0.0" y="150" width="375" height="150"/> + <subviews> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gJJ-nb-LuW"> + <rect key="frame" x="0.0" y="19" width="375" height="112"/> + <subviews> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OEu-Xn-tgO"> + <rect key="frame" x="0.0" y="111" width="375" height="1"/> + <color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstAttribute="height" constant="1" id="ebn-7Z-Vd9"/> + </constraints> + </view> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4JH-HW-GWr"> + <rect key="frame" x="0.0" y="0.0" width="375" height="1"/> + <color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstAttribute="height" constant="1" id="1IP-S2-tPz"/> + </constraints> + </view> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yg0-D7-3oz"> + <rect key="frame" x="14" y="56" width="347" height="1"/> + <color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstAttribute="height" constant="1" id="VHq-6D-TO2"/> + </constraints> + </view> + <imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="login_password" translatesAutoresizingMaskIntoConstraints="NO" id="kqI-fA-5MC"> + <rect key="frame" x="14" y="57" width="44" height="55"/> + <constraints> + <constraint firstAttribute="width" constant="44" id="X18-oH-BbC"/> + </constraints> + </imageView> + <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入账号" minimumFontSize="17" clearButtonMode="always" translatesAutoresizingMaskIntoConstraints="NO" id="U1G-S8-74U"> + <rect key="frame" x="66" y="11" width="295" height="35"/> + <color key="tintColor" red="0.66666666669999997" green="0.66666666669999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <fontDescription key="fontDescription" type="system" pointSize="16"/> + <textInputTraits key="textInputTraits" returnKeyType="done"/> + <connections> + <action selector="didAccountEnd:" destination="7YD-gA-dLJ" eventType="editingDidEndOnExit" id="u0t-LN-P5O"/> + <outlet property="delegate" destination="7YD-gA-dLJ" id="G57-JW-uTJ"/> + </connections> + </textField> + <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入密码" minimumFontSize="17" clearButtonMode="always" translatesAutoresizingMaskIntoConstraints="NO" id="bnT-lO-cJS"> + <rect key="frame" x="66" y="67" width="295" height="34"/> + <color key="tintColor" red="0.66666666669999997" green="0.66666666669999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <fontDescription key="fontDescription" type="system" pointSize="16"/> + <textInputTraits key="textInputTraits" returnKeyType="done" secureTextEntry="YES"/> + <connections> + <action selector="didPWEnd:" destination="7YD-gA-dLJ" eventType="editingDidEndOnExit" id="HdW-oQ-I2Q"/> + </connections> + </textField> + <imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="login_account" translatesAutoresizingMaskIntoConstraints="NO" id="XBn-W6-2qi"> + <rect key="frame" x="14" y="1" width="44" height="55"/> + <constraints> + <constraint firstAttribute="width" constant="44" id="uiy-yL-5eG"/> + </constraints> + </imageView> + </subviews> + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstItem="yg0-D7-3oz" firstAttribute="leading" secondItem="gJJ-nb-LuW" secondAttribute="leading" constant="14" id="15o-2i-SFf"/> + <constraint firstAttribute="trailing" secondItem="4JH-HW-GWr" secondAttribute="trailing" id="8h5-Qs-Xoi"/> + <constraint firstAttribute="height" constant="112" id="Hm8-Wj-pgl"/> + <constraint firstItem="kqI-fA-5MC" firstAttribute="leading" secondItem="gJJ-nb-LuW" secondAttribute="leading" constant="14" id="Ixl-pb-lLo"/> + <constraint firstAttribute="trailing" secondItem="yg0-D7-3oz" secondAttribute="trailing" constant="14" id="J5P-56-niN"/> + <constraint firstItem="bnT-lO-cJS" firstAttribute="top" secondItem="yg0-D7-3oz" secondAttribute="bottom" constant="10" id="JBC-8p-tuV"/> + <constraint firstItem="kqI-fA-5MC" firstAttribute="top" secondItem="XBn-W6-2qi" secondAttribute="bottom" constant="1" id="Jcj-qa-cIi"/> + <constraint firstItem="yg0-D7-3oz" firstAttribute="top" secondItem="XBn-W6-2qi" secondAttribute="bottom" id="Mdb-ch-ZlW"/> + <constraint firstAttribute="centerY" secondItem="yg0-D7-3oz" secondAttribute="centerY" id="MnZ-i3-lie"/> + <constraint firstItem="OEu-Xn-tgO" firstAttribute="top" secondItem="bnT-lO-cJS" secondAttribute="bottom" constant="10" id="Szn-55-hl8"/> + <constraint firstItem="bnT-lO-cJS" firstAttribute="leading" secondItem="kqI-fA-5MC" secondAttribute="trailing" constant="8" id="TNM-xX-JWf"/> + <constraint firstAttribute="trailing" secondItem="OEu-Xn-tgO" secondAttribute="trailing" id="TnQ-QR-ZqC"/> + <constraint firstItem="4JH-HW-GWr" firstAttribute="leading" secondItem="gJJ-nb-LuW" secondAttribute="leading" id="bad-nK-MJN"/> + <constraint firstItem="U1G-S8-74U" firstAttribute="top" secondItem="4JH-HW-GWr" secondAttribute="bottom" constant="10" id="dff-gC-kKN"/> + <constraint firstItem="U1G-S8-74U" firstAttribute="leading" secondItem="XBn-W6-2qi" secondAttribute="trailing" constant="8" id="eUd-No-Eg0"/> + <constraint firstAttribute="trailing" secondItem="U1G-S8-74U" secondAttribute="trailing" constant="14" id="h83-Z3-hRA"/> + <constraint firstItem="XBn-W6-2qi" firstAttribute="top" secondItem="4JH-HW-GWr" secondAttribute="bottom" id="hLE-0b-pLh"/> + <constraint firstItem="XBn-W6-2qi" firstAttribute="leading" secondItem="gJJ-nb-LuW" secondAttribute="leading" constant="14" id="nS7-If-baY"/> + <constraint firstAttribute="bottom" secondItem="OEu-Xn-tgO" secondAttribute="bottom" id="pPd-Gj-W6j"/> + <constraint firstAttribute="trailing" secondItem="bnT-lO-cJS" secondAttribute="trailing" constant="14" id="r6Q-pS-fBv"/> + <constraint firstItem="4JH-HW-GWr" firstAttribute="top" secondItem="gJJ-nb-LuW" secondAttribute="top" id="rCd-rS-bF0"/> + <constraint firstAttribute="bottom" secondItem="kqI-fA-5MC" secondAttribute="bottom" id="riy-n9-KgD"/> + <constraint firstItem="yg0-D7-3oz" firstAttribute="top" secondItem="U1G-S8-74U" secondAttribute="bottom" constant="10" id="xb9-Q9-Gvv"/> + <constraint firstItem="OEu-Xn-tgO" firstAttribute="leading" secondItem="gJJ-nb-LuW" secondAttribute="leading" id="xd7-f5-dzp"/> + </constraints> + </view> + </subviews> + <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstAttribute="trailing" secondItem="gJJ-nb-LuW" secondAttribute="trailing" id="39D-4u-t3c"/> + <constraint firstAttribute="centerY" secondItem="gJJ-nb-LuW" secondAttribute="centerY" id="IvL-uw-yYb"/> + <constraint firstItem="gJJ-nb-LuW" firstAttribute="leading" secondItem="45M-7w-dCo" secondAttribute="leading" id="MEk-fk-31f"/> + </constraints> + </view> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZS7-D8-cI3"> + <rect key="frame" x="0.0" y="300" width="375" height="150"/> + <subviews> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="d0Y-Gl-m8Z"> + <rect key="frame" x="18" y="8" width="339" height="44"/> + <color key="backgroundColor" red="0.10980392160000001" green="0.63529411759999999" blue="1" alpha="1" colorSpace="calibratedRGB"/> + <constraints> + <constraint firstAttribute="height" constant="44" id="QxF-DH-QwA"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="18"/> + <state key="normal" title="登录"> + <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> + <color key="titleShadowColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> + </state> + <connections> + <action selector="onLoginClicked:" destination="7YD-gA-dLJ" eventType="touchUpInside" id="oVG-0D-j2T"/> + </connections> + </button> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Oee-Sm-GxU"> + <rect key="frame" x="18" y="68" width="60" height="21"/> + <constraints> + <constraint firstAttribute="height" constant="21" id="C3O-IB-eG6"/> + <constraint firstAttribute="width" constant="60" id="uzy-xp-hTl"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="13"/> + <state key="normal" title="忘记密码"> + <color key="titleColor" red="0.66666666669999997" green="0.66666666669999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </state> + <connections> + <action selector="activatiAction:" destination="7YD-gA-dLJ" eventType="touchUpInside" id="Al4-o1-Tj0"/> + </connections> + </button> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vmw-Ug-eCf"> + <rect key="frame" x="297" y="68" width="60" height="21"/> + <constraints> + <constraint firstAttribute="width" constant="60" id="5Mx-rp-5ap"/> + <constraint firstAttribute="height" constant="21" id="eJC-qs-Ybn"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="13"/> + <state key="normal" title="注册账号"> + <color key="titleColor" red="0.66666666669999997" green="0.66666666669999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </state> + <connections> + <action selector="returnAction:" destination="7YD-gA-dLJ" eventType="touchUpInside" id="9DX-YN-Sc1"/> + </connections> + </button> + </subviews> + <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstItem="d0Y-Gl-m8Z" firstAttribute="top" secondItem="ZS7-D8-cI3" secondAttribute="top" constant="8" id="MIL-Rx-WNH"/> + <constraint firstItem="Oee-Sm-GxU" firstAttribute="leading" secondItem="ZS7-D8-cI3" secondAttribute="leading" constant="18" id="Mpo-za-g6n"/> + <constraint firstAttribute="trailing" secondItem="d0Y-Gl-m8Z" secondAttribute="trailing" constant="18" id="Mqr-is-1wx"/> + <constraint firstAttribute="trailing" secondItem="vmw-Ug-eCf" secondAttribute="trailing" constant="18" id="YDf-Zg-37t"/> + <constraint firstItem="vmw-Ug-eCf" firstAttribute="top" secondItem="d0Y-Gl-m8Z" secondAttribute="bottom" constant="16" id="nrV-il-Xgj"/> + <constraint firstItem="d0Y-Gl-m8Z" firstAttribute="leading" secondItem="ZS7-D8-cI3" secondAttribute="leading" constant="18" id="qvm-bv-yTq"/> + <constraint firstItem="Oee-Sm-GxU" firstAttribute="top" secondItem="d0Y-Gl-m8Z" secondAttribute="bottom" constant="16" id="v0B-P7-6bL"/> + </constraints> + </view> + </subviews> + <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstItem="ZS7-D8-cI3" firstAttribute="leading" secondItem="eHe-yf-D8O" secondAttribute="leading" id="7UM-rB-lFl"/> + <constraint firstItem="ZS7-D8-cI3" firstAttribute="top" secondItem="45M-7w-dCo" secondAttribute="bottom" id="CbL-jK-gnm"/> + <constraint firstItem="45M-7w-dCo" firstAttribute="leading" secondItem="eHe-yf-D8O" secondAttribute="leading" id="Ccc-A4-FYr"/> + <constraint firstItem="qaQ-kA-93Q" firstAttribute="top" secondItem="eHe-yf-D8O" secondAttribute="top" id="D97-8f-Vp0"/> + <constraint firstItem="qaQ-kA-93Q" firstAttribute="leading" secondItem="eHe-yf-D8O" secondAttribute="leading" id="NZh-xD-ahk"/> + <constraint firstItem="qaQ-kA-93Q" firstAttribute="height" secondItem="45M-7w-dCo" secondAttribute="height" id="VnS-XO-xBL"/> + <constraint firstAttribute="height" secondItem="qaQ-kA-93Q" secondAttribute="height" multiplier="3" id="YyL-6W-t1Z"/> + <constraint firstAttribute="trailing" secondItem="45M-7w-dCo" secondAttribute="trailing" id="aEd-FV-QqG"/> + <constraint firstAttribute="trailing" secondItem="qaQ-kA-93Q" secondAttribute="trailing" id="cho-Ns-D4h"/> + <constraint firstAttribute="height" constant="450" id="mqG-RY-Lo7"/> + <constraint firstAttribute="trailing" secondItem="ZS7-D8-cI3" secondAttribute="trailing" id="q5s-IS-ATm"/> + <constraint firstAttribute="bottom" secondItem="ZS7-D8-cI3" secondAttribute="bottom" id="r1q-06-arK"/> + <constraint firstItem="45M-7w-dCo" firstAttribute="top" secondItem="qaQ-kA-93Q" secondAttribute="bottom" id="ygB-hD-MeQ"/> + </constraints> + </view> + </subviews> + <color key="backgroundColor" red="0.96862745100000003" green="0.96862745100000003" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstAttribute="trailing" secondItem="zyE-vu-SeI" secondAttribute="trailing" id="4UG-vm-nF7"/> + <constraint firstItem="zyE-vu-SeI" firstAttribute="leading" secondItem="U95-dB-O8D" secondAttribute="leading" id="Gac-kM-MUi"/> + <constraint firstItem="eHe-yf-D8O" firstAttribute="leading" secondItem="U95-dB-O8D" secondAttribute="leading" id="Mgw-8G-F7Z"/> + <constraint firstAttribute="centerY" secondItem="eHe-yf-D8O" secondAttribute="centerY" constant="20" id="MqN-UP-SP0"/> + <constraint firstAttribute="trailing" secondItem="eHe-yf-D8O" secondAttribute="trailing" id="SMc-NG-37w"/> + <constraint firstItem="eS2-l5-mzB" firstAttribute="top" secondItem="zyE-vu-SeI" secondAttribute="bottom" id="Uh1-h1-vQ4"/> + </constraints> + </view> + <connections> + <outlet property="buttonLogin" destination="d0Y-Gl-m8Z" id="QDU-R3-RGe"/> + <outlet property="constraintContentOffset" destination="MqN-UP-SP0" id="dpa-vk-fx3"/> + <outlet property="fieldAccount" destination="U1G-S8-74U" id="o8T-Qc-aFJ"/> + <outlet property="fieldPassword" destination="bnT-lO-cJS" id="ZgC-PY-d1y"/> + <outlet property="viewContent" destination="eHe-yf-D8O" id="cqQ-Vu-6em"/> + </connections> + </viewController> + <placeholder placeholderIdentifier="IBFirstResponder" id="OIH-zv-pxO" userLabel="First Responder" sceneMemberID="firstResponder"/> + </objects> + <point key="canvasLocation" x="175.19999999999999" y="5457.1214392803604"/> + </scene> </scenes> <resources> <image name="icon" width="512" height="512"/> + <image name="login_account" width="27" height="27"/> <image name="login_bottom2" width="318" height="124"/> - <image name="userId.png" width="36" height="56"/> - <image name="userPassword.png" width="31" height="41"/> + <image name="login_password" width="27" height="27"/> <image name="上传头像.png" width="70" height="70"/> <image name="编辑.png" width="35" height="31"/> </resources> diff --git a/YouerLiveVideo/YouerLiveVideo/controllers/User/UserCenter/NewLoginViewController.swift b/YouerLiveVideo/YouerLiveVideo/controllers/User/UserCenter/NewLoginViewController.swift new file mode 100644 index 0000000..938f54d --- /dev/null +++ b/YouerLiveVideo/YouerLiveVideo/controllers/User/UserCenter/NewLoginViewController.swift @@ -0,0 +1,139 @@ +// +// NewLoginViewController.swift +// youer +// +// Created by sinceredeveloper on 15/11/9. +// Copyright (c) 2015年 kagami. All rights reserved. +// + +import UIKit + +class NewLoginViewController: UIViewController,UITextFieldDelegate { + @IBOutlet weak var viewContent: UIView! + @IBOutlet weak var constraintContentOffset: NSLayoutConstraint! + @IBOutlet weak var fieldAccount: UITextField! + @IBOutlet weak var fieldPassword: UITextField! + @IBOutlet weak var buttonLogin: UIButton! + override func viewDidLoad() { + super.viewDidLoad() + constraintContentOffset.constant=20 + view.backgroundColor=UIColorFromRGB(0xf7f7f7) + Theme.configButton(buttonLogin) + let lastAccount=Setting.getString("lastAccountNumber") + fieldAccount.text=lastAccount + } + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + NotificationCenter.default.addObserver(self, selector: #selector(NewLoginViewController.keyboardWillShow), name: NSNotification.Name.UIKeyboardWillShow, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(NewLoginViewController.keyboardWillHide), name: NSNotification.Name.UIKeyboardWillHide, object: nil) + fieldAccount.tintColor=Theme.topBarColor() + fieldPassword.tintColor=Theme.topBarColor() + } + override func viewWillDisappear(_ animated: Bool) { + super.viewWillDisappear(animated) + NotificationCenter.default.removeObserver(self) + } + + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + @IBAction func onLoginClicked(sender: AnyObject) { + self.view.endEditing(true) + let account=fieldAccount.text + let pw=fieldPassword.text + + if (account?.characters.count)!<1 || pw!.characters.count<1 { + self.view.makeToast("账号或密码不能为空") + return + } + login(phone: account!, pw:pw!) + } + + func login(phone:String, pw:String){ + if phone.isMobilePhoneNumber() { + SVProgressHUD.show(withStatus: "登录...") + SVProgressHUD.setDefaultMaskType(.black) + let parameters:Dictionary<String,AnyObject>=["grant_type":"password" as AnyObject,"username":phone as AnyObject,"password":pw as AnyObject] + AppDelegate.instance().httpServer.login(parameters: parameters) { (str, error) in + let json=JSON.fromString(jsonString: str) + if let ret=json{ + let er=ret["error"].string + if let errorStr=er{ + SVProgressHUD.dismiss() + let Strings=errorStr.components(separatedBy:":") + if Strings.count >= 2 { + switch Strings[1] { + //用户关联多个身份,请使用学事号登录:100 + case "101"://用户认证身份不存在:101 + AppDelegate.instance().window?.makeToast("用户认证身份不存在,请进行账号激活。") + break + //用户帐号或密码错误:102 + case "103":// 用户不存在:103 + AppDelegate.instance().window?.makeToast("该号码不存在,请联系客服400-826-2468") + break + default: + AppDelegate.instance().window?.makeToast("\(errorStr)") + break + } + }else{ + AppDelegate.instance().window?.makeToast("\(errorStr)") + } + }else if ret["access_token"].stringValue != ""{ + AppDelegate.instance().accountManager.setTokenInfo(tokenInfo: ret) + AppDelegate.instance().accountManager.saveToken(tokenInfo: ret) + AppDelegate.instance().accountManager.refreshUserInfo(completionHandler: { (finish) in + if finish{ + // self.loadUserInfo() + SVProgressHUD.dismiss() + self.back() + }else{ + AppDelegate.instance().window?.makeToast("身份获取失败") + SVProgressHUD.dismiss() + } + }) + }else{ + SVProgressHUD.dismiss() + AppDelegate.instance().window?.makeToast("登录失败,请稍后重试") + } + }else{ + SVProgressHUD.dismiss() + AppDelegate.instance().window?.makeToast("登录失败") + } + } + }else{ + self.view.makeToast("请输入正确手机号") + } + } + func back(){ + self.navigationController!.popViewController(animated: true) + } + + + @IBAction func activatiAction(sender: UIButton) { + let vc = Story.instantiateViewControllerWithIdentifier("ChangePassWordViewControllerVC", storyName: "User") as! ChangePassWordViewController + self.navigationController?.pushViewController(vc, animated: true) + } + @IBAction func returnAction(sender: UIButton) { + let vc = UIStoryboard(name: "Login", bundle: nil).instantiateViewController(withIdentifier: "RegisterViewControllerVC") as! RegisterViewController + self.navigationController!.pushViewController(vc, animated: true) + } + + func keyboardWillShow(){ + constraintContentOffset.constant=144 + UIView.animate(withDuration: 2, animations: { () -> Void in + self.viewContent.layoutIfNeeded() + }) + + } + func keyboardWillHide(){ + constraintContentOffset.constant=20 + UIView.animate(withDuration: 2, animations: { () -> Void in + self.viewContent.layoutIfNeeded() + }) + } +} + + + diff --git a/YouerLiveVideo/YouerLiveVideo/util/utiles.swift b/YouerLiveVideo/YouerLiveVideo/util/utiles.swift index 939dffe..8f881a7 100644 --- a/YouerLiveVideo/YouerLiveVideo/util/utiles.swift +++ b/YouerLiveVideo/YouerLiveVideo/util/utiles.swift @@ -146,7 +146,7 @@ extension UIViewController{ self.navigationController?.navigationBar.barTintColor=Theme.topBarColor() self.navigationController?.navigationBar.tintColor=UIColor.white self.navigationController?.navigationBar.isTranslucent=false - self.navigationController?.navigationBar.titleTextAttributes = {[NSForegroundColorAttributeName: UIColor.white]}()//Theme.topBarColor()]}() + self.navigationController?.navigationBar.titleTextAttributes = {[NSForegroundColorAttributeName: UIColor.white,NSBackgroundColorAttributeName: Theme.topBarColor()]}()//Theme.topBarColor()]}() } ///套上UINavigationController func wrapWithNavigationController()->UINavigationController{ -- libgit2 0.21.0