add files

This commit is contained in:
lianxiang
2018-09-14 18:04:02 +08:00
parent fada68d22d
commit 9bba78987b
59 changed files with 974 additions and 116 deletions
@@ -201,12 +201,14 @@
GIGA_ShowToast(@"请输入验证码");
return;
}
if (!(self.passTexFied.text.length >=6 && self.passTexFied.text.length <=20) || self.passTexFied.text.length == 0) {
GIGA_ShowToast(@"请输入6~20位密码");
BOOL isPass = [GiGaHelper checkPassWord:self.passTexFied.text];
if (isPass == NO) {
GIGA_ShowToast(@"请输入6-20位数字和字母组成的密码");
return;
}
[self regeist:btn];
}
//注册
@@ -18,6 +18,8 @@
#import "GiGaUser.h"
#import "GiGaServerConfig.h"
#import "GIGAMBHUDHelper.h"
#import "GiGaHelper.h"
#import "GiGaUserManager.h"
@interface GiGaUserLoginVC ()
@property (weak, nonatomic) IBOutlet UIImageView *userImagView;
@@ -154,7 +156,7 @@
#pragma mark 手机号登录
-(void)loginBtnAction:(UIButton *)btn{
if (self.acountTextField.text == nil) {
if (self.acountTextField.text.length == 0) {
GIGA_ShowToast(@"请输入手机号");
return;
}
@@ -163,12 +165,14 @@
return;
}
if (self.passwordTextField.text == nil) {
if (self.passwordTextField.text.length == 0) {
GIGA_ShowToast(@"密码不能为空");
return;
}
if (self.passwordTextField.text.length <= 6) {
GIGA_ShowToast(@"密码长度不能小于六位字符");
BOOL isPass = [GiGaHelper checkPassWord:self.passwordTextField.text];
if (isPass == NO) {
GIGA_ShowToast(@"请输入6-20位数字和字母组成的密码");
return;
}
@@ -312,16 +316,18 @@
//token 登陆标志
[GiGaUserDefault saveToken:resDic[@"token"]];
//埋点
[MobClick endEvent:MobClick_UserLogin];
// //暂定123 登陆标志
// [GiGaUserDefault saveUserId:@"123"];
GIGA_WIndowTost(@"登录成功!");
//请求用户数据
[[GiGaUserManager shareUser] synsisUserInfo:^(GiGaUser *user) {
NSLog(@"%@",user.userId);
}];
NC_POST_NAME_OBJECT(kUserLoginSuccessNoti, nil);
[self dismissViewControllerAnimated:YES completion:nil];
}
//接收注册成功通知
-(void)userRegistSuccsessNoti:(NSNotification *)noti{
@@ -79,6 +79,8 @@
GIGA_ShowToast(@"请输入正确手机号");
return;
}
btn.userInteractionEnabled = NO;
[self startTimer:btn];
@@ -150,10 +152,15 @@
GIGA_ShowToast(@"请输入新密码");
return;
}
if (!(self.passNewTextField.text.length >= 6 && self.passNewTextField.text.length <= 20)) {
GIGA_ShowToast(@"请输入6~20位新密码");
BOOL isPass = [GiGaHelper checkPassWord:self.passNewTextField.text];
if (isPass == NO) {
GIGA_ShowToast(@"请输入6-20位数字和字母组成的密码");
return;
}
btn.userInteractionEnabled = NO;
[self.view makeToastActivity:CSToastPositionCenter];
NSDictionary *params = @{
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -25,23 +26,23 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="输入手机号" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="gY9-PP-yev">
<rect key="frame" x="65" y="107" width="245" height="51"/>
<rect key="frame" x="65" y="43" width="245" height="51"/>
<constraints>
<constraint firstAttribute="height" constant="51" id="hdC-Ue-b1i"/>
<constraint firstAttribute="height" constant="51" id="odj-rg-9sy"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="12"/>
<textInputTraits key="textInputTraits" keyboardType="numberPad"/>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="eTv-jk-ONL">
<rect key="frame" x="65" y="159" width="245" height="1"/>
<rect key="frame" x="65" y="95" width="245" height="1"/>
<color key="backgroundColor" red="0.94901960784313721" green="0.94901960784313721" blue="0.94901960784313721" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="oPc-M9-lzE"/>
</constraints>
</view>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="短信验证码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="nCj-Hg-8pQ">
<rect key="frame" x="65" y="162" width="169" height="48"/>
<rect key="frame" x="65" y="98" width="169" height="48"/>
<constraints>
<constraint firstAttribute="height" constant="48" id="bP2-dP-V9B"/>
</constraints>
@@ -50,21 +51,21 @@
<textInputTraits key="textInputTraits" keyboardType="numberPad"/>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rno-VM-u1V">
<rect key="frame" x="65" y="214" width="245" height="1"/>
<rect key="frame" x="65" y="150.5" width="245" height="1"/>
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="I0I-Rj-P4f"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rm0-UH-T6r">
<rect key="frame" x="65" y="273" width="245" height="1"/>
<rect key="frame" x="65" y="209.5" width="245" height="1"/>
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="pu6-ak-TJR"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="w3j-WU-gmW">
<rect key="frame" x="87" y="316" width="200" height="41"/>
<rect key="frame" x="87" y="252.5" width="200" height="41"/>
<color key="backgroundColor" red="0.70980392156862748" green="0.054901960784313725" blue="0.054901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="41" id="q8T-c9-PAl"/>
@@ -75,7 +76,7 @@
</state>
</button>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="输入新的登录密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="MHD-nb-UXj">
<rect key="frame" x="65" y="221" width="245" height="51"/>
<rect key="frame" x="65" y="157.5" width="245" height="51"/>
<constraints>
<constraint firstAttribute="height" constant="51" id="mAg-kT-tQz"/>
</constraints>
@@ -84,7 +85,7 @@
<textInputTraits key="textInputTraits" keyboardType="numbersAndPunctuation"/>
</textField>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Dv2-ja-F8y">
<rect key="frame" x="234" y="161" width="76" height="48"/>
<rect key="frame" x="234" y="97" width="76" height="48"/>
<constraints>
<constraint firstAttribute="height" constant="48" id="bin-f7-lIk"/>
<constraint firstAttribute="width" constant="76" id="jyJ-IU-vK2"/>
@@ -98,30 +99,31 @@
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="gY9-PP-yev" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="0wd-N9-CJi"/>
<constraint firstItem="eTv-jk-ONL" firstAttribute="top" secondItem="gY9-PP-yev" secondAttribute="bottom" constant="1" id="0jP-EQ-F4h"/>
<constraint firstAttribute="trailing" secondItem="rm0-UH-T6r" secondAttribute="trailing" constant="65" id="3Ze-9p-DXQ"/>
<constraint firstItem="eTv-jk-ONL" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="65" id="3f8-py-rVY"/>
<constraint firstItem="rno-VM-u1V" firstAttribute="top" secondItem="nCj-Hg-8pQ" secondAttribute="bottom" constant="4" id="7B6-yw-Ang"/>
<constraint firstItem="MHD-nb-UXj" firstAttribute="width" secondItem="gY9-PP-yev" secondAttribute="width" id="9Rj-pz-EBS"/>
<constraint firstItem="rno-VM-u1V" firstAttribute="top" secondItem="nCj-Hg-8pQ" secondAttribute="bottom" constant="4.5" id="7B6-yw-Ang"/>
<constraint firstAttribute="trailing" secondItem="eTv-jk-ONL" secondAttribute="trailing" constant="65" id="9mt-NK-XDb"/>
<constraint firstItem="w3j-WU-gmW" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="87" id="Abo-oW-YM4"/>
<constraint firstItem="Dv2-ja-F8y" firstAttribute="leading" secondItem="nCj-Hg-8pQ" secondAttribute="trailing" id="C7G-Au-fA7"/>
<constraint firstItem="eTv-jk-ONL" firstAttribute="top" secondItem="gY9-PP-yev" secondAttribute="bottom" constant="1" id="Esi-VW-e2G"/>
<constraint firstItem="gY9-PP-yev" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="65" id="GjR-Hw-LgY"/>
<constraint firstItem="nCj-Hg-8pQ" firstAttribute="leading" secondItem="gY9-PP-yev" secondAttribute="leading" id="K4P-aZ-p4J"/>
<constraint firstItem="gY9-PP-yev" firstAttribute="top" secondItem="g7Z-wI-UmZ" secondAttribute="top" constant="23" id="GDb-aa-Haf"/>
<constraint firstItem="gY9-PP-yev" firstAttribute="leading" secondItem="g7Z-wI-UmZ" secondAttribute="leading" constant="65" id="LuO-vI-GAH"/>
<constraint firstItem="Dv2-ja-F8y" firstAttribute="top" secondItem="eTv-jk-ONL" secondAttribute="bottom" constant="1" id="NRI-Wc-YKg"/>
<constraint firstItem="rm0-UH-T6r" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="65" id="OKP-bj-u5F"/>
<constraint firstItem="w3j-WU-gmW" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="Qx9-jw-ZFV"/>
<constraint firstItem="eTv-jk-ONL" firstAttribute="trailing" secondItem="Dv2-ja-F8y" secondAttribute="trailing" id="Uii-Q8-GAB"/>
<constraint firstItem="rm0-UH-T6r" firstAttribute="top" secondItem="MHD-nb-UXj" secondAttribute="bottom" constant="1" id="WqS-Ct-q67"/>
<constraint firstItem="MHD-nb-UXj" firstAttribute="width" secondItem="gY9-PP-yev" secondAttribute="width" id="ZqJ-CD-AnS"/>
<constraint firstItem="rno-VM-u1V" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="65" id="aJl-ZC-hPs"/>
<constraint firstItem="Dv2-ja-F8y" firstAttribute="trailing" secondItem="gY9-PP-yev" secondAttribute="trailing" id="bbV-7x-WFt"/>
<constraint firstItem="nCj-Hg-8pQ" firstAttribute="top" secondItem="gY9-PP-yev" secondAttribute="bottom" constant="4" id="gP5-TX-MXq"/>
<constraint firstItem="Dv2-ja-F8y" firstAttribute="centerY" secondItem="nCj-Hg-8pQ" secondAttribute="centerY" constant="-1.5" id="jWN-Se-6P6"/>
<constraint firstItem="Dv2-ja-F8y" firstAttribute="centerY" secondItem="nCj-Hg-8pQ" secondAttribute="centerY" constant="-1" id="jWN-Se-6P6"/>
<constraint firstItem="gY9-PP-yev" firstAttribute="centerX" secondItem="g7Z-wI-UmZ" secondAttribute="centerX" id="mfk-pq-DxW"/>
<constraint firstItem="MHD-nb-UXj" firstAttribute="top" secondItem="rno-VM-u1V" secondAttribute="bottom" constant="6" id="mrM-C1-VFv"/>
<constraint firstItem="gY9-PP-yev" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="107" id="qsl-vw-gFU"/>
<constraint firstItem="w3j-WU-gmW" firstAttribute="top" secondItem="rm0-UH-T6r" secondAttribute="bottom" constant="42" id="sFk-c0-xql"/>
<constraint firstAttribute="trailing" secondItem="rno-VM-u1V" secondAttribute="trailing" constant="65" id="sKR-zI-qG4"/>
<constraint firstItem="eTv-jk-ONL" firstAttribute="leading" secondItem="nCj-Hg-8pQ" secondAttribute="leading" id="vDc-UZ-3fU"/>
<constraint firstItem="MHD-nb-UXj" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="wco-Sk-bTY"/>
</constraints>
<viewLayoutGuide key="safeArea" id="g7Z-wI-UmZ"/>
<point key="canvasLocation" x="33.5" y="53.5"/>
</view>
</objects>