瀏覽代碼

add some files

hxb 9 年之前
父節點
當前提交
05c78cd995
共有 4 個文件被更改,包括 56 次插入28 次删除
  1. 1 1
      MyAlertViewController.swift
  2. 50 24
      README.md
  3. 2 1
      SocketChat-Bridging-Header.h
  4. 3 2
      func.swift

+ 1 - 1
MyAlertViewController.swift

@@ -12,7 +12,7 @@ class MyAlertViewController: UIAlertController {
 
     override func viewDidLoad() {
         super.viewDidLoad()
-
+        
         // Do any additional setup after loading the view.
     }
 

+ 50 - 24
README.md

@@ -8,12 +8,13 @@
     待封装 Alamofire http request
 
 
-
+请求短信验证码
+-------------------
 POST    /zhuxunserver/sms/sendCode  -发送短信验证码
 参数说明:
-String serverID      -必填项,服务器ID                             
-String loginName     -必填项,用户账号                              
-String|int userID    -必填项,用户ID                                 
+String serverID      -必填项,服务器ID                             
+String loginName     -必填项,用户账号                              
+String|int userID    -必填项,用户ID                                 
 String mobile        -可选项,手机号码,可有多个号码,以英文逗号间隔       
 String message       -可选项,短信内容,默认有统一格式
 String|int priority  -可选项,优先级,默认为0
@@ -23,29 +24,36 @@ String uuid          -可选项,请求唯一标识
 
 
 
-//验证码发送成功
-
-
-
-
-
-params = @{@"serverID":_loginData.serverID,
-@"userID": _loginData.addrBookID,
-@"mobile":phoneTF.text,
-@"message":@"",
-@"priority": @(0),
-@"extAttrs":@""
-}
-
-
-
+短信验证码校验
+--------------
+POST    /zhuxunserver/sms/authCode  -短信验证码验证
+参数说明:
+String serverID    -必填项,服务器ID
+String loginName   -必填项,用户账号
+String|int userID  -必填项,用户ID
+String mobile      -必填项,手机号码
+String code        -必填项,验证码
+String uid         -可选项,请求唯一标识
+参数格式:{ uuid:"", serverID:"", loginName:"", userID: 123, mobile:"", code:"" }
 
+返回值:主要的返回数据在data属性中
+参数说明:
+Boolean success           -请求是否成功,0|false失败,1|true成功
+String messgae            -提示消息
+int statusCode            -请求状态码
+String|Object|Array data  -请求响应数据
+String type               -请求类型
+String uuid               -请求唯一标识
 
 
 
 
 
+多设备
+新设备  短信验证
+Device1    Device2
 
+强占连接(老设备 主动断开)
 
 
 
@@ -68,8 +76,15 @@ String message       -可选项,短信内容,默认有统一格式
 String|int priority  -可选项,优先级,默认为0
 String extAttrs      -可选项,扩展数据
 String uuid          -可选项,请求唯一标识
-参数格式: { uuid:"", userID: 123, mobile:"接收人手机号码,多个以“,”隔开", message:"短信内容", priority:"优先级,默认:0", extAttrs:"扩展信息,可选" } 
-
+参数格式: { 
+            uuid:"", 
+            userID: 123, 
+            mobile:"接收人手机号码,多个以“,”隔开", 
+            message:"短信内容", 
+            priority:"优先级,默认:0", 
+            extAttrs:"扩展信息,可选" 
+        } 
+---------------------------
 POST    /zhuxunserver/sms/sendCode  -发送短信验证码
 参数说明:
 String serverID      -必填项,服务器ID
@@ -80,7 +95,9 @@ String message       -可选项,短信内容,默认有统一格式
 String|int priority  -可选项,优先级,默认为0
 String extAttrs      -可选项,扩展数据
 String uuid          -可选项,请求唯一标识
-参数格式:{ uuid:"", serverID:"", loginName:"", userID: 123, mobile:"接收人手机号码,多个以“,”隔开", message:"短信内容", priority:"优先级,默认:0", extAttrs:"扩展信息,可选" }
+
+
+
 
 POST    /zhuxunserver/sms/authCode  -短信验证码验证
 参数说明:
@@ -90,4 +107,13 @@ String|int userID  -必填项,用户ID
 String mobile      -必填项,手机号码
 String code        -必填项,验证码
 String uid         -可选项,请求唯一标识
-参数格式:{ uuid:"", serverID:"", loginName:"", userID: 123, mobile:"", code:"" }
+参数格式:{ uuid:"", serverID:"", loginName:"", userID: 123, mobile:"", code:"" }
+
+
+
+---------------------------------
+CoreData
+AddrBookID  Int64    用户ID
+appState    Int16
+avatar      String   头像链接
+branchId    Int64    

+ 2 - 1
SocketChat-Bridging-Header.h

@@ -4,4 +4,5 @@
 
 #import<MBProgressHUD/MBProgressHUD.h>
 #import<CocoaAsyncSocket/GCDAsyncSocket.h>
-#import<CocoaAsyncSocket/AsyncSocket.h>
+#import<CocoaAsyncSocket/AsyncSocket.h>
+#import "XKeyBoard.h"

+ 3 - 2
func.swift

@@ -17,7 +17,8 @@ func trimstring(str:String,trimchar:String = " ")->String{
 }
 
 
-
+//#define APPDELEGATE (AppDelegate*)[[UIApplication sharedApplication] delegate]
+let APPDELEGATE:AppDelegate = UIApplication.sharedApplication().delegate as! AppDelegate
 //###################   About AppdeleGate.  NotificationTypes    ##########
 let Notificationtypes:UIUserNotificationType = [UIUserNotificationType.Alert,UIUserNotificationType.Badge, UIUserNotificationType.Sound]
 
@@ -60,7 +61,7 @@ let DEFAULT_USER_ID = ManagerUserDefault().SelectUserDefault(USERDEFAULT_USER_ID
 
 //############### Check SMS ###############
 let RequireSMSURL = (USER_APP_SERVER as! String) + "/zhuxunserver/sms/sendCode"
-
+let CheckSMSURL =  (USER_APP_SERVER as! String) + "/zhuxunserver/sms/authCode"