                 return
             }
             completion(nil)
-        }
+        })
+    }
     }
 }
 


extension MoyaProvider {

    @discardableResult
    func sendSMS(phone: String, failureHandler: failureHandler? = nil, completion: @escaping (Bool) -> Void) -> Cancellable {
        return self.sendRequest(.sendSMS(phone: phone), failureHandler: failureHandler) { json in
            let sent = (json["sent"] as? Bool) ?? false
            completion(sent)
        }
    }
    
    @discardableResult
    func verifySMS(phone: String, code: String, failureHandler: failureHandler? = nil, completion: @escaping (LoginUser?) -> Void) -> Cancellable {
        return self.sendRequest(.verifySMS(phone: phone, code: code), failureHandler: failureHandler) { json in
            guard let verified = json["verified"] as? Bool, verified == true else {
                completion(nil)
                return

                completion(LoginUser(accessToken: accessToken, userID: userID, parentID: parentID, profileID: profileID, firstLogin: firstLogin, avatarURLString: ""))
            }
            completion(nil)
        })
    }
    
    /// 获取个人账号信息
    ///
    /// - Parameters:
    ///   - id:             个人信息id
    ///   - failureHandler: 失败处理闭包
    ///   - completion:     成功处理闭包
    /// - Returns:          Cancellable
    @discardableResult
    func userProfile(id: Int, failureHandler: failureHandler? = nil, completion: @escaping (ProfileInfo?) -> Void) -> Cancellable {
        return self.sendRequest(.profileInfo(id: id), failureHandler: failureHandler, completion: { json in
            guard let _ = json["id"] else {
                completion(nil)
                return
