123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- //
- // RequestApi+LHP.m
- // ZWLiveApp
- //
- // Created by 刘惠萍 on 2020/10/10.
- // Copyright © 2020 刘惠萍. All rights reserved.
- //
- #import "RequestApi+LHP.h"
- @implementation RequestApi (LHP)
- ///获取验证码
- + (void)requestGetCodeWithPhone:(NSString *)phone
- delegate:(id <RequestDelegate>)delegate
- success:(void (^)(NSDictionary * response, id mark))success
- failure:(void (^)(NSString * errorStr, id mark))failure{
- NSDictionary *dic = @{@"userphone":UnPackStr(phone)
- };
- [self postUrl:@"/api/v1/auth/signin-captcha" delegate:delegate parameters:dic success:success failure:failure];
- }
- ///注册获取验证码
- + (void)requestSignUpCodeWithPhone:(NSString *)phone
- delegate:(id <RequestDelegate>)delegate
- success:(void (^)(NSDictionary * response, id mark))success
- failure:(void (^)(NSString * errorStr, id mark))failure{
- NSDictionary *dic = @{@"userphone":UnPackStr(phone)
- };
- [self postUrl:@"/api/v1/auth/signup-captcha" delegate:delegate parameters:dic success:success failure:failure];
- }
- ///注册
- + (void)requestSignUpByCodeWithPhone:(NSString *)nickname
- valicode:(NSString *)valicode
- delegate:(id <RequestDelegate>)delegate
- success:(void (^)(NSDictionary * response, id mark))success
- failure:(void (^)(NSString * errorStr, id mark))failure{
- NSDictionary *dic = @{@"userphone":UnPackStr(nickname),
- @"deviceBrand":@"iPhone",
- @"deviceModel":[GlobalMethod LookDeviceName],
- @"devicePlatform":@"iOS",
- @"deviceUniqueId":[[[UIDevice currentDevice] identifierForVendor] UUIDString],
- @"password":@"l123456",
- @"deviceSystemVersion":[[UIDevice currentDevice] systemVersion],
- @"captcha":UnPackStr(valicode)
- };
- [self postUrl:@"/api/v1/auth/signup" delegate:delegate parameters:dic success:success failure:failure];
- }
- ///验证码登录
- + (void)requestLoginByCodeWithNickname:(NSString *)nickname
- valicode:(NSString *)valicode
- delegate:(id <RequestDelegate>)delegate
- success:(void (^)(NSDictionary * response, id mark))success
- failure:(void (^)(NSString * errorStr, id mark))failure{
- NSDictionary *dic = @{@"mobile":UnPackStr(nickname),
- @"password":UnPackStr(valicode)
- };
- [self getUrl:@"phoneMobile/login" delegate:delegate parameters:dic success:success failure:failure];
- }
- ///首页轮播图
- +(void)requestFindAdvertisingWheelWithPosition:(NSString *)position
- delegate:(id <RequestDelegate>)delegate
- success:(void (^)(NSDictionary * response, id mark))success
- failure:(void (^)(NSString * errorStr, id mark))failure{
- NSDictionary *dic = @{@"position":UnPackStr(position),
- @"pageNumber":@1,
- @"pageSize":@20
- };
- [self getUrl:@"phoneMobile/findAdvertisingWheel" delegate:delegate parameters:dic success:success failure:failure];
- }
- ///查询文案列表
- + (void)requestGetInformationListWithPage:(NSString *)pageNo
- size:(NSString *)pageSize
- typeId:(NSString *)typeId
- delegate:(id <RequestDelegate>)delegate
- success:(void (^)(NSDictionary * response, id mark))success
- failure:(void (^)(NSString * errorStr, id mark))failure{
- NSDictionary *dic = @{@"typeId":UnPackStr(typeId),
- @"pageNumber":UnPackStr(pageNo),
- @"pageSize":UnPackStr(pageSize)
- };
- [self getUrl:@"phoneMobile/informationPageList" delegate:delegate parameters:dic success:success failure:failure];
- }
- ///机具
- +(void)requestGetInformationTypeNameWithDelegate:(id <RequestDelegate>)delegate
- success:(void (^)(NSDictionary * response, id mark))success
- failure:(void (^)(NSString * errorStr, id mark))failure{
- NSDictionary *dic = @{@"pageNumber":@1,
- @"pageSize":@20,
- @"userId":UnPackStr([GlobalData sharedInstance].GB_UserModel.internalBaseClassIdentifier)
- };
- [self getUrl:[NSString stringWithFormat:@"%@app/getInformationTypeName",URL_HEAD11] delegate:delegate parameters:dic success:success failure:failure];
- }
- ///我的钱包
- +(void)requestFindUserByIdWithDelegate:(id <RequestDelegate>)delegate
- success:(void (^)(NSDictionary * response, id mark))success
- failure:(void (^)(NSString * errorStr, id mark))failure{
- NSDictionary *dic = @{
- @"userId":UnPackStr([GlobalData sharedInstance].GB_UserModel.internalBaseClassIdentifier)
- };
- [self getUrl:@"phoneMobile/findUserById" delegate:delegate parameters:dic success:success failure:failure];
- }
- ///机具钱包
- + (void)requestActivityAuthWithCode:(NSString *)valicode
- delegate:(id <RequestDelegate>)delegate
- success:(void (^)(NSDictionary * response, id mark))success
- failure:(void (^)(NSString * errorStr, id mark))failure{
- NSDictionary *dic = @{@"code":UnPackStr(valicode),
- @"userId":UnPackStr([GlobalData sharedInstance].GB_UserModel.internalBaseClassIdentifier)
- };
- [self postUrl:[NSString stringWithFormat:@"%@app/activityAuth",URL_HEAD11] delegate:delegate parameters:dic success:success failure:failure];
- }
- ///提现规则
- +(void)requestCashApplicationSetWithDelegate:(id <RequestDelegate>)delegate
- success:(void (^)(NSDictionary * response, id mark))success
- failure:(void (^)(NSString * errorStr, id mark))failure{
- NSDictionary *dic = @{
- @"userId":UnPackStr([GlobalData sharedInstance].GB_UserModel.internalBaseClassIdentifier)
- };
- [self getUrl:@"user/cashApplicationSet" delegate:delegate parameters:dic success:success failure:failure];
- }
- @end
|