// // NetworkCenter.h // NEPFoundation // // Created by 周泽文 on 2018/10/11. // Copyright © 2018年 周泽文. All rights reserved. // #import <Foundation/Foundation.h> typedef NS_ENUM(NSInteger,HuanYuBao_NetworkResult) { HuanYuBao_NetworkResultSuccess, //成功 HuanYuBao_NetworkResultLogout, //被登出 HuanYuBao_NetworkResultFailure, //失败,服务器返回具体的错误内容 HuanYuBao_NetworkResultServerError,//服务器连接不上 HuanYuBao_NetworkResultNoNetwork//没有网络 }; NS_ASSUME_NONNULL_BEGIN @interface NetworkCenter : NSObject +(instancetype)shareManager; // 登录 -(void)loginWithPhone:(NSString *)phoneNum password:(NSString *)password completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 注册. -(void)registerWithPhone:(NSString *)phoneNum password:(NSString *)password volidateCode:(NSString*)volidateCode inviteCode:(NSString *)inviteCode completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 登出 -(void)logoutCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 重置密码 -(void)resetPassword:(NSString *)password withPhone:(NSString *)phoneNum code:(NSString *)code completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 修改登录密码 -(void)fixPassword:(NSString *)password newPassword:(NSString *)npassword completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 发送验证码 -(void)sendCodeToPhone:(NSString *)phoneNum completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 忘记支付密码 -(void)forgetPayPasswordWithNewPassword:(NSString *)newPassword phone:(NSString *)phoneNum volidateCode:(NSString *)volidateCode completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; /** 发送验证码到邮箱 @param email 邮箱 @param completion 结果 */ -(void)sendCodeToEmail:(NSString *)email completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; -(void)getMainDataCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; -(void)getMarketCircleDataCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; -(void)getMyDeviceWithPage:(NSInteger)index type:(NSInteger)type completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; -(void)setHead:(NSString *)headPath completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; -(void)getInviteImageListCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; -(void)getInviteImageDetailWithID:(NSInteger)inviteId completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; -(void)getLoginDataCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; -(void)getAddressListWithPage:(NSInteger)index completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; /** 绑定邮箱 @param email 邮箱 @param password 密码 @param volidateCode 验证码 @param completion 结果 */ -(void)validateEmail:(NSString *)email withPassword:(NSString *)password volidateCode:(NSString *)volidateCode completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 检查验证码 -(void)checkCode:(NSString *)code forPhone:(NSString *)phoneNum completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 获取 HuanYuBao 余额 -(void)getHuanYuBaoBalanceCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 获取HuanYuBao 兑人民币的汇率 -(void)getHuanYuBaoRateCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 获取电影的详情 -(void)getMovieInfo:(NSString *)movieId completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 投资电影 -(void)investMovie:(NSInteger)movieId amount:(NSInteger)HuanYuBaoAmount completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 点赞 或者 收藏电影 type = 1 点赞 type=2 收藏 -(void)operateMovie:(NSInteger)movieId type:(NSInteger)type completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 获取电影投资记录 -(void)getInvestMovieRecordCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 获取所有电影 已经投资的人数和HuanYuBao数字 -(void)getAllFilmInvestInfoCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 获取 HuanYuBao 交易记录 -(void)getHuanYuBaoRecordListBalanceCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 上传图片 -(void)uploadImage:(UIImage *)image completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 大转盘投注 -(void)lottoryCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 检查app的版本 -(void)checkVersionCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 更改个人信息 -(void)updateUserInfo:(NSString *)infoString type:(NSInteger )infoType completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 获取首页新资讯banner -(void)getNewsBannerCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 获取竞猜电影信息 -(void)getBetInfoWithType:(NSInteger )type completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 下注电影 -(void)betMovie:(NSInteger)betId amount:(NSInteger)HuanYuBaoAmount type:(NSInteger)type completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 获取竞猜电影想请 -(void)getBetMovieInfo:(NSInteger)scenceId completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 获取竞猜记录 -(void)getBetRecordWithPage:(NSInteger)index completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 查询引导页 -(void)getGuidePageCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 上传实名认证信息 -(void)uploadPersonInfo:(NSDictionary *)personInfo completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 重新上传 实名认证的信息 -(void)updatePersonInfo:(NSDictionary *)personInfo completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 检查认证的状态 -(void)checkAuthStatusCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 获取下载地址 -(void)getDownloadUrlCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; /** 查询TYB变更记录 @param time 年月 如 2019-01 @param index 页码 默认1 @param type (0,全部)(1,投资)(2,竞猜)(3,转账)(4,其它) @param completion 结果 */ -(void)checkTradeRecordWithTime:(NSString *)time page:(NSInteger)index type:(NSInteger)type completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; /** TYB 转账 @param count 数量 @param account 对方账户 @param completion 结果 */ -(void)trasferTYB:(NSInteger)count toAccount:(NSString *)account completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; -(void)trasferRecordWithPage:(NSInteger)index completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; /** 获取用户信息 @param completion 结果 */ -(void)getUserInfoCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; /** 设置支付密码 @param password 密码 @param completion 结果 */ -(void)setPayPasswrod:(NSString *)password completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; /** 校对支付密码 @param password 密码 @param completion 结果 */ -(void)checkPayPassword:(NSString *)password completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; /** 获取播报 @param type 播报类型(0,竞猜)(1,抽奖) @param completion 结果 */ -(void)getBroadcastWithType:(NSInteger)type completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; /** 获取签到信息 @param completion 结果 */ -(void)getSignDataCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; /** 获取大转盘信息 @param completion 结果 */ -(void)getBigWheelDataCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; /** 上传中奖记录 @param prizeID 奖品id @param word 影视金句 @param completion 结果 */ -(void)updatePrize:(NSInteger)prizeID word:(NSString *)word completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; /** 获取中奖纪录 @param index 页码 @param type (0,全部)(1,未领取)(2,已领取) @param completion 结果 */ -(void)getWheelPrizeRecordWithPage:(NSInteger)index type:(NSInteger)type completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 获取竞猜排行榜 -(void)getGuessRankCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 获取用户认证信息 -(void)getUserAuthInfoCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; /** 修改支付密码 @param password 老密码 @param payPassword 新密码 @param completion 结果 */ -(void)fixPayPassword:(NSString *)password newPayPassword:(NSString *)payPassword completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 获取转账到交易所的手续费 -(void)getTransferFeeCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; /** 转账到交易所 @param count 数量 @param account 目的地址 @param payFee 手续费用 @param completion 结果 */ -(void)trasferTYB:(NSInteger)count toAccount:(NSString *)account fee:(NSInteger)payFee completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; /** 获取转账记录 @param index 页码 @param completion 结果 */ -(void)getTransferRecordWithIndex:(NSInteger) index completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 获取今日竞猜的电影 -(void)getCurrentDayGuessMoviesCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 根据电影id 查询同一部电影的不同场次 -(void)findMovieWithId:(NSInteger) movieId completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 获取图形验证码 -(void)getImageCodeWithId:(NSInteger) randomId completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 拿到昨天的开奖结果 -(void)getYesterdayResultCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 获取商城产品 -(void)getMallCommodityList:(NSInteger)commodityType detaiType:(NSInteger)type completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 充值话费 -(void)rechargePhone:(NSString *)phone type:(NSInteger)type completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 获取图形验证 -(void)sendSmsToEmail:(NSString *)email uuid:(NSString *)uuid captchaCode:(NSInteger) code completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; // 发送短信验证码 -(void)sendSmsToPhone:(NSString *)phone completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; -(void)getRechargeRecordWithType:(NSInteger)type completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; -(void)getUserBalanceCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; -(void)redeeDiamondWithCount:(CGFloat)count completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; -(void)trasferFIIC:(NSInteger)count toAccount:(NSString *)account password:(NSString *)password completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary *responseDic))completion; -(void)trasferFIIC:(NSInteger)count toAddress:(NSString *)address password:(NSString *)password completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getSystemTimeCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getRedPackageCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getUserInviteInfoCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getGasCardListCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)rechargeGasCard:(NSString *)cardId itemId:(NSString *)itmeId count:(NSInteger)count completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getLivingExpenseWithCityName:(NSString *)cityName projectId:(NSString*)projectId completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)payLivingExpenseWithId:(NSString *)itemId count:(CGFloat)count account:(NSString *)account completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getSystemMessageCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)buyNodeWithType:(NSInteger)type count:(NSInteger)count completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)readSystemMessage:(NSString *)messageId completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getNodeInvestRecordWithType:(NSInteger)type completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getNodeIncomeCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getContractMemberListCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getNodeIncomeWithType:(NSInteger)type completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getCoinPriceInfoWithType:(NSInteger)type completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)exchangeWithType:(NSInteger)typeId amount:(NSInteger)amount completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getHomePageAssetCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getNodeInfoByType:(NSInteger)type completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getNodePriceCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)isShowAsset:(BOOL)isShow completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)addNewContractCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getJoiningContractCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getCandlesWithTime:(NSInteger)time name:(NSString *)name completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getTrainListWithDate:(NSString *)date start:(NSString *)start end:(NSString *)end completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getPassengerListCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)addPassengerInfoWithName:(NSString *)name cardId:(NSString *)cardId phone:(NSString *)phone completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)editPassengerInfoWithName:(NSString *)name cardId:(NSString *)cardId phone:(NSString *)phone completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)editPassengerInfoWithName:(NSString *)name cardId:(NSString *)cardId phone:(NSString *)phone userId:(NSInteger)userId completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)orderTicketWithInfo:(NSDictionary *)dic completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)checkTicketInfoWithOrderId:(NSString *)orderId completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)checkTicketOrderWithType:(NSInteger)type completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)payOrderWithId:(NSString *)orderId completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)refundTicketWithOrder:(NSString *)orderId sudId:(NSString *)subId completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)checkScanContent:(NSString *)content completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)payMoney:(NSString *)amount address:(NSString *)address payPassword:(NSString *)password completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getBigNodeInfoCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)payMoney:(NSString *)amount address:(NSString *)address completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getChatRoomCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getChatRoomUser:(NSString *)roomName completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)downloadImage:(NSString *)imageUrl toPath:(NSString *)path name:(NSString *)name completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getMyTransactionListWithState:(NSInteger)state page:(NSInteger )page coinType:(NSString *)coinType completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getAllTransactionListWithType:(NSInteger)type page:(NSInteger)page coinType:(NSString *)coinType completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)cancelTransactionWithID:(NSString *)orderId completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getCompleteTransactionOrderWithType:(NSInteger)type orderId:(NSString *)orderId completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)createOrderWithInfo:(NSDictionary *)dic completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)dealOrder:(NSString *)orderId type:(NSInteger)type completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)trasferThirdpartCoin:(NSInteger)count toAddress:(NSString *)address password:(NSString *)password completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getTransactionCoinListCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getPurchaseInfoCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)purchaseCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getTeamIncomeCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getAllProductCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)investPorject:(NSInteger)projectID amount:(NSInteger)amount completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)uploadHashCode:(NSString *)code completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getMyInvestInfoCompletion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; -(void)getMyInvestmentRecordWithState:(NSInteger)state completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; - (void)getMyShop:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; - (void)getMyShopDetailWithID:(NSString *)ID completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; - (void)getPosList:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; - (void)getPosDetailWithID:(NSString *)ID completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; - (void)createOrderWithDeviceID:(NSString *)ID num:(NSString *)num isCredit:(NSString *)isCredit payType:(NSString *)payType addressID:(NSString *)addressID completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; - (void)gainOrderParamWithOrderID:(NSString *)OrderID payType:(NSString *)payType completion:(void (^)(HuanYuBao_NetworkResult result, NSDictionary * responseDic))completion; @end NS_ASSUME_NONNULL_END