直播盒子APP源码AlijuheCMS™开发手册之接口文档 for IOS

这是一个关于AlijuheCMS™ for IOS的接口文档,主要涵盖了直播盒子APP的注册、登录、验证码获取、重置密码等关键接口。使用objective-c开发,集成在xcode中。接口包括用户验证、邀请好友、客服信息获取、首页数据、搜索功能等多个方面。
摘要由CSDN通过智能技术生成

产品名称:AlijuheCMS™ for IOS(阿里聚合直播盒子APP源码IOS端)

版本号:V1.0

开发语言:objective-c

开发工具:xcode

接口文档路径:SmartValleyCloudSeeding\Helper\userInfo

接口代码:

//
//  SVCCommunityApi.m
//  SmartValleyCloudSeeding
//
//  Created by hxisWater on 2018/6/11.
//  Copyright © 2018年 SoWhat. All rights reserved.
//

#import "SVCCommunityApi.h"
#import "BKNetworkHelper.h"
@implementation SVCCommunityApi

#pragma mark --> 初始化网络请求对象
+ (BKNetworkHelper *)initNetHelper
{
    return [BKNetworkHelper shareInstance];
}

#pragma mark --> 获取验证码
+ (void)GetAuthCodeWithNSDictionary:(NSDictionary *)parameters BlockSuccess:(void (^)(NSInteger, NSString *, NSDictionary *))success andfail:(void (^)(NSError *))fail
{
    NSString *url = [NSString stringWithFormat:@"%@%@",ServerUrl,@"mobile/sms/send"];
    [[self initNetHelper] POST:url Parameters:parameters Success:^(id responseObject) {
        NSLog(@"%@ /n %@ /n %@",url,parameters,responseObject);
        NSInteger result=[[responseObject objectForKey:@"code"]integerValue];
        NSString *message=[responseObject objectForKey:@"msg"];
        success(result,message,responseObject[@"data"]);
    } Failure:^(NSError *error) {
        fail(error);
    }];
    
}

#pragma mark --> 获取是否需要验证码
+ (void)GetSmsMopenWithNSDictionary:(NSDictionary *)parameters BlockSuccess:(void (^)(NSInteger, NSString *, NSDictionary *))success andfail:(void (^)(NSError *))fail
{
    NSString *url = [NSString stringWithFormat:@"%@%@",ServerUrl,@"mobile/sms/smsmopen"];
    [[self initNetHelper] POST:url Parameters:parameters Success:^(id responseObject) {
        NSLog(@"%@ /n %@ /n %@",url,parameters,responseObject);
        NSInteger result=[[responseObject objectForKey:@"code"]integerValue];
        NSString *message=[responseObject objectForKey:@"msg"];
        success(result,message,responseObject[@"data"]);
    } Failure:^(NSError *error) {
        fail(error);
    }];
    
}

#pragma mark --> 注册账号
+ (void)RegUserWithNSDictionary:(NSDictionary *)parameters BlockSuccess:(void (^)(NSInteger, NSString *, NSDictionary *))success andfail:(void (^)(NSError *))fail
{
    NSString *url = [NSString stringWithFormat:@"%@%@",ServerUrl,@"mobile/user/register"];
    [[self initNetHelper] POST:url Parameters:parameters Success:^(id responseObject) {
          NSLog(@"%@ /n %@ /n %@ ",url,parameters,responseObject);
        NSInteger result=[[responseObject objectForKey:@"code"]integerValue];
        NSString *message=[responseObject objectForKey:@"msg"];
        success(result,message,responseObject[@"data"]);
    } Failure:^(NSError *error) {
       fail(error);
    }];
}

