Commit fc612f201b9152365da6c0557c6360c01362a45f
1 parent
253fe481
Exists in
newLive
注册流程及登录test
Showing
4 changed files
with
49 additions
and
19 deletions
Show diff stats
YouerLiveVideo/YouerLiveVideo.xcodeproj/xcuserdata/jun.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
... | ... | @@ -9,13 +9,13 @@ |
9 | 9 | shouldBeEnabled = "Yes" |
10 | 10 | ignoreCount = "0" |
11 | 11 | continueAfterRunningActions = "No" |
12 | - filePath = "YouerLiveVideo/controllers/User/UserCenter/LoginViewController.swift" | |
13 | - timestampString = "516765107.692769" | |
12 | + filePath = "YouerLiveVideo/controllers/User/UserCenter/RegisterViewController.swift" | |
13 | + timestampString = "516767766.610948" | |
14 | 14 | startingColumnNumber = "9223372036854775807" |
15 | 15 | endingColumnNumber = "9223372036854775807" |
16 | - startingLineNumber = "127" | |
17 | - endingLineNumber = "127" | |
18 | - landmarkName = "registerBtnClickAction(_:)" | |
16 | + startingLineNumber = "85" | |
17 | + endingLineNumber = "85" | |
18 | + landmarkName = "registerBtnAction(_:)" | |
19 | 19 | landmarkType = "7"> |
20 | 20 | </BreakpointContent> |
21 | 21 | </BreakpointProxy> | ... | ... |
YouerLiveVideo/YouerLiveVideo/controllers/User/UserCenter/LoginViewController.swift
... | ... | @@ -124,9 +124,8 @@ class LoginViewController: UIViewController,UITextFieldDelegate { |
124 | 124 | } |
125 | 125 | //点击注册按钮 |
126 | 126 | @IBAction func registerBtnClickAction(_ sender: AnyObject) { |
127 | - let vc = UIStoryboard(name: "User", bundle: nil).instantiateViewController(withIdentifier: "RegisterViewControllerVC") as! RegisterViewController | |
128 | - vc.title = "注册" | |
129 | - self.navigationController?.pushViewController(vc, animated: true) | |
127 | + let vc = UIStoryboard(name: "User", bundle: nil).instantiateViewController(withIdentifier: "RegisterViewControllerNV") | |
128 | + self.present(vc, animated: true, completion: nil) | |
130 | 129 | } |
131 | 130 | //键盘监听 |
132 | 131 | func keyboardWIllChange(noti: NSNotification){ | ... | ... |
YouerLiveVideo/YouerLiveVideo/controllers/User/UserCenter/RegisterViewController.swift
... | ... | @@ -24,7 +24,7 @@ class RegisterViewController: UIViewController,UIAlertViewDelegate,UIImagePicker |
24 | 24 | var name: String="" |
25 | 25 | override func viewDidLoad() { |
26 | 26 | super.viewDidLoad() |
27 | - // Do any additional setup after loading the view. | |
27 | + self.configTheme() | |
28 | 28 | } |
29 | 29 | |
30 | 30 | @IBAction func touchAction(_ sender: AnyObject) { |
... | ... | @@ -85,7 +85,7 @@ class RegisterViewController: UIViewController,UIAlertViewDelegate,UIImagePicker |
85 | 85 | if inputVerificationCode.text!.characters.count == 4{ |
86 | 86 | SVProgressHUD.show(withStatus: "注册...") |
87 | 87 | SVProgressHUD.setDefaultMaskType(.black) |
88 | - let parameters:Dictionary<String,AnyObject>=["f_Account":phoneNumber.text! as AnyObject,"f_UserPassword":passwordTextField.text! as AnyObject,"f_RealName": (nikeNameTextFiled.text!=="" ? phoneNumber.text! : nikeNameTextFiled.text!) as AnyObject,"f_MobilePhone":phoneNumber.text! as AnyObject,"f_VerCode":inputVerificationCode.text! as AnyObject] | |
88 | + let parameters:Dictionary<String,AnyObject>=["account":phoneNumber.text! as AnyObject,"password":passwordTextField.text! as AnyObject,"vercode":inputVerificationCode.text! as AnyObject,"nickname": (nikeNameTextFiled.text!=="" ? phoneNumber.text! : nikeNameTextFiled.text!) as AnyObject] | |
89 | 89 | AppDelegate.instance().httpServer.getCreateUser(parameters: parameters) { (str, error) in |
90 | 90 | SVProgressHUD.dismiss() |
91 | 91 | self.nikeNameTextFiled.isUserInteractionEnabled=true |
... | ... | @@ -116,7 +116,10 @@ class RegisterViewController: UIViewController,UIAlertViewDelegate,UIImagePicker |
116 | 116 | |
117 | 117 | |
118 | 118 | @IBAction func loginBtnClickAction(_ sender: AnyObject) { |
119 | - self.navigationController!.popViewController(animated: false) | |
119 | + self.navigationController!.dismiss(animated: true, completion: nil) | |
120 | + } | |
121 | + @IBAction func cancleAction(_ sender: UIBarButtonItem) { | |
122 | + self.navigationController!.dismiss(animated: true, completion: nil) | |
120 | 123 | } |
121 | 124 | |
122 | 125 | @IBAction func nickNameSetTapAction(_ sender: AnyObject) { | ... | ... |
YouerLiveVideo/YouerLiveVideo/controllers/User/UserCenter/User.storyboard
... | ... | @@ -233,9 +233,9 @@ |
233 | 233 | </connections> |
234 | 234 | </tapGestureRecognizer> |
235 | 235 | </objects> |
236 | - <point key="canvasLocation" x="-1468" y="1534.1829085457273"/> | |
236 | + <point key="canvasLocation" x="-528.79999999999995" y="1534.1829085457273"/> | |
237 | 237 | </scene> |
238 | - <!--Register View Controller--> | |
238 | + <!--注册--> | |
239 | 239 | <scene sceneID="81Y-IJ-Kye"> |
240 | 240 | <objects> |
241 | 241 | <viewController storyboardIdentifier="RegisterViewControllerVC" id="tCx-JF-YJm" customClass="RegisterViewController" customModule="YouerLiveVideo" customModuleProvider="target" sceneMemberID="viewController"> |
... | ... | @@ -248,7 +248,7 @@ |
248 | 248 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
249 | 249 | <subviews> |
250 | 250 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="403-Gp-RaZ" customClass="UIControl"> |
251 | - <rect key="frame" x="0.0" y="20" width="375" height="168"/> | |
251 | + <rect key="frame" x="0.0" y="64" width="375" height="168"/> | |
252 | 252 | <subviews> |
253 | 253 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8h8-sS-iJ1"> |
254 | 254 | <rect key="frame" x="138" y="15" width="99" height="99"/> |
... | ... | @@ -337,7 +337,7 @@ |
337 | 337 | </variation> |
338 | 338 | </view> |
339 | 339 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xNc-I3-UL6"> |
340 | - <rect key="frame" x="0.0" y="20" width="375" height="168"/> | |
340 | + <rect key="frame" x="0.0" y="64" width="375" height="168"/> | |
341 | 341 | <subviews> |
342 | 342 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1Cp-hz-9O4"> |
343 | 343 | <rect key="frame" x="0.0" y="0.0" width="375" height="56"/> |
... | ... | @@ -365,6 +365,9 @@ |
365 | 365 | <rect key="frame" x="89" y="18.5" width="278" height="19"/> |
366 | 366 | <fontDescription key="fontDescription" type="system" pointSize="15"/> |
367 | 367 | <textInputTraits key="textInputTraits" returnKeyType="done"/> |
368 | + <connections> | |
369 | + <outlet property="delegate" destination="tCx-JF-YJm" id="kUP-Zt-NU9"/> | |
370 | + </connections> | |
368 | 371 | </textField> |
369 | 372 | </subviews> |
370 | 373 | <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
... | ... | @@ -487,7 +490,7 @@ |
487 | 490 | </constraints> |
488 | 491 | </view> |
489 | 492 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rSF-LZ-Bnl"> |
490 | - <rect key="frame" x="0.0" y="188" width="375" height="112"/> | |
493 | + <rect key="frame" x="0.0" y="232" width="375" height="112"/> | |
491 | 494 | <subviews> |
492 | 495 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="vkP-pb-ydp"> |
493 | 496 | <rect key="frame" x="0.0" y="0.0" width="375" height="56"/> |
... | ... | @@ -609,7 +612,7 @@ |
609 | 612 | </constraints> |
610 | 613 | </view> |
611 | 614 | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="R1Y-16-Th7"> |
612 | - <rect key="frame" x="62.5" y="400" width="250" height="40"/> | |
615 | + <rect key="frame" x="62.5" y="444" width="250" height="40"/> | |
613 | 616 | <color key="backgroundColor" red="1" green="0.39607843139999999" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
614 | 617 | <constraints> |
615 | 618 | <constraint firstAttribute="height" constant="40" id="Kvn-w3-Juc"/> |
... | ... | @@ -629,7 +632,7 @@ |
629 | 632 | </connections> |
630 | 633 | </button> |
631 | 634 | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DJH-vy-tj1"> |
632 | - <rect key="frame" x="325" y="315" width="35" height="30"/> | |
635 | + <rect key="frame" x="325" y="359" width="35" height="30"/> | |
633 | 636 | <fontDescription key="fontDescription" type="system" pointSize="15"/> |
634 | 637 | <state key="normal" title="登 录"> |
635 | 638 | <color key="titleColor" red="1" green="0.39607843139999999" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
... | ... | @@ -661,6 +664,13 @@ |
661 | 664 | <outletCollection property="gestureRecognizers" destination="ZEf-mm-u9e" appends="YES" id="Gmm-Kb-eQb"/> |
662 | 665 | </connections> |
663 | 666 | </view> |
667 | + <navigationItem key="navigationItem" title="注册" id="VWP-v7-Qoc"> | |
668 | + <barButtonItem key="rightBarButtonItem" title="取消" id="Okk-g0-Rwk"> | |
669 | + <connections> | |
670 | + <action selector="cancleAction:" destination="tCx-JF-YJm" id="ypG-ks-rG6"/> | |
671 | + </connections> | |
672 | + </barButtonItem> | |
673 | + </navigationItem> | |
664 | 674 | <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> |
665 | 675 | <size key="freeformSize" width="375" height="667"/> |
666 | 676 | <connections> |
... | ... | @@ -692,7 +702,25 @@ |
692 | 702 | </connections> |
693 | 703 | </tapGestureRecognizer> |
694 | 704 | </objects> |
695 | - <point key="canvasLocation" x="-2161" y="1534"/> | |
705 | + <point key="canvasLocation" x="-1446" y="1533"/> | |
706 | + </scene> | |
707 | + <!--注册--> | |
708 | + <scene sceneID="fjB-PO-uzD"> | |
709 | + <objects> | |
710 | + <navigationController storyboardIdentifier="RegisterViewControllerNV" title="注册" automaticallyAdjustsScrollViewInsets="NO" id="smK-XQ-zjA" sceneMemberID="viewController"> | |
711 | + <toolbarItems/> | |
712 | + <navigationBar key="navigationBar" contentMode="scaleToFill" id="rky-2y-rJV"> | |
713 | + <rect key="frame" x="0.0" y="0.0" width="375" height="44"/> | |
714 | + <autoresizingMask key="autoresizingMask"/> | |
715 | + </navigationBar> | |
716 | + <nil name="viewControllers"/> | |
717 | + <connections> | |
718 | + <segue destination="tCx-JF-YJm" kind="relationship" relationship="rootViewController" id="74u-7e-5ID"/> | |
719 | + </connections> | |
720 | + </navigationController> | |
721 | + <placeholder placeholderIdentifier="IBFirstResponder" id="7iS-XR-Acb" userLabel="First Responder" sceneMemberID="firstResponder"/> | |
722 | + </objects> | |
723 | + <point key="canvasLocation" x="-2162.4000000000001" y="1533.2833583208396"/> | |
696 | 724 | </scene> |
697 | 725 | </scenes> |
698 | 726 | <resources> | ... | ... |