#pragma mark --> 账户登录
+ (void)LoginWithNSDictionary:(NSDictionary *)parameters BlockSuccess:(void (^)(NSInteger, NSString *, NSDictionary *))success andfail:(void (^)(NSError *))fail
{
     NSString *url = [NSString stringWithFormat:@"%@%@",ServerUrl,@"mobile/user/login"];
    [[self initNetHelper] POST:url Parameters:parameters Success:^(id responseObject) {
        NSLog(@"%@ /n %@ /n %@",url,parameters,responseObject);
        NSInteger result=[[responseObject objectForKey:@"code"]integerValue];
        NSString *message=[responseObject objectForKey:@"msg"];
        NSDictionary *JSON = responseObject[@"data"];
        success(result,message,JSON);
        SVCCurrUser *userIn = [SVCCurrUser mj_objectWithKeyValues:JSON];
        [SVCUserInfoUtil mSaveUser:userIn];
        NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
        [center postNotificationName:@"login" object:nil];
    } Failure:^(NSError *error) {
        fail(error);
    }];
}

#pragma mark --> 退出登录
+(void)LogoutWithNSDictionary:(NSDictionary *)parameters
                 BlockSuccess:(void(^)(NSInteger, NSString *,NSDictionary *JSON))success
                      andfail:(void (^)(NSError *error))fail
{
    NSString *url = [NSString stringWithFormat:@"%@%@",ServerUrl,@"mobile/user/logout"];
    [[self initNetHelper] POST:url Parameters:parameters Success:^(id responseObject) {
        NSLog(@"%@ /n %@ /n %@",url,parameters,responseObject);
        NSInteger result=[[responseObject objectForKey:@"code"]integerValue];
        NSString *message=[responseObject objectForKey:@"msg"];
        success(result,message,responseObject[@"data"]);
        NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
        [center postNotificationName:@"logout" object:nil];
    } Failure:^(NSError *error) {
        fail(error);
    }];
}

#pragma mark --> 重置密码
+ (void)ResetPasswordWithNSDictionary:(NSDictionary *)parameters type:(NSString *)type  BlockSuccess:(void (^)(NSInteger, NSString *, NSDictionary *))success andfail:(void (^)(NSError *))fail
{
    NSString *url = [NSString stringWithFormat:@"%@%@/%@",ServerUrl,@"mobile/user/",type];
    [[self initNetHelper] POST:url Parameters:parameters Success:^(id responseObject) {
        NSLog(@"%@ /n %@ /n %@",url,parameters,responseObject);
        NSInteger result=[[responseObject objectForKey:@"code"]integerValue];
        NSString *message=[responseObject objectForKey:@"msg"];
        success(result,message,responseObject[@"data"]);
    } Failure:^(NSError *error) {
        fail(error);
    }];
}

#pragma mark --> 邀请好友
+ (void)inviteFriendswithNSDiction:(NSDictionary *)parameters 
                      BlockSuccess:(void(^)(NSInteger, NSString *,NSDictionary *JSON))success
                           andfail:(void (^)(NSError *error))fail
{
     NSString *url = [NSString stringWithFormat:@"%@%@",ServerUrl,@"mobile/user/invite"];
    [[self initNetHelper] POST:url Parameters:parameters Success:^(id responseObject) {
        NSLog(@"%@ /n %@ /n %@",url,parameters,responseObject);
        NSInteger result=[[responseObject objectForKey:@"code"]integerValue];
        NSString *message=[responseObject objectForKey:@"msg"];
         success(result,message,responseObject[@"data"]);
    } Failure:^(NSError *error) {
         fail(error);
    }];
}

#pragma mark --> 邀请好友
+ (void)inviteFriendsDetailwithNSDiction:(NSDictionary *)parameters
                            BlockSuccess:(void(^)(NSInteger, NSString *,NSDictionary *JSON))success
                                 andfail:(void (^)(NSError *error))fail
{
    NSString *url = [NSString stringWithFormat:@"%@%@",ServerUrl,@"mobile/promotion/index"];
    [[self initNetHelper] POST:url Parameters:parameters Success:^(id responseObject) {
        NSLog(@"%@ /n %@ /n %@",url,parameters,responseObject);
        NSInteger result=[[responseObject objectForKey:@"code"]integerValue];

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值