Commit 279e3c89 authored by leijunbo's avatar leijunbo

增加了奖品兑换

parent 9c2ba95d
......@@ -38,6 +38,7 @@ static CGFloat SuccessWindow_hight = 170;
[self addSubview:self.lb_title];
[self addSubview:self.btn_check];
[self addSubview:self.lb_num];
[self addSubview:self.img_num];
[self addSubview:self.btn_dismiss];
self.backgroundColor = [UIColor clearColor];
[self configSubviews];
......@@ -81,6 +82,7 @@ static CGFloat SuccessWindow_hight = 170;
- (void)showAnimation
{
[self startAnimation];
[self startAnimation2];
}
#pragma mark - 动画
......@@ -91,11 +93,11 @@ static CGFloat SuccessWindow_hight = 170;
anima.keyPath = @"position";
anima.duration = 0.4;
anima.duration = 0.8;
anima.fromValue = [NSValue valueWithCGPoint:CGPointMake(300, 250)];
anima.toValue = [NSValue valueWithCGPoint:CGPointMake(300, 200)];
anima.fromValue = [NSValue valueWithCGPoint:CGPointMake(215, 215)];
anima.toValue = [NSValue valueWithCGPoint:CGPointMake(215, 175)];
......@@ -104,7 +106,7 @@ static CGFloat SuccessWindow_hight = 170;
CABasicAnimation *anima2 = [CABasicAnimation animation];
anima2.keyPath = @"opacity";
anima2.duration = 0.4;
anima2.duration = 0.8;
anima2.fromValue = [NSNumber numberWithFloat:1.0];
anima2.toValue = [NSNumber numberWithFloat:0.0];
anima2.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
......@@ -114,12 +116,48 @@ static CGFloat SuccessWindow_hight = 170;
CAAnimationGroup *groupAnima = [CAAnimationGroup animation];
groupAnima.animations = @[anima,anima2];
groupAnima.duration = 0.4;
groupAnima.duration = 0.8;
groupAnima.fillMode = kCAFillModeForwards;
groupAnima.removedOnCompletion = NO;
[self.lb_num.layer addAnimation:groupAnima forKey:nil];
}
- (void)startAnimation2
{
//创建核心动画
CABasicAnimation *anima = [CABasicAnimation animation];
anima.keyPath = @"position";
anima.duration = 0.8;
anima.fromValue = [NSValue valueWithCGPoint:CGPointMake(259.5, 215)];
anima.toValue = [NSValue valueWithCGPoint:CGPointMake(259.5, 175)];
anima.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear];
CABasicAnimation *anima2 = [CABasicAnimation animation];
anima2.keyPath = @"opacity";
anima2.duration = 0.8;
anima2.fromValue = [NSNumber numberWithFloat:1.0];
anima2.toValue = [NSNumber numberWithFloat:0.0];
anima2.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
CAAnimationGroup *groupAnima = [CAAnimationGroup animation];
groupAnima.animations = @[anima,anima2];
groupAnima.duration = 0.8;
groupAnima.fillMode = kCAFillModeForwards;
groupAnima.removedOnCompletion = NO;
[self.img_num.layer addAnimation:groupAnima forKey:nil];
}
#pragma mark - event response
- (void)btnClick:(UIButton *)sender
{
......@@ -178,9 +216,9 @@ static CGFloat SuccessWindow_hight = 170;
- (UILabel *)lb_num
{
if (!_lb_num) {
_lb_num = [[UILabel alloc]initWithFrame:CGRectMake(260, 230, 80, 40)];
_lb_num = [[UILabel alloc]initWithFrame:CGRectMake(175, 195, 80, 40)];
_lb_num.text = @"+100";
_lb_num.font = [UIFont systemFontOfSize:16];
_lb_num.font = [UIFont systemFontOfSize:32];
_lb_num.textColor = [UIColor colorWithHex:0xfed052];
}
return _lb_num;
......@@ -188,8 +226,8 @@ static CGFloat SuccessWindow_hight = 170;
- (UIImageView *)img_num
{
if (!_img_num) {
_img_num = [[UIImageView alloc]init];
_img_num.image = [UIImage imageNamed:@""];
_img_num = [[UIImageView alloc]initWithFrame:CGRectMake(247, 207, 25, 16)];
_img_num.image = [UIImage imageNamed:@"金币"];
}
return _img_num;
}
......
......@@ -49,6 +49,9 @@
// 跑到这里的block的时候,就已经是主线程了。
__block NSURLSessionDataTask *dataTask = nil;
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
manager.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", @"text/html",@"image/jpeg",@"text/plain", nil];
dataTask = [manager dataTaskWithRequest:request uploadProgress:nil downloadProgress:nil completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) {
NSNumber *requestID = @([dataTask taskIdentifier]);
[self.dispatchTable removeObjectForKey:requestID];
......
......@@ -20,7 +20,10 @@ NS_ASSUME_NONNULL_BEGIN
+(void)GET:(NSString *)url params:(NSDictionary *)params completionHandler:(void (^)(id responseObject, NSError *error))complete;
+(void)GET2:(NSString *)url params:(NSDictionary *)params completionHandler:(void (^)(id responseObject, NSError *error))complete;
+(void)POST:(NSString *)url params:(NSDictionary *)params completionHandler:(void (^)(id responseObject, NSError *error))complete;
+ (void)POST2:(NSString *)url params:(NSDictionary *)params completionHandler:(void (^)(id responseObject, NSError *error))complete;
@end
......
......@@ -107,6 +107,22 @@
}
+(void)GET2:(NSString *)url params:(NSDictionary *)params completionHandler:(void (^)(id responseObject, NSError *error))complete
{
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
manager.responseSerializer= [AFHTTPResponseSerializer serializer];
manager.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", @"text/html",@"image/jpeg",@"text/plain", nil];
[manager GET:url parameters:params progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
NSLog(@"JSON:%@",responseObject);
complete(responseObject,nil);
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
NSLog(@"Error: %@",error);
complete(nil,error);
}];
}
+(void)POST:(NSString *)url params:(NSDictionary *)params completionHandler:(void (^)(id responseObject, NSError *error))complete
{
......@@ -126,6 +142,24 @@
}
+ (void)POST2:(NSString *)url params:(NSDictionary *)params completionHandler:(void (^)(id responseObject, NSError *error))complete
{
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
[manager.requestSerializer setValue:@"application/x-www-form-urlencoded; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
manager.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"text/xml",@"text/html", @"application/json", @"text/json", @"text/javascript", @"text/plain", nil];
manager.requestSerializer = [AFHTTPRequestSerializer serializer];
manager.responseSerializer = [AFHTTPResponseSerializer serializer];
[manager POST:url parameters:params progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
NSLog(@"JSON:%@",responseObject);
complete(responseObject,nil);
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
NSLog(@"Error: %@",error);
complete(nil,error);
}];
}
#pragma mark - private methods
- (void)removeRequestIdWithRequestID:(NSInteger)requestId
{
......@@ -146,6 +180,7 @@
if (_httpRequestSerializer == nil) {
_httpRequestSerializer = [AFHTTPRequestSerializer serializer];
[_httpRequestSerializer setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
[_httpRequestSerializer setValue:@"application/x-www-form-urlencoded; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
}
return _httpRequestSerializer;
}
......
......@@ -36,6 +36,7 @@ return [self POST:pathNew1 parameters:dictNew completionHandler:^(id responseOb
if (responseObj) {
NSLog(@"%@",[NSJSONSerialization JSONObjectWithData:responseObj options:NSJSONReadingMutableContainers error:NULL]);
NSLog(@"%@",[[NSString alloc] initWithData:responseObj encoding:NSUTF8StringEncoding]);
}
if ( error || responseObj == nil ) {
complete( nil,error);
......@@ -785,6 +786,12 @@ return [self POST:pathNew1 parameters:dictNew completionHandler:^(id responseOb
return [self POST:pathNew1 parameters:dictNew completionHandler:^(resulTModel* responseObj, NSError *error) {
NSLog(@"response:%@",responseObj);
if (responseObj) {
NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:responseObj options:NSJSONReadingMutableContainers error:nil];
NSLog(@"%@",dic);
}
if (error) {
NSLog(@"打印错误:%@",error);
}else
......
//
// CTDiskCacheCenter.h
// Open
//
// Created by 雷俊博 on 2019/8/26.
// Copyright © 2019 黄江涛 . All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface CTDiskCacheCenter : NSObject
+ (id)fetchCachedRecordWithKey:(NSString *)key;
+ (void)saveCacheWithResponse:(id)response key:(NSString *)key cacheTime:(NSTimeInterval)cacheTime;
+ (void)cleanAll;
@end
NS_ASSUME_NONNULL_END
......@@ -14,7 +14,7 @@
</data>
<key>Info.plist</key>
<data>
savQXok3w1Sr3sI/oxRmAKpzs7M=
0x48A5rwEiIXNto9pMvZ17FgHrc=
</data>
<key>Modules/module.modulemap</key>
<data>
......
......@@ -21,6 +21,7 @@
#import "successViewController.h"
#import "AuthenticationGuideView.h"
@interface GreenChannelVC ()<UIImagePickerControllerDelegate,UINavigationControllerDelegate>
......@@ -69,6 +70,8 @@
//起点发生变化
self.edgesForExtendedLayout=UIRectEdgeBottom;
[self configBackBtn];
}
- (void)viewWillLayoutSubviews
......@@ -81,6 +84,50 @@
}
#pragma mark - 导航栏返回按钮及点击事件
- (void)configBackBtn
{
UIButton *backbtn = [UIButton buttonWithType:UIButtonTypeCustom];
backbtn.frame = CGRectMake(-50, 0, 40, 40);
[backbtn setTitle:@"返回" forState:UIControlStateNormal];
[backbtn setImage:[UIImage imageNamed:@"返回"] forState:UIControlStateNormal];
[backbtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[backbtn addTarget:self action:@selector(backBtnClick:) forControlEvents:UIControlEventTouchUpInside];
[backbtn layoutButtonWithEdgeInsetsStyle:GLButtonEdgeInsetsStyleLeft imageTitleSpace:6];
if (self.state == GreenRenZheng) {
UIBarButtonItem *backItem = [[UIBarButtonItem alloc]initWithCustomView:backbtn];
self.navigationItem.leftBarButtonItem = backItem;
}
}
- (void)backBtnClick:(UIButton *)btn
{
BOOL show = [[NSUserDefaults standardUserDefaults]boolForKey:@"SocialSecurityAuthenticationggreenVC"];
if (!show) {
[AuthenticationGuideView showGuideViewWithimgHidden:YES Block:^(BOOL isBack) {
[[NSUserDefaults standardUserDefaults]setBool:YES forKey:@"SocialSecurityAuthenticationggreenVC"];
[[NSUserDefaults standardUserDefaults]synchronize];
if (isBack) {
[self.navigationController popViewControllerAnimated:YES];
}
}];
}else {
[self.navigationController popViewControllerAnimated:YES];
}
}
#pragma mark - event response
- (void)btnClick:(UIButton *)sender
{
......
......@@ -401,6 +401,10 @@ static NSInteger *tagChangeFOrNumber;
_completion_int(provinceName);
}
//雷俊博
// if (![provinceName isEqualToString:@"请选择"] && provinceName) {
// [getPeopleID getprovinceNightSix:provinceName];
// }
[self hide];
......
......@@ -15,6 +15,10 @@
#import "AtlasDetailVC.h"
#import "WebDetailVC.h"
#import "BaseNetManager.h"
//天气
#import "LMJScrollTextView.h"
#import "WETianqiController.h"
@interface KKNewsVC ()<TTNewsViewDelegate,TTNewsDetailControllerDelegate>
{
NSString* _startTimeStr;
......@@ -122,10 +126,71 @@
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(APPWillResignActive) name:@"APPWillResignActive" object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(APPDidBecomeActive) name:@"APPDidBecomeActive" object:nil];
[self configNavBarItems];
}
- (void)resetTitle{
}
- (void)configNavBarItems
{
LMJScrollTextView *cityView = [[LMJScrollTextView alloc]initWithFrame:CGRectMake(0, 0, 100, 40) textScrollModel:LMJTextScrollContinuous direction:LMJTextScrollMoveLeft];
UILabel *lb_weather = [[UILabel alloc]init];
UIBarButtonItem *item = [[UIBarButtonItem alloc]initWithCustomView:cityView];
UIBarButtonItem *item2 = [[UIBarButtonItem alloc]initWithCustomView:lb_weather];
NSString *city = nil;
NSString *weather = nil;
if ([[NSUserDefaults standardUserDefaults]objectForKey:@"TQData"]) {
NSDictionary *data = [[NSUserDefaults standardUserDefaults]objectForKey:@"TQData"][@"data"];
city = [NSString stringWithFormat:@"%@",data[@"cityname"]];
weather = [NSString stringWithFormat:@"%@ %@℃~%@℃",data[@"weather"],data[@"ltemp"],data[@"htemp"]];
}else {
city = @"北京市";
weather =@"晴 22℃";
}
CGFloat width = [city sizeWithAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIFont systemFontOfSize:16], NSFontAttributeName, nil]].width;
if (width >= 100) {
cityView.frame = CGRectMake(0, 0, 100, 40);
[cityView startScrollWithText:city textColor:[UIColor whiteColor] font:[UIFont systemFontOfSize:16]];
}else {
cityView.frame = CGRectMake(0, 0, width, 40);
[cityView startShowWithText:city textColor:[UIColor whiteColor] font:[UIFont systemFontOfSize:16]];
}
CGFloat width2 = [weather sizeWithAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIFont systemFontOfSize:16], NSFontAttributeName, nil]].width;
lb_weather.frame = CGRectMake(0, 0, width2, 40);
lb_weather.textColor = [UIColor whiteColor];
lb_weather.font = [UIFont systemFontOfSize:16];
lb_weather.text = weather;
self.navigationItem.rightBarButtonItems = @[item2,item];
UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(singleTapGesture:)];
[cityView addGestureRecognizer:singleTap];
UITapGestureRecognizer *singleTap1 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(singleTapGesture:)];
lb_weather.userInteractionEnabled = YES;
[lb_weather addGestureRecognizer:singleTap1];
}
#pragma mark - TTNewsViewDelegate
/** 执行返回顶部方法回调 */
- (void)TTNewsViewBackToTop:(TTNewsView *)newsView {
......@@ -263,7 +328,7 @@
NSInteger time = [timeStr integerValue] - [_startTimeStr integerValue] - (NSInteger)_timeD ;
//判断是否已登录
if ([[NSUserDefaults standardUserDefaults] objectForKey:@"firstlog"] && [getPeopleID PeopleID] && time >= 6) {
if ([[NSUserDefaults standardUserDefaults] objectForKey:@"firstlog"] && [getPeopleID PeopleID] && time >= 6 && _slidingdistance > 0) {
NSDictionary *params = @{
@"uid":[NSNumber numberWithInteger:[getPeopleID PeopleID]],
@"telphone":[EnercryTool encryptUseDES:[getPeopleID PeopleIphoneNmber] key:DESKEY],
......@@ -287,11 +352,11 @@
NSString *code = [responseObj[@"code"] stringValue];
if ([code isEqualToString:@"0"]) {
NSLog(@"看新闻接口提交成功");
_lastUrl = _currentPageUrl;
_startTimeStr = nil;
_endTimeStr = nil;
_currentNewsHeight = 0.0;
_slidingdistance = 0.0;
self->_lastUrl = self->_currentPageUrl;
self->_startTimeStr = nil;
self->_endTimeStr = nil;
self->_currentNewsHeight = 0.0;
self->_slidingdistance = 0.0;
}
}
......@@ -309,6 +374,24 @@
_slidingdistance = fabs(scrollHeight);
}
#pragma mark - event response
- (void)singleTapGesture:(UITapGestureRecognizer *)ges
{
NSDictionary *data = [[NSUserDefaults standardUserDefaults]objectForKey:@"TQData"][@"data"];
if (data) {
NSString *lat = [NSString stringWithFormat:@"%@",data[@"lat"]];
NSString *lng = [NSString stringWithFormat:@"%@",data[@"lng"]];
WETianqiController *controlltr = [[WETianqiController alloc] init];
[controlltr fetchWeatherDataLocationLat:[lat doubleValue] LocationLng:[lng doubleValue]];
[self presentViewController:controlltr animated:YES completion:NULL];
}else{
WETianqiController *controlltr = [[WETianqiController alloc] init];
[controlltr fetchWeatherDataLocationLat:39.91488908 LocationLng:116.40387397];
[self presentViewController:controlltr animated:YES completion:NULL];
}
}
#pragma mark - getters and setters
- (NSMutableDictionary *)dispatchTable
{
......
......@@ -21,13 +21,13 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="my-open.png" translatesAutoresizingMaskIntoConstraints="NO" id="k0g-X0-sDj">
<rect key="frame" x="0.0" y="20" width="320" height="460"/>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="my-open.png" translatesAutoresizingMaskIntoConstraints="NO" id="k0g-X0-sDj">
<rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
</imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="k0g-X0-sDj" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" constant="20" id="L22-bR-zWG"/>
<constraint firstItem="k0g-X0-sDj" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="L22-bR-zWG"/>
<constraint firstAttribute="trailing" secondItem="k0g-X0-sDj" secondAttribute="trailing" id="YeL-ZN-62Y"/>
<constraint firstAttribute="bottom" secondItem="k0g-X0-sDj" secondAttribute="bottom" id="eaY-8H-48s"/>
<constraint firstItem="k0g-X0-sDj" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="pxa-47-QCZ"/>
......@@ -36,7 +36,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="52" y="374.66266866566718"/>
<point key="canvasLocation" x="50.625" y="373.75"/>
</scene>
</scenes>
<resources>
......
......@@ -8,6 +8,9 @@
#import "CoinsCenterViewController.h"
#import "UIColor+Hex.h"
#import "UIButton+ImageTitleSpacing.h"
#import <UICountingLabel.h>
#import "Constants.h"
#import "ExchangeMoneyBtn.h"
......@@ -20,14 +23,37 @@
#import "CoinCenterTableViewCell.h"
#import "WebVC.h"
#import "CTAPIBaseManager.h"
#import "CoinsDetailListVC.h"
//签到弹框
#import "SignInSuccessView.h"
//公众号弹框
#import "OfficialAccountsAlertView.h"
//弹框动画
#import <ZJAnimationPopView.h>
#import <Toast.h>
@interface CoinsCenterViewController ()<UITableViewDelegate,UITableViewDataSource,UICollectionViewDelegate,UICollectionViewDataSource>
{
id _customView;
}
//导航栏
@property (nonatomic, strong)UIButton *rightBtn;
@property (nonatomic, strong)UIView *headerView;
@property (nonatomic, strong)UIView *cardView;
//card view
@property (nonatomic, strong)UILabel *lb_coinsNum;
@property (nonatomic, strong)UICountingLabel *lb_coinsNum;
@property (nonatomic, strong)UILabel *lb_coinsNumTitle;
......@@ -51,6 +77,11 @@
@property (nonatomic, strong)NSMutableArray *dataArray;
@property (nonatomic, assign)NSInteger weekIndex;
@property (nonatomic, assign)BOOL isrefresh;
@end
......@@ -62,6 +93,15 @@
self.view.backgroundColor = [UIColor whiteColor];
[self.view addSubview:self.tableView];
[self refreshHeaderViewData];
[self loadData];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:self.rightBtn];
}
- (void)viewWillAppear:(BOOL)animated
{
......@@ -71,10 +111,41 @@
[self.transitionCoordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
self.navigationController.navigationBar.barTintColor = [UIColor colorWithHex:0xed8b0b];
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@""] forBarMetrics:UIBarMetricsDefault];
} completion:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
}];
NSString *pushStr = [[NSUserDefaults standardUserDefaults]objectForKey:@"pushKey"];
if ([pushStr isEqualToString:@"unOpenPush"] && [self isUserNotificationEnable]) {
[self increaseScoreWithType:@"1006"];
}
if (self.isrefresh) {
[self refreshCoins];
}
}
-(void)viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated];
[JANALYTICSService startLogPageView:@"金币中心"];
[MobClick beginLogPageView:@"金币中心"];
}
-(void)viewDidDisappear:(BOOL)animated{
[super viewDidDisappear:animated];
[JANALYTICSService stopLogPageView:@"金币中心"];
[MobClick endLogPageView:@"金币中心"];
}
- (void)viewWillLayoutSubviews
{
[super viewWillLayoutSubviews];
......@@ -126,6 +197,416 @@
}];
}
#pragma mark - loadData
- (void)refreshCoins
{
if ([getPeopleID PeopleID] && [getPeopleID PeopleIphoneNmber])
{
NSDictionary *params = @{
@"userId":[NSNumber numberWithInteger:[getPeopleID PeopleID]],
@"telephone": [EnercryTool encryptUseDES:[getPeopleID PeopleIphoneNmber] key:DESKEY]
};
NSString *url =[NSString stringWithFormat:@"%@score/getpersonintegrals",CoinsBaseUrl];
WeakSelf
[BaseNetManager POST2:url parameters:params completionHandler:^(id responseObj, NSError *error) {
weakSelf.isrefresh = YES;
if (responseObj) {
NSString *code = [responseObj[@"code"] stringValue];
if ([code isEqualToString:@"0"]) {
[getPeopleID getTotalCoins:responseObj[@"result"]];
NSDictionary *dic = [getPeopleID totalCoins];
NSNumber *num = dic[@"totalScore"];
[weakSelf.lb_coinsNum countFrom:self.lb_coinsNum.text.integerValue to:num.integerValue];
weakSelf.lb_todayCoinsNumber.text = [NSString stringWithFormat:@"%@",[dic[@"todaySore"] stringValue]];
}
}
}];
}
}
- (void)loadData
{
[SVProgressHUD shows];
NSString *url = [NSString stringWithFormat:@"%@/score/getuserTaskStatus",CoinsBaseUrl];
NSDictionary *dic = @{
@"userId":[NSNumber numberWithInteger:[getPeopleID PeopleID]],
@"telephone":[EnercryTool encryptUseDES:[getPeopleID PeopleIphoneNmber] key:DESKEY],
@"fromModel":@"2"
};
NSArray *result = [dic.allKeys sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) {
NSLog(@"%@~%@",obj1,obj2); //3~4 2~1 3~1 3~2
return [obj1 compare:obj2]; //升序
}];
NSString *sign = nil;
for (int i = 0; i < result.count; i++) {
NSString *key = result[i];
if (i==0) {
sign = [NSString stringWithFormat:@"%@=%@",key,dic[key]];
}else{
sign = [NSString stringWithFormat:@"%@&%@=%@",sign,key,dic[key]];
}
}
sign = [NSString stringWithFormat:@"%@&Kanwf574",sign];
NSMutableDictionary *params = [[NSMutableDictionary alloc]initWithDictionary:dic];
NSString *signString = [[MyMD5 md5:sign] lowercaseString];
[params setObject:signString forKey:@"sign"];
[CTAPIBaseManager POST:url params:params completionHandler:^(id _Nonnull responseObject, NSError * _Nonnull error) {
[SVProgressHUD doneShow];
[SVProgressHUD dismiss];
if (responseObject) {
NSNumber *code = responseObject[@"code"];
if (code.integerValue == 0) {
self.tableView.hidden = NO;
self.dateArray = [[NSMutableArray alloc]initWithArray:responseObject[@"result"][@"dateTaskStatus"]];
self.dataArray = [[NSMutableArray alloc]initWithArray:responseObject[@"result"][@"taskstatus"]];
//获取今天是周几
NSNumber *index = responseObject[@"result"][@"currentDayofWeek"];
self.weekIndex = index.integerValue - 1;
if (self.dateArray.count == 7) {
NSDictionary *dic = self.dateArray[self.weekIndex];
NSNumber *status = dic[@"status"];
if (status.integerValue == 302) {
[self setSignBtnInterace:NO];
}else if(status.integerValue == 303){
[self setSignBtnInterace:YES];
}
}
[self.collectionView reloadData];
[self.tableView reloadData];
[self refreshCoins];
return ;
}
}
}];
}
- (void)setSignBtnInterace:(BOOL)Interace
{
if (Interace) {
[_btn_signIn setTitle:@"签到" forState:UIControlStateNormal];
[_btn_signIn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
_btn_signIn.titleLabel.font = [UIFont systemFontOfSize:17 * WIDTHRADIU];
_btn_signIn.backgroundColor = [UIColor colorWithHex:0xed8b0b];
_btn_signIn.layer.cornerRadius = 22 * WIDTHRADIU;
_btn_signIn.userInteractionEnabled = YES;
}else{
[_btn_signIn setTitle:@"今日已签到" forState:UIControlStateNormal];
[_btn_signIn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
_btn_signIn.titleLabel.font = [UIFont systemFontOfSize:17 * WIDTHRADIU];
_btn_signIn.backgroundColor = [UIColor colorWithHex:0xffd28e];
_btn_signIn.layer.cornerRadius = 22 * WIDTHRADIU;
_btn_signIn.userInteractionEnabled = NO;
}
}
- (void)refreshHeaderViewData
{
NSDictionary *dic = [getPeopleID totalCoins];
self.lb_coinsNum.text = [NSString stringWithFormat:@"%@",[dic[@"totalScore"] stringValue]];
self.lb_todayCoinsNumber.text = [NSString stringWithFormat:@"%@",[dic[@"todaySore"] stringValue]];
}
//签到请求
- (void)loadHttpData:(NSString *)str
{
dispatch_group_t group = dispatch_group_create();
dispatch_queue_t searialQueue = dispatch_queue_create("com.hmc.www", DISPATCH_QUEUE_SERIAL);
dispatch_group_enter(group);
dispatch_group_async(group, searialQueue, ^{
//网络请求1
if ([getPeopleID PeopleID] && [getPeopleID PeopleIphoneNmber])
{
NSDictionary *params = @{
@"userId":[NSNumber numberWithInteger:[getPeopleID PeopleID]],
@"telephone": [EnercryTool encryptUseDES:[getPeopleID PeopleIphoneNmber] key:DESKEY]
};
NSString *url =[NSString stringWithFormat:@"%@score/getpersonintegrals",CoinsBaseUrl];
[BaseNetManager POST2:url parameters:params completionHandler:^(id responseObj, NSError *error) {
dispatch_group_leave(group);
if (responseObj) {
NSString *code = [responseObj[@"code"] stringValue];
if ([code isEqualToString:@"0"]) {
[getPeopleID getTotalCoins:responseObj[@"result"]];
}
}
}];
}
});
dispatch_group_enter(group);
dispatch_group_async(group, searialQueue, ^{
//网络请求2
NSString *url = [NSString stringWithFormat:@"%@/score/getuserTaskStatus",CoinsBaseUrl];
NSDictionary *dic = @{
@"userId":[NSNumber numberWithInteger:[getPeopleID PeopleID]],
@"telephone":[EnercryTool encryptUseDES:[getPeopleID PeopleIphoneNmber] key:DESKEY],
@"fromModel":@"2"
};
NSArray *result = [dic.allKeys sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) {
NSLog(@"%@~%@",obj1,obj2); //3~4 2~1 3~1 3~2
return [obj1 compare:obj2]; //升序
}];
NSString *sign = nil;
for (int i = 0; i < result.count; i++) {
NSString *key = result[i];
if (i==0) {
sign = [NSString stringWithFormat:@"%@=%@",key,dic[key]];
}else{
sign = [NSString stringWithFormat:@"%@&%@=%@",sign,key,dic[key]];
}
}
sign = [NSString stringWithFormat:@"%@&Kanwf574",sign];
NSMutableDictionary *params = [[NSMutableDictionary alloc]initWithDictionary:dic];
NSString *signString = [[MyMD5 md5:sign] lowercaseString];
[params setObject:signString forKey:@"sign"];
[CTAPIBaseManager POST:url params:params completionHandler:^(id _Nonnull responseObject, NSError * _Nonnull error) {
dispatch_group_leave(group);
if (responseObject) {
NSNumber *code = responseObject[@"code"];
if (code.integerValue == 0) {
NSNumber *index = responseObject[@"result"][@"currentDayofWeek"];
self.weekIndex =index.integerValue - 1;
self.dateArray = [[NSMutableArray alloc]initWithArray:responseObject[@"result"][@"dateTaskStatus"]];
self.dataArray = [[NSMutableArray alloc]initWithArray:responseObject[@"result"][@"taskstatus"]];
}
}
}];
});
//2个网络请求结束后,刷新UI
dispatch_group_notify(group, searialQueue, ^{
dispatch_async(dispatch_get_global_queue(0, 0), ^{
dispatch_async(dispatch_get_main_queue(), ^{
[self.collectionView reloadData];
[self.tableView reloadData];
if (self.dateArray.count == 7) {
NSDictionary *dic = self.dateArray[self.weekIndex];
NSNumber *status = dic[@"status"];
if (status.integerValue == 302) {
[self setSignBtnInterace:NO];
}else if(status.integerValue == 303){
[self setSignBtnInterace:YES];
}
}
NSDictionary *dic = [getPeopleID totalCoins];
NSNumber *num = dic[@"totalScore"];
//刷新UI
WeakSelf
[SignInSuccessView showSuccessViewWithTitle:@"签到成功" message:@"偷偷告诉你,满签奖励多多" num:str block:^(BOOL hidden) {
if (hidden) {
[weakSelf.lb_coinsNum countFrom:self.lb_coinsNum.text.integerValue to:num.integerValue];
weakSelf.lb_todayCoinsNumber.text = [NSString stringWithFormat:@"%@",[dic[@"todaySore"] stringValue]];
}
}];
});
});
});
}
//领取奖励
- (void)loadHttp2Data:(NSString *)str
{
dispatch_group_t group = dispatch_group_create();
dispatch_queue_t searialQueue = dispatch_queue_create("com.hmc2.www", DISPATCH_QUEUE_SERIAL);
dispatch_group_enter(group);
dispatch_group_async(group, searialQueue, ^{
//网络请求1
if ([getPeopleID PeopleID] && [getPeopleID PeopleIphoneNmber])
{
NSDictionary *params = @{
@"userId":[NSNumber numberWithInteger:[getPeopleID PeopleID]],
@"telephone": [EnercryTool encryptUseDES:[getPeopleID PeopleIphoneNmber] key:DESKEY]
};
NSString *url =[NSString stringWithFormat:@"%@score/getpersonintegrals",CoinsBaseUrl];
[BaseNetManager POST2:url parameters:params completionHandler:^(id responseObj, NSError *error) {
dispatch_group_leave(group);
if (responseObj) {
NSString *code = [responseObj[@"code"] stringValue];
if ([code isEqualToString:@"0"]) {
[getPeopleID getTotalCoins:responseObj[@"result"]];
}
}
}];
}
});
dispatch_group_enter(group);
dispatch_group_async(group, searialQueue, ^{
//网络请求2
NSString *url = [NSString stringWithFormat:@"%@/score/getuserTaskStatus",CoinsBaseUrl];
NSDictionary *dic = @{
@"userId":[NSNumber numberWithInteger:[getPeopleID PeopleID]],
@"telephone":[EnercryTool encryptUseDES:[getPeopleID PeopleIphoneNmber] key:DESKEY],
@"fromModel":@"2"
};
NSArray *result = [dic.allKeys sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) {
NSLog(@"%@~%@",obj1,obj2); //3~4 2~1 3~1 3~2
return [obj1 compare:obj2]; //升序
}];
NSString *sign = nil;
for (int i = 0; i < result.count; i++) {
NSString *key = result[i];
if (i==0) {
sign = [NSString stringWithFormat:@"%@=%@",key,dic[key]];
}else{
sign = [NSString stringWithFormat:@"%@&%@=%@",sign,key,dic[key]];
}
}
sign = [NSString stringWithFormat:@"%@&Kanwf574",sign];
NSMutableDictionary *params = [[NSMutableDictionary alloc]initWithDictionary:dic];
NSString *signString = [[MyMD5 md5:sign] lowercaseString];
[params setObject:signString forKey:@"sign"];
[CTAPIBaseManager POST:url params:params completionHandler:^(id _Nonnull responseObject, NSError * _Nonnull error) {
dispatch_group_leave(group);
if (responseObject) {
NSNumber *code = responseObject[@"code"];
if (code.integerValue == 0) {
NSNumber *index = responseObject[@"result"][@"currentDayofWeek"];
self.weekIndex =index.integerValue - 1;
self.dateArray = [[NSMutableArray alloc]initWithArray:responseObject[@"result"][@"dateTaskStatus"]];
self.dataArray = [[NSMutableArray alloc]initWithArray:responseObject[@"result"][@"taskstatus"]];
}
}
}];
});
//2个网络请求结束后,刷新UI
dispatch_group_notify(group, searialQueue, ^{
dispatch_async(dispatch_get_global_queue(0, 0), ^{
dispatch_async(dispatch_get_main_queue(), ^{
[self.collectionView reloadData];
[self.tableView reloadData];
if (self.dateArray.count == 7) {
NSDictionary *dic = self.dateArray[self.weekIndex];
NSNumber *status = dic[@"status"];
if (status.integerValue == 302) {
[self setSignBtnInterace:NO];
}else if(status.integerValue == 303){
[self setSignBtnInterace:YES];
}
}
NSDictionary *dic = [getPeopleID totalCoins];
NSNumber *num = dic[@"totalScore"];
//刷新UI
WeakSelf
[SignInSuccessView showSuccessViewWithTitle:@"任务完成" message:@"看新闻也可以赚金币啦!!" num:str block:^(BOOL hidden) {
if (hidden) {
[weakSelf.lb_coinsNum countFrom:self.lb_coinsNum.text.integerValue to:num.integerValue];
weakSelf.lb_todayCoinsNumber.text = [NSString stringWithFormat:@"%@",[dic[@"todaySore"] stringValue]];
}
}];
});
});
});
}
#pragma mark - UITableViewDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
......@@ -137,7 +618,11 @@
CoinCenterTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
[cell refreshUIWithString:self.dataArray[indexPath.row]];
[cell.btn_right addTarget:self action:@selector(btn_Click:) forControlEvents:UIControlEventTouchUpInside];
cell.btn_right.tag = indexPath.row + 200;
[cell refreshUIWithDic:self.dataArray[indexPath.row] index:indexPath.row];
return cell;
}
......@@ -147,6 +632,14 @@
return 67 * WIDTHRADIU + 0.5;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
}
#pragma mark - UICollectionViewDataSource
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView
{
......@@ -159,7 +652,7 @@
//这是正确的方法
-(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
SignInCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"cell" forIndexPath:indexPath];
[cell refreshUIWithData:self.dateArray[indexPath.section]];
[cell refreshUIWithData:self.dateArray[indexPath.section] index:indexPath.section];
return cell;
}
......@@ -212,65 +705,412 @@
- (void)exchangeMoneyClick:(UIButton *)sender{
//[SignInSuccessView showSuccessViewWithTitle:@"+30"];
//[RetroactiveView showSuccessView];
[RedPackageSuccessView showSuccessViewWithType:RedPackageTypeNoMultiple];
// [RedPackageSuccessView showSuccessViewWithType:RedPackageTypeNoMultiple];
WebVC *webVC = [[WebVC alloc]init];
webVC.title = @"今日抽奖";
//外网http://nginx.weface.com.cn/lesson/award/src/award.html
//内网@"http://172.16.10.121/award/src/award.html"
webVC.url = @"http://nginx.weface.com.cn/lesson/award/src/award.html";
//webVC.url = @"http://172.16.10.121/award/src/award.html";
[self.navigationController pushViewController:webVC animated:YES];
}
- (void)signBtnClick:(UIButton *)sender
{
sender.userInteractionEnabled = NO;
NSString *url = [NSString stringWithFormat:@"%@/score/increateScore",CoinsBaseUrl];
NSDictionary *dic = @{
@"userId":[NSNumber numberWithInteger:[getPeopleID PeopleID]],
@"telephone":[EnercryTool encryptUseDES:[getPeopleID PeopleIphoneNmber] key:DESKEY],
@"scoreType":@"1004",
@"reqTimesTamp":[NSNumber numberWithInteger:[self getNowTimeTimestamp3]],
@"fromModel":@"2"
};
NSArray *result = [dic.allKeys sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) {
NSLog(@"%@~%@",obj1,obj2); //3~4 2~1 3~1 3~2
return [obj1 compare:obj2]; //升序
}];
NSString *sign = nil;
for (int i = 0; i < result.count; i++) {
NSString *key = result[i];
if (i==0) {
sign = [NSString stringWithFormat:@"%@=%@",key,dic[key]];
}else{
sign = [NSString stringWithFormat:@"%@&%@=%@",sign,key,dic[key]];
}
}
sign = [NSString stringWithFormat:@"%@&Kanwf574",sign];
NSMutableDictionary *params = [[NSMutableDictionary alloc]initWithDictionary:dic];
NSString *signString = [[MyMD5 md5:sign] lowercaseString];
[params setObject:signString forKey:@"sign"];
WeakSelf
[CTAPIBaseManager POST:url params:params completionHandler:^(id _Nonnull responseObject, NSError * _Nonnull error) {
if (responseObject) {
NSNumber *code = responseObject[@"code"];
if (code.integerValue == 1006) {
[weakSelf loadHttpData:[NSString stringWithFormat:@"%@",responseObject[@"result"][@"score"]]];
return ;
}
}
}];
}
#pragma mark - getters and setters
- (NSMutableArray *)dateArray
{
if (!_dateArray) {
NSArray *array = @[@{
@"type":@"num",
@"title":@"周一",
@"num":@"30"
},
@{
@"type":@"num",
@"title":@"周二",
@"num":@"40"
},
@{
@"type":@"redPacket",
@"title":@"周三",
@"num":@"50"
},
@{
@"type":@"num",
@"title":@"周四",
@"num":@"60"
},
@{
@"type":@"giftBag",
@"title":@"周五",
@"num":@"80"
},
@{
@"type":@"num",
@"title":@"周六",
@"num":@"80"
},
@{
@"type":@"treasureBox",
@"title":@"周日",
@"num":@"200"
},
];
_dateArray = [[NSMutableArray alloc]initWithArray:array];
- (void)btn_Click:(UIButton *)sender
{
if ([sender.titleLabel.text isEqualToString:@"已完成"]) {
return;
}
if (sender.tag == 200) {
if ([sender.titleLabel.text isEqualToString:@"去关注"]) {
[self showPopAnimation];
}
}else if (sender.tag == 201){
if ([self isUserNotificationEnable]) {
[self increase2ScoreWithType:@"1006"];
}else {
[self goToAppSystemSetting];
}
}
return _dateArray;
}
- (void)increaseScoreWithType:(NSString *)type
{
NSString *url = [NSString stringWithFormat:@"%@/score/increateScore",CoinsBaseUrl];
NSDictionary *dic = @{
@"userId":[NSNumber numberWithInteger:[getPeopleID PeopleID]],
@"telephone":[EnercryTool encryptUseDES:[getPeopleID PeopleIphoneNmber] key:DESKEY],
@"scoreType":type,
@"reqTimesTamp":[NSNumber numberWithInteger:[self getNowTimeTimestamp3]],
@"fromModel":@"2"
};
NSArray *result = [dic.allKeys sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) {
NSLog(@"%@~%@",obj1,obj2); //3~4 2~1 3~1 3~2
return [obj1 compare:obj2]; //升序
}];
NSString *sign = nil;
for (int i = 0; i < result.count; i++) {
NSString *key = result[i];
if (i==0) {
sign = [NSString stringWithFormat:@"%@=%@",key,dic[key]];
}else{
sign = [NSString stringWithFormat:@"%@&%@=%@",sign,key,dic[key]];
}
}
sign = [NSString stringWithFormat:@"%@&Kanwf574",sign];
NSMutableDictionary *params = [[NSMutableDictionary alloc]initWithDictionary:dic];
NSString *signString = [[MyMD5 md5:sign] lowercaseString];
[params setObject:signString forKey:@"sign"];
WeakSelf
[CTAPIBaseManager POST:url params:params completionHandler:^(id _Nonnull responseObject, NSError * _Nonnull error) {
if (responseObject) {
NSNumber *code = responseObject[@"code"];
if (code.integerValue == 1006) {
if ([type isEqualToString:@""]) {
}
[[NSUserDefaults standardUserDefaults]setObject:@"openedPush" forKey:@"pushKey"];
[[NSUserDefaults standardUserDefaults]synchronize];
[weakSelf loadData];
return ;
}
}
}];
}
- (NSMutableArray *)dataArray
//领取的时候需要弹框
- (void)increase2ScoreWithType:(NSString *)type
{
if (!_dataArray ) {
_dataArray = [NSMutableArray arrayWithObjects:@"gz",@"ts",@"xw",@"tv", nil];
NSString *url = [NSString stringWithFormat:@"%@/score/increateScore",CoinsBaseUrl];
NSDictionary *dic = @{
@"userId":[NSNumber numberWithInteger:[getPeopleID PeopleID]],
@"telephone":[EnercryTool encryptUseDES:[getPeopleID PeopleIphoneNmber] key:DESKEY],
@"scoreType":type,
@"reqTimesTamp":[NSNumber numberWithInteger:[self getNowTimeTimestamp3]],
@"fromModel":@"2"
};
NSArray *result = [dic.allKeys sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) {
NSLog(@"%@~%@",obj1,obj2); //3~4 2~1 3~1 3~2
return [obj1 compare:obj2]; //升序
}];
NSString *sign = nil;
for (int i = 0; i < result.count; i++) {
NSString *key = result[i];
if (i==0) {
sign = [NSString stringWithFormat:@"%@=%@",key,dic[key]];
}else{
sign = [NSString stringWithFormat:@"%@&%@=%@",sign,key,dic[key]];
}
}
return _dataArray;
sign = [NSString stringWithFormat:@"%@&Kanwf574",sign];
NSMutableDictionary *params = [[NSMutableDictionary alloc]initWithDictionary:dic];
NSString *signString = [[MyMD5 md5:sign] lowercaseString];
[params setObject:signString forKey:@"sign"];
WeakSelf
[CTAPIBaseManager POST:url params:params completionHandler:^(id _Nonnull responseObject, NSError * _Nonnull error) {
if (responseObject) {
NSNumber *code = responseObject[@"code"];
if (code.integerValue == 1006) {
if ([type isEqualToString:@""]) {
}
[weakSelf loadHttpData:[NSString stringWithFormat:@"%@",responseObject[@"result"][@"score"]]];
return ;
}
}
}];
}
- (void)goToCoinsDetailVC:(UIButton *)sender
{
CoinsDetailListVC *vc = [[CoinsDetailListVC alloc]init];
vc.title = @"金币明细";
vc.type = ListVCTypeCoinsDetail;
vc.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:vc animated:YES];
}
#pragma mark - private methods
-(NSInteger )getNowTimeTimestamp3{
NSDateFormatter *formatter = [[NSDateFormatter alloc] init] ;
[formatter setDateStyle:NSDateFormatterMediumStyle];
[formatter setTimeStyle:NSDateFormatterShortStyle];
[formatter setDateFormat:@"YYYY-MM-dd HH:mm:ss SSS"]; // ----------设置你想要的格式,hh与HH的区别:分别表示12小时制,24小时制
//设置时区,这个对于时间的处理有时很重要
NSTimeZone* timeZone = [NSTimeZone timeZoneWithName:@"Asia/Beijing"];
[formatter setTimeZone:timeZone];
NSDate *datenow = [NSDate date];//现在时间,你可以输出来看下是什么格式
NSInteger timeSp = [datenow timeIntervalSince1970]*1000;
return timeSp;
}
//计算今天周几
- (NSInteger)getNowWeekday {
NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
NSDateComponents *comps = [[NSDateComponents alloc] init];
NSInteger unitFlags = NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay | NSCalendarUnitWeekday |
NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond;
NSDate *now = [NSDate date];
// 话说在真机上需要设置区域,才能正确获取本地日期,天朝代码:zh_CN
calendar.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"zh_CN"];
comps = [calendar components:unitFlags fromDate:now];
return [comps weekday] - 1;
}
- (BOOL)isUserNotificationEnable { // 判断用户是否允许接收通知
BOOL isEnable = NO;
if ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0f) { // iOS版本 >=8.0 处理逻辑
UIUserNotificationSettings *setting = [[UIApplication sharedApplication] currentUserNotificationSettings];
isEnable = (UIUserNotificationTypeNone == setting.types) ? NO : YES;
} else { // iOS版本 <8.0 处理逻辑
UIRemoteNotificationType type = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
isEnable = (UIRemoteNotificationTypeNone == type) ? NO : YES;
}
return isEnable;
}
#pragma mark - 跳转
// 如果用户关闭了接收通知功能,该方法可以跳转到APP设置页面进行修改 iOS版本 >=8.0 处理逻辑
- (void)goToAppSystemSetting {
WeakSelf
UIApplication *application = [UIApplication sharedApplication];
NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
if ([application canOpenURL:url]) {
if ([application respondsToSelector:@selector(openURL:options:completionHandler:)]) {
[application openURL:url options:@{} completionHandler:^(BOOL success) {
[weakSelf increaseScoreWithType:@"1006"];
}];
} else {
[application openURL:url];
[self increaseScoreWithType:@"1006"];
}
}
}
//跳转微信
-(void)openWechat{
NSURL * url = [NSURL URLWithString:@"weixin://"];
BOOL canOpen = [[UIApplication sharedApplication] canOpenURL:url];
//先判断是否能打开该url
if (canOpen)
{ //打开微信
WeakSelf
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, 0.5 * NSEC_PER_SEC);
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
[[UIApplication sharedApplication] openURL:url options:@{} completionHandler:^(BOOL success) {
[weakSelf increaseScoreWithType:@"1005"];
}];
});
}else {
[SVProgressHUD showInfoWithStatus:@"您的设备未安装微信APP"];
}
}
#pragma mark 显示弹框
- (void)showPopAnimation
{
ZJAnimationPopStyle popStyle = ZJAnimationPopStyleShakeFromTop;
ZJAnimationDismissStyle dismissStyle = ZJAnimationDismissStyleNO;
OfficialAccountsAlertView *alertView = [[OfficialAccountsAlertView alloc]initWithFrame:CGRectMake(0, 0, 280 * WIDTHRADIU, 225 * WIDTHRADIU)];
alertView.backgroundColor = [UIColor whiteColor];
alertView.layer.cornerRadius = 15 * WIDTHRADIU;
_customView = alertView;
// 1.初始化
ZJAnimationPopView *popView = [[ZJAnimationPopView alloc] initWithCustomView:alertView popStyle:popStyle dismissStyle:dismissStyle];
// 2.设置属性,可不设置使用默认值,见注解
// 2.1 显示时点击背景是否移除弹框
popView.isClickBGDismiss = ![OfficialAccountsAlertView isKindOfClass:[OfficialAccountsAlertView class]];
// 2.2 显示时背景的透明度
popView.popBGAlpha = 0.5f;
// 2.3 显示时是否监听屏幕旋转
popView.isObserverOrientationChange = NO;
// 2.4 显示时动画时长
// popView.popAnimationDuration = 0.8f;
// 2.5 移除时动画时长
// popView.dismissAnimationDuration = 0.8f;
// 2.6 显示完成回调
popView.popComplete = ^{
NSLog(@"显示完成");
};
// 2.7 移除完成回调
popView.dismissComplete = ^{
NSLog(@"移除完成");
};
// 3.处理自定义视图操作事件
[self handleCustomActionEnvent:popView];
// 4.显示弹框
[popView pop];
}
#pragma mark 处理自定义视图操作事件
- (void)handleCustomActionEnvent:(ZJAnimationPopView *)popView
{
// 在监听自定义视图的block操作事件时,要使用弱对象来避免循环引用
__weak typeof(popView) weakPopView = popView;
if ([_customView isKindOfClass:[OfficialAccountsAlertView class]]) {
OfficialAccountsAlertView *infoPopView = _customView;
infoPopView.block = ^(BOOL click) {
if (click) {
[weakPopView dismiss];
[self.view makeToast:@"复制成功"];
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
pasteboard.string = @"看看社保";
[self openWechat];
}
};
}
}
#pragma mark - getters and setters
- (UIButton *)rightBtn
{
if (!_rightBtn) {
_rightBtn = [UIButton buttonWithType:UIButtonTypeCustom];
_rightBtn.frame = CGRectMake(0, 0, 65, 22);
[_rightBtn setTitle:@"明细" forState:UIControlStateNormal];
[_rightBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[_rightBtn setImage:[UIImage imageNamed:@"btn_coinsdetail"] forState:UIControlStateNormal];
_rightBtn.titleLabel.font = [UIFont systemFontOfSize:14 * WIDTHRADIU];
[_rightBtn layoutButtonWithEdgeInsetsStyle:GLButtonEdgeInsetsStyleLeft imageTitleSpace:4 * WIDTHRADIU ];
_rightBtn.backgroundColor = [UIColor colorWithHex:0xfa6b05];
_rightBtn.layer.cornerRadius = 11;
[_rightBtn addTarget:self action:@selector(goToCoinsDetailVC:) forControlEvents:UIControlEventTouchUpInside];
}
return _rightBtn;
}
- (UIView *)headerView
{
if (!_headerView) {
......@@ -313,11 +1153,13 @@
return _cardView;
}
- (UILabel *)lb_coinsNum
- (UICountingLabel *)lb_coinsNum
{
if (!_lb_coinsNum) {
_lb_coinsNum = [[UILabel alloc]init];
_lb_coinsNum.text = @"10240";
_lb_coinsNum = [[UICountingLabel alloc]init];
_lb_coinsNum.text = @"0";
_lb_coinsNum.method = UILabelCountingMethodEaseOut;
_lb_coinsNum.format = @"%d";
_lb_coinsNum.textColor = [UIColor whiteColor];
_lb_coinsNum.font = [UIFont systemFontOfSize:35 * WIDTHRADIU];
_lb_coinsNum.textAlignment = NSTextAlignmentCenter;
......@@ -329,7 +1171,7 @@
{
if (!_lb_coinsNumTitle) {
_lb_coinsNumTitle = [[UILabel alloc]init];
_lb_coinsNumTitle.text = @"金币(个)";
_lb_coinsNumTitle.text = @"可用金币(个)";
_lb_coinsNumTitle.textColor = [UIColor whiteColor];
_lb_coinsNumTitle.font = [UIFont systemFontOfSize:13 * WIDTHRADIU];
_lb_coinsNumTitle.textAlignment = NSTextAlignmentCenter;
......@@ -341,10 +1183,10 @@
{
if (!_btn_exchangeMoney) {
_btn_exchangeMoney = [ExchangeMoneyBtn buttonWithType:UIButtonTypeCustom];
[_btn_exchangeMoney setTitle:@"兑换现金" forState:UIControlStateNormal];
[_btn_exchangeMoney setTitle:@"金币抽奖" forState:UIControlStateNormal];
[_btn_exchangeMoney setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
_btn_exchangeMoney.titleLabel.font = [UIFont systemFontOfSize:13 * WIDTHRADIU];
_btn_exchangeMoney.backgroundColor = [UIColor colorWithHex:0xfc9708];
_btn_exchangeMoney.backgroundColor = [UIColor colorWithHex:0xfa6b05];
[_btn_exchangeMoney addTarget:self action:@selector(exchangeMoneyClick:) forControlEvents:UIControlEventTouchUpInside];
}
return _btn_exchangeMoney;
......@@ -354,7 +1196,7 @@
{
if (!_lb_allCoinsNumber) {
_lb_allCoinsNumber = [[UILabel alloc]init];
_lb_allCoinsNumber.text = @"20240";
_lb_allCoinsNumber.text = @"--";
_lb_allCoinsNumber.font = [UIFont systemFontOfSize:20 * WIDTHRADIU];
_lb_allCoinsNumber.textColor = [UIColor colorWithHex:0Xfee2b8];
_lb_allCoinsNumber.textAlignment = NSTextAlignmentCenter;
......@@ -387,7 +1229,7 @@
{
if (!_lb_todayCoinsNumber) {
_lb_todayCoinsNumber = [[UILabel alloc]init];
_lb_todayCoinsNumber.text = @"240";
_lb_todayCoinsNumber.text = @"0";
_lb_todayCoinsNumber.font = [UIFont systemFontOfSize:20 * WIDTHRADIU];
_lb_todayCoinsNumber.textColor = [UIColor colorWithHex:0xfee2b8];
_lb_todayCoinsNumber.textAlignment = NSTextAlignmentCenter;
......@@ -433,11 +1275,13 @@
if (!_btn_signIn) {
_btn_signIn = [UIButton buttonWithType:UIButtonTypeCustom];
_btn_signIn.frame = CGRectMake(10 * WIDTHRADIU, CGRectGetMaxY(self.collectionView.frame) + 15 * WIDTHRADIU, ScreenWidth - 20 * WIDTHRADIU, 45 * WIDTHRADIU);
[_btn_signIn setTitle:@"今日已签到" forState:UIControlStateNormal];
[_btn_signIn setTitle:@"签到" forState:UIControlStateNormal];
[_btn_signIn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
_btn_signIn.titleLabel.font = [UIFont systemFontOfSize:17 * WIDTHRADIU];
_btn_signIn.backgroundColor = [UIColor colorWithHex:0xffd28e];
_btn_signIn.backgroundColor = [UIColor colorWithHex:0xed8b0b];
_btn_signIn.layer.cornerRadius = 22 * WIDTHRADIU;
_btn_signIn.userInteractionEnabled = YES;
[_btn_signIn addTarget:self action:@selector(signBtnClick:) forControlEvents:UIControlEventTouchUpInside];
}
return _btn_signIn;
}
......@@ -455,6 +1299,8 @@
[_tableView registerClass:[CoinCenterTableViewCell class] forCellReuseIdentifier:@"cell"];
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_tableView.hidden = YES;
}
return _tableView;
......
......@@ -15,10 +15,21 @@ typedef NS_ENUM(NSUInteger, ListCoinsMissonType) {
ListCoinsMissonTypeNews,
ListCoinsMissonTypeVideo
};
typedef NS_ENUM(NSUInteger, ListCoinsMissonState) {
ListCoinsMissonStateUNFinished,
ListCoinsMissonStateFinished
};
@interface CoinCenterTableViewCell : UITableViewCell
@property (nonatomic, strong)UIButton *btn_right;
@property (nonatomic, assign)ListCoinsMissonState state;
- (void)refreshUIWithString:(NSString *)str;
- (void)refreshUIWithDic:(NSDictionary *)dic index:(NSInteger)index;
@end
NS_ASSUME_NONNULL_END
......@@ -17,7 +17,7 @@
@property (nonatomic, strong)UILabel *lb_num;
@property (nonatomic, strong)UIButton *btn_right;
@property (nonatomic, strong)UIView *lineView;
......@@ -81,8 +81,74 @@
self.type = ListCoinsMissonTypeVideo;
}
}
- (void)refreshUIWithDic:(NSDictionary *)dic index:(NSInteger)index
{
NSString *str;
if (index == 0) {
[self.btn_right setTitle:@"去关注" forState:UIControlStateNormal];
str = @"关注“看看社保”公众号";
}else if (index == 1){
if ([self isUserNotificationEnable]) {
[self.btn_right setTitle:@"领取" forState:UIControlStateNormal];
}else{
[self.btn_right setTitle:@"去开启" forState:UIControlStateNormal];
}
str = @"打开APP推送权限";
}
NSNumber *status = dic[@"status"];
if (status.integerValue == 304) {
self.state = ListCoinsMissonStateFinished;
}else if (status.integerValue == 305){
self.state = ListCoinsMissonStateUNFinished;
}
self.lb_type.text = str;
self.lb_num.text =[NSString stringWithFormat:@"+%@金币",dic[@"sourceScore"]];
}
#pragma mark - private methods
- (BOOL)isUserNotificationEnable { // 判断用户是否允许接收通知
BOOL isEnable = NO;
if ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0f) { // iOS版本 >=8.0 处理逻辑
UIUserNotificationSettings *setting = [[UIApplication sharedApplication] currentUserNotificationSettings];
isEnable = (UIUserNotificationTypeNone == setting.types) ? NO : YES;
} else { // iOS版本 <8.0 处理逻辑
UIRemoteNotificationType type = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
isEnable = (UIRemoteNotificationTypeNone == type) ? NO : YES;
}
return isEnable;
}
#pragma mark - getters and setters
- (void)setState:(ListCoinsMissonState)state
{
if (state == ListCoinsMissonStateUNFinished) {
[self.btn_right setTitleColor:[UIColor colorWithHex:0xfa9504] forState:UIControlStateNormal];
self.btn_right.layer.borderWidth = 1.0;
self.btn_right.layer.borderColor = [UIColor colorWithHex:0xfa9504].CGColor;
self.btn_right.layer.cornerRadius = 12 * WIDTHRADIU;
self.btn_right.layer.masksToBounds = YES;
}else if (state == ListCoinsMissonStateFinished){
[self.btn_right setTitle:@"已完成" forState:UIControlStateNormal];
[self.btn_right setTitleColor:[UIColor colorWithHex:0x999999] forState:UIControlStateNormal];
self.btn_right .backgroundColor = [UIColor colorWithHex:0xe5e5e5];
self.btn_right.layer.borderWidth = 1.0;
self.btn_right.layer.borderColor = [UIColor colorWithHex:0xe5e5e5].CGColor;
self.btn_right.layer.cornerRadius = 12 * WIDTHRADIU;
self.btn_right.layer.masksToBounds = YES;
}
}
- (void)setType:(ListCoinsMissonType)type
{
if (type == ListCoinsMissonTypePublic) {
......
......@@ -10,17 +10,27 @@
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, ListCoinsPackageType) {
ListCoinsPackageTypeCheckedIn,
ListCoinsPackageTypeNumber,
ListCoinsPackageTypeRedPacket,
ListCoinsPackageTypeGiftBag,
ListCoinsPackageTypeTreasureBox
};
typedef NS_ENUM(NSUInteger, ListCoinsPackageState) {
ListCoinsPackageStateToSign,//待签到
ListCoinsPackageStateNoSigned,//未签到
ListCoinsPackageStateSigned//已签到;
};
@interface SignInCollectionViewCell : UICollectionViewCell
@property (nonatomic, assign)ListCoinsPackageType type;
@property (nonatomic, assign)ListCoinsPackageState state;
- (void)refreshUIWithData:(NSDictionary *)dic;
- (void)refreshUIWithData:(NSDictionary *)dic index:(NSInteger)index;
@end
......
......@@ -19,7 +19,7 @@
@property (nonatomic, strong)UILabel *lb_date;
@property (nonatomic, assign)ListCoinsPackageType type;
@end
......@@ -59,31 +59,86 @@
}
#pragma mark - public methods
- (void)refreshUIWithData:(NSDictionary *)dic
- (void)refreshUIWithData:(NSDictionary *)dic index:(NSInteger)index
{
NSString *type = dic[@"type"];
if ([type isEqualToString:@"num"]) {
self.lb_num.text = dic[@"num"];
self.img_back.image = [UIImage imageNamed:@"my_gold_Checkin_bg_normal"];
self.type = ListCoinsPackageTypeNumber;
}else if ([type isEqualToString:@"redPacket"]){
if (index == 2) {
self.type = ListCoinsPackageTypeRedPacket;
}else if ([type isEqualToString:@"giftBag"]){
self.type = ListCoinsPackageTypeGiftBag;
self.img_back.image = [UIImage imageNamed:@"my_gold_Checkin_Friday_normal"];
}else if ([type isEqualToString:@"treasureBox"]){
}else if (index == 4){
self.type = ListCoinsPackageTypeGiftBag;
}else if (index == 6){
self.type = ListCoinsPackageTypeTreasureBox;
self.img_back.image = [UIImage imageNamed:@"my_gold_Checkin_Sunday_normal"];
}else{
self.type = ListCoinsPackageTypeNumber;
}
self.lb_date.text = dic[@"title"];
NSNumber *status = dic[@"status"];
if (status.integerValue == 302) {
self.state = ListCoinsPackageStateSigned;
}else if (status.integerValue == 301){
self.state = ListCoinsPackageStateNoSigned;
}else if (status.integerValue == 300){
self.state = ListCoinsPackageStateToSign;
}
self.lb_num.text = [NSString stringWithFormat:@"%@",dic[@"sourceScore"]];
self.lb_date.text = dic[@"desc"];
}
#pragma mark - getters and setters
- (void)setState:(ListCoinsPackageState)state
{
_state = state;
switch (state) {
//未签到
case ListCoinsPackageStateNoSigned:
self.img_back.image = [UIImage imageNamed:@"my_gold_Checkin_bg_Signed_normal"];
self.lb_num.hidden = NO;
break;
//待签到
case ListCoinsPackageStateToSign:
self.lb_num.hidden = NO;
break;
//已签到
case ListCoinsPackageStateSigned:
self.img_back.image = [UIImage imageNamed:@"coins-signSuccess"];
self.lb_num.hidden = YES;
break;
default:
break;
}
}
- (void)setType:(ListCoinsPackageType)type
{
_type = type;
switch (type) {
case ListCoinsPackageTypeNumber:
self.img_back.image = [UIImage imageNamed:@"my_gold_Checkin_bg_normal"];
break;
case ListCoinsPackageTypeRedPacket:
self.img_back.image = [UIImage imageNamed:@"my_gold_Checkin_ Wednesday_normal"];
break;
case ListCoinsPackageTypeGiftBag:
self.img_back.image = [UIImage imageNamed:@"my_gold_Checkin_Friday_normal"];
break;
case ListCoinsPackageTypeTreasureBox:
self.img_back.image = [UIImage imageNamed:@"my_gold_Checkin_Sunday_normal"];
break;
default:
break;
}
if ((type == ListCoinsPackageTypeRedPacket) || (type == ListCoinsPackageTypeGiftBag) || (type == ListCoinsPackageTypeTreasureBox)) {
self.lb_num.hidden = YES;
}else{
......
......@@ -9,10 +9,14 @@
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
typedef void(^tapBlock)(BOOL hidden);
@interface SignInSuccessView : UIView
+ (void)showSuccessViewWithTitle:(NSString *)title;
@property (nonatomic, strong)tapBlock block;
+ (void)showSuccessViewWithTitle:(NSString *)title message:(NSString *)message num:(NSString *)num block:(tapBlock)block;
@end
......
......@@ -27,11 +27,15 @@
@end
@implementation SignInSuccessView
#pragma mark - life cycle
- (instancetype)initWithTitle:(NSString *)title
- (instancetype)initWithTitle:(NSString *)title message:(NSString *)message num:(NSString *)num block:(tapBlock)block
{
self = [super init];
if (self) {
[self initUI];
self.lb_successTitle.text = title;
self.lb_message.text = message;
self.lb_num.text = [NSString stringWithFormat:@"+%@",num];
self.block = block;
}
return self;
}
......@@ -85,9 +89,9 @@
}
#pragma mark - public methods
+ (void)showSuccessViewWithTitle:(NSString *)title
+ (void)showSuccessViewWithTitle:(NSString *)title message:(nonnull NSString *)message num:(nonnull NSString *)num block:(nonnull tapBlock)block
{
SignInSuccessView *view = [[SignInSuccessView alloc]initWithTitle:title];
SignInSuccessView *view = [[SignInSuccessView alloc]initWithTitle:title message:message num:num block:block];
[view showWithAnimation:YES];
}
......@@ -108,7 +112,7 @@
UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow;
[keyWindow addSubview: self];
[self addAnimation];
//[self addAnimation];
}
......@@ -134,7 +138,7 @@
- (void)dismissWithAnimation:(BOOL)animation
{
self.block(YES);
[self.lb_message removeFromSuperview];
[self.lb_num removeFromSuperview];
[self.img_Success removeFromSuperview];
......
......@@ -12,7 +12,8 @@ NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, ListVCType) {
ListVCTypeCoinsDetail,
ListVCTypeMyWallet
ListVCTypeMyWallet,
ListVCTypeCoinsCost
};
@interface CoinsDetailListVC : UIViewController
......
......@@ -43,8 +43,16 @@
[self.view addSubview:self.tableView];
[self.view addSubview:self.btn_Exchange];
self.tableView.tableFooterView = self.footerView;
[self loadData];
[self.headerView refreshData];
if (self.type == ListVCTypeCoinsDetail) {
[self configNavBar];
[self loadData];
}else if (self.type == ListVCTypeCoinsCost){
[self loadData];
}
}
- (void)viewWillAppear:(BOOL)animated
{
......@@ -56,13 +64,37 @@
self.navigationController.navigationBar.barTintColor = [UIColor colorWithHex:0xed8b0b];
} completion:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
}];
}
-(void)viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated];
if ([self.title isEqualToString:@"金币明细"]) {
[JANALYTICSService startLogPageView:@"金币明细"];
[MobClick beginLogPageView:@"金币明细"];
}else if ([self.title isEqualToString:@"金币消费"]){
[JANALYTICSService startLogPageView:@"金币消费"];
[MobClick beginLogPageView:@"金币消费"];
}
}
-(void)viewDidDisappear:(BOOL)animated{
[super viewDidDisappear:animated];
if ([self.title isEqualToString:@"金币明细"]) {
[JANALYTICSService stopLogPageView:@"金币明细"];
[MobClick endLogPageView:@"金币明细"];
}else if ([self.title isEqualToString:@"金币消费"]){
[JANALYTICSService stopLogPageView:@"金币消费"];
[MobClick endLogPageView:@"金币消费"];
}
}
- (void)viewWillLayoutSubviews
{
[super viewWillLayoutSubviews];
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.left.right.offset(0);
make.bottom.offset(-45 * WIDTHRADIU);
make.bottom.offset(0);
}];
[self.btn_Exchange mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.offset(0);
......@@ -71,9 +103,26 @@
}
- (void)configNavBar
{
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
btn.frame = CGRectMake(0, 0, 60, 40);
btn.titleLabel.font = [UIFont systemFontOfSize:16];
[btn setTitle:@"金币消费" forState:UIControlStateNormal];
[btn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[btn addTarget:self action:@selector(goTocoinCostListVC:) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *item = [[UIBarButtonItem alloc]initWithCustomView:btn];
self.navigationItem.rightBarButtonItem = item;
}
#pragma mark - call api
//金币明细接口
- (void)loadData{
if ([getPeopleID PeopleID] && self.type == ListVCTypeCoinsDetail)
if ([getPeopleID PeopleID] )
{
NSDictionary *params = @{
@"uid":[NSNumber numberWithInteger:[getPeopleID PeopleID]],
......@@ -85,7 +134,15 @@
if (responseObj) {
NSString *code = [responseObj[@"code"] stringValue];
if ([code isEqualToString:@"0"]) {
NSArray *array = responseObj[@"result"][@"detailInfo"];
NSArray *array = nil;
if (self.type == ListVCTypeCoinsDetail) {
array = responseObj[@"result"][@"detailInfo"];
}else if (self.type == ListVCTypeCoinsCost){
array = responseObj[@"result"][@"expendList"];
}
self.dataArray = [CoinDetailModel mj_objectArrayWithKeyValuesArray:array];
[self.tableView reloadData];
}else{
......@@ -97,6 +154,8 @@
}
}
//消费明细接口
#pragma mark - UITableViewDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
......@@ -112,6 +171,8 @@
if (self.type == ListVCTypeCoinsDetail) {
[cell refreshUIWithData:self.dataArray[indexPath.row]];
}else if (self.type == ListVCTypeCoinsCost){
[cell refreshUIWithData:self.dataArray[indexPath.row]];
}
......@@ -145,6 +206,15 @@
}
- (void)goTocoinCostListVC:(UIButton *)btn
{
CoinsDetailListVC *vc = [[CoinsDetailListVC alloc]init];
vc.title = @"金币消费";
vc.type = ListVCTypeCoinsCost;
vc.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:vc animated:YES];
}
#pragma mark getters and setters
- (UITableView *)tableView
{
......@@ -157,7 +227,7 @@
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
[_tableView registerClass:[CoinsListItemTableViewCell class] forCellReuseIdentifier:@"cell"];
_tableView.tableHeaderView = self.headerView;
// _tableView.tableHeaderView = self.headerView;
}
return _tableView;
}
......@@ -169,6 +239,7 @@
_btn_Exchange.titleLabel.font = [UIFont systemFontOfSize:15 * WIDTHRADIU];
[_btn_Exchange setTitle:@"金币兑换" forState:UIControlStateNormal];
[_btn_Exchange addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
_btn_Exchange.hidden = YES;
}
return _btn_Exchange;
}
......
......@@ -143,7 +143,7 @@
{
if (!_lb_coinsNumTitle) {
_lb_coinsNumTitle = [[UILabel alloc]init];
_lb_coinsNumTitle.text = @"金币(个)";
_lb_coinsNumTitle.text = @"可用金币(个)";
_lb_coinsNumTitle.textColor = [UIColor whiteColor];
_lb_coinsNumTitle.font = [UIFont systemFontOfSize:13 * WIDTHRADIU];
_lb_coinsNumTitle.textAlignment = NSTextAlignmentCenter;
......
......@@ -70,7 +70,12 @@
CoinDetailModel *myModel = (CoinDetailModel *)model;
self.lb_itemType.text = myModel.sourcestr;
self.lb_timeStamp.text = myModel.create_time;
self.lb_addOrReduce.text = [NSString stringWithFormat:@"+%@",myModel.socre];
if (self.type == ListVCTypeCoinsDetail) {
self.lb_addOrReduce.text = [NSString stringWithFormat:@"+%@",myModel.socre];
}else if (self.type == ListVCTypeCoinsCost){
self.lb_addOrReduce.text = [NSString stringWithFormat:@"-%@",myModel.socre];
}
}
}
......
//
// HealthKitManager.h
// Open
//
// Created by 雷俊博 on 2019/8/30.
// Copyright © 2019 黄江涛 . All rights reserved.
//
#import <Foundation/Foundation.h>
#import <HealthKit/HealthKit.h>
#import <UIKit/UIDevice.h>
NS_ASSUME_NONNULL_BEGIN
@interface HealthKitManager : NSObject
@property (nonatomic, strong) HKHealthStore *healthStore;
+(id)shareInstance;
- (void)authorizeHealthKit:(void(^)(BOOL success, NSError *error))compltion;
- (void)getStepCount:(void(^)(double value, NSError *error))completion;
- (void)getDistance:(void(^)(double value, NSError *error))completion;
@end
NS_ASSUME_NONNULL_END
//
// OnFootAlertView.h
// Open
//
// Created by 雷俊博 on 2019/9/3.
// Copyright © 2019 黄江涛 . All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface OnFootAlertView : UIView
/** 带block回调的弹窗 */
+ (void)alertWithButtonClickedBlock:(void (^)(void))buttonClickedBlock;
@end
NS_ASSUME_NONNULL_END
//
// OnFootAlertView.m
// Open
//
// Created by 雷俊博 on 2019/9/3.
// Copyright © 2019 黄江涛 . All rights reserved.
//
#import "OnFootAlertView.h"
#import <Masonry.h>
#import "UIColor+Hex.h"
#import "UIButton+CQBlockSupport.h"
#import "Constants.h"
@implementation OnFootAlertView
/** 带block回调的弹窗 */
+ (void)alertWithButtonClickedBlock:(void (^)(void))buttonClickedBlock
{
//大背景
UIView *bgView = [[UIView alloc]init];
[[[[UIApplication sharedApplication] delegate] window] addSubview:bgView];
bgView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.7];
[bgView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(UIEdgeInsetsMake(0, 0, 0, 0));
}];
UIView *backView = [[UIView alloc]init];
backView.backgroundColor = [UIColor clearColor];
[bgView addSubview:backView];
[backView mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.mas_equalTo(bgView);
make.size.mas_equalTo(CGSizeMake(272, 245));
}];
// 背景图片
UIImageView *bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"exercise_coinsAlertView"]];
[backView addSubview:bgImageView];
[bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.mas_equalTo(bgView);
make.size.mas_equalTo(CGSizeMake(272, 245));
}];
UILabel *lb_number = [[UILabel alloc]init];
lb_number.text = @"+100";
lb_number.textAlignment = NSTextAlignmentCenter;
lb_number.textColor = [UIColor colorWithHex:0xfff1d1];
lb_number.font = [UIFont systemFontOfSize:43];
[bgImageView addSubview:lb_number];
[lb_number mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.offset(68);
make.centerX.equalTo(bgImageView);
make.height.offset(35);
}];
UILabel *lb_message = [[UILabel alloc]init];
lb_message.text = @"恭喜!您已完成今日健步走";
lb_message.textAlignment = NSTextAlignmentCenter;
lb_message.textColor = [UIColor colorWithHex:0xfff1d1];
lb_message.font = [UIFont systemFontOfSize:15];
[bgImageView addSubview:lb_message];
[lb_message mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(lb_number.mas_bottom).offset(25);
make.centerX.equalTo(bgImageView);
make.height.offset(15);
}];
UIButton *confirmBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[confirmBtn setTitle:@"确定" forState:UIControlStateNormal];
confirmBtn.backgroundColor = [UIColor clearColor];
[confirmBtn setTitleColor:[UIColor colorWithHex:0xfff1d1] forState:UIControlStateNormal];
confirmBtn.titleLabel.font = [UIFont systemFontOfSize:15];
confirmBtn.layer.cornerRadius = 17.5;
confirmBtn.layer.borderColor = [UIColor colorWithHex:0xfff1d1].CGColor;
confirmBtn.layer.borderWidth = 1.0;
[confirmBtn cq_addAction:^(UIButton *button) {
[bgView removeFromSuperview];
} forControlEvents:UIControlEventTouchUpInside];
[backView addSubview:confirmBtn];
[confirmBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(13 + 15);
make.bottom.offset(-15);
make.size.mas_equalTo(CGSizeMake(101, 35));
}];
UIButton *OtherBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[OtherBtn setTitle:@"去抽奖" forState:UIControlStateNormal];
OtherBtn.backgroundColor = [UIColor colorWithHex:0xfff1d1];
[OtherBtn setTitleColor:[UIColor colorWithHex:0xc95215] forState:UIControlStateNormal];
OtherBtn.titleLabel.font = [UIFont systemFontOfSize:15];
OtherBtn.layer.cornerRadius = 17.5;
[OtherBtn cq_addAction:^(UIButton *button) {
buttonClickedBlock();
[bgView removeFromSuperview];
} forControlEvents:UIControlEventTouchUpInside];
[backView addSubview:OtherBtn];
[OtherBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.offset(-13 - 15);
make.bottom.offset(-15);
make.size.mas_equalTo(CGSizeMake(101, 35));
}];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
//
// PrizeDetailInfoViewController.h
// Open
//
// Created by 雷俊博 on 2019/9/5.
// Copyright © 2019 黄江涛 . All rights reserved.
//
#import <UIKit/UIKit.h>
#import "ListPrizeTableViewCell.h"
NS_ASSUME_NONNULL_BEGIN
@interface PrizeDetailInfoViewController : UIViewController
@property (nonatomic, assign)CTListPrizeType type;
@property (nonatomic, assign)CTListPrizeState state;
@property (nonatomic, strong)NSDictionary *contentDic;
@property (nonatomic, copy) void(^clickBlock)(BOOL);
@end
NS_ASSUME_NONNULL_END
//
// PrizeDetailInfoViewController.m
// Open
//
// Created by 雷俊博 on 2019/9/5.
// Copyright © 2019 黄江涛 . All rights reserved.
//
#import "PrizeDetailInfoViewController.h"
#import "PrizeDetailCardView.h"
#import "PrizeDetailProcessView.h"
#import "SNXUXIANView.h"
#import "CTPrizeDetailProcessTableViewCell.h"
#import "UIColor+Hex.h"
#import "UIButton+ImageTitleSpacing.h"
#import "NSString+AttributedString.h"
#import "Constants.h"
#import "CTAPIBaseManager.h"
#import <Masonry.h>
#import <SVProgressHUD.h>
#import <UIImageView+WebCache.h>
@interface PrizeDetailInfoViewController ()<UITableViewDelegate,UITableViewDataSource>
@property (nonatomic, strong)UIScrollView *scrollView;
@property (nonatomic, strong)UIView *backView;
@property (nonatomic, strong)PrizeDetailCardView *cardView;
@property (nonatomic, strong)PrizeDetailProcessView *processView;
@property (nonatomic, strong)UIImageView * img_connect;
@property (nonatomic, strong)UIImageView * img_connect2;
@property (nonatomic, strong)UILabel *lb_number;
@property (nonatomic, strong)UILabel *lb_moneyNumber;
@property (nonatomic, strong)UILabel *lb_moneyUnit;
@property (nonatomic, strong)UILabel *lb_type;
@property (nonatomic, strong)UILabel *lb_date;
@property (nonatomic, strong)UIButton *btn_getCoins;
@property (nonatomic, strong)SNXUXIANView *lineView;
@property (nonatomic, strong)UILabel *lb_stateTitle;
@property (nonatomic, strong)UILabel *lb_state;
@property (nonatomic, strong)UIButton *btn_bindWx;
@property (nonatomic, strong)UIImageView *img_wxIcon;
@property (nonatomic, strong)UILabel *lb_prizeNameTitle;
@property (nonatomic, strong)UILabel *lb_prizeName;
@property (nonatomic, strong)UITableView *tableView;
@end
@implementation PrizeDetailInfoViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.view.backgroundColor = [UIColor colorWithHex:0xf8502c];
[self.view addSubview:self.scrollView];
if (self.type == CTListPrizeTypeCoins200 || self.type == CTListPrizeTypeCoins388 || self.type == CTListPrizeTypeCoins588) {
self.lb_number.text = [self.contentDic[@"giftName"] stringByReplacingOccurrencesOfString:@"金币" withString:@""];
self.lb_state.text = self.contentDic[@"lotterStatus"];
self.lb_prizeName.text = self.contentDic[@"giftName"];
NSString * state = self.contentDic[@"lotterStatus"];
if ([state isEqualToString:@"未领取"]) {
NSDate *startDate = [self getDateWithDateStr:self.contentDic[@"createTime"]];
NSDate *endDate = [self getDateAfter30DaysWithCurrentDate:startDate];
self.lb_date.text = [NSString stringWithFormat:@"有效期:%@-%@",[self getCustomDateStrWithDate:startDate],[self getCustomDateStrWithDate:endDate]];
[self.btn_getCoins setTitle:@"立即领取" forState:UIControlStateNormal];
[_btn_getCoins setTitleColor:[UIColor colorWithHex:0xfd592f] forState:UIControlStateNormal];
_btn_getCoins.layer.cornerRadius = 20 * WIDTHRADIU;
_btn_getCoins.layer.borderColor = [UIColor colorWithHex:0xfd592f].CGColor;
_btn_getCoins.layer.borderWidth = 1.0;
}else if ([state isEqualToString:@"已领取"]){
NSDate *startDate = [self getDateWithDateStr:self.contentDic[@"createTime"]];
NSDate *endDate = [self getDateAfter30DaysWithCurrentDate:startDate];
self.lb_date.text = [NSString stringWithFormat:@"领取时间:%@",[self getCustomDateStrWithDate:startDate]];
[self.btn_getCoins setTitle:@"已领取" forState:UIControlStateNormal];
[_btn_getCoins setTitleColor:[UIColor colorWithHex:0xb3b3b3] forState:UIControlStateNormal];
_btn_getCoins.layer.cornerRadius = 20 * WIDTHRADIU;
_btn_getCoins.layer.borderColor = [UIColor colorWithHex:0xb3b3b3].CGColor;
_btn_getCoins.layer.borderWidth = 1.0;
_btn_getCoins.userInteractionEnabled = NO;
}else if ([state isEqualToString:@"已过期"]){
NSDate *startDate = [self getDateWithDateStr:self.contentDic[@"createTime"]];
NSDate *endDate = [self getDateAfter30DaysWithCurrentDate:startDate];
self.lb_date.text = [NSString stringWithFormat:@"有效期:%@-%@",[self getCustomDateStrWithDate:startDate],[self getCustomDateStrWithDate:endDate]];
[self.btn_getCoins setTitle:@"已过期" forState:UIControlStateNormal];
[_btn_getCoins setTitleColor:[UIColor colorWithHex:0xb3b3b3] forState:UIControlStateNormal];
_btn_getCoins.layer.cornerRadius = 20 * WIDTHRADIU;
_btn_getCoins.layer.borderColor = [UIColor colorWithHex:0xb3b3b3].CGColor;
_btn_getCoins.layer.borderWidth = 1.0;
_btn_getCoins .userInteractionEnabled = NO;
}
}else if (self.type == CTListPrizeTypePackage2 || self.type == CTListPrizeTypePackage3 || self.type == CTListPrizeTypePackage10){
self.lb_moneyNumber.text = [self.contentDic[@"giftName"] stringByReplacingOccurrencesOfString:@"元红包" withString:@""];
self.lb_type.text = @"金币抽奖红包";
self.lb_stateTitle.text = @"收款微信号";
self.lb_prizeNameTitle.text = @"提现金额";
self.lb_prizeName.text = [self.contentDic[@"giftName"] stringByReplacingOccurrencesOfString:@"话费" withString:@""];
NSString * state = self.contentDic[@"lotterStatus"];
if ([state isEqualToString:@"未领取"]) {
NSDate *startDate = [self getDateWithDateStr:self.contentDic[@"createTime"]];
NSDate *endDate = [self getDateAfter30DaysWithCurrentDate:startDate];
self.lb_date.text = [NSString stringWithFormat:@"有效期:%@-%@",[self getCustomDateStrWithDate:startDate],[self getCustomDateStrWithDate:endDate]];
[self.btn_getCoins setTitle:@"微信提现" forState:UIControlStateNormal];
[_btn_getCoins setTitleColor:[UIColor colorWithHex:0xfd592f] forState:UIControlStateNormal];
_btn_getCoins.layer.cornerRadius = 20 * WIDTHRADIU;
_btn_getCoins.layer.borderColor = [UIColor colorWithHex:0xfd592f].CGColor;
_btn_getCoins.layer.borderWidth = 1.0;
}else if ([state isEqualToString:@"发放中"]){
NSDate *startDate = [self getDateWithDateStr:self.contentDic[@"createTime"]];
NSDate *endDate = [self getDateAfter30DaysWithCurrentDate:startDate];
self.lb_date.text = [NSString stringWithFormat:@"有效期:%@-%@",[self getCustomDateStrWithDate:startDate],[self getCustomDateStrWithDate:endDate]];
[self.btn_getCoins setTitle:@"发放中..." forState:UIControlStateNormal];
[_btn_getCoins setTitleColor:[UIColor colorWithHex:0xfd592f] forState:UIControlStateNormal];
_btn_getCoins.layer.cornerRadius = 20 * WIDTHRADIU;
_btn_getCoins.layer.borderColor = [UIColor colorWithHex:0xfd592f].CGColor;
_btn_getCoins.layer.borderWidth = 1.0;
}else if ([state isEqualToString:@"已领取"]){
NSDate *startDate = [self getDateWithDateStr:self.contentDic[@"createTime"]];
NSDate *endDate = [self getDateAfter30DaysWithCurrentDate:startDate];
self.lb_date.text = [NSString stringWithFormat:@"领取时间:%@",[self getCustomDateStrWithDate:startDate]];
[self.btn_getCoins setTitle:@"已领取" forState:UIControlStateNormal];
[_btn_getCoins setTitleColor:[UIColor colorWithHex:0xb3b3b3] forState:UIControlStateNormal];
_btn_getCoins.layer.cornerRadius = 20 * WIDTHRADIU;
_btn_getCoins.layer.borderColor = [UIColor colorWithHex:0xb3b3b3].CGColor;
_btn_getCoins.layer.borderWidth = 1.0;
_btn_getCoins .userInteractionEnabled = NO;
}else if ([state isEqualToString:@"已过期"]){
NSDate *startDate = [self getDateWithDateStr:self.contentDic[@"createTime"]];
NSDate *endDate = [self getDateAfter30DaysWithCurrentDate:startDate];
self.lb_date.text = [NSString stringWithFormat:@"有效期:%@-%@",[self getCustomDateStrWithDate:startDate],[self getCustomDateStrWithDate:endDate]];
[self.btn_getCoins setTitle:@"已过期" forState:UIControlStateNormal];
[_btn_getCoins setTitleColor:[UIColor colorWithHex:0xb3b3b3] forState:UIControlStateNormal];
_btn_getCoins.layer.cornerRadius = 20 * WIDTHRADIU;
_btn_getCoins.layer.borderColor = [UIColor colorWithHex:0xb3b3b3].CGColor;
_btn_getCoins.layer.borderWidth = 1.0;
_btn_getCoins .userInteractionEnabled = NO;
}else if ([state isEqualToString:@"领取失败"]){
NSDate *startDate = [self getDateWithDateStr:self.contentDic[@"createTime"]];
NSDate *endDate = [self getDateAfter30DaysWithCurrentDate:startDate];
self.lb_date.text = [NSString stringWithFormat:@"有效期:%@-%@",[self getCustomDateStrWithDate:startDate],[self getCustomDateStrWithDate:endDate]];
[self.btn_getCoins setTitle:@"重新领取" forState:UIControlStateNormal];
[_btn_getCoins setTitleColor:[UIColor colorWithHex:0xfd592f] forState:UIControlStateNormal];
_btn_getCoins.layer.cornerRadius = 20 * WIDTHRADIU;
_btn_getCoins.layer.borderColor = [UIColor colorWithHex:0xfd592f].CGColor;
_btn_getCoins.layer.borderWidth = 1.0;
}
[self requestBindAPI];
}
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[JANALYTICSService startLogPageView:@"奖品详情"];
[MobClick beginLogPageView:@"奖品详情"];
}
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
[JANALYTICSService stopLogPageView:@"奖品详情"];
[MobClick endLogPageView:@"奖品详情"];
}
- (void)viewWillLayoutSubviews
{
[super viewWillLayoutSubviews];
if (self.type == CTListPrizeTypeCoins200 || self.type == CTListPrizeTypeCoins388 || self.type == CTListPrizeTypeCoins588 ) {
[self.lb_number mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.cardView);
make.top.offset(35 * WIDTHRADIU);
make.height.offset(55 * WIDTHRADIU);
}];
[self.lb_type mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.cardView);
make.top.equalTo(self.lb_number.mas_bottom).offset(14 * WIDTHRADIU);
make.height.offset(14 * WIDTHRADIU);
}];
}else{
[self.lb_moneyNumber mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.cardView).offset(-15 * WIDTHRADIU);
make.top.offset(35 * WIDTHRADIU);
make.height.offset(55 * WIDTHRADIU);
}];
[self.lb_moneyUnit mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(self.lb_moneyNumber);
make.left.equalTo(self.lb_moneyNumber.mas_right).offset(5 * WIDTHRADIU);
make.height.offset(15 * WIDTHRADIU);
}];
[self.lb_type mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.cardView);
make.top.equalTo(self.lb_moneyNumber.mas_bottom).offset(14 * WIDTHRADIU);
make.height.offset(14 * WIDTHRADIU);
}];
if (self.state == CTListPrizeStateUnGet || self.state == CTListPrizeStateInvalid || self.state == CTListPrizeTypeUnKnow) {
}else{
[self.img_connect mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.cardView).offset(50 * WIDTHRADIU);
make.top.equalTo(self.cardView.mas_bottom).offset(-14 * WIDTHRADIU);
make.width.offset(10 * WIDTHRADIU);
make.height.offset(43 * WIDTHRADIU);
}];
[self.img_connect2 mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.cardView).offset(-50 * WIDTHRADIU);
make.top.equalTo(self.cardView.mas_bottom).offset(-14 * WIDTHRADIU);
make.width.offset(10 * WIDTHRADIU);
make.height.offset(43 * WIDTHRADIU);
}];
}
}
[self.lb_date mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.cardView);
make.top.equalTo(self.lb_type.mas_bottom).offset(6 * WIDTHRADIU);
make.height.offset(14 * WIDTHRADIU);
}];
[self.btn_getCoins mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.lb_date.mas_bottom).offset(20 * WIDTHRADIU);
make.left.offset(30 * WIDTHRADIU);
make.right.offset(-30 * WIDTHRADIU);
make.height.offset(40 * WIDTHRADIU);
}];
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.btn_getCoins.mas_bottom).offset(21 * WIDTHRADIU);
make.left.offset(8 * WIDTHRADIU);
make.right.offset(- 8 * WIDTHRADIU);
make.height.offset(0.5);
}];
[self.lb_stateTitle mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.lineView.mas_bottom).offset(15 * WIDTHRADIU);
make.left.offset(14 * WIDTHRADIU);
make.height.offset(14 * WIDTHRADIU);
}];
if (self.type == CTListPrizeTypeCoins200 || self.type == CTListPrizeTypeCoins388 || self.type == CTListPrizeTypeCoins588) {
[self.lb_state mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(self.lb_stateTitle);
make.right.offset(-27 * WIDTHRADIU);
make.height.offset(14 * WIDTHRADIU);
}];
}else {
[self.btn_bindWx mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(self.lb_stateTitle);
make.right.offset(-27 * WIDTHRADIU);
make.height.offset(14 * WIDTHRADIU);
}];
[self.img_wxIcon mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(self.btn_bindWx);
make.right.equalTo(self.btn_bindWx.mas_left).offset(-3);
make.width.height.offset(20 * WIDTHRADIU);
}];
}
[self.lb_prizeNameTitle mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.lb_stateTitle.mas_bottom).offset(15 * WIDTHRADIU);
make.left.equalTo(self.lb_stateTitle);
make.height.offset(14 * WIDTHRADIU);
}];
[self.lb_prizeName mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(self.lb_prizeNameTitle);
make.right.offset(-27 * WIDTHRADIU);
make.height.offset(14 * WIDTHRADIU);
}];
}
#pragma mark - UITableViewDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section;
{
return 3;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *stringIdentifier = @"cell";
CTPrizeDetailProcessTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:stringIdentifier];
cell.currented = YES;
if (indexPath.row == 0) {
cell.hasUpLine = NO;
cell.hasDownLine = YES;
}else if (indexPath.row == 1){
cell.hasUpLine = YES;
cell.hasDownLine = YES;
}else if (indexPath.row == 2){
cell.hasUpLine = YES;
cell.hasDownLine = NO;
}
[cell reloadUIWithData:self.contentDic state:self.state Index:indexPath.row];
return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 54 * WIDTHRADIU;
}
#pragma mark - 字符串转日期后30天后的日期
- (NSDate *)getDateWithDateStr:(NSString *)str
{
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyy/MM/dd"];
NSDate *date = [dateFormatter dateFromString:str];
return date;
}
- (NSDate *)getDate2WithDateStr:(NSString *)str
{
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
NSDate *date = [dateFormatter dateFromString:str];
return date;
}
- (NSDate *)getDateAfter30DaysWithCurrentDate:(NSDate *)date
{
NSDate *newDate = [date dateByAddingTimeInterval:30 * 60 * 60 * 24];
return newDate;
}
- (NSString *)getCustomDateStrWithDate:(NSDate *)date
{
// 获取代表公历的NSCalendar对象
NSCalendar *gregorian = [[NSCalendar alloc]
initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
// 定义一个时间字段的旗标,指定将会获取指定年、月、日、时、分、秒的信息
unsigned unitFlags = NSCalendarUnitYear |
NSCalendarUnitMonth | NSCalendarUnitDay |
NSCalendarUnitHour | NSCalendarUnitMinute |
NSCalendarUnitSecond | NSCalendarUnitWeekday;
// 获取不同时间字段的信息
NSDateComponents* comp = [gregorian components: unitFlags
fromDate:date];
// 获取各时间字段的数值
NSLog(@"现在是%ld年" , comp.year);
NSLog(@"现在是%ld月 " , comp.month);
NSLog(@"现在是%ld日" , comp.day);
NSLog(@"现在是%ld时" , comp.hour);
NSLog(@"现在是%ld分" , comp.minute);
NSLog(@"现在是%ld秒" , comp.second);
NSLog(@"现在是星期%ld" , comp.weekday);
return [NSString stringWithFormat:@"%ld.%ld.%ld",(long)comp.year,comp.month,comp.day];
}
- (NSString *)getCustom2DateStrWithDate:(NSDate *)date
{
// 获取代表公历的NSCalendar对象
NSCalendar *gregorian = [[NSCalendar alloc]
initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
// 定义一个时间字段的旗标,指定将会获取指定年、月、日、时、分、秒的信息
unsigned unitFlags = NSCalendarUnitYear |
NSCalendarUnitMonth | NSCalendarUnitDay |
NSCalendarUnitHour | NSCalendarUnitMinute |
NSCalendarUnitSecond | NSCalendarUnitWeekday;
// 获取不同时间字段的信息
NSDateComponents* comp = [gregorian components: unitFlags
fromDate:date];
// 获取各时间字段的数值
NSLog(@"现在是%ld年" , comp.year);
NSLog(@"现在是%ld月 " , comp.month);
NSLog(@"现在是%ld日" , comp.day);
NSLog(@"现在是%ld时" , comp.hour);
NSLog(@"现在是%ld分" , comp.minute);
NSLog(@"现在是%ld秒" , comp.second);
NSLog(@"现在是星期%ld" , comp.weekday);
return [NSString stringWithFormat:@"%ld.%ld.%ld %ld:%ld",(long)comp.year,comp.month,comp.day,comp.hour,comp.minute];
}
#pragma mark - event response
- (void)btnClick:(UIButton *)sender
{
if (self.type == CTListPrizeTypePackage2 ||self.type == CTListPrizeTypePackage3 || self.type == CTListPrizeTypePackage10) {
if (![[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"wechat://"]] ) {
[SVProgressHUD showErrorWithStatus:@"您未安装微信\n只支持微信提现哟!"];
return;
}
if ([sender.titleLabel.text isEqualToString:@"绑定微信提现"]) {
[self getUserInfoForPlatform:UMSocialPlatformType_WechatSession];
}else if ([sender.titleLabel.text isEqualToString:@"微信提现"]){
[self withdrawCash];
sender.userInteractionEnabled = NO;
}else if ([sender.titleLabel.text isEqualToString:@"重新领取"]){
[self withdrawCash];
sender.userInteractionEnabled = NO;
}
}else if (self.type == CTListPrizeTypeCoins200 || self.type == CTListPrizeTypeCoins388 || self.type == CTListPrizeTypeCoins588){
if ([sender.titleLabel.text isEqualToString:@"立即领取"]) {
[self requestGetCoins];
}
}
}
- (void)bindWXClick:(UIButton *)sender
{
if ([sender.titleLabel.text isEqualToString:@"未绑定"]) {
if (![[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"wechat://"]] ) {
[SVProgressHUD showErrorWithStatus:@"您未安装微信\n只支持微信提现哟!"];
return;
}
[self getUserInfoForPlatform:UMSocialPlatformType_WechatSession];
sender.userInteractionEnabled = NO;
}
}
#pragma mark - api 调用
- (void)requestBindAPI
{
WeakSelf
NSString *url = [NSString stringWithFormat:@"%@scorepay/validateBind",CoinsBaseUrl];
NSDictionary *dic = @{
@"userid":[NSNumber numberWithInteger:[getPeopleID PeopleID]],
@"telephone": [EnercryTool encryptUseDES:[getPeopleID PeopleIphoneNmber] key:DESKEY],
@"requestTimeStamp":[NSNumber numberWithInteger:[self getNowTimeTimestamp3]],
@"fromModel":@"2",
@"accounttype":[NSNumber numberWithInt:1],
};
NSArray *result = [dic.allKeys sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) {
NSLog(@"%@~%@",obj1,obj2); //3~4 2~1 3~1 3~2
return [obj1 compare:obj2]; //升序
}];
NSString *sign = nil;
for (int i = 0; i < result.count; i++) {
NSString *key = result[i];
if (i==0) {
sign = [NSString stringWithFormat:@"%@=%@",key,dic[key]];
}else{
sign = [NSString stringWithFormat:@"%@&%@=%@",sign,key,dic[key]];
}
}
sign = [NSString stringWithFormat:@"%@&weface9578",sign];
NSMutableDictionary *params = [[NSMutableDictionary alloc]initWithDictionary:dic];
NSString *signString = [[MyMD5 md5:sign] lowercaseString];
[params setObject:signString forKey:@"sign"];
[CTAPIBaseManager POST:url params:params completionHandler:^(id _Nonnull responseObject, NSError * _Nonnull error) {
self.btn_bindWx.userInteractionEnabled = NO;
if (error) {
[SVProgressHUD showInfoWithStatus:@"无网络"];
return ;
}
if (responseObject) {
NSNumber *code = responseObject[@"code"];
NSString *des = responseObject[@"des"];
if ([code isKindOfClass:[NSNumber class]]) {
if (code.integerValue == 0) {
if (weakSelf.state == CTListPrizeStateUnGet) {
[weakSelf.btn_getCoins setTitle:@"微信提现" forState:UIControlStateNormal];
}
NSString *screenName = [NSString blankString:responseObject[@"result"][@"screenName"]] ? @"" : responseObject[@"result"][@"screenName"];
NSString *iconUrl = [NSString blankString:responseObject[@"result"][@"iconUrl"]] ? @"" : responseObject[@"result"][@"iconUrl"];
[weakSelf.btn_bindWx setTitle:screenName forState:UIControlStateNormal];
[weakSelf.btn_bindWx layoutButtonWithEdgeInsetsStyle:GLButtonEdgeInsetsStyleRight imageTitleSpace:3];
[weakSelf.img_wxIcon sd_setImageWithURL:[NSURL URLWithString:iconUrl] placeholderImage:[UIImage imageNamed:@"my_information_headportrait_default"]];
self.btn_bindWx.userInteractionEnabled = NO;
}else if (code.integerValue == 1018){
if (weakSelf.state == CTListPrizeStateUnGet) {
[weakSelf.btn_getCoins setTitle:@"绑定微信提现" forState:UIControlStateNormal];
}
}else{
[SVProgressHUD showInfoWithStatus:des];
}
}else{
[SVProgressHUD showInfoWithStatus:@"服务器错误"];
}
}
}];
}
- (void)bindWxApiWithParams:(NSDictionary *)dic
{
NSString *url = [NSString stringWithFormat:@"%@scorepay/accountBind",CoinsBaseUrl];
NSDictionary *dic2 = @{
@"userid":[NSNumber numberWithInteger:[getPeopleID PeopleID]],
@"telephone": [EnercryTool encryptUseDES:[getPeopleID PeopleIphoneNmber] key:DESKEY],
@"accounttype":[NSNumber numberWithInt:1],
@"requestTimeStamp":[NSNumber numberWithInteger:[self getNowTimeTimestamp3]],
@"fromModel":@"2",
@"accounttype":[NSNumber numberWithInt:1],
};
NSMutableDictionary *dic3 = [[NSMutableDictionary alloc]initWithDictionary:dic];
[dic3 addEntriesFromDictionary:dic2];
NSArray *result = [dic3.allKeys sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) {
NSLog(@"%@~%@",obj1,obj2); //3~4 2~1 3~1 3~2
return [obj1 compare:obj2]; //升序
}];
NSString *sign = nil;
for (int i = 0; i < result.count; i++) {
NSString *key = result[i];
if (i==0) {
sign = [NSString stringWithFormat:@"%@=%@",key,dic3[key]];
}else{
sign = [NSString stringWithFormat:@"%@&%@=%@",sign,key,dic3[key]];
}
}
sign = [NSString stringWithFormat:@"%@&weface9578",sign];
NSMutableDictionary *params = [[NSMutableDictionary alloc]initWithDictionary:dic3];
NSString *signString = [[MyMD5 md5:sign] lowercaseString];
[params setObject:signString forKey:@"sign"];
NSString *username = dic3[@"screenname"];
[params setObject:[username stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLPathAllowedCharacterSet]] forKey:@"screenname"];
WeakSelf
[CTAPIBaseManager POST:url params:params completionHandler:^(id _Nonnull responseObject, NSError * _Nonnull error) {
if (error) {
[SVProgressHUD showInfoWithStatus:@"无网络"];
return ;
}
if (responseObject) {
NSNumber *code = responseObject[@"code"];
NSString *des = responseObject[@"des"];
if ([code isKindOfClass:[NSNumber class]]) {
if (code.integerValue == 0) {
weakSelf.clickBlock(YES);
[weakSelf.btn_getCoins setTitle:@"微信提现" forState:UIControlStateNormal];
NSString *screenName = username ? username : @"";
NSString *iconUrl = dic[@"iconurl"];
[weakSelf.btn_bindWx setTitle:screenName forState:UIControlStateNormal];
[weakSelf.btn_bindWx layoutButtonWithEdgeInsetsStyle:GLButtonEdgeInsetsStyleRight imageTitleSpace:3];
[weakSelf.img_wxIcon sd_setImageWithURL:[NSURL URLWithString:iconUrl] placeholderImage:[UIImage imageNamed:@"my_information_headportrait_default"]];
}else if (code.integerValue == 1018){
[weakSelf.btn_getCoins setTitle:@"绑定微信提现" forState:UIControlStateNormal];
}else{
[SVProgressHUD showInfoWithStatus:des];
}
}else{
[SVProgressHUD showInfoWithStatus:@"服务器错误"];
}
}
}];
}
#pragma mark - 绑定微信
- (void)getUserInfoForPlatform:(UMSocialPlatformType)platformType
{WeakSelf
[[UMSocialManager defaultManager] getUserInfoWithPlatform:platformType currentViewController:self completion:^(id result, NSError *error) {
NSLog(@">>>>>wx>>result:%@, error:%@",result,error);
if (error) {
[SVProgressHUD showErrorWithStatus:@"微信授权失败!"];
return;
}
UMSocialUserInfoResponse *resp = result;
if(resp.uid ){
if (!resp.name) {
resp.name =@"";
}
if (!resp.iconurl) {
resp.iconurl=@"";
}
}
// 第三方登录数据(为空表示平台未提供)
// 授权数据
NSLog(@" uid: %@", resp.uid);//uuid
NSLog(@" openid: %@", resp.openid);
NSLog(@" accessToken: %@", resp.accessToken);
NSLog(@" refreshToken: %@", resp.refreshToken);
NSLog(@" expiration: %@", resp.expiration);
// 用户数据
NSLog(@" name: %@", resp.name);
NSLog(@" iconurl: %@", resp.iconurl);
NSLog(@" gender: %@", resp.gender);
// 第三方平台SDK原始数据
NSLog(@" originalResponse: %@", resp.originalResponse);
NSDictionary *dic = @{
@"iconurl":resp.iconurl ? resp.iconurl :@"",
@"openid":resp.openid ? resp.openid : @"",
@"uid":resp.uid ? resp.uid : @"",
@"token":resp.accessToken ? resp.accessToken : @"",
@"screenname":resp.name ? resp.name : @"",
};
[weakSelf bindWxApiWithParams:dic];
}];
}
- (void)withdrawCash
{
[SVProgressHUD shows];
WeakSelf
NSString *url = [NSString stringWithFormat:@"%@scorepay/cashMoney",CoinsBaseUrl];
NSDictionary *dic = @{
@"recordId":self.contentDic[@"recordId"],
@"userorderno":self.contentDic[@"userorderno"] ? self.contentDic[@"userorderno"] : @"",
@"giftId":self.contentDic[@"giftId"],
@"userid":[NSNumber numberWithInteger:[getPeopleID PeopleID]],
@"telephone": [EnercryTool encryptUseDES:[getPeopleID PeopleIphoneNmber] key:DESKEY],
@"requestTimeStamp":[NSNumber numberWithInteger:[self getNowTimeTimestamp3]],
@"paystyle":[NSNumber numberWithInt:1],
};
NSArray *result = [dic.allKeys sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) {
NSLog(@"%@~%@",obj1,obj2); //3~4 2~1 3~1 3~2
return [obj1 compare:obj2]; //升序
}];
NSString *sign = nil;
for (int i = 0; i < result.count; i++) {
NSString *key = result[i];
if (i==0) {
sign = [NSString stringWithFormat:@"%@=%@",key,dic[key]];
}else{
sign = [NSString stringWithFormat:@"%@&%@=%@",sign,key,dic[key]];
}
}
sign = [NSString stringWithFormat:@"%@&kw#8ra",sign];
NSMutableDictionary *params = [[NSMutableDictionary alloc]initWithDictionary:dic];
NSString *signString = [[MyMD5 md5:sign] lowercaseString];
[params setObject:signString forKey:@"sign"];
[CTAPIBaseManager POST:url params:params completionHandler:^(id _Nonnull responseObject, NSError * _Nonnull error) {
weakSelf.btn_getCoins.userInteractionEnabled = YES;
[SVProgressHUD doneShow];
[SVProgressHUD dismiss];
if (error) {
[SVProgressHUD showInfoWithStatus:@"无网络"];
return ;
}
if (responseObject) {
NSNumber *code = responseObject[@"code"];
NSString *des = responseObject[@"des"];
if ([code isKindOfClass:[NSNumber class]]) {
if (code.integerValue == 0) {
weakSelf.clickBlock(YES);
[weakSelf.btn_getCoins setTitle:@"已领取" forState:UIControlStateNormal];
[weakSelf.btn_getCoins setTitleColor:[UIColor colorWithHex:0xb3b3b3] forState:UIControlStateNormal];
weakSelf.btn_getCoins.layer.cornerRadius = 20 * WIDTHRADIU;
weakSelf.btn_getCoins.layer.borderColor = [UIColor colorWithHex:0xb3b3b3].CGColor;
weakSelf.btn_getCoins.layer.borderWidth = 1.0;
weakSelf.btn_getCoins .userInteractionEnabled = NO;
NSString *payTime = responseObject[@"result"][@"payTime"];
weakSelf.lb_date.text = [NSString stringWithFormat:@"领取时间:%@",[weakSelf getCustom2DateStrWithDate:[weakSelf getDate2WithDateStr:payTime]]];
NSMutableDictionary *dic = [weakSelf.contentDic mutableCopy];
[dic setObject:[weakSelf getCustomDateStrWithDate:[weakSelf getDate2WithDateStr:payTime]] forKey:@"payTime"];
[dic setObject:[weakSelf getCustomDateStrWithDate:[NSDate date]] forKey:@"orderRequestTime"];
self.contentDic = dic;
if (weakSelf.state == CTListPrizeStateUnGet) {
weakSelf.state = CTListPrizeStateReceived;
[weakSelf withDrawrefreshUI];
}else if (weakSelf.state == CTListPrizeStateFailure){
weakSelf.state = CTListPrizeStateReceived;
[weakSelf.tableView reloadData];
}
}else if (code.integerValue == 1017){
[SVProgressHUD showInfoWithStatus:@"提现失败"];
}else if (code.integerValue == 1018){
[SVProgressHUD showInfoWithStatus:@"账户未授权"];
}else if (code.integerValue == 1023){
[SVProgressHUD showInfoWithStatus:@"账户异常"];
}else if (code.integerValue == 1024){
[SVProgressHUD showInfoWithStatus:@"账户异常"];
}else{
[SVProgressHUD showInfoWithStatus:@" 请确定微信账号 \n 是否已实名 "];
if (self.state == CTListPrizeStateUnGet) {
weakSelf.clickBlock(YES);
[weakSelf.btn_getCoins setTitle:@"重新领取" forState:UIControlStateNormal];
weakSelf.state = CTListPrizeStateFailure;
[weakSelf withDrawrefreshUI];
}
}
} else{
[SVProgressHUD showInfoWithStatus:@"无网络"];
}
}
}];
}
//领取金币
- (void)requestGetCoins
{
[SVProgressHUD shows];
WeakSelf
NSString *url = [NSString stringWithFormat:@"%@score/excharge",CoinsBaseUrl];
NSDictionary *dic = @{
@"telphone": [EnercryTool encryptUseDES:[getPeopleID PeopleIphoneNmber] key:DESKEY],
@"sysorderNo":self.contentDic[@"recordId"] ? [NSString stringWithFormat:@"%@",self.contentDic[@"recordId"]] : @"",
@"userId":[NSString stringWithFormat:@"%ld",[getPeopleID PeopleID]],
@"requestTimeStamp":[NSNumber numberWithInteger:[self getNowTimeTimestamp3]]
};
NSArray *result = [dic.allKeys sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) {
NSLog(@"%@~%@",obj1,obj2); //3~4 2~1 3~1 3~2
return [obj1 compare:obj2]; //升序
}];
NSString *sign = nil;
for (int i = 0; i < result.count; i++) {
NSString *key = result[i];
if (i==0) {
sign = [NSString stringWithFormat:@"%@=%@",key,dic[key]];
}else{
sign = [NSString stringWithFormat:@"%@&%@=%@",sign,key,dic[key]];
}
}
sign = [NSString stringWithFormat:@"%@&kk#d12",sign];
NSMutableDictionary *params = [[NSMutableDictionary alloc]initWithDictionary:dic];
NSString *signString = [[MyMD5 md5:sign] lowercaseString];
[params setObject:signString forKey:@"sign"];
[CTAPIBaseManager POST:url params:params completionHandler:^(id _Nonnull responseObject, NSError * _Nonnull error) {
[SVProgressHUD doneShow];
[SVProgressHUD dismiss];
if (error) {
[SVProgressHUD showInfoWithStatus:@"无网络"];
return ;
}
if (responseObject) {
NSNumber *code = responseObject[@"code"];
NSString *des = responseObject[@"des"];
if ([code isKindOfClass:[NSNumber class]]) {
if (code.integerValue == 0) {
weakSelf.clickBlock(YES);
[weakSelf.btn_getCoins setTitle:@"已领取" forState:UIControlStateNormal];
[weakSelf.btn_getCoins setTitleColor:[UIColor colorWithHex:0xb3b3b3] forState:UIControlStateNormal];
weakSelf.btn_getCoins.layer.cornerRadius = 20 * WIDTHRADIU;
weakSelf.btn_getCoins.layer.borderColor = [UIColor colorWithHex:0xb3b3b3].CGColor;
weakSelf.btn_getCoins.layer.borderWidth = 1.0;
weakSelf.btn_getCoins .userInteractionEnabled = NO;
weakSelf.lb_state.text = @"已领取";
}else{
[SVProgressHUD showInfoWithStatus:des];
}
} else{
[SVProgressHUD showInfoWithStatus:@"服务器错误"];
}
}
}];
}
//点击提现后,重新刷新UI
- (void)withDrawrefreshUI
{
[self.backView addSubview:self.processView];
[self.backView addSubview:self.img_connect];
[self.backView addSubview:self.img_connect2];
[self.img_connect mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.cardView).offset(50 * WIDTHRADIU);
make.top.equalTo(self.cardView.mas_bottom).offset(-14 * WIDTHRADIU);
make.width.offset(10 * WIDTHRADIU);
make.height.offset(43 * WIDTHRADIU);
}];
[self.img_connect2 mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.cardView).offset(-50 * WIDTHRADIU);
make.top.equalTo(self.cardView.mas_bottom).offset(-14 * WIDTHRADIU);
make.width.offset(10 * WIDTHRADIU);
make.height.offset(43 * WIDTHRADIU);
}];
}
#pragma mark - 获取当前时间戳
-(NSInteger )getNowTimeTimestamp3{
NSDateFormatter *formatter = [[NSDateFormatter alloc] init] ;
[formatter setDateStyle:NSDateFormatterMediumStyle];
[formatter setTimeStyle:NSDateFormatterShortStyle];
[formatter setDateFormat:@"YYYY-MM-dd HH:mm:ss SSS"]; // ----------设置你想要的格式,hh与HH的区别:分别表示12小时制,24小时制
//设置时区,这个对于时间的处理有时很重要
NSTimeZone* timeZone = [NSTimeZone timeZoneWithName:@"Asia/Beijing"];
[formatter setTimeZone:timeZone];
NSDate *datenow = [NSDate date];//现在时间,你可以输出来看下是什么格式
NSInteger timeSp = [datenow timeIntervalSince1970]*1000;
return timeSp;
}
#pragma mark - getters and setters
- (UIScrollView *)scrollView
{
if (!_scrollView) {
_scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, ScreenWidth, ScreenHeight - cl_kNavigationBarHeight)];
_scrollView.backgroundColor = [UIColor clearColor];
_scrollView.contentSize = CGSizeMake(ScreenWidth, ScreenHeight);
_scrollView.showsHorizontalScrollIndicator = NO;
_scrollView.showsVerticalScrollIndicator = NO;
[_scrollView addSubview:self.backView];
}
return _scrollView;
}
- (UIView *)backView
{
if (!_backView) {
_backView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenWidth, ScreenHeight * 1)];
_backView.backgroundColor = [UIColor clearColor];
[_backView addSubview:self.cardView];
if (self.type == CTListPrizeTypeCoins200 || self.type == CTListPrizeTypeCoins388 || self.type == CTListPrizeTypeCoins588) {
}else{
if (self.state == CTListPrizeStateUnGet || self.state == CTListPrizeStateInvalid || self.state == CTListPrizeTypeUnKnow) {
}else{
[_backView addSubview:self.processView];
[_backView addSubview:self.img_connect];
[_backView addSubview:self.img_connect2];
}
}
}
return _backView;
}
- (PrizeDetailCardView *)cardView
{
if (!_cardView) {
_cardView = [[PrizeDetailCardView alloc]initWithFrame:CGRectMake(10 * WIDTHRADIU, 10 * WIDTHRADIU , ScreenWidth - 20 * WIDTHRADIU, 304 * WIDTHRADIU)];
_cardView.backgroundColor = [UIColor whiteColor];
if (self.type == CTListPrizeTypeCoins200 || self.type == CTListPrizeTypeCoins388 || self.type == CTListPrizeTypeCoins588) {
[_cardView addSubview:self.lb_number];
}else{
[_cardView addSubview:self.lb_moneyNumber];
[_cardView addSubview:self.lb_moneyUnit];
}
[_cardView addSubview:self.lb_type];
[_cardView addSubview:self.lb_date];
[_cardView addSubview:self.btn_getCoins];
[_cardView addSubview:self.lineView];
[_cardView addSubview:self.lb_stateTitle];
if ( self.type == CTListPrizeTypeCoins200 || self.type == CTListPrizeTypeCoins388 || self.type == CTListPrizeTypeCoins588) {
[_cardView addSubview:self.lb_state];
}else{
[_cardView addSubview:self.btn_bindWx];
[_cardView addSubview:self.img_wxIcon];
}
[_cardView addSubview:self.lb_prizeNameTitle];
[_cardView addSubview:self.lb_prizeName];
}
return _cardView;
}
- (PrizeDetailProcessView *)processView
{
if (!_processView) {
_processView = [[PrizeDetailProcessView alloc]initWithFrame:CGRectMake(10 * WIDTHRADIU, 329 * WIDTHRADIU, ScreenWidth - 20 * WIDTHRADIU, 210 * WIDTHRADIU)];
_processView.backgroundColor = [UIColor whiteColor];
[_processView addSubview:self.tableView];
}
return _processView;
}
- (UIImageView *)img_connect
{
if (!_img_connect) {
_img_connect = [[UIImageView alloc]init];
_img_connect.image = [UIImage imageNamed:@"关联"];
}
return _img_connect;
}
- (UIImageView *)img_connect2
{
if (!_img_connect2) {
_img_connect2 = [[UIImageView alloc]init];
_img_connect2.image = [UIImage imageNamed:@"关联"];
}
return _img_connect2;
}
- (UILabel *)lb_number
{
if (!_lb_number) {
_lb_number = [[UILabel alloc]init];
_lb_number.textColor = [UIColor colorWithHex:0xfe5733];
_lb_number.textAlignment = NSTextAlignmentCenter;
_lb_number.font = [UIFont systemFontOfSize:70 * WIDTHRADIU];
_lb_number.text = @"10";
}
return _lb_number;
}
- (UILabel *)lb_moneyNumber
{
if (!_lb_moneyNumber) {
_lb_moneyNumber = [[UILabel alloc]init];
_lb_moneyNumber.textColor = [UIColor colorWithHex:0xfe5733];
_lb_moneyNumber.textAlignment = NSTextAlignmentCenter;
_lb_moneyNumber.font = [UIFont systemFontOfSize:70 * WIDTHRADIU];
_lb_moneyNumber.text = @"10";
}
return _lb_moneyNumber;
}
- (UILabel *)lb_moneyUnit
{
if (!_lb_moneyUnit) {
_lb_moneyUnit = [[UILabel alloc]init];
_lb_moneyUnit.textColor = [UIColor colorWithHex:0xfe5733];
_lb_moneyUnit.textAlignment = NSTextAlignmentCenter;
_lb_moneyUnit.font = [UIFont systemFontOfSize:15 * WIDTHRADIU];
_lb_moneyUnit.text = @"元";
}
return _lb_moneyUnit;
}
//- (UILabel *)lb_unit
//{
// if (!_lb_unit) {
// _lb_unit = [[UILabel alloc]init];
// _lb_unit.textColor = [UIColor whiteColor];
// _lb_unit.textAlignment = NSTextAlignmentCenter;
// _lb_unit.font = [UIFont systemFontOfSize:13 * WIDTHRADIU];
// _lb_unit.text = @"元";
// }
// return _lb_unit;
//}
- (UILabel *)lb_type
{
if (!_lb_type) {
_lb_type = [[UILabel alloc]init];
_lb_type.textAlignment = NSTextAlignmentCenter;
_lb_type.textColor = [UIColor colorWithHex:0x808080];
_lb_type.font = [UIFont systemFontOfSize:14 * WIDTHRADIU];
_lb_type.text = @"金币奖励";
}
return _lb_type;
}
- (UILabel *)lb_date
{
if (!_lb_date) {
_lb_date = [[UILabel alloc]init];
_lb_date.text = @"有效期:2019.09.02-2019.10.02";
_lb_date.textColor = [UIColor colorWithHex:0x808080];
_lb_date.font = [UIFont systemFontOfSize:14 * WIDTHRADIU];
}
return _lb_date;
}
- (UIButton *)btn_getCoins
{
if (!_btn_getCoins) {
_btn_getCoins = [UIButton buttonWithType:UIButtonTypeCustom];
_btn_getCoins.titleLabel.font = [UIFont systemFontOfSize:15 * WIDTHRADIU];
_btn_getCoins.backgroundColor = [UIColor clearColor];
[_btn_getCoins addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
}
return _btn_getCoins;
}
- (SNXUXIANView *)lineView
{
if (!_lineView) {
_lineView = [[SNXUXIANView alloc]init];
}
return _lineView;
}
- (UILabel *)lb_stateTitle
{
if (!_lb_stateTitle) {
_lb_stateTitle = [[UILabel alloc]init];
_lb_stateTitle.text = @"领取状态";
_lb_stateTitle.textColor = [UIColor colorWithHex:0x808080];
_lb_stateTitle.font = [UIFont systemFontOfSize:14 * WIDTHRADIU];
}
return _lb_stateTitle;
}
- (UILabel *)lb_state
{
if (!_lb_state) {
_lb_state = [[UILabel alloc]init];
_lb_state.text = @"实时到账";
_lb_state.textColor = [UIColor colorWithHex:0x808080];
_lb_state.font = [UIFont systemFontOfSize:14 * WIDTHRADIU];
}
return _lb_state;
}
- (UIButton *)btn_bindWx
{
if (!_btn_bindWx) {
_btn_bindWx = [UIButton buttonWithType:UIButtonTypeCustom];
[_btn_bindWx setTitleColor:[UIColor colorWithHex:0x808080] forState:UIControlStateNormal];
_btn_bindWx.titleLabel.font = [UIFont systemFontOfSize:14 * WIDTHRADIU];
[_btn_bindWx setImage:[UIImage imageNamed:@"my_arrow_normal"] forState:UIControlStateNormal];
[_btn_bindWx setTitle:@"未绑定" forState:UIControlStateNormal];
[_btn_bindWx layoutButtonWithEdgeInsetsStyle:GLButtonEdgeInsetsStyleRight imageTitleSpace:0];
[_btn_bindWx addTarget:self action:@selector(bindWXClick:) forControlEvents:UIControlEventTouchUpInside];
}
return _btn_bindWx;
}
- (UIImageView *)img_wxIcon
{
if (!_img_wxIcon) {
_img_wxIcon = [[UIImageView alloc]init];
_img_wxIcon.layer.cornerRadius = 10 * WIDTHRADIU;
_img_wxIcon.layer.masksToBounds = YES;
}
return _img_wxIcon;
}
- (UILabel *)lb_prizeNameTitle
{
if (!_lb_prizeNameTitle) {
_lb_prizeNameTitle = [[UILabel alloc]init];
_lb_prizeNameTitle.text = @"奖品名称";
_lb_prizeNameTitle.textColor = [UIColor colorWithHex:0x808080];
_lb_prizeNameTitle.font = [UIFont systemFontOfSize:14 * WIDTHRADIU];
}
return _lb_prizeNameTitle;
}
- (UILabel *)lb_prizeName
{
if (!_lb_prizeName) {
_lb_prizeName = [[UILabel alloc]init];
_lb_prizeName.text = @"200金币";
_lb_prizeName.textColor = [UIColor colorWithHex:0x808080];
_lb_prizeName.font = [UIFont systemFontOfSize:14 * WIDTHRADIU];
}
return _lb_prizeName;
}
- (UITableView *)tableView
{
if (!_tableView ) {
_tableView = [[UITableView alloc]initWithFrame:CGRectMake(10 * WIDTHRADIU, 30 * WIDTHRADIU, ScreenWidth - 40 * WIDTHRADIU, 160 * WIDTHRADIU) style:UITableViewStylePlain];
_tableView.showsHorizontalScrollIndicator = YES;
_tableView.showsVerticalScrollIndicator = NO;
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_tableView.backgroundColor = [UIColor clearColor];
_tableView.delegate = self;
_tableView.dataSource = self;
_tableView.scrollEnabled = NO;
[_tableView registerClass:[CTPrizeDetailProcessTableViewCell class] forCellReuseIdentifier:@"cell"];
_tableView.tableFooterView = [UIView new];
}
return _tableView;
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
//
// CTPrizeDetailProcessTableCellContentView.h
// Open
//
// Created by 雷俊博 on 2019/9/6.
// Copyright © 2019 黄江涛 . All rights reserved.
//
#import <UIKit/UIKit.h>
#import "ListPrizeTableViewCell.h"
NS_ASSUME_NONNULL_BEGIN
@interface CTPrizeDetailProcessTableCellContentView : UIView
@property (assign, nonatomic) BOOL hasUpLine;
@property (assign, nonatomic) BOOL hasDownLine;
@property (assign, nonatomic) BOOL currented;
@property (assign, nonatomic) CTListPrizeState state;
@property (assign, nonatomic)NSInteger index;
- (void)reloadUIWithData:(NSDictionary *)dic state:(CTListPrizeState)state Index:(NSInteger)index;
@end
NS_ASSUME_NONNULL_END
//
// CTPrizeDetailProcessTableCellContentView.m
// Open
//
// Created by 雷俊博 on 2019/9/6.
// Copyright © 2019 黄江涛 . All rights reserved.
//
#import "CTPrizeDetailProcessTableCellContentView.h"
#import "UIColor+Hex.h"
#import "Constants.h"
@interface CTPrizeDetailProcessTableCellContentView ()
@property (strong, nonatomic)UILabel *infoLabel;
@property (strong, nonatomic)UILabel *dateLabel;
@property (strong, nonatomic)UILabel *infoLabel2;
@property (strong, nonatomic)UIImageView *img_error;
@end
@implementation CTPrizeDetailProcessTableCellContentView
#pragma mark - life cycle
- (instancetype)init
{
self = [super init];
if (self) {
[self addSubview:self.infoLabel];
[self addSubview:self.img_error];
[self addSubview:self.dateLabel];
[self addSubview:self.infoLabel2];
[self setupUI];
}
return self;
}
- (void)setupUI
{
[self.infoLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.offset(10 * WIDTHRADIU);
make.left.offset(35 * WIDTHRADIU);
make.height.offset(15 * WIDTHRADIU);
}];
[self.img_error mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(self.infoLabel);
make.left.equalTo(self.infoLabel.mas_right).offset(3);
}];
[self.dateLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.infoLabel);
make.top.equalTo(self.infoLabel.mas_bottom).offset(5 * WIDTHRADIU);
make.height.offset(12 * WIDTHRADIU);
}];
[self.infoLabel2 mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.infoLabel);
make.centerY.equalTo(self);
make.height.offset(15 * WIDTHRADIU);
}];
}
#pragma mark - public methods
- (void)reloadUIWithData:(NSDictionary *)dic state:(CTListPrizeState)state Index:(NSInteger)index
{
self.state = state;
self.index = index;
if (index == 0) {
self.infoLabel.text = @"奖励已领取";
self.img_error.image = [UIImage imageNamed:@""];
if (self.state == CTListPrizeStateGiving || self.state == CTListPrizeStateFailure || self.state == CTListPrizeStateReceived) {
self.dateLabel.text = [dic[@"orderRequestTime"] stringByReplacingOccurrencesOfString:@"/" withString:@"."];
}else{
self.dateLabel.text = [dic[@"createTime"] stringByReplacingOccurrencesOfString:@"/" withString:@"."];
}
self.infoLabel2.text = @"";
}else if (index == 1){
self.infoLabel.text = @"奖励发放中";
self.img_error.image = [UIImage imageNamed:@""];
self.dateLabel.text = @"预计两小时到账";
self.infoLabel2.text = @"";
}else if (index == 2){
if (self.state == CTListPrizeStateGiving) {
self.infoLabel.text = @"";
self.img_error.image = [UIImage imageNamed:@""];
self.dateLabel.text = @"";
self.infoLabel2.text = @"奖励到账";
}else if (self.state == CTListPrizeStateReceived){
self.infoLabel.text = @"奖励已到账";
self.img_error.image = [UIImage imageNamed:@""];
self.dateLabel.text = [dic[@"payTime"] stringByReplacingOccurrencesOfString:@"/" withString:@"."];
self.infoLabel2.text = @"";
}else if (self.state == CTListPrizeStateFailure){
self.infoLabel.text = @"奖励发放失败";
self.img_error.image = [UIImage imageNamed:@"奖品详情-警示"];
self.dateLabel.text = @"请确认微信账号是否实名";
self.infoLabel2.text = @"";
}else{
self.infoLabel.text = @"";
self.img_error.image = [UIImage imageNamed:@""];
self.dateLabel.text = @"";
self.infoLabel2.text = @"奖励到账";
}
}
[self setNeedsDisplay];
}
#pragma mark - getters and setters
- (UILabel *)infoLabel
{
if (!_infoLabel) {
_infoLabel = [[UILabel alloc]init];
_infoLabel.text = @"奖励已领取";
_infoLabel.textColor = [UIColor colorWithHex:0xfe5733];
_infoLabel.font = [UIFont systemFontOfSize:15 * WIDTHRADIU];
_infoLabel.textAlignment = NSTextAlignmentCenter;
}
return _infoLabel;
}
- (UIImageView *)img_error
{
if (!_img_error) {
_img_error = [[UIImageView alloc]init];
}
return _img_error;
}
- (UILabel *)dateLabel
{
if (!_dateLabel) {
_dateLabel = [[UILabel alloc]init];
_dateLabel.text = @"2019.09.02 15:40";
_dateLabel.textColor = [UIColor colorWithHex:0x808080];
_dateLabel.font = [UIFont systemFontOfSize:12 * WIDTHRADIU];
_dateLabel.textAlignment = NSTextAlignmentCenter;
}
return _dateLabel;
}
- (UILabel *)infoLabel2
{
if (!_infoLabel2) {
_infoLabel2 = [[UILabel alloc]init];
_infoLabel2.text = @"奖励到账";
_infoLabel2.textColor = [UIColor colorWithHex:0xb2b2b2];
_infoLabel2.font = [UIFont systemFontOfSize:15 * WIDTHRADIU];
_infoLabel2.textAlignment = NSTextAlignmentCenter;
}
return _infoLabel2;
}
- (void)drawRect:(CGRect)rect {
// Drawing code
CGFloat height = self.bounds.size.height;
if (self.hasUpLine) {
if (self.state == CTListPrizeStateGiving || self.state == CTListPrizeStateFailure) {
if (self.index == 2) {
UIBezierPath *topBezier = [UIBezierPath bezierPath];
[topBezier moveToPoint:CGPointMake(10 * WIDTHRADIU +7.5, 0)];
[topBezier addLineToPoint:CGPointMake(10 * WIDTHRADIU +7.5, (height -15)/2.0 + 2.5)];
topBezier.lineWidth = 1.0;
UIColor *stroke = [UIColor colorWithHex:0x808080];
[stroke set];
[topBezier stroke];
}else{
UIBezierPath *topBezier = [UIBezierPath bezierPath];
[topBezier moveToPoint:CGPointMake(10 * WIDTHRADIU +7.5, 0)];
[topBezier addLineToPoint:CGPointMake(10 * WIDTHRADIU +7.5, (height -15)/2.0 + 2.5)];
topBezier.lineWidth = 1.0;
UIColor *stroke = [UIColor colorWithHex:0xfe5733];
[stroke set];
[topBezier stroke];
}
}else{
UIBezierPath *topBezier = [UIBezierPath bezierPath];
[topBezier moveToPoint:CGPointMake(10 * WIDTHRADIU +7.5, 0)];
[topBezier addLineToPoint:CGPointMake(10 * WIDTHRADIU +7.5, height/2.0 - 5)];
topBezier.lineWidth = 1.0;
UIColor *stroke = [UIColor colorWithHex:0xfe5733];
[stroke set];
[topBezier stroke];
}
}
if (self.currented) {
if (self.state == CTListPrizeStateGiving || self.state == CTListPrizeStateFailure) {
if (self.index == 2) {
UIBezierPath *cicle = [UIBezierPath bezierPathWithArcCenter:CGPointMake(10 * WIDTHRADIU +7.5, height/2) radius:5 startAngle:0 endAngle:(M_PI * 2) clockwise:YES];
cicle.lineWidth = 1.0;
UIColor *cColor = [UIColor colorWithHex:0x808080];
[cColor set];
[cicle fill];
[cicle stroke];
UIBezierPath *cicle2 = [UIBezierPath bezierPathWithArcCenter:CGPointMake(10 * WIDTHRADIU +7.5, height/2) radius:7.5 startAngle:0 endAngle:(M_PI * 2) clockwise:YES];
cicle2.lineWidth = 1.0;
UIColor *cColor2 = [UIColor colorWithHex:0x808080];
[cColor2 set];
[cicle2 stroke];
}else{
UIBezierPath *cicle = [UIBezierPath bezierPathWithArcCenter:CGPointMake(10 * WIDTHRADIU +7.5, height/2) radius:5 startAngle:0 endAngle:(M_PI * 2) clockwise:YES];
cicle.lineWidth = 1.0;
UIColor *cColor = [UIColor colorWithHex:0xfe5633];
[cColor set];
[cicle fill];
[cicle stroke];
UIBezierPath *cicle2 = [UIBezierPath bezierPathWithArcCenter:CGPointMake(10 * WIDTHRADIU +7.5, height/2) radius:7.5 startAngle:0 endAngle:(M_PI * 2) clockwise:YES];
cicle2.lineWidth = 1.0;
UIColor *cColor2 = [UIColor colorWithHex:0xfe5633];
[cColor2 set];
[cicle2 stroke];
}
}else{
UIBezierPath *cicle = [UIBezierPath bezierPathWithArcCenter:CGPointMake(10 * WIDTHRADIU +7.5, height/2) radius:5 startAngle:0 endAngle:(M_PI * 2) clockwise:YES];
cicle.lineWidth = 1.0;
UIColor *cColor = [UIColor colorWithHex:0xfe5633];
[cColor set];
[cicle fill];
[cicle stroke];
UIBezierPath *cicle2 = [UIBezierPath bezierPathWithArcCenter:CGPointMake(10 * WIDTHRADIU +7.5, height/2) radius:7.5 startAngle:0 endAngle:(M_PI * 2) clockwise:YES];
cicle2.lineWidth = 1.0;
UIColor *cColor2 = [UIColor colorWithHex:0xfe5633];
[cColor2 set];
[cicle2 stroke];
}
}
if (self.hasDownLine) {
UIBezierPath *downBezier = [UIBezierPath bezierPath];
[downBezier moveToPoint:CGPointMake(10 * WIDTHRADIU +7.5, (height - 15)/2.0 +15 - 2.5)];
[downBezier addLineToPoint:CGPointMake(10 * WIDTHRADIU +7.5, height)];
downBezier.lineWidth = 1.0;
UIColor *stroke = [UIColor colorWithHex:0xfe5733];
[stroke set];
[downBezier stroke];
}
}
@end
//
// PrizeDetailCardView.h
// Open
//
// Created by 雷俊博 on 2019/9/5.
// Copyright © 2019 黄江涛 . All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface PrizeDetailCardView : UIView
@end
NS_ASSUME_NONNULL_END
//
// PrizeDetailCardView.m
// Open
//
// Created by 雷俊博 on 2019/9/5.
// Copyright © 2019 黄江涛 . All rights reserved.
//
#import "PrizeDetailCardView.h"
#import "Constants.h"
#define degreesToRadian(x) (M_PI * (x) / 180.0)
@interface PrizeDetailCardView ()
/** 遮罩 */
@property (nonatomic, strong) CAShapeLayer *maskLayer;
/** 路径 */
@property (nonatomic, strong) UIBezierPath *borderPath;
@end
@implementation PrizeDetailCardView
-(instancetype)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
// 初始化遮罩
self.maskLayer = [CAShapeLayer layer];
// 设置遮罩
[self.layer setMask:self.maskLayer];
// 初始化路径
self.borderPath = [UIBezierPath bezierPath];
}
return self;
}
- (void)layoutSubviews
{
[super layoutSubviews];
//遮罩层frame
self.maskLayer.frame = self.bounds;
//设置path的起点
[self.borderPath moveToPoint:CGPointMake(0, 10)];
//左上角的圆角
[self.borderPath addQuadCurveToPoint:CGPointMake(10, 0) controlPoint:CGPointMake(0, 0)];
// 直线,到右上角
[self.borderPath addLineToPoint:CGPointMake(self.bounds.size.width - 10, 0)];
// 右上角的圆角
[self.borderPath addQuadCurveToPoint:CGPointMake(self.bounds.size.width, 10) controlPoint:CGPointMake(self.bounds.size.width, 0)];
// 直线,到右下角
[self.borderPath addLineToPoint:CGPointMake(self.bounds.size.width, self.bounds.size.height - 91 * WIDTHRADIU)];
[self.borderPath addArcWithCenter:CGPointMake(self.bounds.size.width , self.bounds.size.height - 91 * WIDTHRADIU + 6 *WIDTHRADIU ) radius:6 * WIDTHRADIU startAngle:degreesToRadian(-90) endAngle:degreesToRadian(-270) clockwise:NO];
[self.borderPath addLineToPoint:CGPointMake(self.bounds.size.width, self.bounds.size.height - 10)];
[self.borderPath addQuadCurveToPoint:CGPointMake(self.bounds.size.width-10, self.bounds.size.height) controlPoint:CGPointMake(self.bounds.size.width, self.bounds.size.height)];
[self.borderPath addLineToPoint:CGPointMake(10, self.bounds.size.height )];
[self.borderPath addQuadCurveToPoint:CGPointMake(0, self.bounds.size.height - 10) controlPoint:CGPointMake(0, self.bounds.size.height)];
[self.borderPath addLineToPoint:CGPointMake(0, self.bounds.size.height - 91 * WIDTHRADIU + 10)];
[self.borderPath addArcWithCenter:CGPointMake(0, self.bounds.size.height - 91 * WIDTHRADIU + 6 * WIDTHRADIU) radius:6 * WIDTHRADIU startAngle:degreesToRadian(90) endAngle:degreesToRadian(-90) clockwise:NO];
[self.borderPath addLineToPoint:CGPointMake(0, 10)];
self.maskLayer.path = self.borderPath.CGPath;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
//
// PrizeDetailProcessView.h
// Open
//
// Created by 雷俊博 on 2019/9/5.
// Copyright © 2019 黄江涛 . All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface PrizeDetailProcessView : UIView
@end
NS_ASSUME_NONNULL_END
//
// PrizeDetailProcessView.m
// Open
//
// Created by 雷俊博 on 2019/9/5.
// Copyright © 2019 黄江涛 . All rights reserved.
//
#import "PrizeDetailProcessView.h"
#import "Constants.h"
#define degreesToRadian(x) (M_PI * (x) / 180.0)
@interface PrizeDetailProcessView ()
{
CGFloat _radius;
}
/** 遮罩 */
@property (nonatomic, strong) CAShapeLayer *maskLayer;
/** 路径 */
@property (nonatomic, strong) UIBezierPath *borderPath;
@end
@implementation PrizeDetailProcessView
-(instancetype)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
// 初始化遮罩
self.maskLayer = [CAShapeLayer layer];
// 设置遮罩
[self.layer setMask:self.maskLayer];
// 初始化路径
self.borderPath = [UIBezierPath bezierPath];
_radius = (frame.size.width - 21 * 5*WIDTHRADIU)/40;
}
return self;
}
- (void)layoutSubviews
{
[super layoutSubviews];
//遮罩层frame
self.maskLayer.frame = self.bounds;
//设置path的起点
[self.borderPath moveToPoint:CGPointMake(0, 10)];
//左上角的圆角
[self.borderPath addQuadCurveToPoint:CGPointMake(10, 0) controlPoint:CGPointMake(0, 0)];
// 直线,到右上角
[self.borderPath addLineToPoint:CGPointMake(self.bounds.size.width - 10, 0)];
// 右上角的圆角
[self.borderPath addQuadCurveToPoint:CGPointMake(self.bounds.size.width, 10) controlPoint:CGPointMake(self.bounds.size.width, 0)];
// 直线,到右下角
[self.borderPath addLineToPoint:CGPointMake(self.bounds.size.width, self.bounds.size.height)];
[self.borderPath addLineToPoint:CGPointMake(self.bounds.size.width - 5 * WIDTHRADIU, self.bounds.size.height)];
for (int i = 0; i < 20; i++) {
[self.borderPath addArcWithCenter:CGPointMake(self.bounds.size.width -_radius - 5 * WIDTHRADIU - i *(_radius * 2 + 5 * WIDTHRADIU ) , self.bounds.size.height) radius:_radius startAngle:degreesToRadian(0) endAngle:degreesToRadian(180) clockwise:NO];
[self.borderPath addLineToPoint:CGPointMake((5 * WIDTHRADIU + 2 *_radius)*(19 - i), self.bounds.size.height)];
}
[self.borderPath addLineToPoint:CGPointMake(0, 10)];
self.maskLayer.path = self.borderPath.CGPath;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
//
// MyPrizeListVC.h
// Open
//
// Created by 雷俊博 on 2019/9/3.
// Copyright © 2019 黄江涛 . All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface MyPrizeListVC : UIViewController
@property (nonatomic,assign) NSInteger index;
@end
NS_ASSUME_NONNULL_END
//
// MyPrizeListVC.m
// Open
//
// Created by 雷俊博 on 2019/9/3.
// Copyright © 2019 黄江涛 . All rights reserved.
//
#import "MyPrizeListVC.h"
#import "orderHeader.h"
#import "PrizeDetailInfoViewController.h"
#import "ListPrizeTableViewCell.h"
#import "JYEmpty.h"
#import "NoDataView.h"
#import "Constants.h"
#import "UIColor+Hex.h"
#import "CTAPIBaseManager.h"
static NSString * const identifier = @"identifier";
@interface MyPrizeListVC ()<UITableViewDataSource, UITableViewDelegate>
{
orderHeader *_headView;
BOOL _isup;
}
@property(nonatomic, strong, nonnull) UITableView *tableView;
@property (nonatomic, strong)orderHeader *headerView;
@property(nonatomic, strong, nullable) NSArray *dataArray;
@property (nonatomic, strong, nullable)NSMutableArray *dataArry2;
@property (nonatomic, strong)CTAPIBaseManager *manager;
@end
@implementation MyPrizeListVC
#pragma mark - life cycle
- (void)viewDidLoad {
[super viewDidLoad];
[self createUI];
// Do any additional setup after loading the view.
[self.view addSubview:self.tableView];
WeakSelf
self.tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
//进行数据刷新操作
[weakSelf loadData];
}];
// 马上进入刷新状态
[self.tableView.mj_header beginRefreshing];
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[JANALYTICSService startLogPageView:@"我的奖品"];
[MobClick beginLogPageView:@"我的奖品"];
}
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
[JANALYTICSService stopLogPageView:@"我的奖品"];
[MobClick endLogPageView:@"我的奖品"];
}
- (void)dealloc
{
NSLog(@"MyPrizeListVc已释放");
}
-(void)createUI{
self.view.backgroundColor=[UIColor whiteColor];
UIView *back = [[UIView alloc]initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 42)];
back.backgroundColor = [UIColor colorWithHex:0xd9d9d9 alpha:0.5];
[self.view addSubview:back];
[self.view addSubview:self.headerView];
}
- (void)loadData
{
NSString *url = [NSString stringWithFormat:@"%@score/getwinRecord",CoinsBaseUrl];
NSDictionary *dic = @{
@"userId":[NSNumber numberWithInteger:[getPeopleID PeopleID]],
@"telephone": [EnercryTool encryptUseDES:[getPeopleID PeopleIphoneNmber] key:DESKEY],
@"reqTimesTamp":[NSNumber numberWithInteger:[self getNowTimeTimestamp3]],
};
NSArray *result = [dic.allKeys sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) {
NSLog(@"%@~%@",obj1,obj2); //3~4 2~1 3~1 3~2
return [obj1 compare:obj2]; //升序
}];
NSString *sign = nil;
for (int i = 0; i < result.count; i++) {
NSString *key = result[i];
if (i==0) {
sign = [NSString stringWithFormat:@"%@=%@",key,dic[key]];
}else{
sign = [NSString stringWithFormat:@"%@&%@=%@",sign,key,dic[key]];
}
}
sign = [NSString stringWithFormat:@"%@&kk#d12",sign];
NSMutableDictionary *params = [[NSMutableDictionary alloc]initWithDictionary:dic];
NSString *signString = [[MyMD5 md5:sign] lowercaseString];
[params setObject:signString forKey:@"sign"];
WeakSelf
[self.manager POSTWithUrl:url params:params success:^(id _Nonnull responseObject) {
[weakSelf.tableView.mj_header endRefreshing];
if (responseObject) {
NSNumber *code = responseObject[@"code"];
NSString *des = responseObject[@"des"];
if ([code isKindOfClass:[NSNumber class]]) {
if (code.integerValue == 0) {
[weakSelf.dataArry2 removeAllObjects];
NSArray *results = responseObject[@"result"];
weakSelf.dataArray = results;
dispatch_async(dispatch_get_global_queue(0, 0), ^{
for (int i = 0; i < results.count; i++) {
NSDictionary *dic = results[i];
if ([dic[@"lotterStatus"] isEqualToString:@"未领取"]) {
[weakSelf.dataArry2 addObject:dic];
}
}
dispatch_async(dispatch_get_main_queue(), ^{
[weakSelf.tableView reloadData];
UIButton *btn = [weakSelf.headerView viewWithTag:79];
[btn setTitle:[NSString stringWithFormat:@"未领取(%ld)",weakSelf.dataArry2.count] forState:UIControlStateNormal];
});
});
}else{
[SVProgressHUD showInfoWithStatus:des];
}
}else{
[SVProgressHUD showInfoWithStatus:@"服务器错误"];
}
}
} fail:^(NSError * _Nonnull error) {
[weakSelf.tableView.mj_header endRefreshing];
if (error.code == NSURLErrorTimedOut) {
[SVProgressHUD showInfoWithStatus:@"请求超时"];
}else if (error.code == NSURLErrorCancelled){
// [SVProgressHUD showInfoWithStatus:@"取消请求"];
}else if (error.code == NSURLErrorNotConnectedToInternet){
[SVProgressHUD showInfoWithStatus:@"无网络"];
}
}];
}
#pragma mark - tableview datasourse delegate
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
if (self.index == 0) {
if (self.dataArray.count != 0) {
self.tableView.backgroundView = nil;
}else{
NoDataView *view = [[NoDataView alloc]initWithFrame:self.tableView.bounds];
self.tableView.backgroundView = view;
}
return self.dataArray.count;
}else{
if (self.dataArry2.count != 0) {
self.tableView.backgroundView = nil;
}else{
NoDataView *view = [[NoDataView alloc]initWithFrame:self.tableView.bounds];
self.tableView.backgroundView = view;
}
return self.dataArry2.count;
}
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
ListPrizeTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
if (self.index == 0) {
[cell refreshUIWithData:self.dataArray[indexPath.row]];
}else{
[cell refreshUIWithData:self.dataArry2[indexPath.row]];
}
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 100*WIDTHRADIU;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
PrizeDetailInfoViewController *detailVC = [[PrizeDetailInfoViewController alloc]init];
NSDictionary *dic = nil;
if (self.index == 0) {
dic = self.dataArray[indexPath.row];
}else{
dic = self.dataArry2[indexPath.row];
}
if ([dic[@"giftId"] isEqualToString:@"1"]) {
detailVC.type = CTListPrizeTypeCoins200;
}else if ([dic[@"giftId"] isEqualToString:@"12"]) {
detailVC.type = CTListPrizeTypeCoins388;
}else if ([dic[@"giftId"] isEqualToString:@"13"]){
detailVC.type = CTListPrizeTypeCoins588;
}
else if ([dic[@"giftId"] isEqualToString:@"9"]){
detailVC.type = CTListPrizeTypePackage10;
}else if ([dic[@"giftId"] isEqualToString:@"11"]){
detailVC.type = CTListPrizeTypePackage2;
}else if ([dic[@"giftId"] isEqualToString:@"10"]){
detailVC.type = CTListPrizeTypePackage3;
}else{
detailVC.type = CTListPrizeTypeUnKnow;
}
if ([dic[@"lotterStatus"] isEqualToString:@"未领取"]) {
detailVC.state = CTListPrizeStateUnGet;
}else if ([dic[@"lotterStatus"] isEqualToString:@"发放中"]){
detailVC.state = CTListPrizeStateGiving;
}else if ([dic[@"lotterStatus"] isEqualToString:@"已领取"]){
detailVC.state = CTListPrizeStateReceived;
}else if ([dic[@"lotterStatus"] isEqualToString:@"已过期"]){
detailVC.state = CTListPrizeStateInvalid;
}else if ([dic[@"lotterStatus"] isEqualToString:@"领取失败"]){
detailVC.state = CTListPrizeStateFailure;
}else {
detailVC.state = CTListPrizeStateUnKnow;
}
detailVC.title = @"奖品详情";
detailVC.contentDic = dic;
if (detailVC.type != CTListPrizeTypeUnKnow && detailVC.state != CTListPrizeStateUnKnow) {
WeakSelf
detailVC.clickBlock = ^(BOOL isCLick) {
// 马上进入刷新状态
[weakSelf.tableView.mj_header beginRefreshing];
};
[self.navigationController pushViewController:detailVC animated:YES];
}else{
[SVProgressHUD showInfoWithStatus:@"该奖励现无法查看,\n需更新版本"];
return;
}
}
#pragma mark - 获取当前时间戳
-(NSInteger )getNowTimeTimestamp3{
NSDateFormatter *formatter = [[NSDateFormatter alloc] init] ;
[formatter setDateStyle:NSDateFormatterMediumStyle];
[formatter setTimeStyle:NSDateFormatterShortStyle];
[formatter setDateFormat:@"YYYY-MM-dd HH:mm:ss SSS"]; // ----------设置你想要的格式,hh与HH的区别:分别表示12小时制,24小时制
//设置时区,这个对于时间的处理有时很重要
NSTimeZone* timeZone = [NSTimeZone timeZoneWithName:@"Asia/Beijing"];
[formatter setTimeZone:timeZone];
NSDate *datenow = [NSDate date];//现在时间,你可以输出来看下是什么格式
NSInteger timeSp = [datenow timeIntervalSince1970]*1000;
return timeSp;
}
#pragma mark - getters and setters
- (UITableView *)tableView {
if (!_tableView){
_tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 42, ScreenWidth, ScreenHeight - cl_kNavigationBarHeight - 42) style:UITableViewStylePlain];
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_tableView.dataSource = self;
_tableView.delegate = self;
_tableView.tableFooterView = [UIView new];
[_tableView registerClass:[ListPrizeTableViewCell class] forCellReuseIdentifier:@"identifier"];
}
return _tableView;
}
- (orderHeader *)headerView
{
if (!_headView) {
_headView = [[orderHeader alloc]initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 40)];
_headView.backgroundColor = [UIColor whiteColor];
_headView.items = @[@"全部奖品",@"未领取"];
//消除强引用
__weak typeof(self) weakSelf = self;
_headView.itemClickAtIndex = ^(NSInteger index){
weakSelf.index = index;
[weakSelf.tableView reloadData];
};
}
return _headView;
}
- (CTAPIBaseManager *)manager
{
if (!_manager) {
_manager = [[CTAPIBaseManager alloc]init];
}
return _manager;
}
- (NSMutableArray *)dataArry2
{
if (!_dataArry2) {
_dataArry2 = [[NSMutableArray alloc]init];
}
return _dataArry2;
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
//
// orderHeader.h
// YKHXProject
//
// Created by 杜文全 on 15/11/1.
// Copyright © 2015年 com.iOSDeveloper.duwenquan. All rights reserved.
//
#define DWQMainScreenWidth [UIScreen mainScreen].bounds.size.width
#define DWQMainScreenHeight [UIScreen mainScreen].bounds.size.height
#define DWQMainScreenBounds [UIScreen mainScreen].bounds
#define Button_Origin_Tag 78
#import <UIKit/UIKit.h>
@interface orderHeader : UIView
//外部决定有多少模块
@property (nonatomic,strong) NSArray * items;
//内部选中某一个模块,传递给外部
@property (nonatomic,copy) void(^itemClickAtIndex)(NSInteger index);
//由外部决定选中哪一个模块
-(void)setSelectAtIndex:(NSInteger)index;
-(void)buttonClick:(UIButton*)button;
@end
//
// orderHeader.m
// YKHXProject
//
// Created by 杜文全 on 15/11/1.
// Copyright © 2015年 com.iOSDeveloper.duwenquan. All rights reserved.
//
#import "orderHeader.h"
#import "UIColor+Hex.h"
@implementation orderHeader
{
UIView * _redLine ;
}
-(void)setItems:(NSArray *)items
{
_items = items;
//先清空当前视图上的所有子视图
for (UIView * view in self.subviews) {
[view removeFromSuperview];
}
//添加按钮
CGFloat itemWidth = DWQMainScreenWidth/items.count;
CGFloat itemHeight = self.frame.size.height-2;
for (int i = 0; i< items.count;i++ ) {
UIButton * buton = [[UIButton alloc]init];
buton.frame = CGRectMake(i*itemWidth, 0, itemWidth, itemHeight);
[buton setTitle:items[i] forState:UIControlStateNormal];
[buton setTitleColor:[UIColor colorWithHex:0x808080]forState:UIControlStateNormal];
[buton setTitleColor:[UIColor colorWithHex:0x4d4d4d] forState:UIControlStateSelected];
[buton addTarget:self action:@selector(buttonClick:) forControlEvents:UIControlEventTouchDown];
buton.tag = Button_Origin_Tag+i;
[self addSubview:buton];
if (i == 0) {
buton.selected = YES;
}
}
//加红线
_redLine = [[UIView alloc]init];
_redLine.frame = CGRectMake(itemWidth * 0.1, self.frame.size.height-2, itemWidth * 0.8, 2);
_redLine.backgroundColor = [UIColor redColor];
[self addSubview:_redLine];
}
-(void)buttonClick:(UIButton*)button
{
//获取点击的是第几个button
NSInteger index = button.tag - Button_Origin_Tag;
[self setSelectAtIndex:index];
//2、把事件传递出去
if (self.itemClickAtIndex) {
_itemClickAtIndex(index);
}
}
-(void)setSelectAtIndex:(NSInteger)index
{
//1、先调整自身的视图显示
for (int i = 0; i < self.items.count; i++) {
UIButton * bt = [self viewWithTag:i+Button_Origin_Tag];
if (bt.tag-Button_Origin_Tag == index) {
bt.selected = YES;
}else{
bt.selected = NO;
}
}
//调整红线的位置
CGFloat itemWidth = DWQMainScreenWidth/self.items.count;
[UIView animateWithDuration:0.2 animations:^{
CGRect rect = self->_redLine.frame;
rect.origin.x = index*(rect.size.width + 0.2 *itemWidth) + 0.1 * itemWidth;
self->_redLine.frame = rect;
}];
}
@end
//
// JYEmpty.h
// ShowEmptyView
//
// Created by Davis on 16/9/22.
// Copyright © 2016年 Davis. All rights reserved.
//
#ifndef JYEmpty_h
#define JYEmpty_h
#endif /* JYEmpty_h */
#import "JYEmptyConst.h"
#import "UIView+Awesome.h"
#import "JYEmptyView.h"
#import "UITableView+JYEmptyView.h"
\ No newline at end of file
//
// JYEmptyConst.h
// ShowEmptyView
//
// Created by Davis on 16/9/22.
// Copyright © 2016年 Davis. All rights reserved.
//
#import <UIKit/UIKit.h>
#define kRGBColor(r,g,b) ([UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:1])
#define kFont(font) ([UIFont boldSystemFontOfSize:font])
#define kWindow [UIApplication sharedApplication].keyWindow
// 常量
// 字体大小
// 16
UIKIT_EXTERN const CGFloat Font_H1;
// 15
UIKIT_EXTERN const CGFloat Font_H2;
// 12
UIKIT_EXTERN const CGFloat Font_H3;
// 空白视图间距
UIKIT_EXTERN const CGFloat Margin_Top;
// Label最大高度
UIKIT_EXTERN const CGFloat UILabelMaxHeight;
\ No newline at end of file
//
// JYEmptyConst.m
// ShowEmptyView
//
// Created by Davis on 16/9/22.
// Copyright © 2016年 Davis. All rights reserved.
//
#import <UIKit/UIKit.h>
const CGFloat Font_H1 = 16;
const CGFloat Font_H2 = 15;
const CGFloat Font_H3 = 12;
const CGFloat Margin_Top = 20;
const CGFloat UILabelMaxHeight = 80.f;
NSString *const kImageStr = @"imageKey";
NSString *const kTopStr = @"topKey";
NSString *const kDesStr = @"desKey";
\ No newline at end of file
//
// JYEmptyView.h
// ShowEmptyView
//
// Created by Davis on 16/9/22.
// Copyright © 2016年 Davis. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef void(^RefreshBtnClick)();
@interface JYEmptyView : UIView
/** 上方的提示文本 */
@property (nonatomic, copy, nullable) NSString *labelText;
/** 下方的提示文本 */
@property (nonatomic, copy, nullable) NSString *detailsLabelText;
/** 提示的图片 */
@property (nonatomic, strong, nullable) UIImage *iconImage;
/** 点击回调 */
@property (nonatomic, copy, nonnull) RefreshBtnClick refreshBtnClickBlock;
+ (JYEmptyView * _Nonnull)showTitle:(NSString * _Nonnull)title
details:(NSString * _Nonnull)details
iconImag:(NSString * _Nonnull)imageName;
@end
//
// JYEmptyView.m
// ShowEmptyView
//
// Created by Davis on 16/9/22.
// Copyright © 2016年 Davis. All rights reserved.
//
#import "JYEmptyView.h"
#import "JYEmpty.h"
#import <Reachability.h>
@interface JYEmptyView ()
/** 刷新按钮 */
@property (nonatomic, strong, nonnull) UIButton *refreshBtn;
/** 图标 */
@property (nonatomic, strong, nonnull) UIImageView *iconImageView;
/** 上面的提示信息 */
@property (nonatomic, strong, nonnull) UILabel *topTitleLabel;
/** 下面的提示信息 */
@property (nonatomic, strong, nonnull) UILabel *detailsLabel;
@end
@implementation JYEmptyView
/** 计算文本 CGSize */
static inline CGSize LableExpectedSize(NSString *text, UIFont *font, CGSize maxSize){
if (text.length > 0) {
//计算大小
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
paragraphStyle.lineBreakMode = NSLineBreakByCharWrapping;
paragraphStyle.alignment = NSTextAlignmentCenter;
NSDictionary * attributes = @{NSFontAttributeName: font,
NSParagraphStyleAttributeName: paragraphStyle
};
return [text boundingRectWithSize:maxSize options:NSStringDrawingUsesLineFragmentOrigin attributes:attributes context:nil].size;
}
return CGSizeZero;
}
+ (JYEmptyView *)showTitle:(NSString *)title
details:(NSString *)details
iconImag:(NSString *)imageName {
//自定义相关配置
JYEmptyView *emptyView = [[JYEmptyView alloc]init];
emptyView.iconImage = [UIImage imageNamed:imageName];
emptyView.labelText = title;
emptyView.detailsLabelText = details;
return emptyView;
}
#pragma mark - 重新刷新按钮的点击事件
- (void)refreshBtnClicked {
if (self.refreshBtnClickBlock) {
self.refreshBtnClickBlock();
}
}
#pragma mark - setter
- (void)setIconImage:(UIImage *)iconImage {
_iconImage = iconImage;
self.iconImageView.image = iconImage;
}
- (void)setLabelText:(NSString *)labelText {
_labelText = labelText;
self.topTitleLabel.text = self.labelText;
}
- (void)setDetailsLabelText:(NSString *)detailsLabelText {
_detailsLabelText = detailsLabelText;
self.detailsLabel.text = detailsLabelText;
}
- (void)layoutSubviews {
[super layoutSubviews];
// 调整位置
self.topTitleLabel.size = LableExpectedSize(_labelText, kFont(Font_H1), CGSizeMake(self.topTitleLabel.bounds.size.width, UILabelMaxHeight));
self.detailsLabel.size = LableExpectedSize(_detailsLabel.text, kFont(Font_H2),CGSizeMake(_detailsLabel.bounds.size.width, UILabelMaxHeight));
self.iconImageView.size = CGSizeMake(self.iconImage.size.width, self.iconImage.size.height);
CGFloat contentHeight = self.iconImageView.height + Margin_Top + self.topTitleLabel.height + Margin_Top + self.detailsLabel.height + Margin_Top + self.refreshBtn.height;
CGFloat topBottomMargin = (self.height - contentHeight) / 2;
self.iconImageView.centerX = self.width / 2;
self.iconImageView.y = topBottomMargin;
self.topTitleLabel.y = self.iconImageView.bottom + Margin_Top;
self.topTitleLabel.centerX = self.iconImageView.centerX;
self.detailsLabel.y = self.topTitleLabel.bottom + Margin_Top;
self.detailsLabel.centerX = self.width / 2;
self.refreshBtn.y = self.detailsLabel.bottom + Margin_Top;
self.refreshBtn.centerX = self.width / 2;
}
#pragma mark - 懒加载
- (UIButton *)refreshBtn {
if(!_refreshBtn) {
_refreshBtn= [[UIButton alloc]init];
[_refreshBtn setTitle:@"重新加载" forState:UIControlStateNormal];
_refreshBtn.layer.cornerRadius = 3.0f;
_refreshBtn.layer.masksToBounds = YES;
_refreshBtn.layer.borderColor = [UIColor redColor].CGColor;
_refreshBtn.layer.borderWidth = 0.5;
[_refreshBtn setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
[_refreshBtn sizeToFit];
_refreshBtn.size = CGSizeMake(120, 35);
_refreshBtn.titleLabel.font = kFont(Font_H2);
[_refreshBtn addTarget:self action:@selector(refreshBtnClicked) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:_refreshBtn];
}
return _refreshBtn;
}
- (UIImageView *)iconImageView {
if(!_iconImageView) {
_iconImageView = [[UIImageView alloc] init];
_iconImageView.contentMode = UIViewContentModeCenter;
[self addSubview:_iconImageView];
}
return _iconImageView;
}
/** 主标题只显示一行 */
- (UILabel *)topTitleLabel {
if (!_topTitleLabel) {
_topTitleLabel = [[UILabel alloc] init];
_topTitleLabel.numberOfLines = 1;
_topTitleLabel.textAlignment = NSTextAlignmentCenter;
_topTitleLabel.font = kFont(Font_H1);
_topTitleLabel.textColor = kRGBColor(46, 46, 46);
[self addSubview:_topTitleLabel];
}
return _topTitleLabel;
}
/** 详情 -- 多行 */
- (UILabel *)detailsLabel {
if(!_detailsLabel) {
_detailsLabel = [[UILabel alloc] initWithFrame:self.bounds];
_detailsLabel.textAlignment = NSTextAlignmentCenter;
_detailsLabel.numberOfLines = 0;
_detailsLabel.font = kFont(Font_H3);
_detailsLabel.textColor = kRGBColor(100, 100, 100);
[self addSubview:_detailsLabel];
}
return _detailsLabel;
}
@end
//
// UITableView+JYEmptyView.h
// ShowEmptyView
//
// Created by Davis on 16/9/22.
// Copyright © 2016年 Davis. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UITableView (JYEmptyView)
/** 传入的空视图 */
@property (nonatomic, strong, nonnull) UIView *emptyView;
/** 传入的无网络视图 */
@property (nonatomic, strong, nonnull) UIView *noNetworkView;
@end
//
// UITableView+JYEmptyView.m
// ShowEmptyView
//
// Created by Davis on 16/9/22.
// Copyright © 2016年 Davis. All rights reserved.
//
#import "UITableView+JYEmptyView.h"
#import <objc/runtime.h>
#import "JYEmpty.h"
#import <Reachability.h>
static JYEmptyView *view;
@implementation UITableView (JYEmptyView)
/**
* 交换方法
*
* @param c 类
* @param orig system @selector
* @param new new @selector
*/
void swizzle(Class c, SEL orig, SEL new) {
Method origMethod = class_getInstanceMethod(c, orig);
Method newMethod = class_getInstanceMethod(c, new);
if(class_addMethod(c, orig, method_getImplementation(newMethod), method_getTypeEncoding(newMethod))) {
class_replaceMethod(c, new, method_getImplementation(origMethod), method_getTypeEncoding(origMethod));
} else {
method_exchangeImplementations(origMethod, newMethod);
}
}
+ (void)load {
// 交换方法
[self swizzleMethod];
}
+ (void)swizzleMethod {
Class c = [UITableView class];
swizzle(c, @selector(layoutSubviews), @selector(JY_layoutSubviews));
}
- (void)listenNetwork {
static Reachability *reach = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
reach = [Reachability reachabilityWithHostname:@"www.baidu.com"];
[reach startNotifier];
});
UIView *noNetworkView = self.noNetworkView;
noNetworkView.frame = [UIScreen mainScreen].bounds;
reach.reachableBlock = ^(Reachability *reach) {
dispatch_async(dispatch_get_main_queue(), ^{
NSLog(@"REACHABLE!");
if (noNetworkView.superview) {
[noNetworkView removeFromSuperview];
}
});
};
reach.unreachableBlock = ^(Reachability *reach){
dispatch_async(dispatch_get_main_queue(), ^{
NSLog(@"UNREACHABLE!");
if (!noNetworkView.superview) {
[kWindow addSubview:noNetworkView];
}
});
};
}
#pragma mark - 根据数据情况确定空白视图显示与否
- (BOOL)isShowEmptyView {
NSUInteger numberOfRows = 0;
for (NSInteger sectionIndex = 0; sectionIndex < self.numberOfSections; sectionIndex++) {
numberOfRows += [self numberOfRowsInSection:sectionIndex];
}
return (numberOfRows > 0);
}
#pragma mark - 设置空白视图
- (void)setEmptyView {
UIView *emptyView = self.emptyView;
if (emptyView.superview) {
[emptyView removeFromSuperview];
}
[kWindow addSubview:emptyView];
emptyView.backgroundColor = [UIColor whiteColor];
emptyView.frame = [UIScreen mainScreen].bounds;
BOOL emptyViewShouldBeShow = ([self isShowEmptyView] == NO);
emptyView.hidden = !emptyViewShouldBeShow;
if (emptyView.hidden) {
[emptyView removeFromSuperview];
emptyView = nil;
}
}
#pragma mark - swizzle method
- (void)JY_layoutSubviews {
[self JY_layoutSubviews];
[self setEmptyView];
}
#pragma mark - AssociatedObject
- (void)setEmptyView:(UIView *)emptyView {
objc_setAssociatedObject(self, @selector(setEmptyView:), emptyView, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
- (UIView *)emptyView {
return objc_getAssociatedObject(self, @selector(setEmptyView:));
}
- (void)setNoNetworkView:(UIView *)noNetworkView {
objc_setAssociatedObject(self, @selector(setNoNetworkView:), noNetworkView, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
[self listenNetwork];
}
- (UIView *)noNetworkView {
return objc_getAssociatedObject(self, @selector(setNoNetworkView:));
}
@end
//
// UIView+Awesome.h
// UICategory
//
// Created by Davis on 16/8/26.
// Copyright © 2016年 Davis. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIView (Awesome)
@property (nonatomic, assign) CGFloat x;
@property (nonatomic, assign) CGFloat y;
@property (nonatomic, assign) CGFloat width;
@property (nonatomic, assign) CGFloat height;
@property (nonatomic, assign) CGFloat centerX;
@property (nonatomic, assign) CGFloat centerY;
@property (nonatomic, assign) CGSize size;
@property (nonatomic, assign) CGFloat bottom;
/** 当前view从xib中加载 */
+ (instancetype)viewFromNIB;
/**
*
* 设置不同角的圆角(得Masonry确定尺寸之后才能用)
*
* @param sideType 圆角类型
* @param cornerRadius 圆角半径
*/
- (void)cornerRoundingCorners:(UIRectCorner)RoundingCorners withCornerRadius:(CGFloat)cornerRadius;
/** 动态添加手势 */
- (void)setTapActionWithBlock:(void (^)(void))block;
@end
@interface UILabel(Extension)
/** UILabel基本初始化方法 */
+ (instancetype)labelWithFont:(CGFloat )font textColor:(UIColor *)textColor textAlignment:(NSTextAlignment)textAlignment numberOfLines:(NSInteger)numberOfLines;
@end
@interface UIButton(Extension)
/** 根据图片的大小初始化按钮 */
+ (instancetype)buttonSizeWithName:(NSString *)name;
/** 根据 名称 颜色 大小 设置按钮 */
+ (instancetype)buttonWhiteTitleWith:(NSString *)title color:(UIColor *)color andFontSize:(CGFloat)fontSize;
@end
@interface UITextField(Extension)
/** UITextField基本初始化方法 */
+ (instancetype)textFieldWithFont:(CGFloat)font placeholder:(NSString *)placeholder andKeyboardType:(UIKeyboardType)type;
@end
@interface UIImageView (Extension)
- (instancetype)initWithCornerRadiusAdvance:(CGFloat)cornerRadius rectCornerType:(UIRectCorner)rectCornerType;
- (void)cornerRadiusAdvance:(CGFloat)cornerRadius rectCornerType:(UIRectCorner)rectCornerType;
- (instancetype)initWithRoundingRectImageView;
- (void)cornerRadiusRoundingRect;
//- (void)attachBorderWidth:(CGFloat)width color:(UIColor *)color;
@end
typedef void(^PhotoBlock)(UIImage *photo);
@interface UIViewController(Extension)
/** 获取UIWindow当前展示的控制器 */
+ (UIViewController *)currentViewController;
/**
* 照片选择->图库/相机
*
* @param edit 照片是否需要裁剪,默认NO
* @param block 照片回调
*/
- (void)showCanEdit:(BOOL)edit photo:(PhotoBlock)block;
@end
//
// UIView+Awesome.m
// UICategory
//
// Created by Davis on 16/8/26.
// Copyright © 2016年 Davis. All rights reserved.
//
#import "UIView+Awesome.h"
#import <objc/runtime.h>
#import <AssetsLibrary/ALAssetsLibrary.h>
@implementation UIView (Awesome)
- (void)setX:(CGFloat)x {
CGRect frame = self.frame;
frame.origin.x = x;
self.frame = frame;
}
- (CGFloat)x {
return self.frame.origin.x;
}
- (void)setY:(CGFloat)y {
CGRect frame = self.frame;
frame.origin.y = y;
self.frame = frame;
}
- (CGFloat)y {
return self.frame.origin.y;
}
- (void)setWidth:(CGFloat)width {
CGRect frame = self.frame;
frame.size.width = width;
self.frame = frame;
}
- (CGFloat)width {
return self.frame.size.width;
}
- (void)setHeight:(CGFloat)height {
CGRect frame = self.frame;
frame.size.height = height;
self.frame = frame;
}
- (CGFloat)height {
return self.frame.size.height;
}
- (void)setCenterX:(CGFloat)centerX {
CGPoint center = self.center;
center.x = centerX;
self.center = center;
}
- (CGFloat)centerX {
return self.center.x;
}
- (void)setCenterY:(CGFloat)centerY {
CGPoint center = self.center;
center.y = centerY;
self.center = center;
}
- (CGFloat)centerY {
return self.center.y;
}
- (CGSize)size {
return self.frame.size;
}
- (void)setSize:(CGSize)size {
CGRect frame = self.frame;
frame.size = size;
self.frame = frame;
}
- (CGFloat)bottom
{
return self.frame.origin.y + self.frame.size.height;
}
- (void)setBottom:(CGFloat)bottom
{
CGRect frame = self.frame;
frame.origin.y = bottom - self.frame.size.height;
self.frame = frame;
}
+ (instancetype)viewFromNIB {
// 加载xib中的视图,其中xib文件名和本类类名必须一致
// 这个xib文件的File's Owner必须为空
// 这个xib文件必须只拥有一个视图,并且该视图的class为本类
NSArray *views = [[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class]) owner:nil options:nil];
return views[0];
}
- (void)cornerRoundingCorners:(UIRectCorner)RoundingCorners withCornerRadius:(CGFloat)cornerRadius{
CGSize cornerSize = CGSizeMake(cornerRadius, cornerRadius);
UIBezierPath *maskPath;
maskPath = [UIBezierPath bezierPathWithRoundedRect:self.bounds
byRoundingCorners:RoundingCorners
cornerRadii:cornerSize];
// Create the shape layer and set its path
CAShapeLayer *maskLayer = [CAShapeLayer layer];
maskLayer.frame = self.bounds;
maskLayer.path = maskPath.CGPath;
// Set the newly created shape layer as the mask for the image view's layer
self.layer.mask = maskLayer;
[self.layer setMasksToBounds:YES];
}
- (void)setTapActionWithBlock:(void (^)(void))block {
self.userInteractionEnabled = YES;
UITapGestureRecognizer *gesture = objc_getAssociatedObject(self, @selector(setTapActionWithBlock:));
if (!gesture) {
gesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleActionForTapGesture:)];
[self addGestureRecognizer:gesture];
objc_setAssociatedObject(self, @selector(setTapActionWithBlock:), gesture, OBJC_ASSOCIATION_RETAIN);
}
objc_setAssociatedObject(self, @selector(setTapActionWithBlock:), block, OBJC_ASSOCIATION_COPY);
}
- (void)handleActionForTapGesture:(UITapGestureRecognizer *)gesture {
if (gesture.state == UIGestureRecognizerStateRecognized) {
void(^action)(void) = objc_getAssociatedObject(self, @selector(setTapActionWithBlock:));
if (action) {
action();
}
}
}
@end
@implementation UILabel(Extension)
+ (instancetype)labelWithFont:(CGFloat)font textColor:(UIColor *)textColor textAlignment:(NSTextAlignment)textAlignment numberOfLines:(NSInteger)numberOfLines {
UILabel *label = [[UILabel alloc]init];
label.font = [UIFont systemFontOfSize:font];
label.textColor = textColor;
label.textAlignment = textAlignment;
label.numberOfLines = numberOfLines;
return label;
}
@end
@implementation UIButton (Extension)
+ (instancetype)buttonSizeWithName:(NSString *)name {
UIImage *image = [UIImage imageNamed:name];
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
btn.frame = CGRectMake(0, 0, image.size.width * 0.65, image.size.height * 0.65);
[btn setBackgroundImage:image forState:UIControlStateNormal];
[btn setBackgroundImage:image forState:UIControlStateHighlighted];
return btn;
}
+ (instancetype)buttonWhiteTitleWith:(NSString *)title color:(UIColor *)color andFontSize:(CGFloat)fontSize {
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
btn.frame = CGRectMake(0, 0, [title sizeWithAttributes:@{NSFontAttributeName: [UIFont systemFontOfSize:fontSize]}].width,fontSize);
[btn setTitleColor:color forState:UIControlStateNormal];
[btn setTitle:title forState:UIControlStateNormal];
btn.titleLabel.font = [UIFont systemFontOfSize:fontSize];
return btn;
}
@end
@implementation UITextField (Extension)
+ (instancetype)textFieldWithFont:(CGFloat)font placeholder:(NSString *)placeholder andKeyboardType:(UIKeyboardType)type {
UITextField *textfield = [[UITextField alloc] init];
textfield.placeholder = placeholder;
textfield.font = [UIFont systemFontOfSize:font];
textfield.keyboardType = type;
return textfield;
}
@end
const char kProcessedImage;
@interface UIImageView ()
@property (assign, nonatomic) CGFloat zyRadius;
@property (assign, nonatomic) UIRectCorner roundingCorners;
@property (assign, nonatomic) BOOL zyHadAddObserver;
@property (assign, nonatomic) BOOL zyIsRounding;
@end
@implementation UIImageView (Extension)
/**
* @brief init the Rounding UIImageView, no off-screen-rendered
*/
- (instancetype)initWithRoundingRectImageView {
self = [super init];
if (self) {
[self cornerRadiusRoundingRect];
}
return self;
}
/**
* @brief init the UIImageView with cornerRadius, no off-screen-rendered
*/
- (instancetype)initWithCornerRadiusAdvance:(CGFloat)cornerRadius rectCornerType:(UIRectCorner)rectCornerType {
self = [super init];
if (self) {
[self cornerRadiusAdvance:cornerRadius rectCornerType:rectCornerType];
}
return self;
}
#pragma mark - Kernel
/**
* @brief clip the cornerRadius with image, UIImageView must be setFrame before, no off-screen-rendered
*/
- (void)cornerRadiusWithImage:(UIImage *)image cornerRadius:(CGFloat)cornerRadius rectCornerType:(UIRectCorner)rectCornerType {
CGSize size = self.bounds.size;
CGFloat scale = [UIScreen mainScreen].scale;
CGSize cornerRadii = CGSizeMake(cornerRadius, cornerRadius);
UIGraphicsBeginImageContextWithOptions(size, NO, scale);
CGContextRef currentContext = UIGraphicsGetCurrentContext();
if (nil == currentContext) {
return;
}
UIBezierPath *cornerPath = [UIBezierPath bezierPathWithRoundedRect:self.bounds byRoundingCorners:rectCornerType cornerRadii:cornerRadii];
[cornerPath addClip];
[self.layer renderInContext:currentContext];
UIImage *processedImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
objc_setAssociatedObject(processedImage, &kProcessedImage, @(1), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
self.image = processedImage;
}
/**
* @brief clip the cornerRadius with image, draw the backgroundColor you want, UIImageView must be setFrame before, no off-screen-rendered, no Color Blended layers
*/
- (void)cornerRadiusWithImage:(UIImage *)image cornerRadius:(CGFloat)cornerRadius rectCornerType:(UIRectCorner)rectCornerType backgroundColor:(UIColor *)backgroundColor {
CGSize size = self.bounds.size;
CGFloat scale = [UIScreen mainScreen].scale;
CGSize cornerRadii = CGSizeMake(cornerRadius, cornerRadius);
UIGraphicsBeginImageContextWithOptions(size, YES, scale);
CGContextRef currentContext = UIGraphicsGetCurrentContext();
if (nil == currentContext) {
return;
}
UIBezierPath *cornerPath = [UIBezierPath bezierPathWithRoundedRect:self.bounds byRoundingCorners:rectCornerType cornerRadii:cornerRadii];
UIBezierPath *backgroundRect = [UIBezierPath bezierPathWithRect:self.bounds];
[backgroundColor setFill];
[backgroundRect fill];
[cornerPath addClip];
[self.layer renderInContext:currentContext];
UIImage *processedImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
objc_setAssociatedObject(processedImage, &kProcessedImage, @(1), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
self.image = processedImage;
}
/**
* @brief set cornerRadius for UIImageView, no off-screen-rendered
*/
- (void)cornerRadiusAdvance:(CGFloat)cornerRadius rectCornerType:(UIRectCorner)rectCornerType {
self.zyRadius = cornerRadius;
self.roundingCorners = rectCornerType;
self.zyIsRounding = NO;
if (!self.zyHadAddObserver) {
[[self class] swizzleDealloc];
[self addObserver:self forKeyPath:@"image" options:NSKeyValueObservingOptionNew context:nil];
self.zyHadAddObserver = YES;
}
}
/**
* @brief become Rounding UIImageView, no off-screen-rendered
*/
- (void)cornerRadiusRoundingRect {
self.zyIsRounding = YES;
if (!self.zyHadAddObserver) {
[[self class] swizzleDealloc];
[self addObserver:self forKeyPath:@"image" options:NSKeyValueObservingOptionNew context:nil];
self.zyHadAddObserver = YES;
}
}
- (void)zy_dealloc {
if (self.zyHadAddObserver) {
[self removeObserver:self forKeyPath:@"image"];
}
[self zy_dealloc];
}
- (void)validateFrame {
if (self.frame.size.width == 0) {
[self.class swizzleLayoutSubviews];
}
}
+ (void)swizzleMethod:(SEL)oneSel anotherMethod:(SEL)anotherSel {
Method oneMethod = class_getInstanceMethod(self, oneSel);
Method anotherMethod = class_getInstanceMethod(self, anotherSel);
method_exchangeImplementations(oneMethod, anotherMethod);
}
+ (void)swizzleDealloc {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
[self swizzleMethod:NSSelectorFromString(@"dealloc") anotherMethod:@selector(zy_dealloc)];
});
}
+ (void)swizzleLayoutSubviews {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
[self swizzleMethod:@selector(layoutSubviews) anotherMethod:@selector(zy_LayoutSubviews)];
});
}
- (void)zy_LayoutSubviews {
[self zy_LayoutSubviews];
if (self.zyIsRounding) {
[self cornerRadiusWithImage:self.image cornerRadius:self.frame.size.width/2 rectCornerType:UIRectCornerAllCorners];
} else if (0 != self.zyRadius && 0 != self.roundingCorners && nil != self.image) {
[self cornerRadiusWithImage:self.image cornerRadius:self.zyRadius rectCornerType:self.roundingCorners];
}
}
#pragma mark - KVO for .image
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
if ([keyPath isEqualToString:@"image"]) {
UIImage *newImage = change[NSKeyValueChangeNewKey];
if ([newImage isMemberOfClass:[NSNull class]]) {
return;
} else if ([objc_getAssociatedObject(newImage, &kProcessedImage) intValue] == 1) {
return;
}
[self validateFrame];
if (self.zyIsRounding) {
[self cornerRadiusWithImage:newImage cornerRadius:self.frame.size.width/2 rectCornerType:UIRectCornerAllCorners];
} else if (0 != self.zyRadius && 0 != self.roundingCorners && nil != self.image) {
[self cornerRadiusWithImage:newImage cornerRadius:self.zyRadius rectCornerType:self.roundingCorners];
}
}
}
- (BOOL)zyHadAddObserver {
return [objc_getAssociatedObject(self, _cmd) boolValue];
}
- (void)setZyHadAddObserver:(BOOL)zyHadAddObserver {
objc_setAssociatedObject(self, @selector(zyHadAddObserver), @(zyHadAddObserver), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
- (BOOL)zyIsRounding {
return [objc_getAssociatedObject(self, _cmd) boolValue];
}
- (void)setZyIsRounding:(BOOL)zyIsRounding {
objc_setAssociatedObject(self, @selector(zyIsRounding), @(zyIsRounding), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
- (UIRectCorner)roundingCorners {
return [objc_getAssociatedObject(self, _cmd) unsignedLongValue];
}
- (void)setRoundingCorners:(UIRectCorner)roundingCorners {
objc_setAssociatedObject(self, @selector(roundingCorners), @(roundingCorners), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
- (CGFloat)zyRadius {
return [objc_getAssociatedObject(self, _cmd) floatValue];
}
- (void)setZyRadius:(CGFloat)zyRadius {
objc_setAssociatedObject(self, @selector(zyRadius), @(zyRadius), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
//ZYCornerRadius is available under the MIT license.
//Please visit https://github.com/liuzhiyi1992/ZYCornerRadius for details.
@end
static BOOL canEdit = NO;
static char blockKey;
@interface UIViewController()<UIActionSheetDelegate,UINavigationControllerDelegate, UIImagePickerControllerDelegate,UIAlertViewDelegate>
@property (nonatomic, copy) PhotoBlock photoBlock;
@end
@implementation UIViewController (Extension)
+ (UIViewController *)findBestViewController:(UIViewController *)vc {
if (vc.presentedViewController) {
// Return presented view controller
return [UIViewController findBestViewController:vc.presentedViewController];
} else if ([vc isKindOfClass:[UISplitViewController class]]) {
// Return right hand side
UISplitViewController* svc = (UISplitViewController*)vc;
if (svc.viewControllers.count > 0)
return [UIViewController findBestViewController:svc.viewControllers.lastObject];
else
return vc;
} else if ([vc isKindOfClass:[UINavigationController class]]) {
// Return top view
UINavigationController* svc = (UINavigationController*)vc;
if (svc.viewControllers.count > 0)
return [UIViewController findBestViewController:svc.topViewController];
else
return vc;
} else if ([vc isKindOfClass:[UITabBarController class]]) {
// Return visible view
UITabBarController* svc = (UITabBarController*)vc;
if (svc.viewControllers.count > 0)
return [UIViewController findBestViewController:svc.selectedViewController];
else
return vc;
} else {
// Unknown view controller type, return last child view controller
return vc;
}
}
+ (UIViewController*)currentViewController {
// Find best view controller
UIViewController* viewController = [UIApplication sharedApplication].keyWindow.rootViewController;
return [UIViewController findBestViewController:viewController];
}
#pragma mark - set
- (void)setPhotoBlock:(PhotoBlock)photoBlock
{
objc_setAssociatedObject(self, &blockKey, photoBlock, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
#pragma mark - get
- (PhotoBlock )photoBlock
{
return objc_getAssociatedObject(self, &blockKey);
}
- (void)showCanEdit:(BOOL)edit photo:(PhotoBlock)block
{
if(edit) canEdit = edit;
self.photoBlock = [block copy];
UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:nil otherButtonTitles:@"拍照", @"相册中获取", nil];
sheet.tag = 2599;
[sheet showInView:self.view];
}
#pragma mark - action sheet delegte
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
if (actionSheet.tag == 2599)
{
//权限
ALAuthorizationStatus author = [ALAssetsLibrary authorizationStatus];
if (author == ALAuthorizationStatusRestricted || author ==ALAuthorizationStatusDenied) {
CGFloat kSystemMainVersion = [UIDevice currentDevice].systemVersion.floatValue;
NSString *title = nil;
NSString *photoType = buttonIndex==0?@"相机":@"相册";
NSString *msg = [NSString stringWithFormat:@"还没有开启%@权限,请在系统设置中开启",photoType];
NSString *cancelTitle = @"暂不";
NSString *otherButtonTitles = @"去设置";
if (kSystemMainVersion < 8.0) {
title = [NSString stringWithFormat:@"%@权限未开启",photoType];
msg = [NSString stringWithFormat:@"请在系统设置中开启%@服务\n(设置>隐私>%@>开启)",photoType,photoType];
cancelTitle = @"知道了";
otherButtonTitles = nil;
}
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:title message:msg delegate:self cancelButtonTitle:cancelTitle otherButtonTitles:otherButtonTitles, nil];
alertView.tag = 2598;
[alertView show];
return;
}
//跳转到相机/相册页面
UIImagePickerController* imagePickerController = [[UIImagePickerController alloc] init];
imagePickerController.delegate = self;
imagePickerController.allowsEditing = canEdit;
switch (buttonIndex)
{
case 0:
//拍照
//是否支持相机
if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
{
imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentViewController:imagePickerController animated:YES completion:NULL];
}
else
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"温馨提示" message:@"该设备不支持相机" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil, nil];
[alert show];
}
break;
case 1:
//相册
imagePickerController.sourceType =UIImagePickerControllerSourceTypePhotoLibrary;
[self presentViewController:imagePickerController animated:YES completion:NULL];
default:
break;
}
}
}
#pragma mark - UIAlertDelegate
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
if(alertView.tag==2598)
{
if (buttonIndex == 1) {
CGFloat kSystemMainVersion = [UIDevice currentDevice].systemVersion.floatValue;
if (kSystemMainVersion >= 8.0) {
NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
if ([[UIApplication sharedApplication] canOpenURL:url]) {
[[UIApplication sharedApplication] openURL:url];
}
//@"1.iOS8以后支持跳转到设置,设置完成后,系统会自启应用,刷新应用权限 2.由于系统自启应用,连接Xcode调试会crash,断开与Xcode连接,进行操作即可";
}
}
}
}
#pragma mark - image picker delegte
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
[picker dismissViewControllerAnimated:YES completion:^{}];
UIImage *image;
//是否要裁剪
if ([picker allowsEditing]){
//编辑之后的图像
image = [info objectForKey:UIImagePickerControllerEditedImage];
} else {
image = [info objectForKey:UIImagePickerControllerOriginalImage];
}
if(self.photoBlock)
{
self.photoBlock(image);
}
}
+ (void)load
{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
Method method1 = class_getInstanceMethod(self, NSSelectorFromString(@"dealloc"));
Method method2 = class_getInstanceMethod(self, @selector(my_dealloc));
method_exchangeImplementations(method1, method2);
});
}
- (void)my_dealloc
{
NSLog(@"%@销毁了", self);
[self my_dealloc];
}
@end
......@@ -35,6 +35,10 @@
//新手引导
#import "LogGuideView.h"
//天气
#import "LMJScrollTextView.h"
#import "WETianqiController.h"
#import "UIColor+Hex.h"
@interface LogViewController ()<UITableViewDelegate, UITableViewDataSource,shareViewClickDelegate,logHeaderClickDelegate>
......@@ -90,6 +94,69 @@
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:self.lb_title];
[LogGuideView showGuideView];
//设置导航栏
[self configNavBarItems];
}
- (void)configNavBarItems
{
LMJScrollTextView *cityView = [[LMJScrollTextView alloc]initWithFrame:CGRectMake(0, 0, 100, 40) textScrollModel:LMJTextScrollContinuous direction:LMJTextScrollMoveLeft];
UILabel *lb_weather = [[UILabel alloc]init];
UIBarButtonItem *item = [[UIBarButtonItem alloc]initWithCustomView:cityView];
UIBarButtonItem *item2 = [[UIBarButtonItem alloc]initWithCustomView:lb_weather];
NSString *city = nil;
NSString *weather = nil;
if ([[NSUserDefaults standardUserDefaults]objectForKey:@"TQData"]) {
NSDictionary *data = [[NSUserDefaults standardUserDefaults]objectForKey:@"TQData"][@"data"];
city = [NSString stringWithFormat:@"%@",data[@"cityname"]];
weather = [NSString stringWithFormat:@"%@ %@℃~%@℃",data[@"weather"],data[@"ltemp"],data[@"htemp"]];
}else {
city = @"北京市";
weather =@"晴 22℃";
}
CGFloat width = [city sizeWithAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIFont systemFontOfSize:16], NSFontAttributeName, nil]].width;
if (width >= 100) {
cityView.frame = CGRectMake(0, 0, 100, 40);
[cityView startScrollWithText:city textColor:[UIColor whiteColor] font:[UIFont systemFontOfSize:16]];
}else {
cityView.frame = CGRectMake(0, 0, width, 40);
[cityView startShowWithText:city textColor:[UIColor whiteColor] font:[UIFont systemFontOfSize:16]];
}
CGFloat width2 = [weather sizeWithAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIFont systemFontOfSize:16], NSFontAttributeName, nil]].width;
lb_weather.frame = CGRectMake(0, 0, width2, 40);
lb_weather.textColor = [UIColor whiteColor];
lb_weather.font = [UIFont systemFontOfSize:16];
lb_weather.text = weather;
self.navigationItem.rightBarButtonItems = @[item2,item];
UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(singleTapGesture:)];
[cityView addGestureRecognizer:singleTap];
UITapGestureRecognizer *singleTap1 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(singleTapGesture:)];
lb_weather.userInteractionEnabled = YES;
[lb_weather addGestureRecognizer:singleTap1];
}
......@@ -203,11 +270,10 @@
}else if ([type isEqualToString:@"allcoins"]){
CoinsDetailListVC *vc = [[CoinsDetailListVC alloc]init];
vc.title = @"金币明细";
vc.type = ListVCTypeCoinsDetail;
vc.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:vc animated:YES];
CoinsCenterViewController *vc = [[CoinsCenterViewController alloc]init];
vc.title = @"金币中心";
vc.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:vc animated:YES];
}else if ([type isEqualToString:@"todaycoins"]){
CoinsCenterViewController *vc = [[CoinsCenterViewController alloc]init];
......@@ -246,6 +312,25 @@
}
#pragma mark - event response
- (void)singleTapGesture:(UITapGestureRecognizer *)ges
{
NSDictionary *data = [[NSUserDefaults standardUserDefaults]objectForKey:@"TQData"][@"data"];
if (data) {
NSString *lat = [NSString stringWithFormat:@"%@",data[@"lat"]];
NSString *lng = [NSString stringWithFormat:@"%@",data[@"lng"]];
WETianqiController *controlltr = [[WETianqiController alloc] init];
[controlltr fetchWeatherDataLocationLat:[lat doubleValue] LocationLng:[lng doubleValue]];
[self presentViewController:controlltr animated:YES completion:NULL];
}else{
WETianqiController *controlltr = [[WETianqiController alloc] init];
[controlltr fetchWeatherDataLocationLat:39.91488908 LocationLng:116.40387397];
[self presentViewController:controlltr animated:YES completion:NULL];
}
}
#pragma mark - private methods
//显示动画
-(void)faceToAN:(UIView *)view1 andtranslter:(BOOL)bools;
......
......@@ -103,7 +103,7 @@
}else if (indexPath.row == 1){
cell.lb_Content_ArrowHidden.text = @"400-002-1709";
cell.lb_Content_ArrowHidden.text = @"400-002-1799";
}
......
......@@ -157,7 +157,8 @@
NSDictionary *dic = [getPeopleID totalCoins];
_lb_allCoinsNumber.text = [NSString stringWithFormat:@"%@",[dic[@"totalScore"] stringValue]];
_lb_todayCoinsNumber.text = [NSString stringWithFormat:@"%@",[dic[@"todaySore"] stringValue]];
NSString *str = [NSString stringWithFormat:@"约%@元",dic[@"caculationMoney"] ];
// NSString *str = [NSString stringWithFormat:@"约%@元",dic[@"caculationMoney"] ];
NSString *str = @"金币抽奖";
UIFont *fnt = [UIFont fontWithName:@"HelveticaNeue" size:8.0f];
CGSize size = CGSizeMake(SCREEN_WIDTH,8);
CGSize labSize = [str sizeWithFont:fnt constrainedToSize:size lineBreakMode:UILineBreakModeWordWrap];
......@@ -183,7 +184,7 @@
make.left.equalTo(self.lb_allCoinsNumber.mas_right).offset(-5);
make.height.offset(15*WIDTHRADIU);
}];
self.popView.textLabel.text = str;
self.popView.textLabel.text = @"金币抽奖";
}
}
......@@ -293,7 +294,7 @@
{
if (!_popView) {
_popView = [[PopView alloc]init];
_popView.hidden = YES;
//_popView.hidden = YES;
//_popView.backgroundColor = [UIColor redColor];
}
return _popView;
......
......@@ -88,6 +88,8 @@ static char base64EncodingTable[64] = {
return NO;
}
- (NSString *)CT_MD5
{
NSData* inputData = [self dataUsingEncoding:NSUTF8StringEncoding];
......
//
// UIButton+CQBlockSupport.h
// AlertToastHUD
//
// Created by caiqiang on 2018/12/6.
// Copyright © 2018年 Caiqiang. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIButton (CQBlockSupport)
- (void)cq_addAction:(void(^)(UIButton *button))action forControlEvents:(UIControlEvents)controlEvents;
@end
//
// UIButton+CQBlockSupport.m
// AlertToastHUD
//
// Created by caiqiang on 2018/12/6.
// Copyright © 2018年 Caiqiang. All rights reserved.
//
#import "UIButton+CQBlockSupport.h"
#import <objc/runtime.h>
typedef void(^CQButtonEventBlock)(UIButton *button);
@interface UIButton ()
@property (nonatomic, copy) CQButtonEventBlock cq_buttonEventBlock;
@end
@implementation UIButton (CQBlockSupport)
static void *cq_buttonEventsBlockKey = &cq_buttonEventsBlockKey;
- (CQButtonEventBlock)cq_buttonEventBlock {
return objc_getAssociatedObject(self, &cq_buttonEventsBlockKey);
}
- (void)setCq_buttonEventBlock:(CQButtonEventBlock)cq_buttonEventBlock {
objc_setAssociatedObject(self, &cq_buttonEventsBlockKey, cq_buttonEventBlock, OBJC_ASSOCIATION_COPY);
}
- (void)cq_addAction:(void (^)(UIButton *))action forControlEvents:(UIControlEvents)controlEvents {
self.cq_buttonEventBlock = action;
[self addTarget:self action:@selector(cq_callButtonEventBlock) forControlEvents:controlEvents];
}
- (void)cq_callButtonEventBlock {
!self.cq_buttonEventBlock ?: self.cq_buttonEventBlock(self);
}
@end
......@@ -13,6 +13,8 @@
#import "SMSLoginViewController.h"
#import "PasswordLoginViewController.h"
@interface LoginVC ()<LoginClickDelegate>
@property (nonatomic, strong)WXLoginViewController *wxVC;
......@@ -50,8 +52,9 @@
[self.view addSubview:self.passwordVC.view];
[self.view bringSubviewToFront:self.wxVC.view];
//预取号
//闪验预取号
[CLShanYanSDKManager preGetPhonenumber:nil];
}
- (void)dealloc
......@@ -74,7 +77,9 @@
break;
case CTLoginBtnTypeDirectly:
//闪验
[self clLogin];
break;
default:
......@@ -82,6 +87,10 @@
}
}
- (void)clLogin
{
......
......@@ -1428,7 +1428,7 @@
<constraint firstAttribute="height" constant="44" id="h5k-Dx-QE1"/>
</constraints>
<fontDescription key="fontDescription" name="HiraginoSansGB-W3" family="Hiragino Sans GB" pointSize="19"/>
<state key="normal" title="重新采集" backgroundImage="矩形-5">
<state key="normal" title="重新认证" backgroundImage="矩形-5">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
......@@ -1640,13 +1640,13 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="认证成功-波浪背景" translatesAutoresizingMaskIntoConstraints="NO" id="ryP-Aa-zPO">
<rect key="frame" x="0.0" y="24" width="1024" height="161"/>
<rect key="frame" x="0.0" y="74" width="1024" height="161"/>
<constraints>
<constraint firstAttribute="height" constant="161" id="l3O-Uv-I8U"/>
</constraints>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="grH-VA-Ftl">
<rect key="frame" x="15" y="140" width="994" height="339.5"/>
<rect key="frame" x="15" y="190" width="994" height="339.5"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="认证成功-照片背景框" translatesAutoresizingMaskIntoConstraints="NO" id="hLw-8r-LUp">
<rect key="frame" x="0.0" y="0.0" width="994" height="339.5"/>
......@@ -1721,7 +1721,7 @@
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" hasAttributedTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Zkm-uc-nLA">
<rect key="frame" x="534.5" y="559.5" width="474.5" height="45"/>
<rect key="frame" x="534.5" y="609.5" width="474.5" height="45"/>
<state key="normal" backgroundImage="矩形-5">
<attributedString key="attributedTitle">
<fragment content="返回首页">
......@@ -1738,7 +1738,7 @@
</connections>
</button>
<button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1Z5-1A-L4t">
<rect key="frame" x="0.0" y="499.5" width="1024" height="44"/>
<rect key="frame" x="0.0" y="549.5" width="1024" height="44"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="sMr-6w-Exp"/>
</constraints>
......@@ -1748,7 +1748,7 @@
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" hasAttributedTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="hys-Cn-sva">
<rect key="frame" x="15" y="559.5" width="474.5" height="45"/>
<rect key="frame" x="15" y="609.5" width="474.5" height="45"/>
<state key="normal" backgroundImage="矩形-5">
<attributedString key="attributedTitle">
<fragment content="继续认证">
......@@ -1767,20 +1767,20 @@
</connections>
</button>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="认证成功-对勾-" translatesAutoresizingMaskIntoConstraints="NO" id="leK-h1-ZKz">
<rect key="frame" x="487" y="449.5" width="50" height="50"/>
<rect key="frame" x="487" y="499.5" width="50" height="50"/>
<constraints>
<constraint firstAttribute="width" constant="50" id="YeU-kj-m9i"/>
<constraint firstAttribute="height" constant="50" id="lMQ-AJ-4SS"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="河北省河北是" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ica-dM-Hez">
<rect key="frame" x="442" y="45.5" width="140" height="27.5"/>
<rect key="frame" x="442" y="95.5" width="140" height="27.5"/>
<fontDescription key="fontDescription" type="system" weight="heavy" pointSize="23"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="肥乡区人力资源和社会保障局" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CrJ-Rm-vtz">
<rect key="frame" x="360.5" y="81" width="303" height="27.5"/>
<rect key="frame" x="360.5" y="131" width="303" height="27.5"/>
<fontDescription key="fontDescription" type="system" weight="heavy" pointSize="23"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
......@@ -3154,14 +3154,14 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xdz-Ub-4T9">
<rect key="frame" x="25" y="10" width="76" height="23"/>
<rect key="frame" x="25" y="10" width="77.5" height="23"/>
<constraints>
<constraint firstAttribute="height" constant="23" id="f9h-9r-mkx"/>
</constraints>
<attributedString key="attributedText">
<fragment content="撒大声地">
<attributes>
<font key="NSFont" size="19" name="STYuanti-SC-Bold"/>
<font key="NSFont" metaFont="system" size="19"/>
<paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
......@@ -6373,7 +6373,7 @@
<scene sceneID="jfa-no-e6h">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="V3K-nf-CFC" sceneMemberID="viewController">
<tabBarItem key="tabBarItem" title="发现" image="发现" selectedImage="发现_s" id="QfA-Fs-7hV"/>
<tabBarItem key="tabBarItem" title="发现" image="Find-n" selectedImage="Find-s" id="QfA-Fs-7hV"/>
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="UBr-pM-akk">
<rect key="frame" x="0.0" y="24" width="1024" height="50"/>
......@@ -6968,12 +6968,12 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0rE-zR-AG6">
<rect key="frame" x="444.5" y="1022.5" width="135" height="25"/>
<rect key="frame" x="454.5" y="1022.5" width="115" height="25"/>
<constraints>
<constraint firstAttribute="height" constant="25" id="urM-xv-s6I"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="10"/>
<state key="normal" title="同意 &lt;&lt;解析社保数据协议&gt;&gt;">
<state key="normal" title="同意 &lt;&lt;用户服务协议&gt;&gt;">
<color key="titleColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
</state>
<connections>
......@@ -6981,7 +6981,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="19C-dz-Tl5">
<rect key="frame" x="420.5" y="1025.5" width="14" height="22"/>
<rect key="frame" x="430.5" y="1025.5" width="14" height="22"/>
<state key="normal" image="check_unselected.png"/>
<state key="selected" image="check_selected.png"/>
<connections>
......@@ -7156,6 +7156,7 @@
<outlet property="nameText" destination="Jhx-d3-aHb" id="bt8-BZ-aeB"/>
<outlet property="photoNumber" destination="YI1-IK-tAp" id="dcb-VU-BRI"/>
<outlet property="searchButton2" destination="9jb-c8-dSn" id="izS-pc-sLK"/>
<outlet property="topConstant" destination="H3D-Kq-65T" id="CIy-6V-A5L"/>
<segue destination="4aA-7b-6tV" kind="show" identifier="successSegueTwo" id="G1D-FP-FSY"/>
</connections>
</viewController>
......@@ -10991,6 +10992,8 @@
<image name="4失业信息1-8-4" width="355" height="72.5"/>
<image name="5需求信息_就业" width="355" height="72.5"/>
<image name="9月10日更改背景.png" width="718" height="856"/>
<image name="Find-n" width="26" height="19"/>
<image name="Find-s" width="28" height="18.5"/>
<image name="QQ" width="70" height="70"/>
<image name="addPhoto_1" width="86" height="131.5"/>
<image name="addressLabel_tel" width="20" height="19"/>
......@@ -31186,8 +31189,6 @@ E9MT1hPbE+MT5hP4E/sUAAAAAAAAAAIBAAAAAAAAAFcAAAAAAAAAAAAAAAAAABQCA
<image name="关闭按钮" width="20.5" height="20"/>
<image name="内容背景1:4" width="374" height="369.5"/>
<image name="劳动力就业信息数据采集" width="328.5" height="56"/>
<image name="发现" width="21" height="20"/>
<image name="发现_s" width="21" height="20"/>
<image name="周边游2" width="35" height="33"/>
<image name="图2 线2" width="373.5" height="21"/>
<image name="图2线1" width="361.5" height="15"/>
......@@ -31272,6 +31273,6 @@ E9MT1hPbE+MT5hP4E/sUAAAAAAAAAAIBAAAAAAAAAFcAAAAAAAAAAAAAAAAAABQCA
<inferredMetricsTieBreakers>
<segue reference="jHw-xL-3Bt"/>
<segue reference="Irf-nw-i6n"/>
<segue reference="Upx-sG-jrU"/>
<segue reference="G1D-FP-FSY"/>
</inferredMetricsTieBreakers>
</document>
......@@ -161,7 +161,7 @@
UIButton * button_2 = [UIButton buttonWithType:UIButtonTypeCustom]; button_2.frame = CGRectMake(0, 0, 0, 49); button_2.titleLabel.textAlignment =NSTextAlignmentRight; [button_2 setTitle:@" 帮助" forState:UIControlStateNormal]; [button_2 addTarget:self action:@selector(buttonClick_1) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem * backButtonItem_2 = [[UIBarButtonItem alloc] initWithCustomView:button_2]; self.navigationItem.rightBarButtonItem = backButtonItem_2;
// UIButton * button_2 = [UIButton buttonWithType:UIButtonTypeCustom]; button_2.frame = CGRectMake(0, 0, 0, 49); button_2.titleLabel.textAlignment =NSTextAlignmentRight; [button_2 setTitle:@" 帮助" forState:UIControlStateNormal]; [button_2 addTarget:self action:@selector(buttonClick_1) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem * backButtonItem_2 = [[UIBarButtonItem alloc] initWithCustomView:button_2]; self.navigationItem.rightBarButtonItem = backButtonItem_2;
[self.view reloadInputViews];
......@@ -417,9 +417,12 @@
if (model.code != 0) {
dispatch_async(dispatch_get_main_queue(), ^{
self.buttonForCameraPost.userInteractionEnabled =YES;
self.failurePic =[[UIImageView alloc]init];
self.failurePic.image =selfImage;
self.failurePic =[[UIImageView alloc]init];
self.failurePic.image =selfImage;
});
}
});
......@@ -628,6 +631,7 @@
#pragma mark -错报图标
- (IBAction)senderToHiddenView:(id)sender {
self.backguardView.hidden =YES;
[self.navigationController popViewControllerAnimated:YES];
//return;
// [self KZViewControllerEnter];
}
......@@ -824,6 +828,7 @@
// }
// }];
//获取控制器
UIStoryboard *sb =[UIStoryboard storyboardWithName:@"Main" bundle:nil];
artificalViewController *artVC=[sb instantiateViewControllerWithIdentifier:@"artificalViewController"];
//传递数据
......
//
// SocialSecurityApproveSuccessVC.h
// Open
//
// Created by 雷俊博 on 2019/9/2.
// Copyright © 2019 黄江涛 . All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface SocialSecurityApproveSuccessVC : UIViewController
@property (nonatomic, copy)NSString *departmentName;
@property (nonatomic, strong)UIImage *imgPhoto;
@property (nonatomic, copy)NSString *dateStr;
@property (nonatomic, copy)NSString *addressStr;
@property (nonatomic, strong)paramResult *model;
@end
NS_ASSUME_NONNULL_END
//
// SocialSecurityApproveSuccessVC.m
// Open
//
// Created by 雷俊博 on 2019/9/2.
// Copyright © 2019 黄江涛 . All rights reserved.
//
#import "SocialSecurityApproveSuccessVC.h"
#import "Constants.h"
#import "UIColor+Hex.h"
#import <Masonry.h>
@interface SocialSecurityApproveSuccessVC ()
@property (nonatomic, strong)UIScrollView *scrollview;
@property (nonatomic, strong)UIView *backView;
@property (nonatomic, strong)UIImageView *img_back;
@property (nonatomic, strong)UILabel *lb_department;
@property (nonatomic, strong)UIView *whiteView;
@property (nonatomic, strong)UIImageView *img_photo;
@property (nonatomic, strong)UIImageView *img_date;
@property (nonatomic, strong)UILabel *lb_date;
@property (nonatomic, strong)UIImageView *img_address;
@property (nonatomic, strong)UILabel *lb_address;
@property (nonatomic, strong)UIImageView *img_success;
@property (nonatomic, strong)UILabel *lb_success;
@property (nonatomic, strong)UIButton *btn_approve;
@property (nonatomic, strong)UIButton *btn_back;
@end
@implementation SocialSecurityApproveSuccessVC
#pragma mark - life cycle
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.view.backgroundColor = [UIColor whiteColor];
[self.view addSubview:self.scrollview];
self.navigationItem.hidesBackButton = YES;
NSString *str = [NSString stringWithFormat:@"%@%@\n%@人力资源和社会保障局",MHSafeStrings(self.model.provinceName),MHSafeStrings(self.model.cityName),MHSafeStrings(self.model.countryName)];
NSMutableAttributedString *attributedStr = [[NSMutableAttributedString alloc] initWithString:str];
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
paragraphStyle.lineSpacing = 8.0 * WIDTHRADIU; // 设置行间距
paragraphStyle.alignment = NSTextAlignmentCenter; //设置两端对齐显示
[attributedStr addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, attributedStr.length)];
self.lb_department.attributedText = attributedStr;
self.lb_date.text = MHSafeStrings(self.model.vafiryTime);
self.lb_address.text = MHSafeStrings(self.model.verifyAdress);
if (self.model.verifyPhoto) {
self.img_photo.image = [UIImage imageWithData:[[NSData alloc] initWithBase64EncodedString:self.model.verifyPhoto options:NSDataBase64DecodingIgnoreUnknownCharacters]];
}
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
self.navigationController.navigationBar.translucent = NO;
self.navigationController.navigationBar.barTintColor = [UIColor colorWithHex:0x1986d4];
[self.transitionCoordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
self.navigationController.navigationBar.barTintColor = [UIColor colorWithHex:0x1986d4];
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@""] forBarMetrics:UIBarMetricsDefault];
} completion:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
}];
//禁止手势返回
id traget = self.navigationController.interactivePopGestureRecognizer.delegate;
UIPanGestureRecognizer * pan = [[UIPanGestureRecognizer alloc]initWithTarget:traget action:nil];
[self.view addGestureRecognizer:pan];
}
- (void)viewWillLayoutSubviews
{
[super viewWillLayoutSubviews];
[self.lb_department mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.offset(20 * WIDTHRADIU);
make.centerX.equalTo(self.img_back);
}];
[self.img_photo mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.offset(15 * WIDTHRADIU);
make.width.equalTo(self.whiteView.mas_width).multipliedBy(0.5);
make.height.offset(190 * WIDTHRADIU);
make.centerX.equalTo(self.whiteView);
}];
[self.img_date mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(21 * WIDTHRADIU);
make.top.equalTo(self.img_photo.mas_bottom).offset(24 * WIDTHRADIU);
}];
[self.lb_date mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(self.img_date);
make.left.equalTo(self.img_date.mas_right).offset(5 * WIDTHRADIU);
}];
[self.img_address mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(21 * WIDTHRADIU);
make.top.equalTo(self.img_date.mas_bottom).offset(15 * WIDTHRADIU);
}];
[self.lb_address mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(self.img_address);
make.left.equalTo(self.img_date.mas_right).offset(5 * WIDTHRADIU);
}];
UIImage *image = [UIImage imageNamed:@"认证成功-对勾-"];
[self.img_success mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.offset(CGRectGetMaxY(self.whiteView.frame) - image.size.height/2);
make.centerX.equalTo(self.backView);
}];
[self.lb_success mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.img_success.mas_bottom).offset(20 * WIDTHRADIU);
make.centerX.equalTo(self.img_success);
}];
[self.btn_approve mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.lb_success.mas_bottom).offset(30 * WIDTHRADIU);
make.left.equalTo(self.whiteView);
make.width.offset((ScreenWidth - 30 * WIDTHRADIU - 45 * WIDTHRADIU)/2);
make.height.offset(45 * WIDTHRADIU);
}];
[self.btn_back mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.lb_success.mas_bottom).offset(30 * WIDTHRADIU);
make.right.equalTo(self.whiteView);
make.width.offset((ScreenWidth - 30 * WIDTHRADIU - 45 * WIDTHRADIU)/2);
make.height.offset(45 * WIDTHRADIU);
}];
}
#pragma mark - event response
- (void)btnClick:(UIButton *)sender
{
if (sender == self.btn_approve) {
[self.navigationController popViewControllerAnimated:YES];
}else if (sender == self.btn_back){
WeakSelf
UIAlertController * alertVC = [UIAlertController alertControllerWithTitle:@"确认返回首页?" message:nil preferredStyle:UIAlertControllerStyleAlert];
[alertVC addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
NSLog(@"点击取消");
}]];
[alertVC addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
NSLog(@"点击确认");
[weakSelf.navigationController popToRootViewControllerAnimated:YES];
}]];
[self presentViewController:alertVC animated:YES completion:nil];
}
}
#pragma mark - getters and setters
- (UIScrollView *)scrollview
{
if (!_scrollview) {
_scrollview = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, ScreenWidth, ScreenHeight - cl_kNavigationBarHeight)];
_scrollview.backgroundColor = [UIColor whiteColor];
_scrollview.contentSize = CGSizeMake(ScreenWidth, ScreenHeight);
_scrollview.showsHorizontalScrollIndicator = NO;
_scrollview.showsVerticalScrollIndicator = NO;
[_scrollview addSubview:self.backView];
}
return _scrollview;
}
- (UIView *)backView
{
if (!_backView) {
_backView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenWidth, ScreenHeight * 1)];
_backView.backgroundColor = [UIColor whiteColor];
[_backView addSubview:self.img_back];
[_backView addSubview:self.whiteView];
[_backView addSubview:self.img_success];
[_backView addSubview:self.lb_success];
[_backView addSubview:self.btn_approve];
[_backView addSubview:self.btn_back];
}
return _backView;
}
- (UIImageView *)img_back
{
if (!_img_back) {
UIImage *image = [UIImage imageNamed:@"img_wave_backview"];
CGFloat imageWidth = image.size.width;
CGFloat imageHeight = image.size.height;
CGFloat imageScale = imageHeight/imageWidth;
_img_back = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_WIDTH *imageScale)];
_img_back.image = image;
[_img_back addSubview:self.lb_department];
}
return _img_back;
}
- (UILabel *)lb_department
{
if (!_lb_department) {
_lb_department = [[UILabel alloc]init];
_lb_department.textAlignment = NSTextAlignmentCenter;
_lb_department.textColor = [UIColor whiteColor];
_lb_department.font = [UIFont boldSystemFontOfSize:22 * WIDTHRADIU];
_lb_department.numberOfLines = 0;
[_lb_department sizeToFit];
}
return _lb_department;
}
- (UIView *)whiteView
{
if (!_whiteView) {
_whiteView = [[UIView alloc]initWithFrame:CGRectMake(15 * WIDTHRADIU, CGRectGetMaxY(self.img_back.frame) - 40 * WIDTHRADIU , ScreenWidth - 30 * WIDTHRADIU, 300 * WIDTHRADIU)];
_whiteView.backgroundColor = [UIColor whiteColor];
_whiteView.layer.cornerRadius = 8 * WIDTHRADIU;
_whiteView.layer.shadowColor = [UIColor colorWithHex:0x797979].CGColor;
// 阴影偏移,默认(0, -3)
_whiteView.layer.shadowOffset = CGSizeMake(0,0);
// 阴影透明度,默认0
_whiteView.layer.shadowOpacity = 0.5;
// 阴影半径,默认3
_whiteView.layer.shadowRadius = 5 * WIDTHRADIU;
[_whiteView addSubview:self.img_photo];
[_whiteView addSubview:self.img_date];
[_whiteView addSubview:self.lb_date];
[_whiteView addSubview:self.img_address];
[_whiteView addSubview:self.lb_address];
}
return _whiteView;
}
- (UIImageView *)img_photo
{
if (!_img_photo) {
_img_photo = [[UIImageView alloc]init];
_img_photo.backgroundColor = [UIColor redColor];
}
return _img_photo;
}
- (UIImageView *)img_date
{
if (!_img_date) {
_img_date = [[UIImageView alloc]init];
_img_date.image = [UIImage imageNamed:@"认证成功-时间"];
}
return _img_date;
}
- (UILabel *)lb_date
{
if (!_lb_date) {
_lb_date = [[UILabel alloc]init];
_lb_date.textColor = [UIColor colorWithHex:0x999999];
_lb_date.font = [UIFont systemFontOfSize:12 * WIDTHRADIU];
}
return _lb_date;
}
- (UIImageView *)img_address
{
if (!_img_address) {
_img_address = [[UIImageView alloc]init];
_img_address.image = [UIImage imageNamed:@"认证成功-地址"];
}
return _img_address;
}
- (UILabel *)lb_address
{
if (!_lb_address) {
_lb_address = [[UILabel alloc]init];
_lb_address.textColor = [UIColor colorWithHex:0x999999];
_lb_address.font = [UIFont systemFontOfSize:12 * WIDTHRADIU];
}
return _lb_address;
}
- (UIImageView *)img_success
{
if (!_img_success) {
_img_success = [[UIImageView alloc]init];
_img_success.image = [UIImage imageNamed:@"认证成功-对勾-"];
}
return _img_success;
}
- (UILabel *)lb_success
{
if (!_lb_success) {
_lb_success = [[UILabel alloc]init];
_lb_success.textColor = [UIColor colorWithHex:0x1986d4];
_lb_success.font = [UIFont boldSystemFontOfSize:20 * WIDTHRADIU];
_lb_success.textAlignment = NSTextAlignmentCenter;
_lb_success.text = @"恭喜您社保认证成功";
}
return _lb_success;
}
- (UIButton *)btn_approve
{
if (!_btn_approve) {
_btn_approve = [UIButton buttonWithType:UIButtonTypeCustom];
[_btn_approve setTitle:@"继续认证" forState:UIControlStateNormal];
[_btn_approve setBackgroundColor:[UIColor colorWithHex:0x1a480]];
[_btn_approve setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
_btn_approve.titleLabel.font = [UIFont systemFontOfSize:17 * WIDTHRADIU];
_btn_approve.layer.cornerRadius = 5 * WIDTHRADIU;
[_btn_approve addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
}
return _btn_approve;
}
- (UIButton *)btn_back
{
if (!_btn_back) {
_btn_back = [UIButton buttonWithType:UIButtonTypeCustom];
[_btn_back setTitle:@"返回首页" forState:UIControlStateNormal];
[_btn_back setBackgroundColor:[UIColor colorWithHex:0x1a480]];
[_btn_back setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
_btn_back.titleLabel.font = [UIFont systemFontOfSize:17 * WIDTHRADIU];
_btn_back.layer.cornerRadius = 5 * WIDTHRADIU;
[_btn_back addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
}
return _btn_back;
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
......@@ -36,7 +36,7 @@
#import <CL_ShanYanSDK/CL_ShanYanSDK.h>
//#import <CL_ShanYanSDK/CL_ShanYanSDK.h>
#import "GTCountSDK.h"
#import "WXApi.h"
......@@ -57,6 +57,9 @@
#import "AtlasDetailVC.h"
#import "KKNewsVC.h"
//瞬验
//#import "ShareInstallSDK.h"
#define kGcAppId @"CYol79N33N71BV6dcjrqj3"
#define WXAppId @"wx205c6619f1eab2e8"
......@@ -247,6 +250,9 @@
//瞬验
// [ShareInstallSDK setAppKey:@"AKBK2FKF6BBEAF" withDelegate:self WithOptions:launchOptions];
//日志
[DDLog addLogger:[DDASLLogger sharedInstance]]; // Uses os_log
......@@ -526,6 +532,9 @@ fetchCompletionHandler:
}
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
{
BOOL result = [[UMSocialManager defaultManager] handleOpenURL:url];
......@@ -550,12 +559,17 @@ fetchCompletionHandler:
BOOL result = [[UMSocialManager defaultManager] handleOpenURL:url options:options];
BOOL result2 = [WXApi handleOpenURL:url delegate:self];
BOOL result3 = [JANALYTICSService handleUrl:url];
if (result3) {
return YES;
}
if (result2) {
return result2;
}
if (!result) {
}
......@@ -580,6 +594,15 @@ completionHandler:(void (^ __nullable)(BOOL success))completion
}
#pragma mark - WXAPIDelegate
/*! @brief 收到一个来自微信的请求,第三方应用程序处理完后调用sendResp向微信发送结果
*
......
{
"images" : [
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "2688h",
"filename" : "1242_2688.png",
"minimum-system-version" : "12.0",
"orientation" : "portrait",
"scale" : "3x"
},
{
"orientation" : "landscape",
"idiom" : "iphone",
"extent" : "full-screen",
"minimum-system-version" : "12.0",
"subtype" : "2688h",
"scale" : "3x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "1792h",
"filename" : "828_1792.png",
"minimum-system-version" : "12.0",
"orientation" : "portrait",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "iphone",
"extent" : "full-screen",
"minimum-system-version" : "12.0",
"subtype" : "1792h",
"scale" : "2x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "2436h",
"filename" : "1125_2436.png",
"minimum-system-version" : "11.0",
"orientation" : "portrait",
"scale" : "3x"
},
{
"orientation" : "landscape",
"idiom" : "iphone",
"extent" : "full-screen",
"minimum-system-version" : "11.0",
"subtype" : "2436h",
"scale" : "3x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "736h",
"filename" : "1242_2208.png",
"minimum-system-version" : "8.0",
"orientation" : "portrait",
"scale" : "3x"
},
{
"orientation" : "landscape",
"idiom" : "iphone",
"extent" : "full-screen",
"minimum-system-version" : "8.0",
"subtype" : "736h",
"scale" : "3x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "667h",
"filename" : "750_1134.png",
"minimum-system-version" : "8.0",
"orientation" : "portrait",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "640_960.png",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "retina4",
"filename" : "640_1136.png",
"minimum-system-version" : "7.0",
"orientation" : "portrait",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"extent" : "full-screen",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"extent" : "full-screen",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"extent" : "full-screen",
"subtype" : "retina4",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "btn_coinsdetail.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "btn_coinsdetail@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "btn_coinsdetail@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "exercise_coinsAlertView.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "exercise_coinsAlertView@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "exercise_coinsAlertView@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "airInsurance.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "airInsurance@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "airInsurance@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "微保.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "微保@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "微保@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "社保计算器.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "社保计算器@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "社保计算器@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "发放失败.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "发放失败@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "发放失败@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "奖品-框-发放失败.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "奖品-框-发放失败@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "奖品-框-发放失败@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "奖品详情-警示.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "奖品详情-警示@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "奖品详情-警示@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "警示.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "警示@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "警示@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "my_activity_prize_Details_normal.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "my_activity_prize_Details_normal@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "my_activity_prize_Details_normal@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "my_activity_prize_Invalid_normal.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "my_activity_prize_Invalid_normal@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "my_activity_prize_Invalid_normal@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "my_activity_prize_Rogerthat_normal.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "my_activity_prize_Rogerthat_normal@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "my_activity_prize_Rogerthat_normal@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "my_activity_prize_receivebg_normal.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "my_activity_prize_receivebg_normal@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "my_activity_prize_receivebg_normal@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "关联.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "关联@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "关联@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "分割线.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "分割线@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "分割线@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "发放中.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "发放中@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "发放中@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "奖品-框-已发放.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "奖品-框-已发放@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "奖品-框-已发放@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "奖品-框-未发放.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "奖品-框-未发放@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "奖品-框-未发放@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "我的奖品-空状态.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "我的奖品-空状态@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "我的奖品-空状态@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "未领取.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "未领取@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "未领取@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "神秘礼包.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "神秘礼包@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "神秘礼包@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "my_gold_Checkin_ Wednesday_normal.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "my_gold_Checkin_ Wednesday_normal@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "my_gold_Checkin_ Wednesday_normal@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "my_gold_Checkin_bg_Signed_normal.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "my_gold_Checkin_bg_Signed_normal@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "my_gold_Checkin_bg_Signed_normal@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "通知icon.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "通知icon@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "通知icon@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "金币.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "金币@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "金币@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "img_wave_backview.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "img_wave_backview@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "img_wave_backview@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
//
// HomeSectionHeaderView.h
// Open
//
// Created by 雷俊博 on 2019/8/16.
// Copyright © 2019 黄江涛 . All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface HomeSectionHeaderView : UITableViewHeaderFooterView
@property (nonatomic, strong)UILabel *lb_title;
@end
NS_ASSUME_NONNULL_END
//
// HomeSectionHeaderView.m
// Open
//
// Created by 雷俊博 on 2019/8/16.
// Copyright © 2019 黄江涛 . All rights reserved.
//
#import "HomeSectionHeaderView.h"
#import "UIColor+Hex.h"
#import "Constants.h"
@interface HomeSectionHeaderView ()
@property (nonatomic, strong)UIView *lineView;
@end
@implementation HomeSectionHeaderView
#pragma mark - life cycle
- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithReuseIdentifier:reuseIdentifier];
if (self) {
[self addSubview:self.lb_title];
[self addSubview:self.lineView];
self.contentView.backgroundColor = [UIColor whiteColor];
[self setupUI];
}
return self;
}
- (void)setupUI
{
[self.lb_title mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(self);
make.left.offset(20 * WIDTHRADIU);
}];
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(10 * WIDTHRADIU);
make.right.offset(-10 * WIDTHRADIU);
make.bottom.offset(0);
make.height.offset(0.5);
}];
}
#pragma mark - getters and setters
- (UILabel *)lb_title
{
if (!_lb_title) {
_lb_title = [[UILabel alloc]init];
_lb_title.textColor = [UIColor colorWithHex:0x4d4d4d];
_lb_title.font = [UIFont boldSystemFontOfSize:20* WIDTHRADIU];
}
return _lb_title;
}
- (UIView *)lineView
{
if (!_lineView) {
_lineView = [[UIView alloc]init];
_lineView.backgroundColor = [UIColor colorWithHex:0x8c8c8c];
}
return _lineView;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
......@@ -21,7 +21,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.6.4</string>
<string>1.6.6</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
......@@ -86,10 +86,15 @@
<key>CFBundleURLName</key>
<string>alipays</string>
</dict>
<dict/>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array/>
</dict>
</array>
<key>CFBundleVersion</key>
<string>100.18.4</string>
<string>100.18.6</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>LSApplicationQueriesSchemes</key>
......@@ -129,6 +134,7 @@
<string>mqzoneopensdkapi</string>
<string>mqqbrowser</string>
<string>mttbrowser</string>
<string>www.shuidihuzhu.com</string>
</array>
<key>LSRequiresIPhoneOS</key>
<false/>
......@@ -151,6 +157,10 @@
<string>microphoneDesciption</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>我们需要访问您的图片库</string>
<key>NSHealthShareUsageDescription</key>
<string>APP想要读取您的步数</string>
<key>NSHealthUpdateUsageDescription</key>
<string>APP想要更新您的步数</string>
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
......
......@@ -4,6 +4,10 @@
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.healthkit</key>
<true/>
<key>com.apple.developer.healthkit.access</key>
<array/>
<key>com.apple.developer.networking.wifi-info</key>
<true/>
</dict>
......
......@@ -208,6 +208,8 @@
//#define CoinsBaseUrl @"http://172.16.10.215:8080/scoreService/"
//#define CoinsBaseUrl @"http://172.16.10.206:8080/scoreService/"
#define SSCardBaseUrl @"http://h5.weface.com.cn/socialsecurity/"
//#define SSCardBaseUrl @"http://he.weface.com.cn:8888"
......@@ -225,7 +227,7 @@
#define AREA @"浦东新区"
#define COUNTRY @"市辖区"
#define PROVINCE @"上海市"
#define buildAndVersion @"v1.6.4"
#define buildAndVersion @"v1.6.6"
#define QQ_KEFU @"1479035400"
#define DIANHUAHUAOMA @"18302132874"
......@@ -242,6 +244,10 @@
#define GATHERMAX 20
/* ------- 缩写 ------- */
#define MHSafeStrings(str) (str == nil ? @"" : str)
//日志
#import <CocoaLumberjack.h>
static const DDLogLevel ddLogLevel = DDLogLevelDebug;
......
......@@ -40,9 +40,17 @@
#import "UIImage+GIF.h"
#import "MyTableViewCell_d.h"
//区头
#import "HomeSectionHeaderView.h"
#import "UIColor+Hex.h"
//雷俊博
#import "LittleProcedureTableViewCell.h"
#import "Home3MiddleBannerCell.h"
//个数统计
#import "GTCountSDK.h"
#import "WXApi.h"
#import "CTAPIBaseManager.h"
......@@ -54,6 +62,16 @@
#import "tabViewController.h"
#import "WebViewco.h"
#import "WebVC.h"
#import "SSCardWebViewController.h"
//测试
#import "OnFootEarnCoinsViewController.h"
#import "SocialSecurityApproveSuccessVC.h"
#import "MyPrizeListVC.h"
......@@ -66,7 +84,7 @@
#define statusRect [[UIApplication sharedApplication] statusBarFrame]
@import AVKit;
@interface ViewController ()<SDCycleScrollViewDelegate,MKMapViewDelegate,CLLocationManagerDelegate,UITableViewDelegate,UITableViewDataSource>{
@interface ViewController ()<SDCycleScrollViewDelegate,MKMapViewDelegate,CLLocationManagerDelegate,UITableViewDelegate,UITableViewDataSource,MiddleBannerViewCellDelegate>{
BOOL hiddenStatusBar;
}
......@@ -169,17 +187,24 @@
self.tableViewNews.bounces = NO;
self.tableViewNews.sectionFooterHeight = 6;
self.tableViewNews.contentInset = UIEdgeInsetsMake(0, 0,5, 0);
self.KKtableHeight.constant = 663+114-208-20-75-75-10+6 + 34 + 10+30;
UIImage *image = [UIImage imageNamed:@"大病求助"];
CGFloat scale = image.size.height / image.size.width;
self.KKtableHeight.constant = 663+114-208-20-75-75-10+6 + 34 + 10+30 + 80 + (ScreenWidth - 30)/2 *scale;
//修改banner约束
self.BannerScrollViewtopConstraints.constant = -statusRect.size.height;
NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
[center addObserver:self selector:@selector(skipCoinDetailVC:) name:@"authenticationCoinsSkip" object:nil];
//观察跳转广告页
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pushToAd:) name:@"ZLPushToAdvert" object:nil];
[self.tableViewNews registerClass:[HomeSectionHeaderView class] forHeaderFooterViewReuseIdentifier:@"homeSection"];
[self.tableViewNews registerClass:[Home3MiddleBannerCell class] forCellReuseIdentifier:@"Home3MiddleBannerCell"];
}
-(void)viewWillDisappear:(BOOL)animated
......@@ -190,7 +215,9 @@
//雷俊博
//取消隐藏导航栏
self.navigationController.navigationBarHidden = NO;
[self.navigationController setNavigationBarHidden:NO animated:YES];
}
......@@ -199,7 +226,15 @@
[super viewWillAppear:animated];
//雷俊博
//隐藏导航栏
//self.navigationController.navigationBarHidden = YES;
[self.navigationController setNavigationBarHidden:YES animated:NO];
//导航栏颜色
self.navigationController.navigationBar.barTintColor = [UIColor colorWithHex:0x1886d3];
[self.transitionCoordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
self.navigationController.navigationBar.barTintColor = [UIColor colorWithHex:0x1886d3];
} completion:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
}];
self.pushHidel.hidden = NO;
......@@ -307,7 +342,7 @@
[self.pai_er_three setImage:[UIImage imageNamed:@"水滴互助"] forState:UIControlStateNormal];
[self.pai_er_three setTitle:@"互助宝" forState:normal];
[self.pai_er_three setTitle:@"水滴互助" forState:normal];
}else{
[self.pai_er_three setImage:[UIImage imageNamed:@"智慧出行20"] forState:UIControlStateNormal];
......@@ -356,7 +391,6 @@
- (void)dealloc
{
NSLog(@"首页被销毁了");
[[NSNotificationCenter defaultCenter ]removeObserver:self name:@"authenticationCoinsSkip" object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self name:@"ZLPushToAdvert" object:nil];
}
......@@ -364,6 +398,8 @@
[SearchProgressNet getgetBindIdCardsListHandle:^(SearchProgress *model, NSError *error) {
self.shenghuojifei.userInteractionEnabled = YES;
if (model.code ==0) {
if (model.result.count == 0) {
......@@ -665,9 +701,9 @@
if([[NSUserDefaults standardUserDefaults] boolForKey:@"firstlog"]){
NSURL * alipay_app_url = [NSURL URLWithString:@"alipay://"];
BOOL ali = [[UIApplication sharedApplication] canOpenURL:alipay_app_url];
if (ali) {
[self skipToAliSSCard];
......@@ -731,7 +767,6 @@ if([[NSUserDefaults standardUserDefaults] boolForKey:@"firstlog"]){
}else if(sender==self.nongzi){
......@@ -762,6 +797,7 @@ if([[NSUserDefaults standardUserDefaults] boolForKey:@"firstlog"]){
}else if (sender==self.shenghuojifei){
sender.userInteractionEnabled = NO;
[self searchProgress];
......@@ -774,32 +810,55 @@ if([[NSUserDefaults standardUserDefaults] boolForKey:@"firstlog"]){
if (self.arr111.count == 0){
[self functionAllAnd:@"万年历"];
}else{
ingeerr ++;
if ([getPeopleID LimmitedToBanbana] == YES) {
if(ingeerr % 2 == 0){
WKSuperViewController *tc=[[WKSuperViewController alloc]init];
tc.titleStr=@"支付宝抢红包";
tc.pathStr=@"https://render.alipay.com/p/f/jfxb4alj/pages/receive-redpacket/index.html?partnerId=&sharedUserId=&shareUserId=2088331168368991&__webview_options__=ttb%253Dauto&shareChannel=QRCode&sceneCode=KF_DYW04";
tc.hidesBottomBarWhenPushed =YES;
[self.navigationController pushViewController:tc animated:YES];
if ([self ALIisLogin]) {
if (ingeerr % 2 == 0) {
sender.userInteractionEnabled = NO;
[self refreshCoins];
}else{
WKSuperViewController *tc=[[WKSuperViewController alloc]init];
tc.titleStr=@"银联抢红包";
tc.pathStr=@"https://wallet.95516.com/s/wl/webV3/activity/vInvite/html/snsIndex.html?code=bdyx&from=groupmessage&isappinstalled=0";
tc.hidesBottomBarWhenPushed =YES;
[self.navigationController pushViewController:tc animated:YES];
}
}else{
WKSuperViewController *tc=[[WKSuperViewController alloc]init];
tc.titleStr=@"银联抢红包";
tc.pathStr=@"https://wallet.95516.com/s/wl/webV3/activity/vInvite/html/snsIndex.html?code=bdyx&from=groupmessage&isappinstalled=0";
tc.hidesBottomBarWhenPushed =YES;
[self.navigationController pushViewController:tc animated:YES];
if(ingeerr % 3 == 0){
WKSuperViewController *tc=[[WKSuperViewController alloc]init];
tc.titleStr=@"支付宝抢红包";
tc.pathStr=@"https://render.alipay.com/p/f/jfxb4alj/pages/receive-redpacket/index.html?partnerId=&sharedUserId=&shareUserId=2088331168368991&__webview_options__=ttb%253Dauto&shareChannel=QRCode&sceneCode=KF_DYW04";
tc.hidesBottomBarWhenPushed =YES;
[self.navigationController pushViewController:tc animated:YES];
}else if (ingeerr % 3 == 1){
sender.userInteractionEnabled = NO;
[self refreshCoins];
} else{
WKSuperViewController *tc=[[WKSuperViewController alloc]init];
tc.titleStr=@"银联抢红包";
tc.pathStr=@"https://wallet.95516.com/s/wl/webV3/activity/vInvite/html/snsIndex.html?code=bdyx&from=groupmessage&isappinstalled=0";
tc.hidesBottomBarWhenPushed =YES;
[self.navigationController pushViewController:tc animated:YES];
}
}
ingeerr ++;
}else{
......@@ -838,11 +897,12 @@ if([[NSUserDefaults standardUserDefaults] boolForKey:@"firstlog"]){
[self jumpToHTML5:strA andJAnalytics:@"快速问诊"];
}else if(sender ==self.pai_er_three){
NSString * strA = @"https://www.shuidihuzhu.com/toufang/throwIn?typeFrom=external&channel=sdhzkksb";
[self jumpToHTML5:strA andJAnalytics:@"水滴互助"];
//
// if ([getPeopleID LimmitedToBanbana] == YES) {
//
......@@ -1065,6 +1125,39 @@ if([[NSUserDefaults standardUserDefaults] boolForKey:@"firstlog"]){
}
#pragma mark - 广告异步点击检测
//返回曝光检测地址请求
- (void)loadOtherData:(NSArray *)array
{
dispatch_group_t group = dispatch_group_create();
dispatch_queue_t searialQueue = dispatch_queue_create("com.hmc4.www", DISPATCH_QUEUE_SERIAL);
for (NSString *urlStr in array) {
dispatch_group_enter(group);
dispatch_group_async(group, searialQueue, ^{
//网络请求1
[CTAPIBaseManager GET2:urlStr params:@{} completionHandler:^(id _Nonnull responseObject, NSError * _Nonnull error) {
dispatch_group_leave(group);
}];
});
}
//多个网络请求结束后,刷新UI
dispatch_group_notify(group, searialQueue, ^{
dispatch_async(dispatch_get_global_queue(0, 0), ^{
dispatch_async(dispatch_get_main_queue(), ^{
NSLog(@"返回异步点击c检测地址请求");
});
});
});
}
#pragma mark - 跳转电子社保卡
- (void)skipToAliSSCard
{
......@@ -1081,20 +1174,31 @@ if([[NSUserDefaults standardUserDefaults] boolForKey:@"firstlog"]){
UIStoryboard *sb =[UIStoryboard storyboardWithName:@"Main" bundle:nil];
WebViewController *tc=[sb instantiateViewControllerWithIdentifier:@"webViewController"];
//urlPath
NSDictionary *dict = noti.userInfo;
NSArray *click_tracking_urls = dict[@"click_tracking_urls"];
if (click_tracking_urls.count > 0) {
[GTCountSDK trackCountEvent:@"advertisementClickSStatistics" withArgs:@{}];
[self loadOtherData:dict[@"click_tracking_urls"]];
}
tc.URL =[NSURL URLWithString: dict[@"url"]];
tc.hidesBottomBarWhenPushed =YES;
[self.navigationController pushViewController:tc animated:YES];
}
#pragma mark - UITableViewDataSource
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
return 5;
return 6;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
......@@ -1107,12 +1211,15 @@ if([[NSUserDefaults standardUserDefaults] boolForKey:@"firstlog"]){
//雷俊博
if(indexPath.section == 1) {
static NSString *cellIdentifier = @"littleProcedure";
LittleProcedureTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
// static NSString *cellIdentifier = @"littleProcedure";
// LittleProcedureTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
//
// if (cell == nil) {
// cell = [[[NSBundle mainBundle]loadNibNamed:@"LittleProcedureTableViewCell" owner:self options:nil]objectAtIndex:0];
// }
if (cell == nil) {
cell = [[[NSBundle mainBundle]loadNibNamed:@"LittleProcedureTableViewCell" owner:self options:nil]objectAtIndex:0];
}
Home3MiddleBannerCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Home3MiddleBannerCell"];
cell.delegate = self;
return cell;
}
......@@ -1198,6 +1305,14 @@ if([[NSUserDefaults standardUserDefaults] boolForKey:@"firstlog"]){
//
if (model.result.count == 0) {
cell.KKHide.text =@"足不出户,安全认证,放心领钱";
cell.AAReccord.text =@"";
cell.AAImage.image= nil;
cell.AAName.text =@"";
cell.AAId.text = @"";
cell.AATime.text =@"";
return;
}else{
socialResultModel *models =(socialResultModel*)model.result[0];
......@@ -1229,6 +1344,18 @@ if([[NSUserDefaults standardUserDefaults] boolForKey:@"firstlog"]){
cell.AAId.text = @"";
cell.AATime.text =@"";
}
}else{
//当请求失败时
cell.KKHide.text =@"足不出户,安全认证,放心领钱";
cell.AAReccord.text =@"";
cell.AAImage.image= nil;
cell.AAName.text =@"";
cell.AAId.text = @"";
cell.AATime.text =@"";
}
}];
......@@ -1250,6 +1377,8 @@ UITapGestureRecognizer * tag = [[UITapGestureRecognizer alloc]initWithTarget:sel
UITapGestureRecognizer * tag1 = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(onClick:)];
UITapGestureRecognizer * tag2 = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(onClick:)];
UITapGestureRecognizer * tag3 = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(onClick:)];
UITapGestureRecognizer * tag4 = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(onClick:)];
UITapGestureRecognizer * tag5 = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(onClick:)];
switch (indexPath.section) {
case 3:
......@@ -1269,7 +1398,8 @@ UITapGestureRecognizer * tag1 = [[UITapGestureRecognizer alloc]initWithTarget:se
break;
case 4:
cell.imageleft.image =[UIImage imageNamed:@"在线问诊"];
//cell.imageleft.image =[UIImage imageNamed:@"在线问诊"];
cell.imageleft.image =[UIImage imageNamed:@"社保计算器11"];
cell.imageright.image =[UIImage imageNamed:@"海外医疗"];
cell.selectionStyle=UITableViewCellSelectionStyleNone;
cell.imageleft.tag = 3;
......@@ -1282,6 +1412,22 @@ UITapGestureRecognizer * tag1 = [[UITapGestureRecognizer alloc]initWithTarget:se
break;
case 5:
//cell.imageleft.image =[UIImage imageNamed:@"社保计算器11"];
cell.imageleft.image =[UIImage imageNamed:@"在线问诊"];
cell.imageright.image =[UIImage imageNamed:@"微保"];
cell.selectionStyle=UITableViewCellSelectionStyleNone;
cell.imageleft.tag = 5;
cell.imageright.tag =6;
cell.imageleft.userInteractionEnabled = YES;
cell.imageright.userInteractionEnabled = YES;
[cell.imageleft addGestureRecognizer:tag4];
[cell.imageright addGestureRecognizer:tag5];
break;
//
......@@ -1359,9 +1505,12 @@ UITapGestureRecognizer * tag1 = [[UITapGestureRecognizer alloc]initWithTarget:se
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
//不要显示
if (section == 2 || section == 6 || section == 7) {
if ( section==2 ||section == 4 || section == 6 || section == 7) {
return 0.00000000001;
}else{
}else if (section == 3 ||section == 5){
return 40;
}
else{
return 10;
}
......@@ -1369,10 +1518,25 @@ UITapGestureRecognizer * tag1 = [[UITapGestureRecognizer alloc]initWithTarget:se
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
if (section == 2 || section == 4) {
return 10;
}
return 0.00001;
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
if (section == 3 || section == 5) {
HomeSectionHeaderView *headerView = [tableView dequeueReusableHeaderFooterViewWithIdentifier:@"homeSection"];
if (section == 3) {
headerView.lb_title.text = @"爱心医疗";
}else if (section == 5){
headerView.lb_title.text = @"生活服务";
}
return headerView;
}
UIView *headView = [[UIView alloc]init];
headView.backgroundColor = [UIColor clearColor];
return headView;
......@@ -1390,13 +1554,7 @@ UITapGestureRecognizer * tag1 = [[UITapGestureRecognizer alloc]initWithTarget:se
if (indexPath.section == 0) {
SSPaymenyViewController *vc = [[SSPaymenyViewController alloc]init];
vc.title = @"社保自助缴纳";
vc.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:vc animated:YES];
return;
switch ([getPeopleID socialSate]) {
case 1:
if([[NSUserDefaults standardUserDefaults] boolForKey:@"firstlog"]){
......@@ -1409,6 +1567,7 @@ UITapGestureRecognizer * tag1 = [[UITapGestureRecognizer alloc]initWithTarget:se
socialRecord*vc=[sb instantiateViewControllerWithIdentifier:@"socialRecord"];
vc.hidesBottomBarWhenPushed =YES;
vc.isHomeVC = YES;
[self.navigationController pushViewController:vc animated:YES];
}else
{
......@@ -1430,6 +1589,7 @@ UITapGestureRecognizer * tag1 = [[UITapGestureRecognizer alloc]initWithTarget:se
socialRecord*vc=[sb instantiateViewControllerWithIdentifier:@"socialRecord"];
vc.record = 1;
vc.isHomeVC = YES;
vc.hidesBottomBarWhenPushed =YES;
[self.navigationController pushViewController:vc animated:YES];
}else
......@@ -1481,11 +1641,11 @@ UITapGestureRecognizer * tag1 = [[UITapGestureRecognizer alloc]initWithTarget:se
}else if(indexPath.section == 1){
WXLaunchMiniProgramReq *launchMiniProgramReq = [WXLaunchMiniProgramReq object];
launchMiniProgramReq.userName = @"gh_f8a0e531525d"; //拉起的小程序的username
launchMiniProgramReq.path = @"WXMiniPro://gh_f8a0e531525d/pages/base/redirect/index?routeKey=PH04_PRODUCT_TRANSFER_CY&wtagid=118.4.2"; //拉起小程序页面的可带参路径,不填默认拉起小程序首页
launchMiniProgramReq.miniProgramType = WXMiniProgramTypeRelease; //拉起小程序的类型
[WXApi sendReq:launchMiniProgramReq];
// WXLaunchMiniProgramReq *launchMiniProgramReq = [WXLaunchMiniProgramReq object];
// launchMiniProgramReq.userName = @"gh_f8a0e531525d"; //拉起的小程序的username
// launchMiniProgramReq.path = @"WXMiniPro://gh_f8a0e531525d/pages/base/redirect/index?routeKey=PH04_PRODUCT_TRANSFER_CY&wtagid=118.4.2"; //拉起小程序页面的可带参路径,不填默认拉起小程序首页
// launchMiniProgramReq.miniProgramType = WXMiniProgramTypeRelease; //拉起小程序的类型
// [WXApi sendReq:launchMiniProgramReq];
}else if(indexPath.section == 2){
......@@ -1503,22 +1663,103 @@ UITapGestureRecognizer * tag1 = [[UITapGestureRecognizer alloc]initWithTarget:se
{
NSLog(@"---点击了第%ld张图片", (long)index);
if (self.arrayT) {
if (self.arrayT.count > 0) {
homePageNewsResultModel *model = self.arrayT[index];
if (model.targetUrl && ![model.targetUrl isEqualToString:@""]) {
UIStoryboard *sb =[UIStoryboard storyboardWithName:@"Main" bundle:nil];
WebViewController *tc=[sb instantiateViewControllerWithIdentifier:@"webViewController"];
tc.URL =[NSURL URLWithString:model.targetUrl];
tc.janalytics = model.title;
tc.hidesBottomBarWhenPushed =YES;
tc.title = model.title;
[self.navigationController pushViewController:tc animated:YES];
// UIStoryboard *sb =[UIStoryboard storyboardWithName:@"Main" bundle:nil];
// WebViewController *tc=[sb instantiateViewControllerWithIdentifier:@"webViewController"];
// tc.URL =[NSURL URLWithString:model.targetUrl];
// tc.janalytics = model.title;
// tc.hidesBottomBarWhenPushed =YES;
// tc.title = model.title;
// [self.navigationController pushViewController:tc animated:YES];
SSCardWebViewController *vc = [[SSCardWebViewController alloc]init];
vc.JSString = model.targetUrl;
vc.title = model.title;
vc.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:vc animated:YES];
}
}
}
#pragma mark - MiddleBannerViewCellDelegate
- (void)selectedItemCell:(NSInteger)index
{
if (index == 1) {
WXLaunchMiniProgramReq *launchMiniProgramReq = [WXLaunchMiniProgramReq object];
launchMiniProgramReq.userName = @"gh_f8a0e531525d"; //拉起的小程序的username
launchMiniProgramReq.path = @"WXMiniPro://gh_f8a0e531525d/pages/base/redirect/index?routeKey=PH04_PRODUCT_TRANSFER_CY&wtagid=118.4.2"; //拉起小程序页面的可带参路径,不填默认拉起小程序首页
launchMiniProgramReq.miniProgramType = WXMiniProgramTypeRelease; //拉起小程序的类型
[WXApi sendReq:launchMiniProgramReq];
}else if (index == 0){
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"firstlog"]) {
[self refreshCoins];
}else {
LoginVC *loginVC = [[LoginVC alloc]init];
UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:loginVC];
[self presentViewController:nav animated:YES completion:nil];
}
}else if (index == 2){
WXLaunchMiniProgramReq *launchMiniProgramReq = [WXLaunchMiniProgramReq object];
launchMiniProgramReq.userName = @"gh_f8a0e531525d"; //拉起的小程序的username
launchMiniProgramReq.path = @"WXMiniPro://gh_f8a0e531525d/pages/base/redirect/index?routeKey=PH04_PRODUCT_TRANSFER_CY&wtagid=118.4.2"; //拉起小程序页面的可带参路径,不填默认拉起小程序首页
launchMiniProgramReq.miniProgramType = WXMiniProgramTypeRelease; //拉起小程序的类型
[WXApi sendReq:launchMiniProgramReq];
}
}
#pragma mark - 抽奖
- (void)refreshCoins
{
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"firstlog"]) {
if ([getPeopleID PeopleID] && [getPeopleID PeopleIphoneNmber])
{
NSDictionary *params = @{
@"userId":[NSNumber numberWithInteger:[getPeopleID PeopleID]],
@"telephone": [EnercryTool encryptUseDES:[getPeopleID PeopleIphoneNmber] key:DESKEY]
};
NSString *url =[NSString stringWithFormat:@"%@score/getpersonintegrals",CoinsBaseUrl];
WeakSelf;
[BaseNetManager POST2:url parameters:params completionHandler:^(id responseObj, NSError *error) {
self.medcine.userInteractionEnabled = YES;
if (responseObj) {
NSString *code = [responseObj[@"code"] stringValue];
if ([code isEqualToString:@"0"]) {
[getPeopleID getTotalCoins:responseObj[@"result"]];
WebVC *webVC = [[WebVC alloc]init];
webVC.title = @"今日抽奖";
//外网http://nginx.weface.com.cn/lesson/award/src/award.html
//内网@"http://172.16.10.121/award/src/award.html"
webVC.url = @"http://nginx.weface.com.cn/lesson/award/src/award.html";
// webVC.url = @"http://172.16.10.121/award/src/award.html";
webVC.hidesBottomBarWhenPushed =YES;
[weakSelf.navigationController pushViewController:webVC animated:YES];
}
}
}];
}
}else {
LoginVC *loginVC = [[LoginVC alloc]init];
UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:loginVC];
[self presentViewController:nav animated:YES completion:nil];
}
}
#pragma mark - event response
-(void)vcJumpOtherVc:(NSInteger)row
{
......@@ -1544,32 +1785,7 @@ UITapGestureRecognizer * tag1 = [[UITapGestureRecognizer alloc]initWithTarget:se
}
#pragma mark - event response
-(void)skipCoinDetailVC:(NSNotification *)notif
{
dispatch_async(dispatch_get_main_queue(), ^{
//self.navigationController.toolbarHidden=NO;
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
UIViewController *vc = appDelegate.window.rootViewController;
if ([vc isKindOfClass:[uitableViewController class]]){
uitableViewController *tabvc = (uitableViewController *)vc;
tabvc.selectedIndex = 3;
}else if ([vc isKindOfClass:[tabViewController class]]){
tabViewController *tabVC = (tabViewController*)vc;
if ([tabVC.selectedViewController isKindOfClass:[uitableViewController class]]) {
uitableViewController *myTabVC = (uitableViewController *)tabVC.selectedViewController;
myTabVC.tabBar.hidden = NO;
myTabVC.selectedIndex = 3;
}
}
});
}
-(void)onClick:(UITapGestureRecognizer *)sender{
if([[NSUserDefaults standardUserDefaults] boolForKey:@"firstlog"]){
......@@ -1599,7 +1815,8 @@ UITapGestureRecognizer * tag1 = [[UITapGestureRecognizer alloc]initWithTarget:se
// strA = [str stringByAppendingString:s];
// [self jumpToHTML5:@"https://kksb.wy.guahao.com/standard/index" andJAnalytics:@"在线问诊"];
[self jumpToHTML5:@"https://kksb.wy.guahao.com/ask/entry/introduce?pageFrom=10020" andJAnalytics:@"在线问诊"];
// [self jumpToHTML5:@"https://kksb.wy.guahao.com/ask/entry/introduce?pageFrom=10020" andJAnalytics:@"在线问诊"];
[self jumpToHTML5:@"http://www.wodeshebao.com/calc/index.html" andJAnalytics:@"社保计算器"];
}else if (t == 4){
NSString * strA;
......@@ -1610,6 +1827,15 @@ UITapGestureRecognizer * tag1 = [[UITapGestureRecognizer alloc]initWithTarget:se
[self jumpToHTML5:strA andJAnalytics:@"海外医疗"];
}else if (t == 5){
[self jumpToHTML5:@"https://kksb.wy.guahao.com/ask/entry/introduce?pageFrom=10020" andJAnalytics:@"在线问诊"];
// [self jumpToHTML5:@"http://www.wodeshebao.com/calc/index.html" andJAnalytics:@"社保计算器"];
}else if (t == 6){
WXLaunchMiniProgramReq *launchMiniProgramReq = [WXLaunchMiniProgramReq object];
launchMiniProgramReq.userName = @"gh_f8a0e531525d"; //拉起的小程序的username
launchMiniProgramReq.path = @"WXMiniPro://gh_f8a0e531525d/pages/base/redirect/index?routeKey=PH04_PRODUCT_TRANSFER_CY&wtagid=118.4.2"; //拉起小程序页面的可带参路径,不填默认拉起小程序首页
launchMiniProgramReq.miniProgramType = WXMiniProgramTypeRelease; //拉起小程序的类型
[WXApi sendReq:launchMiniProgramReq];
}
}else{
// LoginViewController *logVC = [LoginViewController sharedInstance];
......@@ -1951,6 +2177,20 @@ UITapGestureRecognizer * tag1 = [[UITapGestureRecognizer alloc]initWithTarget:se
}
//检测是否安装了支付宝
-(BOOL)ALIisLogin{
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"alipay://"]]) {
return YES;
}
else {
// NSLog(@"未安装");
return NO;
}
}
#pragma mark - getters and setters
-(newsViewModel *)viewModel{
......
......@@ -1064,7 +1064,7 @@ return @"晚上好!";}
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[sender setEnabled:YES];
});
/*
CGFloat screenScale = [UIScreen mainScreen].bounds.size.width/375.0;
CLUIConfigure * baseUIConfigure = [CLUIConfigure new];
......@@ -1250,7 +1250,7 @@ return @"晚上好!";}
}
}];
*/
// //s注册
// FandRViewController *logVC = [FandRViewController sharedInstance];
......
......@@ -136,7 +136,7 @@ self.title=@"人脸采集";
self.view.backgroundColor =[UIColor whiteColor];
self.nameShare.text = self.social.nText;
self.shareTextField.text =[NSString stringWithFormat:@"\t我们家乡%@%@%@可以刷脸社保认证了,足不出户、足不出村、放心领钱!\n\t看看社保,科技惠民、科技便民,人工智能走入寻常百姓家。", MHSafeString(self.social.province.text),MHSafeString(self.social.downTown.text),MHSafeString(self.social.area.text) ];
UIButton * button_2 = [UIButton buttonWithType:UIButtonTypeCustom]; button_2.frame = CGRectMake(0, 0, 0, 49); button_2.titleLabel.textAlignment =NSTextAlignmentRight; [button_2 setTitle:@" 帮助" forState:UIControlStateNormal]; [button_2 addTarget:self action:@selector(buttonClick_1) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem * backButtonItem_2 = [[UIBarButtonItem alloc] initWithCustomView:button_2]; self.navigationItem.rightBarButtonItem = backButtonItem_2;
// UIButton * button_2 = [UIButton buttonWithType:UIButtonTypeCustom]; button_2.frame = CGRectMake(0, 0, 0, 49); button_2.titleLabel.textAlignment =NSTextAlignmentRight; [button_2 setTitle:@" 帮助" forState:UIControlStateNormal]; [button_2 addTarget:self action:@selector(buttonClick_1) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem * backButtonItem_2 = [[UIBarButtonItem alloc] initWithCustomView:button_2]; self.navigationItem.rightBarButtonItem = backButtonItem_2;
//百度活体检测
[[NSUserDefaults standardUserDefaults ]setInteger:1 forKey:@"huoti_kankan_int"];
[[NSUserDefaults standardUserDefaults]synchronize];
......
......@@ -26,6 +26,7 @@
// [sender setEnabled:YES];
});
/*
CGFloat screenScale = [UIScreen mainScreen].bounds.size.width/375.0;
CLUIConfigure * baseUIConfigure = [CLUIConfigure new];
......@@ -223,7 +224,7 @@
}
}];
*/
}
......
......@@ -218,6 +218,10 @@
}
NSString *appStoreVersion = [dic[@"results"] firstObject][@"version"]; //获取App Store版本号
NSString *currentVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; //获取本地版本号
NSMutableArray *currentItems = [[currentVersion componentsSeparatedByString:@"."] mutableCopy];
NSMutableArray *lastestItems = [[appStoreVersion componentsSeparatedByString:@"."] mutableCopy];
if (![currentVersion isEqualToString:appStoreVersion]) { //比较是否相等
NSLog(@"有新版本,请更新到最新版本!!!");
......@@ -229,6 +233,43 @@
}
/// 判断是否最新版本号(大于或等于为最新)
- (BOOL)isLastestVersion:(NSString *)currentVersion compare:(NSString *)lastestVersion {
if (currentVersion && lastestVersion) {
// 拆分成数组
NSMutableArray *currentItems = [[currentVersion componentsSeparatedByString:@"."] mutableCopy];
NSMutableArray *lastestItems = [[lastestVersion componentsSeparatedByString:@"."] mutableCopy];
// 如果数量不一样补0
NSInteger currentCount = currentItems.count;
NSInteger lastestCount = lastestItems.count;
if (currentCount != lastestCount) {
NSInteger count = labs(currentCount - lastestCount); // 取绝对值
for (int i = 0; i < count; ++i) {
if (currentCount > lastestCount) {
[lastestItems addObject:@"0"];
} else {
[currentItems addObject:@"0"];
}
}
}
// 依次比较
BOOL isLastest = YES;
for (int i = 0; i < currentItems.count; ++i) {
NSString *currentItem = currentItems[i];
NSString *lastestItem = lastestItems[i];
if (currentItem.integerValue != lastestItem.integerValue) {
isLastest = currentItem.integerValue > lastestItem.integerValue;
break;
}
}
return isLastest;
}
return NO;
}
/*
......
......@@ -65,7 +65,6 @@ WEBS
- (void)viewDidLoad {
[super viewDidLoad];
if ([self.CAOCAOCAO isEqualToString:@"我是皮卡丘"]) {
self.navigationItem.hidesBackButton = NO;
}else{
......@@ -82,7 +81,7 @@ WEBS
// UIButton * button = [UIButton buttonWithType:UIButtonTypeCustom]; button.frame = CGRectMake(0, 0, 80, 49); button.titleLabel.textAlignment =NSTextAlignmentLeft; [button setTitle:@"返回 " forState:UIControlStateNormal]; [button addTarget:self action:@selector(buttonClick_) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem * backButtonItem_ = [[UIBarButtonItem alloc] initWithCustomView:button]; self.navigationItem.leftBarButtonItem = backButtonItem_;
UIButton * button_2 = [UIButton buttonWithType:UIButtonTypeCustom]; button_2.frame = CGRectMake(0, 0, 0, 49); button_2.titleLabel.textAlignment =NSTextAlignmentRight; [button_2 setTitle:@" 帮助" forState:UIControlStateNormal]; [button_2 addTarget:self action:@selector(buttonClick_1) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem * backButtonItem_2 = [[UIBarButtonItem alloc] initWithCustomView:button_2]; self.navigationItem.rightBarButtonItem = backButtonItem_2;
// UIButton * button_2 = [UIButton buttonWithType:UIButtonTypeCustom]; button_2.frame = CGRectMake(0, 0, 0, 49); button_2.titleLabel.textAlignment =NSTextAlignmentRight; [button_2 setTitle:@" 帮助" forState:UIControlStateNormal]; [button_2 addTarget:self action:@selector(buttonClick_1) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem * backButtonItem_2 = [[UIBarButtonItem alloc] initWithCustomView:button_2]; self.navigationItem.rightBarButtonItem = backButtonItem_2;
self.title =@"信息采集";
......
......@@ -14,4 +14,6 @@
@property(nonatomic,assign)NSInteger record;
@property(nonatomic,assign)BOOL isHomeVC;
@end
......@@ -11,6 +11,8 @@
#import "AppDelegate.h"
#import "UITableView+FDTemplateLayoutCell.h"
#import "Constants.h"
......@@ -87,14 +89,22 @@
// }
//雷俊博
//防止隐藏导航栏,内容向上移动
self.edgesForExtendedLayout = UIRectEdgeNone;
// self.edgesForExtendedLayout = UIRectEdgeNone;
if (@available(iOS 11.0, *) ) {
self.socTab.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
self.socTab.contentInset = UIEdgeInsetsMake(0, 0, 49, 0);
self.socTab.scrollIndicatorInsets = self.socTab.contentInset;
if (self.isHomeVC) {
self.socTab.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
self.socTab.contentInset = UIEdgeInsetsMake(cl_kNavigationBarHeight, 0, 49, 0);
self.socTab.scrollIndicatorInsets = self.socTab.contentInset;
}
}
[self getprovinceMessage];
......
......@@ -230,8 +230,8 @@ static NSString *static_numbercountry;
[self presentViewController:alertCon animated:YES completion:nil];
}
UIButton * button_ = [UIButton buttonWithType:UIButtonTypeCustom]; button_.frame = CGRectMake(0, 0, 0, 49); button_.titleLabel.textAlignment =NSTextAlignmentRight; [button_ setTitle:@" 帮助" forState:UIControlStateNormal]; [button_ addTarget:self action:@selector(buttonClick_1) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem * backButtonItem_2 = [[UIBarButtonItem alloc] initWithCustomView:button_]; self.navigationItem.rightBarButtonItem = backButtonItem_2;
// UIButton * button_ = [UIButton buttonWithType:UIButtonTypeCustom]; button_.frame = CGRectMake(0, 0, 0, 49); button_.titleLabel.textAlignment =NSTextAlignmentRight; [button_ setTitle:@" 帮助" forState:UIControlStateNormal]; [button_ addTarget:self action:@selector(buttonClick_1) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem * backButtonItem_2 = [[UIBarButtonItem alloc] initWithCustomView:button_]; self.navigationItem.rightBarButtonItem = backButtonItem_2;
//
[self getOCR];
[self getProvinceMessage];
// self.scrollV.frame=CGRectMake(0, 0, self.view.bounds.size.width, 667);
......
......@@ -34,6 +34,12 @@
#import "successViewController.h"
#import "kankanshebaoxieyi.h"
#import "newsViewModel.h"
//雷俊博
#import "UIColor+Hex.h"
#import "Constants.h"
#import "SocialSecurityApproveSuccessVC.h"
#define MHSafeStrings(str) (str == nil ? @"" : str)
//static AFHTTPSessionManager *manager = nil;
@interface PhotoViewController ()<UIImagePickerControllerDelegate,UINavigationControllerDelegate,UITextFieldDelegate,UINavigationControllerDelegate,UIImagePickerControllerDelegate,SCNavigationControllerDelegate>
......@@ -76,6 +82,18 @@
@property (weak, nonatomic) IBOutlet UIButton *button_xieyi;
//显示最新认证对象
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *topConstant;
@property (nonatomic, strong)UIView *topView;
@property (nonatomic, strong)UIImageView *img_loudspeaker;
@property (nonatomic, strong)UILabel *lb_left;
@property (nonatomic, strong)UIButton *btn_right;
@end
......@@ -129,7 +147,7 @@
NSLog(@"%@",path);
//对输入框的身份证去空格
NSString *newStr = [self.IDText.text stringByReplacingOccurrencesOfString:@" " withString:@""];
NSString *newStr = [self.IDText.text stringByReplacingOccurrencesOfString:@" " withString:@""];
NSLog(@"%@",newStr);
//姓名AES加密
......@@ -179,6 +197,16 @@ NSString *newStr = [self.IDText.text stringByReplacingOccurrencesOfString:@" "
if(model.code == 0){
[SVProgressHUD doneShow];
[SVProgressHUD dismiss];
//雷俊博
// SocialSecurityApproveSuccessVC *vc = [[SocialSecurityApproveSuccessVC alloc]init];
// vc.title = @"认证成功";
//
// vc.model = model.param;
//
// [self.navigationController pushViewController:vc animated:YES];
[self performSegueWithIdentifier:@"successSegueTwo" sender:self];
return;
......@@ -366,6 +394,9 @@ NSString *newStr = [self.IDText.text stringByReplacingOccurrencesOfString:@" "
}
receive.ValidationName = self.nameText.text;
receive.ValidationIdNumber = self.IDText.text;
......@@ -422,6 +453,9 @@ NSString *newStr = [self.IDText.text stringByReplacingOccurrencesOfString:@" "
self.isEnter = NO;
}
[self showUser];
}
WEBS
......@@ -437,7 +471,7 @@ NSString *newStr = [self.IDText.text stringByReplacingOccurrencesOfString:@" "
self.title =@"参保信息";
UIButton * button_2 = [UIButton buttonWithType:UIButtonTypeCustom]; button_2.frame = CGRectMake(0, 0, 0, 49); button_2.titleLabel.textAlignment =NSTextAlignmentRight; [button_2 setTitle:@" 帮助" forState:UIControlStateNormal]; [button_2 addTarget:self action:@selector(buttonClick_1) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem * backButtonItem_2 = [[UIBarButtonItem alloc] initWithCustomView:button_2]; self.navigationItem.rightBarButtonItem = backButtonItem_2;
// UIButton * button_2 = [UIButton buttonWithType:UIButtonTypeCustom]; button_2.frame = CGRectMake(0, 0, 0, 49); button_2.titleLabel.textAlignment =NSTextAlignmentRight; [button_2 setTitle:@" 帮助" forState:UIControlStateNormal]; [button_2 addTarget:self action:@selector(buttonClick_1) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem * backButtonItem_2 = [[UIBarButtonItem alloc] initWithCustomView:button_2]; self.navigationItem.rightBarButtonItem = backButtonItem_2;
self.button_xieyi.selected = YES;
self.leftContrainst.constant = [UIScreen mainScreen].bounds.size.width *90 /375;
if ([UIScreen mainScreen].bounds.size.width == 375 ) {
......@@ -468,8 +502,10 @@ NSString *newStr = [self.IDText.text stringByReplacingOccurrencesOfString:@" "
[tongxunlu getTongxunlu];
[self.view addSubview:self.topView];
// self.edgesForExtendedLayout=UIRectEdgeBottom;
}
......@@ -485,6 +521,27 @@ NSString *newStr = [self.IDText.text stringByReplacingOccurrencesOfString:@" "
#pragma mark - 显示认证最新成功对象
- (void)showUser
{
NSDictionary *dic = [[NSUserDefaults standardUserDefaults]objectForKey:@"ValidationDic"];
NSString *ValidationName = dic[@"ValidationName"];
if (ValidationName) {
self.topView.hidden = NO;
self.topConstant.constant = 30 * WIDTHRADIU;
self.lb_left.text = [NSString stringWithFormat:@"%@刚刚认证成功",ValidationName];
}else{
self.topView.hidden = YES;
self.topConstant.constant = 5;
}
}
- (IBAction)returnBtn:(UIButton *)sender {
[self dismissViewControllerAnimated:YES completion:nil];
......@@ -867,7 +924,7 @@ NSString *newStr = [self.IDText.text stringByReplacingOccurrencesOfString:@" "
UIAlertController *alertCon =[UIAlertController alertControllerWithTitle:str message:nil preferredStyle:UIAlertControllerStyleAlert];
__weak __typeof(self)weakSelf = self;
[alertCon addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
self->_isEnter = YES;
}]];
[alertCon addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
dispatch_async(dispatch_get_main_queue(), ^{
......@@ -951,7 +1008,79 @@ NSString *newStr = [self.IDText.text stringByReplacingOccurrencesOfString:@" "
}
#pragma mark - event response
- (void)checkBtnClick:(UIButton *)sender
{
UIStoryboard *sb =[UIStoryboard storyboardWithName:@"Main" bundle:nil];
socialRecord*vc=[sb instantiateViewControllerWithIdentifier:@"socialRecord"];
vc.isHomeVC = YES;
vc.hidesBottomBarWhenPushed =YES;
[self.navigationController pushViewController:vc animated:YES];
}
#pragma mark - getters and setters
- (UIView *)topView
{
if (!_topView) {
_topView = [[UIView alloc]initWithFrame:CGRectMake(0, cl_kNavigationBarHeight, ScreenWidth, 30 * WIDTHRADIU)];
_topView.backgroundColor = [UIColor colorWithHex:0x32b070];
[_topView addSubview:self.img_loudspeaker];
[_topView addSubview:self.lb_left];
[_topView addSubview:self.btn_right];
[self settopViewUI];
_topView.hidden = YES;
}
return _topView;
}
- (void)settopViewUI{
[self.img_loudspeaker mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(self.topView);
make.left.offset(10 * WIDTHRADIU);
}];
[self.lb_left mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(self.img_loudspeaker);
make.left.equalTo(self.img_loudspeaker.mas_right).offset(5 * WIDTHRADIU);
}];
[self.btn_right mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(self.img_loudspeaker);
make.right.offset(- 10 * WIDTHRADIU);
}];
}
- (UIImageView *)img_loudspeaker
{
if (!_img_loudspeaker) {
_img_loudspeaker = [[UIImageView alloc]init];
_img_loudspeaker.image = [UIImage imageNamed:@"通知icon"];
}
return _img_loudspeaker;
}
- (UILabel *)lb_left
{
if (!_lb_left) {
_lb_left = [[UILabel alloc]init];
_lb_left.textColor = [UIColor whiteColor];
_lb_left.font = [UIFont systemFontOfSize:12 * WIDTHRADIU];
}
return _lb_left;
}
- (UIButton *)btn_right
{
if (!_btn_right) {
_btn_right = [UIButton buttonWithType:UIButtonTypeCustom];
[_btn_right setTitle:@"查看更多>>" forState:UIControlStateNormal];
_btn_right.titleLabel.font = [UIFont systemFontOfSize:12 * WIDTHRADIU];
[_btn_right setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[_btn_right addTarget:self action:@selector(checkBtnClick:) forControlEvents:UIControlEventTouchUpInside];
}
return _btn_right;
}
......
......@@ -8,7 +8,10 @@ PODS:
- JCore (< 3.0.0, >= 1.2.0)
- JCore (2.0.2)
- Masonry (1.0.2)
- Reachability (3.2)
- SVProgressHUD (2.1.2)
- Toast (4.0.0)
- UICountingLabel (1.4.1)
- ZJAnimationPopView (1.0.2)
DEPENDENCIES:
......@@ -17,7 +20,10 @@ DEPENDENCIES:
- GInsightSDK (~> 1.4.5.0)
- JAnalytics (~> 2.0.0)
- Masonry (~> 1.0.2)
- Reachability (~> 3.2)
- SVProgressHUD (~> 2.1.2)
- Toast (~> 4.0.0)
- UICountingLabel
- ZJAnimationPopView
SPEC REPOS:
......@@ -28,7 +34,10 @@ SPEC REPOS:
- JAnalytics
- JCore
- Masonry
- Reachability
- SVProgressHUD
- Toast
- UICountingLabel
- ZJAnimationPopView
SPEC CHECKSUMS:
......@@ -38,9 +47,12 @@ SPEC CHECKSUMS:
JAnalytics: ec34148f72109c75acefc0606f6bc6f20040dffc
JCore: d4cbe6d178eaeb0ed263e42a6ebcb617855ef7cb
Masonry: 7c429b56da9d4ee0bbb3ed77a5ea710d6a5df39e
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
SVProgressHUD: c404a55d78acbeb7ebb78b76d3faf986475a6994
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
UICountingLabel: faf890b505d96312e324a86718f031fafffb0ccb
ZJAnimationPopView: 10ffb9f42cb868502d9de379f51666d8fa2a5bc7
PODFILE CHECKSUM: e66e8097acda3d6f526505e884b0096958335b3b
PODFILE CHECKSUM: 8f124cde697e58390cec87bceac14cf2c209aaa2
COCOAPODS: 1.6.2
......@@ -8,7 +8,10 @@ PODS:
- JCore (< 3.0.0, >= 1.2.0)
- JCore (2.0.2)
- Masonry (1.0.2)
- Reachability (3.2)
- SVProgressHUD (2.1.2)
- Toast (4.0.0)
- UICountingLabel (1.4.1)
- ZJAnimationPopView (1.0.2)
DEPENDENCIES:
......@@ -17,7 +20,10 @@ DEPENDENCIES:
- GInsightSDK (~> 1.4.5.0)
- JAnalytics (~> 2.0.0)
- Masonry (~> 1.0.2)
- Reachability (~> 3.2)
- SVProgressHUD (~> 2.1.2)
- Toast (~> 4.0.0)
- UICountingLabel
- ZJAnimationPopView
SPEC REPOS:
......@@ -28,7 +34,10 @@ SPEC REPOS:
- JAnalytics
- JCore
- Masonry
- Reachability
- SVProgressHUD
- Toast
- UICountingLabel
- ZJAnimationPopView
SPEC CHECKSUMS:
......@@ -38,9 +47,12 @@ SPEC CHECKSUMS:
JAnalytics: ec34148f72109c75acefc0606f6bc6f20040dffc
JCore: d4cbe6d178eaeb0ed263e42a6ebcb617855ef7cb
Masonry: 7c429b56da9d4ee0bbb3ed77a5ea710d6a5df39e
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
SVProgressHUD: c404a55d78acbeb7ebb78b76d3faf986475a6994
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
UICountingLabel: faf890b505d96312e324a86718f031fafffb0ccb
ZJAnimationPopView: 10ffb9f42cb868502d9de379f51666d8fa2a5bc7
PODFILE CHECKSUM: e66e8097acda3d6f526505e884b0096958335b3b
PODFILE CHECKSUM: 8f124cde697e58390cec87bceac14cf2c209aaa2
COCOAPODS: 1.6.2
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -14,7 +14,7 @@
buildForArchiving = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AA1E8FABC992E008A98756D801004A91"
BlueprintIdentifier = "106CE42A2C5B1BDB1F5F584E81C570C7"
BuildableName = "libPods-Open.a"
BlueprintName = "Pods-Open"
ReferencedContainer = "container:Pods.xcodeproj">
......
......@@ -14,7 +14,7 @@
buildForArchiving = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B774017EFFF5AA6369E245590A2E3DDF"
BlueprintIdentifier = "695CCEFBE4038E3BB34273E99F3F18BA"
BuildableName = "libSVProgressHUD.a"
BlueprintName = "SVProgressHUD"
ReferencedContainer = "container:Pods.xcodeproj">
......
......@@ -14,7 +14,7 @@
buildForArchiving = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0A1E32A67A2F143EDB7ECE642B963C34"
BlueprintIdentifier = "0AFDA44195F7665E8FB15EC543E7FD27"
BuildableName = "libZJAnimationPopView.a"
BlueprintName = "ZJAnimationPopView"
ReferencedContainer = "container:Pods.xcodeproj">
......
......@@ -39,11 +39,26 @@
<key>isShown</key>
<false/>
</dict>
<key>Reachability.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
</dict>
<key>SVProgressHUD.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
</dict>
<key>Toast.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
</dict>
<key>UICountingLabel.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
</dict>
<key>ZJAnimationPopView.xcscheme</key>
<dict>
<key>isShown</key>
......
......@@ -79,6 +79,20 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
## Reachability
Copyright (c) 2011, Tony Million.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
## SVProgressHUD
Copyright (c) 2011-2016 Sam Vermette, Tobias Tiemerding and contributors.
......@@ -109,6 +123,54 @@ including Freepik Icons. Please consult their
respective headers for the terms of their individual licenses.
## Toast
Copyright (c) 2011-2017 Charles Scalesse.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
## UICountingLabel
The MIT License (MIT)
Copyright (c) 2013 Tim Gostony
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
## ZJAnimationPopView
MIT License
......
......@@ -126,6 +126,26 @@ THE SOFTWARE.</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Copyright (c) 2011, Tony Million.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</string>
<key>License</key>
<string>BSD</string>
<key>Title</key>
<string>Reachability</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Copyright (c) 2011-2016 Sam Vermette, Tobias Tiemerding and contributors.
......@@ -162,6 +182,66 @@ respective headers for the terms of their individual licenses.
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Copyright (c) 2011-2017 Charles Scalesse.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
</string>
<key>License</key>
<string>MIT</string>
<key>Title</key>
<string>Toast</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>The MIT License (MIT)
Copyright (c) 2013 Tim Gostony
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.</string>
<key>License</key>
<string>MIT</string>
<key>Title</key>
<string>UICountingLabel</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>MIT License
......
......@@ -10,6 +10,8 @@
#import <WebKit/WebKit.h>
#import "Constants.h"
#import "UIColor+Hex.h"
@interface SSCardWebViewController ()< WKUIDelegate, WKNavigationDelegate>
@property (nonatomic, strong)WKWebView *webView;
......@@ -58,6 +60,16 @@
}else if([keyPath isEqualToString:@"title"]
&& object == _webView){
self.navigationItem.title = _webView.title;
if ([self.navigationItem.title isEqualToString:@"抽奖"]) {
self.navigationController.navigationBar.barTintColor = [UIColor colorWithHex:0xef341f];
[self.transitionCoordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
self.navigationController.navigationBar.barTintColor = [UIColor colorWithHex:0xef341f];
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@""] forBarMetrics:UIBarMetricsDefault];
} completion:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
}];
}
}else{
[super observeValueForKeyPath:keyPath
ofObject:object
......@@ -66,6 +78,21 @@
}
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
if ([self.navigationItem.title isEqualToString:@"抽奖"]) {
self.navigationController.navigationBar.barTintColor = [UIColor colorWithHex:0xef341f];
[self.transitionCoordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
self.navigationController.navigationBar.barTintColor = [UIColor colorWithHex:0xef341f];
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@""] forBarMetrics:UIBarMetricsDefault];
} completion:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
}];
}
}
#pragma mark -- WKNavigationDelegate
......
......@@ -74,9 +74,9 @@
self.view.backgroundColor = [UIColor whiteColor];
//起点发生变化
self.edgesForExtendedLayout=UIRectEdgeBottom;
//self.edgesForExtendedLayout=UIRectEdgeBottom;
[self queryCardResult];
[self getOCR];
......@@ -84,12 +84,18 @@
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self queryCardResult];
}
- (void)viewWillLayoutSubviews
{
[super viewWillLayoutSubviews];
[self.backView_Name mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.offset(45 * WIDTHRADIU);
make.top.offset(45 * WIDTHRADIU +cl_kNavigationBarHeight);
make.left.offset(20 * WIDTHRADIU);
make.right.offset(-20 * WIDTHRADIU);
make.height.offset(45 * WIDTHRADIU);
......@@ -277,7 +283,7 @@
#pragma mark - 电子社保卡请求
-(void)queryCardResult
{
NSString *url = [NSString stringWithFormat:@"%@/card/local",SSCardBaseUrl];
NSString *url = [NSString stringWithFormat:@"%@card/local",SSCardBaseUrl];
NSDictionary *params = @{
@"userId":[NSNumber numberWithInteger:[getPeopleID PeopleID]]
......@@ -296,31 +302,125 @@
}
if (responseObject) {
NSNumber *code = responseObject[@"code"];
NSLog(@"%@",responseObject);
if (code.integerValue == 200) {
//如果返回的字符串不为空
if (![NSString blankString:responseObject[@"result"]]) {
[self.view addSubview:self.frontView];
self.lb_name.text = responseObject[@"outUserName"];
self.lb_cardId.text = responseObject[@"outUserCardNo"];
NSLog(@"电子社保卡responseObject:%@",responseObject);
if ([responseObject[@"code"] isKindOfClass:[NSNumber class]]) {
NSNumber *code = responseObject[@"code"];
if (code.integerValue == 200) {
//如果返回的字符串不为空
if (![NSString blankString:responseObject[@"result"]]) {
[self queryCard:responseObject[@"result"]];
return;
}else{
[self alertMessage];
}
}else{
[SVProgressHUD showInfoWithStatus:@"网络异常"];
}
}else{
[SVProgressHUD showInfoWithStatus:@"网络异常"];
[SVProgressHUD showInfoWithStatus:@"服务端异常"];
}
}
}];
}
- (void)queryCard:(NSString *)auth_no
{
NSString *url = [NSString stringWithFormat:@"%@card/query",SSCardBaseUrl];
NSDictionary *params = @{
@"auth_no":auth_no
};
[SVProgressHUD show];
[CTAPIBaseManager POST:url params:params completionHandler:^(id _Nonnull responseObject, NSError * _Nonnull error) {
[SVProgressHUD dismiss];
if (error) {
NSLog(@"%@",error);
[SVProgressHUD showInfoWithStatus:@"网络异常"];
return;
}
if (responseObject) {
if ([responseObject[@"code"] isKindOfClass:[NSNumber class]]) {
NSNumber *code = responseObject[@"code"];
NSLog(@"%@",responseObject);
if (code.integerValue == 200) {
//如果返回的字符串不为空
if (![NSString blankString:responseObject[@"result"]]) {
NSDictionary *dic = [self dictionaryWithJsonString:responseObject[@"result"]];
if ([dic[@"alipay_commerce_app_upload_response"][@"code"] isEqualToString:@"10000"]) {
NSDictionary *dic2 = [self dictionaryWithJsonString:dic[@"alipay_commerce_app_upload_response"][@"data"][@"response"]];
if (![NSString blankString:dic2[@"outUserCardNo"]]) {
[self.view addSubview:self.frontView];
self.lb_name.text = dic2[@"outUserName"];
self.lb_cardId.text = dic2[@"outUserCardNo"];
return;
}
}
[self alertMessage];
}else{
}
}else{
[SVProgressHUD showInfoWithStatus:@"网络异常"];
}
}else {
[SVProgressHUD showInfoWithStatus:@"服务端异常"];
return;
}
}
}];
}
//提醒
- (void)alertMessage
{
NSString*sstermination = [[NSUserDefaults standardUserDefaults]objectForKey:@"sstermination"];
if (!sstermination) {
[self createAlterController];
}
}
/*** 弹出对话框 */
- (void)createAlterController
{
UIAlertController *alter = [UIAlertController alertControllerWithTitle:@"提示信息" message:@"只能绑定本人电子社保卡" preferredStyle:UIAlertControllerStyleAlert];
//确定按钮的风格是默认的
UIAlertAction *sure = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
NSLog(@"确定");
[[NSUserDefaults standardUserDefaults]setObject:@"yes" forKey:@"sstermination"];
[[NSUserDefaults standardUserDefaults]synchronize];
//添加你自己让他发生的事件 都是一样的!!!!!
}];
//取消按钮的风格是取消, 并且一直在最下边,且只能有一个
[alter addAction:sure];
[self presentViewController:alter animated:YES completion:^{
}];
}
- (void)getSSCardSign
{
NSString *url = [[NSString stringWithFormat:@"%@/card/sign",SSCardBaseUrl] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSString *url = [[NSString stringWithFormat:@"%@card/sign",SSCardBaseUrl] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSString *newStr = [self.tf_IDNumber.text stringByReplacingOccurrencesOfString:@" " withString:@""];
NSDictionary *params = @{
@"userId":[NSNumber numberWithInteger:[getPeopleID PeopleID]],
......@@ -328,7 +428,9 @@
@"idCard":newStr
};
[SVProgressHUD show];
[CTAPIBaseManager POST:url params:params completionHandler:^(id _Nonnull responseObject, NSError * _Nonnull error) {
[CTAPIBaseManager GET:url params:params completionHandler:^(id _Nonnull responseObject, NSError * _Nonnull error) {
if (error) {
......@@ -339,23 +441,34 @@
}
if (responseObject) {
NSNumber *code = responseObject[@"code"];
NSString *msg = responseObject[@"msg"];
NSLog(@"%@",responseObject);
if (code.integerValue == 200) {
id result = responseObject[@"result"];
if ([result isKindOfClass:[NSString class]] && ![NSString blankString:result]) {
[self getBindUrlWithAuth_no:result];
}
if ([responseObject[@"code"] isKindOfClass:[NSNumber class]]) {
NSNumber *code = responseObject[@"code"];
NSString *msg = responseObject[@"msg"];
}else{
[SVProgressHUD showInfoWithStatus:@"网络异常"];
NSLog(@"%@",responseObject);
if (code.integerValue == 200) {
id result = responseObject[@"result"];
if ([result isKindOfClass:[NSString class]] && ![NSString blankString:result]) {
[self getBindUrlWithAuth_no:result];
}
}else{
[SVProgressHUD showInfoWithStatus:@"网络异常"];
return;
}
}else {
[SVProgressHUD showInfoWithStatus:@"服务端异常"];
return;
}
}
[SVProgressHUD dismiss];
}];
}
- (void)getBindUrlWithAuth_no:(NSString *)auth_no
......@@ -375,35 +488,42 @@
}
if (responseObject) {
NSNumber *code = responseObject[@"code"];
NSString *msg = responseObject[@"msg"];
NSLog(@"%@",responseObject);
if (code.integerValue == 200) {
if ([responseObject[@"code"] isKindOfClass:[NSNumber class]]) {
if (responseObject) {
NSNumber *code = responseObject[@"code"];
NSString *msg = responseObject[@"msg"];
[SVProgressHUD dismiss];
id result = responseObject[@"result"];
if ([result isKindOfClass:[NSString class]] && ![NSString blankString:result]) {
NSString *res = result;
NSString *dataStr =[SecurityUtil decodeBase64String:res];
[self jumpToHTML5:dataStr andJAnalytics:@"电子社保卡" JSString:dataStr];
NSLog(@"%@",responseObject);
if (code.integerValue == 200) {
[SVProgressHUD dismiss];
id result = responseObject[@"result"];
if ([result isKindOfClass:[NSString class]] && ![NSString blankString:result]) {
NSString *res = result;
NSString *dataStr =[SecurityUtil decodeBase64String:res];
[self jumpToHTML5:dataStr andJAnalytics:@"电子社保卡" JSString:dataStr];
}
}else{
[SVProgressHUD showInfoWithStatus:@"网络异常"];
return;
}
}else{
[SVProgressHUD showInfoWithStatus:@"网络异常"];
return;
}
}else {
[SVProgressHUD showInfoWithStatus:@"服务端异常"];
return;
}
}];
}
......@@ -431,7 +551,41 @@
// 阴影透明度,默认0
theView.layer.shadowOpacity = 0.5;
// 阴影半径,默认3
theView.layer.shadowRadius = 5;
theView.layer.shadowRadius = 3;
}
- (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString {
if (jsonString == nil) {
return nil;
}
NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding];
NSError *err;
NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:jsonData
options:NSJSONReadingMutableContainers
error:&err];
if(err) {
NSLog(@"json解析失败:%@",err);
return nil;
}
return dic;
}
......
......@@ -46,6 +46,10 @@
//支付的接口_产品编号
@property(nonatomic,strong)NSString *product_no;
//雷俊博
@property (nonatomic, copy)NSString *ValidationName;
@property (nonatomic, copy)NSString *ValidationIdNumber;
......
......@@ -174,6 +174,12 @@
}
} onViewController:self];
//禁止手势返回
id traget = self.navigationController.interactivePopGestureRecognizer.delegate;
UIPanGestureRecognizer * pan = [[UIPanGestureRecognizer alloc]initWithTarget:traget action:nil];
[self.view addGestureRecognizer:pan];
}
......@@ -234,7 +240,7 @@
[self.view openKeyboardOffsetView];
self.view.keyboardOffsetViewDelegate =self;
self.view.keyboardGap =60;
self.navigationController.navigationBar.translucent = NO;
//self.navigationController.navigationBar.translucent = NO;
// AppDelegate *delegate=(AppDelegate*)[[UIApplication sharedApplication]delegate];
......@@ -433,14 +439,14 @@
{
BOOL show = [[NSUserDefaults standardUserDefaults]boolForKey:@"SocialSecurityAuthentication"];
if (!show) {
[AuthenticationGuideView showGuideViewBlock:^(BOOL isBack) {
[AuthenticationGuideView showGuideViewWithimgHidden:NO Block:^(BOOL isBack) {
[[NSUserDefaults standardUserDefaults]setBool:YES forKey:@"SocialSecurityAuthentication"];
[[NSUserDefaults standardUserDefaults]synchronize];
if (isBack) {
[[NSUserDefaults standardUserDefaults]setBool:YES forKey:@"SocialSecurityAuthentication"];
[[NSUserDefaults standardUserDefaults]synchronize];
[self.navigationController popViewControllerAnimated:YES];
}
}];
}else {
[self.navigationController popViewControllerAnimated:YES];
......@@ -1501,6 +1507,16 @@
self.image_2 =image;
}
[self performSegueWithIdentifier:@"successSegue" sender:self];
//雷俊博存储认证成功信息,在认证m页面显示
if (self.ValidationName) {
NSDictionary *ValidationDic = @{@"ValidationName":self.ValidationName};
[[NSUserDefaults standardUserDefaults]setObject:ValidationDic forKey:@"ValidationDic"];
[[NSUserDefaults standardUserDefaults]synchronize];
[getPeopleID getprovinceNightSix:self.province];
}
});
}else{
......
......@@ -14,7 +14,7 @@ typedef void(^BtnClickClock) (BOOL);
@property (nonatomic, copy)BtnClickClock block;
+ (void)showGuideViewBlock:(BtnClickClock)block;
+ (void)showGuideViewWithimgHidden:(BOOL)hidden Block:(BtnClickClock)block ;
@end
......
......@@ -36,16 +36,20 @@
@property (nonatomic, strong)UILabel *lb_imgTitle;
@property (nonatomic, assign)BOOL hidden;
@end
@implementation AuthenticationGuideView
- (instancetype)initWithBlock:(BtnClickClock)block
- (instancetype)initWithimgHidden:(BOOL)hidden Block:(BtnClickClock)block
{
self = [super init];
if (self) {
[self initUI];
self.block = block;
self.hidden = hidden;
[self initUI];
}
return self;
}
......@@ -53,6 +57,12 @@
- (void)initUI
{
self.frame =ScreenBounds;
if (self.hidden) {
[self addSubview:self.backgroundView];
[self addSubview:self.whiteView];
[self setupUI];
return;
}
[self addSubview:self.backgroundView];
[self addSubview:self.whiteView];
......@@ -72,7 +82,14 @@
- (void)setupUI
{
if (self.hidden) {
[self.whiteView mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.equalTo(self);
make.width.offset(250 * WIDTHRADIU);
make.height.offset(150 * WIDTHRADIU);
}];
return;
}
[self.img_circle mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self).offset(470 + cl_kNavigationBarHeight);
make.left.offset(150 );
......@@ -117,9 +134,9 @@
}
#pragma mark - public methods
+ (void)showGuideViewBlock:(BtnClickClock)block
+ (void)showGuideViewWithimgHidden:(BOOL)hidden Block:(BtnClickClock)block ;
{
AuthenticationGuideView *showView = [[AuthenticationGuideView alloc]initWithBlock:block];
AuthenticationGuideView *showView = [[AuthenticationGuideView alloc]initWithimgHidden:hidden Block:block];
[showView showWithAnimation:YES];
}
......@@ -146,7 +163,7 @@
{
//1.获取当前应用的主窗口
UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow;
UIWindow *keyWindow = [UIApplication sharedApplication].delegate.window;
[keyWindow addSubview: self];
[self addAnimation];
......@@ -322,7 +339,7 @@
{
if (!_btn_cancel) {
_btn_cancel = [UIButton buttonWithType:UIButtonTypeCustom];
[_btn_cancel setTitle:@"" forState:UIControlStateNormal];
[_btn_cancel setTitle:@"继续认证" forState:UIControlStateNormal];
[_btn_cancel setTitleColor:[UIColor colorWithHex:0x1886d3] forState:UIControlStateNormal];
_btn_cancel.titleLabel.font = [UIFont systemFontOfSize:15 * WIDTHRADIU];
[_btn_cancel addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
......
//
// WeakWebViewScriptMessageDelegate.h
// Open
//
// Created by 雷俊博 on 2019/8/19.
// Copyright © 2019 黄江涛 . All rights reserved.
//
#import <Foundation/Foundation.h>
#import <WebKit/WebKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface WeakWebViewScriptMessageDelegate : NSObject<WKScriptMessageHandler>
@property (nonatomic, weak) id<WKScriptMessageHandler> scriptDelegate;
- (instancetype)initWithDelegate:(id<WKScriptMessageHandler>)scriptDelegate;
@end
NS_ASSUME_NONNULL_END
//
// WebVC.h
// Open
//
// Created by 雷俊博 on 2019/8/18.
// Copyright © 2019 黄江涛 . All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface WebVC : UIViewController
//远程H5链接
@property (nonatomic, copy)NSString *url;
@end
NS_ASSUME_NONNULL_END
//
// WebVC.m
// Open
//
// Created by 雷俊博 on 2019/8/18.
// Copyright © 2019 黄江涛 . All rights reserved.
//
#import "WebVC.h"
#import <WebKit/WebKit.h>
#import <Masonry.h>
#import "WeakWebViewScriptMessageDelegate.h"
#import "UIColor+Hex.h"
#import "Constants.h"
#import "MyPrizeListVC.h"
//WKUIDelegate:主要处理js脚本,确认框,警告框等
//WKNavigationDelegate:主要处理一些跳转、加载处理操作,
@interface WebVC ()<WKUIDelegate,WKNavigationDelegate,WKScriptMessageHandler>
@property (nonatomic, strong)WKWebView *webView;
//@property (nonatomic, strong)WKUserContentController *userContentController;
@end
@implementation WebVC
#pragma mark - life cycle
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.view.backgroundColor = [UIColor whiteColor];
[self.view addSubview:self.webView];
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
self.navigationController.navigationBar.barTintColor = [UIColor colorWithHex:0xf8502c];
[self.transitionCoordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
[self.navigationController.navigationBar setBackgroundImage:[self convertViewToImage:[self getNavBackView]] forBarMetrics:UIBarMetricsDefault];
} completion:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
[self.navigationController.navigationBar setBackgroundImage:[self convertViewToImage:[self getNavBackView]] forBarMetrics:UIBarMetricsDefault];
}];
}
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@""] forBarMetrics:UIBarMetricsDefault];
}
-(void)viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated];
if ([self.title isEqualToString:@"今日抽奖"]) {
[JANALYTICSService startLogPageView:@"今日抽奖"];
[MobClick beginLogPageView:@"今日抽奖"];
}
}
-(void)viewDidDisappear:(BOOL)animated{
[super viewDidDisappear:animated];
if ([self.title isEqualToString:@"今日抽奖"]) {
[JANALYTICSService stopLogPageView:@"今日抽奖"];
[MobClick endLogPageView:@"今日抽奖"];
}
}
- (void)viewWillLayoutSubviews
{
[super viewWillLayoutSubviews];
[self.webView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.view);
make.right.equalTo(self.view);
make.top.equalTo(self.view);
make.bottom.equalTo(self.view);
}];
}
- (void)dealloc
{
// [self.userContentController removeScriptMessageHandlerForName:@"toNews()"];
NSLog(@"WebVC:%@销毁了",self.title);
}
#pragma mark - WKNavigationDelegate
//页面开始加载时调用
- (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation
{
NSLog(@"WebVC:页面开始加载");
}
//当内容开始返回时调用
- (void)webView:(WKWebView *)webView didCommitNavigation:(WKNavigation *)navigation
{
NSLog(@"WebVC:内容开始返回");
}
// 页面加载完成之后调用
- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation
{
NSLog(@"WebVC:页面加载完成");
NSString *injectionJSString = @"var script = document.createElement('meta');"   "script.name = 'viewport';"    "script.content=\"width=device-width, user-scalable=no\";"    "document.getElementsByTagName('head')[0].appendChild(script);";
[webView evaluateJavaScript:injectionJSString completionHandler:nil];
}
// 页面加载失败时调用
- (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(NSError *)error
{
NSLog(@"WebVC:页面加载失败");
}
//接收到服务器跳转请求之后调用
- (void)webView:(WKWebView *)webView didReceiveServerRedirectForProvisionalNavigation:(WKNavigation *)navigation
{
NSLog(@"WebVC:接收到服务器跳转请求");
}
// 在收到响应后,决定是否跳转
- (void)webView:(WKWebView *)webView decidePolicyForNavigationResponse:(nonnull WKNavigationResponse *)navigationResponse decisionHandler:(nonnull void (^)(WKNavigationResponsePolicy))decisionHandler
{
NSLog(@"WebVC:收到服务器响应,是否跳转");
NSLog(@"%@",navigationResponse.response.URL.absoluteString);
//允许跳转
decisionHandler(WKNavigationResponsePolicyAllow);
//不允许跳转
//decisionHandler(WKNavigationResponsePolicyCancel);
}
// 在发送请求之前,决定是否跳转
- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler
{
NSLog(@"WebVC:发送请求之前,决定是否跳转");
NSLog(@"%@",navigationAction.request.URL.absoluteString);
//允许跳转
decisionHandler(WKNavigationActionPolicyAllow);
//不允许跳转
//decisionHandler(WKNavigationActionPolicyCancel);
}
#pragma mark - WKUIDelegate
//创建一个新的WebView
- (WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures
{
NSLog(@"WebVC:创建一个新的WebView");
return [[WKWebView alloc]init];
}
//输入框
- (void)webView:(WKWebView *)webView runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(nullable NSString *)defaultText initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(NSString * _Nullable result))completionHandler
{
NSLog(@"WebVC:输入框");
completionHandler(@"http");
}
// 确认框
- (void)webView:(WKWebView *)webView runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(BOOL result))completionHandler{
NSLog(@"WebVC:确认框");
completionHandler(YES);
}
// 警告框
- (void)webView:(WKWebView *)webView runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(void))completionHandler{
NSLog(@"WebVC:警告框");
NSLog(@"%@",message);
completionHandler();
}
#pragma mark - WKScriptMessageHandler
//被自定义的WKScriptMessageHandler在回调方法里通过代理回调回来,绕了一圈就是为了解决内存不释放的问题
//通过接收JS传出消息的name进行捕捉的回调方法
- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message{
NSLog(@"name:%@\\\\n body:%@\\\\n frameInfo:%@\\\\n",message.name,message.body,message.frameInfo);
//用message.body获得JS传出的参数体
//JS调用OC
if([message.name isEqualToString:@"jsToOcNoPrams"]){
self.navigationController.tabBarController.selectedIndex = 1;
[self.navigationController popToRootViewControllerAnimated:YES];
}else if ([message.name isEqualToString:@"toMyawardListVc"]){
MyPrizeListVC *vc = [[MyPrizeListVC alloc]init];
vc.title = @"我的奖品";
[self.navigationController pushViewController:vc animated:YES];
return;
}
}
#pragma mark - private methods
//渐变色
- (UIImage *)convertViewToImage:(UIView *)v
{
CGSize s = v.bounds.size;
UIGraphicsBeginImageContextWithOptions(s, NO, [UIScreen mainScreen].scale);
[v.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return image;
}
#pragma mark - getters and setters
- (UIView *)getNavBackView
{
UIView*backView = [[UIView alloc]initWithFrame:CGRectMake(0,0, ScreenWidth,cl_kNavigationBarHeight)];
CAGradientLayer*gradientLayer = [CAGradientLayer layer];
gradientLayer.locations = @[@0.0, @1.0];
gradientLayer.startPoint = CGPointMake(1, 0);
gradientLayer.endPoint = CGPointMake(1, 1);
[gradientLayer setColors:@[(id)[[UIColor colorWithHex:0xff5633] CGColor],(id)[[UIColor colorWithHex:0xf8502c] CGColor]]];//渐变数组
gradientLayer.frame = backView.frame;
[backView.layer addSublayer:gradientLayer];
return backView;
}
- (WKWebView *)webView
{
if (!_webView) {
//创建网页配置对象
WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc] init];
config.preferences.javaScriptEnabled = YES;
config.preferences.javaScriptCanOpenWindowsAutomatically = YES;
//自定义的WKScriptMessageHandler 是为了解决内存不释放的问题
WeakWebViewScriptMessageDelegate *weakScriptMessageDelegate = [[WeakWebViewScriptMessageDelegate alloc]initWithDelegate:self];
//这个类主要用来做native与JavaScript的交互管理
WKUserContentController * wkUController = [[WKUserContentController alloc] init];
//注册一个name为jsToOcNoPrams的js方法 设置处理接收JS方法的对象
[wkUController addScriptMessageHandler:weakScriptMessageDelegate name:@"jsToOcNoPrams"];
[wkUController addScriptMessageHandler:weakScriptMessageDelegate name:@"toMyawardListVc"];
config.userContentController = wkUController;
//以下代码适配文本大小
NSString *jSString = @"var meta = document.createElement('meta'); meta.setAttribute('name', 'viewport'); meta.setAttribute('content', 'width=device-width'); document.getElementsByTagName('head')[0].appendChild(meta);";
//用于进行JavaScript注入
WKUserScript *wkUScript = [[WKUserScript alloc] initWithSource:jSString injectionTime:WKUserScriptInjectionTimeAtDocumentEnd forMainFrameOnly:YES];
[config.userContentController addUserScript:wkUScript];
_webView = [[WKWebView alloc]initWithFrame:CGRectZero configuration:config];
_webView.UIDelegate = self;
_webView.navigationDelegate = self;
_webView.scrollView.bounces = false;
NSDictionary *dic = [getPeopleID totalCoins];
NSString *score = [NSString stringWithFormat:@"%@",[dic[@"totalScore"] stringValue]];
NSURL *photoUrl = [getPeopleID PeoplePhoto];
if ([self.title isEqualToString:@"今日抽奖"]) {
NSString *url = [NSString stringWithFormat:@"%@?UserId=%@&gold=%@&tel=%@&headPic=%@",self.url,[NSNumber numberWithInteger:[getPeopleID PeopleID]],score,[EnercryTool encryptUseDES:[getPeopleID PeopleIphoneNmber] key:DESKEY],photoUrl.absoluteString ?photoUrl.absoluteString :@""];
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:url]];
[_webView loadRequest:request];
}else{
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:self.url]];
[_webView loadRequest:request];
}
}
return _webView;
}
//- (WKUserContentController *)userContentController
//{
// if (!_userContentController) {
// _userContentController = [[WKUserContentController alloc]init];
// //注册一个name为toNews()的js方法 设置处理接收JS方法的对象
// //自定义的WKScriptMessageHandler 是为了解决内存不释放的问题
// //注册方法
// WKDelegateController * delegateController = [[WKDelegateController alloc]init];
// delegateController.delegate = self;
// [_userContentController addScriptMessageHandler:delegateController name:@"jsToOcWithPrams"];
// }
// return _userContentController;
//}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
......@@ -13,6 +13,7 @@
#define SYSTEMVersion [[[UIDevice currentDevice] systemVersion] floatValue]
@interface WebViewController ()<UIWebViewDelegate>
@property (weak, nonatomic) IBOutlet UIWebView *webView;
@property(nonatomic)BOOL failWeb;
......@@ -114,7 +115,9 @@
}
-(void)buttonClick_1{
if (self.webView.canGoBack==YES) {
[self.webView goBack];
// [self.webView goBack];
[self.navigationController popViewControllerAnimated:YES];
}else{
[self.navigationController popViewControllerAnimated:YES];
}
......@@ -127,6 +130,7 @@
{
NSString * urlStr = request.URL.absoluteString;
NSURL *url = [NSURL URLWithString:urlStr];
......@@ -138,6 +142,14 @@
}
//     NSString  * url = request.URL.absoluteString;
......@@ -293,6 +305,8 @@
}else if([self.janalytics isEqualToString:@"银联抢红包"]){
}else if([self.janalytics isEqualToString:@"社保计算器"]){
[webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.getElementsByClassName('mc-button')[0].style.display = 'none';"];
}else{
[webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.getElementsByClassName('app-open')[0].style.display = 'none';"];
[webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.getElementsByClassName('J-toapp toapp')[0].style.display = 'none';"];
......
......@@ -30,7 +30,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.title =@"人工提交";
UIButton * button_2 = [UIButton buttonWithType:UIButtonTypeCustom]; button_2.frame = CGRectMake(0, 0, 0, 49); button_2.titleLabel.textAlignment =NSTextAlignmentRight; [button_2 setTitle:@" 帮助" forState:UIControlStateNormal]; [button_2 addTarget:self action:@selector(buttonClick_1) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem * backButtonItem_2 = [[UIBarButtonItem alloc] initWithCustomView:button_2]; self.navigationItem.rightBarButtonItem = backButtonItem_2;
// UIButton * button_2 = [UIButton buttonWithType:UIButtonTypeCustom]; button_2.frame = CGRectMake(0, 0, 0, 49); button_2.titleLabel.textAlignment =NSTextAlignmentRight; [button_2 setTitle:@" 帮助" forState:UIControlStateNormal]; [button_2 addTarget:self action:@selector(buttonClick_1) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem * backButtonItem_2 = [[UIBarButtonItem alloc] initWithCustomView:button_2]; self.navigationItem.rightBarButtonItem = backButtonItem_2;
self.qudaoOCR= NO;
}
#pragma mark - 提交按钮
......
......@@ -302,6 +302,14 @@ return [[NSUserDefaults standardUserDefaults] boolForKey:@"jurisdiction"];
[[NSUserDefaults standardUserDefaults]setValue:dic forKey:@"totalCoins"];
[[NSUserDefaults standardUserDefaults]synchronize];
}
//存储选择默认省份
+ (void)getDefaultProvince:(NSString *)provinceName;
{
[[NSUserDefaults standardUserDefaults]setValue:provinceName forKey:@"defalutProvince"];
[[NSUserDefaults standardUserDefaults]synchronize];
}
+ (NSString *)loginType
......@@ -322,6 +330,15 @@ return [[NSUserDefaults standardUserDefaults] boolForKey:@"jurisdiction"];
return [[NSUserDefaults standardUserDefaults]objectForKey:@"totalCoins"];
}
+ (NSString *)defaultProvince
{
return [[NSUserDefaults standardUserDefaults]objectForKey:@"defalutProvince"];
}
-(void)dealloc
......
......@@ -134,8 +134,21 @@ static NSString *reuseIdentifier = @"collectionCellID";
// self.strWeather.text= [[NSUserDefaults standardUserDefaults] objectForKey:@"weatherti1"];
// self.imageWeather.image = [UIImage imageNamed: [[NSUserDefaults standardUserDefaults] objectForKey:@"weatherti2"]];
NSDictionary *data = [[NSUserDefaults standardUserDefaults]objectForKey:@"TQData"][@"data"];
NSString *city = [NSString stringWithFormat:@"%@",data[@"cityname"]];
NSString *city = nil;
NSString *weather = nil;
if ([[NSUserDefaults standardUserDefaults]objectForKey:@"TQData"]) {
NSDictionary *data = [[NSUserDefaults standardUserDefaults]objectForKey:@"TQData"][@"data"];
city = [NSString stringWithFormat:@"%@",data[@"cityname"]];
weather = [NSString stringWithFormat:@"%@ %@℃~%@℃",data[@"weather"],data[@"ltemp"],data[@"htemp"]];
}else {
city = @"北京市";
weather =@"晴 22℃";
}
CGFloat width = [city sizeWithAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIFont systemFontOfSize:16], NSFontAttributeName, nil]].width;
if (width >= 100) {
[_cityView startScrollWithText:city textColor:[UIColor whiteColor] font:[UIFont systemFontOfSize:16]];
......@@ -143,7 +156,7 @@ static NSString *reuseIdentifier = @"collectionCellID";
[_cityView startShowWithText:city textColor:[UIColor whiteColor] font:[UIFont systemFontOfSize:16]];
}
self.strWeather.text = [NSString stringWithFormat:@"%@ %@℃~%@℃",data[@"weather"],data[@"ltemp"],data[@"htemp"]];
self.strWeather.text = weather;
[self changeABC];
......@@ -179,7 +192,7 @@ AppDelegate *delegate=(AppDelegate*)[[UIApplication sharedApplication]delegate];
[self presentViewController:controlltr animated:YES completion:NULL];
}else{
WETianqiController *controlltr = [[WETianqiController alloc] init];
[controlltr fetchWeatherDataLocationLat:29.5591085724 LocationLng:106.5108726056];
[controlltr fetchWeatherDataLocationLat:39.91488908 LocationLng:116.40387397];
[self presentViewController:controlltr animated:YES completion:NULL];
}
......@@ -417,7 +430,7 @@ AppDelegate *delegate=(AppDelegate*)[[UIApplication sharedApplication]delegate];
// [getPeopleID changePlistContentand:@"酒店"];
// break;
case 0:
[self jumpToHTML5:@"http://m.xiachufang.com/" andJAnalytics:@"菜谱"];
[self jumpToHTML5:@"https://www.xinshipu.com/" andJAnalytics:@"菜谱"];
[getPeopleID changePlistContentand:@"菜谱"];
break;
case 1:
......@@ -515,11 +528,13 @@ AppDelegate *delegate=(AppDelegate*)[[UIApplication sharedApplication]delegate];
}
-(void)senderWK{
WKSuperViewController *tc=[[WKSuperViewController alloc]init];
tc.titleStr=@"社保计算器";
tc.pathStr=@"http://www.wodeshebao.com/calc/index.html";
tc.hidesBottomBarWhenPushed =YES;
[self.navigationController pushViewController:tc animated:YES];
[self jumpToHTML5:@"http://www.wodeshebao.com/calc/index.html" andJAnalytics:@"社保计算器"];
// WKSuperViewController *tc=[[WKSuperViewController alloc]init];
// tc.titleStr=@"社保计算器";
// tc.pathStr=@"http://www.wodeshebao.com/calc/index.html";
// tc.hidesBottomBarWhenPushed =YES;
// [self.navigationController pushViewController:tc animated:YES];
}
-(void)searchProgress{
......
......@@ -8,6 +8,8 @@
#import <UIKit/UIKit.h>
@interface WKSuperViewController : UIViewController
@property(nonatomic,copy)NSString *titleStr;
......
......@@ -13,36 +13,11 @@
//#import "md5.h"
#import "WeakWebViewScriptMessageDelegate.h"
#import "UIColor+Hex.h"
@interface WeakWebViewScriptMessageDelegate : NSObject<WKScriptMessageHandler>
@property (nonatomic, weak) id<WKScriptMessageHandler> scriptDelegate;
- (instancetype)initWithDelegate:(id<WKScriptMessageHandler>)scriptDelegate;
@end
@implementation WeakWebViewScriptMessageDelegate
- (instancetype)initWithDelegate:(id<WKScriptMessageHandler>)scriptDelegate {
self = [super init];
if (self) {
_scriptDelegate = scriptDelegate;
}
return self;
}
#pragma mark - WKScriptMessageHandler
- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message {
if ([self.scriptDelegate respondsToSelector:@selector(userContentController:didReceiveScriptMessage:)]) {
[self.scriptDelegate userContentController:userContentController didReceiveScriptMessage:message];
}
}
@end
@interface WKSuperViewController ()<WKScriptMessageHandler, WKUIDelegate, WKNavigationDelegate>
@property (nonatomic, strong) WKWebView * webView;
......@@ -63,6 +38,24 @@
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
if ([self.pathStr isEqualToString:@"https://wallet.95516.com/s/wl/webV3/activity/vInvite/html/snsIndex.html?code=bdyx&from=groupmessage&isappinstalled=0"]) {
self.navigationController.navigationBar.barTintColor = [UIColor colorWithHex:0xbe0124];
[self.transitionCoordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
self.navigationController.navigationBar.barTintColor = [UIColor colorWithHex:0xbe0124];
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@""] forBarMetrics:UIBarMetricsDefault];
} completion:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
}];
}
}
- (void)viewDidLoad {
[super viewDidLoad];
[self setupNavigationItem];
......@@ -72,10 +65,12 @@
forKeyPath:NSStringFromSelector(@selector(estimatedProgress))
options:0
context:nil];
[self.webView addObserver:self
forKeyPath:@"title"
options:NSKeyValueObservingOptionNew
context:nil];
[self.webView addObserver:self
forKeyPath:@"title"
options:NSKeyValueObservingOptionNew
context:nil];
self.view.backgroundColor =[UIColor whiteColor];
}
......@@ -275,6 +270,7 @@
jSString = @"var meta = document.createElement('meta'); meta.setAttribute('name', 'viewport'); meta.setAttribute('content', 'width=device-width'); document.getElementsByTagName('head')[0].appendChild(meta);javascript:function setTop(){document.querySelector('.turnoff').style.position='inherit';}setTop();javascript:function setTop1()javascript:function setTop5(){document.querySelector('.site-header-bg').style.display='none';}setTop5();";
}else if([self.titleStr isEqualToString:@"社保计算器"]){
// jSString=@"javascript:function setTop6(){}setTop6();javascript:function setTop7(){document.querySelector('.nb-invite-wrap-base').style.width='0px';}setTop7();";
jSString = @"javascript:function setTop11(){document.querySelector('.top_denglu').style.display='none';document.querySelector('.col-sm-6').style.display='none';document.querySelector('.navbar').style.display='none';document.querySelector('#newBridge').style.opacity='0';document.querySelector('.row').style.display='none';document.querySelector('.footer1').style.display='none';}setTop11();";
}
......@@ -553,8 +549,7 @@
[[_webView configuration].userContentController removeScriptMessageHandlerForName:@"jsToOcWithPrams"];
[_webView removeObserver:self
forKeyPath:NSStringFromSelector(@selector(estimatedProgress))];
[_webView removeObserver:self
forKeyPath:NSStringFromSelector(@selector(title))];
[self.webView removeObserver:self forKeyPath:@"title"];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
......
......@@ -31,6 +31,9 @@
@property(nonatomic,strong)NSString *OCRData;
@property(nonatomic,strong)NSString *OCRData_;
@property(nonatomic,strong)NSString *telStr;
+ (pickerViewController *)sharedInstance;
//textField 文本框
@property (weak, nonatomic) IBOutlet UITextField *province;
......
......@@ -178,7 +178,7 @@ static NSString *static_numbercountry;
[super viewDidLoad];
//ui
UIButton * button_2 = [UIButton buttonWithType:UIButtonTypeCustom]; button_2.frame = CGRectMake(0, 0, 0, 49); button_2.titleLabel.textAlignment =NSTextAlignmentRight; [button_2 setTitle:@" 帮助" forState:UIControlStateNormal]; [button_2 addTarget:self action:@selector(buttonClick_1) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem * backButtonItem_2 = [[UIBarButtonItem alloc] initWithCustomView:button_2]; self.navigationItem.rightBarButtonItem = backButtonItem_2;
// UIButton * button_2 = [UIButton buttonWithType:UIButtonTypeCustom]; button_2.frame = CGRectMake(0, 0, 0, 49); button_2.titleLabel.textAlignment =NSTextAlignmentRight; [button_2 setTitle:@" 帮助" forState:UIControlStateNormal]; [button_2 addTarget:self action:@selector(buttonClick_1) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem * backButtonItem_2 = [[UIBarButtonItem alloc] initWithCustomView:button_2]; self.navigationItem.rightBarButtonItem = backButtonItem_2;
// ui
if ([[[UIDevice currentDevice]deviceModel] isEqualToString:Device_iPhone5S]) {
......
......@@ -11,5 +11,7 @@ pod 'GInsightSDK', '~> 1.4.5.0'
pod 'JAnalytics', '~> 2.0.0'
pod 'ZJAnimationPopView'
pod 'CocoaLumberjack', '~> 3.5.3'
pod 'UICountingLabel'
pod 'Toast', '~> 4.0.0'
pod 'Reachability', '~> 3.2'
end
......@@ -90,7 +90,6 @@
0036F5C222602DC600D9647D /* UINavigationController+FDFullscreenPopGesture.m in Sources */ = {isa = PBXBuildFile; fileRef = 0036F5BF22602DC200D9647D /* UINavigationController+FDFullscreenPopGesture.m */; };
0036F5C322602DC600D9647D /* UIViewController+navibarSetting.m in Sources */ = {isa = PBXBuildFile; fileRef = 0036F5C122602DC600D9647D /* UIViewController+navibarSetting.m */; };
0036F5C62260672A00D9647D /* KKNewsVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 0036F5C52260672A00D9647D /* KKNewsVC.m */; };
0036F5DA2264213D00D9647D /* DFTTPushSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0036F5D92264213C00D9647D /* DFTTPushSDK.framework */; };
0038066A1E5FCA3F007B7FA1 /* homePageNewsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 003806691E5FCA3F007B7FA1 /* homePageNewsModel.m */; };
003806B31E603153007B7FA1 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 003806B21E603153007B7FA1 /* CoreMedia.framework */; };
003D5F521E6E8D5000675FF1 /* apple.png in Resources */ = {isa = PBXBuildFile; fileRef = 003D5F511E6E8D5000675FF1 /* apple.png */; };
......@@ -218,7 +217,7 @@
006F52C31EC1ACE800521772 /* backItemImage@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 006F52C11EC1ACE800521772 /* backItemImage@2x.png */; };
006F52C51EC1ACEC00521772 /* WKJSPOST.html in Resources */ = {isa = PBXBuildFile; fileRef = 006F52C41EC1ACEC00521772 /* WKJSPOST.html */; };
006F5A321EF3DAC000D8550B /* UserNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 006F5A311EF3DAC000D8550B /* UserNotifications.framework */; };
006F5A361EF3DAF800D8550B /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 006F5A351EF3DAF800D8550B /* CoreFoundation.framework */; };
006F5A361EF3DAF800D8550B /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 006F5A351EF3DAF800D8550B /* CoreFoundation.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
006F5A381EF3DB0900D8550B /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 006F5A371EF3DB0900D8550B /* CFNetwork.framework */; };
006F5A401EF3F57100D8550B /* libresolv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 006F5A3F1EF3F57100D8550B /* libresolv.tbd */; };
007131B72292825F005C5675 /* GTSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 007131B52292825F005C5675 /* GTSDK.framework */; };
......@@ -486,15 +485,12 @@
4401C48522C85B700045FD7E /* LoginVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 4401C48422C85B700045FD7E /* LoginVC.m */; };
4401C48C22C898E60045FD7E /* BPViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4401C48B22C898E60045FD7E /* BPViewController.m */; };
4401C48F22C8B7400045FD7E /* Tools.m in Sources */ = {isa = PBXBuildFile; fileRef = 4401C48E22C8B7400045FD7E /* Tools.m */; };
4401CA4323137CAD006EDD48 /* CTDiskCacheCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4401CA4223137CAD006EDD48 /* CTDiskCacheCenter.m */; };
440223452304F2EF003F67CD /* libz.1.2.8.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 440223442304F2EF003F67CD /* libz.1.2.8.tbd */; };
4402D7A222CCA147001430DF /* SettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4402D7A122CCA147001430DF /* SettingViewController.m */; };
4402D7A622CCA464001430DF /* SettingTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4402D7A422CCA464001430DF /* SettingTableViewCell.m */; };
4402D7A722CCA464001430DF /* SettingTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4402D7A522CCA464001430DF /* SettingTableViewCell.xib */; };
4402D7A922CCAC28001430DF /* SettingItemList.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4402D7A822CCAC28001430DF /* SettingItemList.plist */; };
44036A1C22B0FE2A00A919C2 /* TYRZSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 44036A1722B0FE2A00A919C2 /* TYRZSDK.framework */; };
44036A1D22B0FE2A00A919C2 /* CL_ShanYanSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 44036A1822B0FE2A00A919C2 /* CL_ShanYanSDK.framework */; };
44036A1E22B0FE2A00A919C2 /* sdk_oauth.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 44036A1922B0FE2A00A919C2 /* sdk_oauth.bundle */; };
44036A1F22B0FE2A00A919C2 /* OAuth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 44036A1A22B0FE2A00A919C2 /* OAuth.framework */; };
44036A2022B0FE2A00A919C2 /* EAccountApiSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 44036A1B22B0FE2A00A919C2 /* EAccountApiSDK.framework */; };
4403E19622F5377C00F7ED8E /* PaymentDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4403E19322F5377C00F7ED8E /* PaymentDetailViewController.m */; };
4403E19922F539C600F7ED8E /* PaymentDetailTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4403E19822F539C600F7ED8E /* PaymentDetailTableViewCell.m */; };
4403E19E22F542B100F7ED8E /* libTianqijun_V1.0.1.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4403E19A22F542AF00F7ED8E /* libTianqijun_V1.0.1.a */; };
......@@ -535,6 +531,7 @@
44061E7B22E820600089A774 /* SuccessBaseView.m in Sources */ = {isa = PBXBuildFile; fileRef = 44061E7A22E820600089A774 /* SuccessBaseView.m */; };
44061E8122E83EF30089A774 /* DashesLineView.m in Sources */ = {isa = PBXBuildFile; fileRef = 44061E8022E83EF30089A774 /* DashesLineView.m */; };
44061E8522E85EB80089A774 /* NSString+AttributedString.m in Sources */ = {isa = PBXBuildFile; fileRef = 44061E8422E85EB80089A774 /* NSString+AttributedString.m */; };
44064635230EA04300F9B804 /* MiddleBannerCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 44064634230EA04300F9B804 /* MiddleBannerCollectionViewCell.m */; };
44067E1522CB59B30059F569 /* UIColor+Hex.m in Sources */ = {isa = PBXBuildFile; fileRef = 44067E1322CB59B30059F569 /* UIColor+Hex.m */; };
44067E1822CB59D60059F569 /* LogViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 44067E1722CB59D60059F569 /* LogViewController.m */; };
44067E1C22CB59E90059F569 /* LogTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 44067E1922CB59E80059F569 /* LogTableViewCell.m */; };
......@@ -547,44 +544,79 @@
44070FB022E6ECD000048ABC /* TestViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 44070FAF22E6ECD000048ABC /* TestViewController.m */; };
440746AF22CEEF6A005154FA /* ChangeUserInfoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 440746AE22CEEF6A005154FA /* ChangeUserInfoViewController.m */; };
440746B622CF036A005154FA /* UPViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 440746B522CF036A005154FA /* UPViewController.m */; };
4407CD2822EADB6500CF0164 /* my-open@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4407CD2622EADB6300CF0164 /* my-open@2x.png */; };
4407CD2922EADB6500CF0164 /* my-open@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4407CD2722EADB6500CF0164 /* my-open@3x.png */; };
4407CD3322EAEB8C00CF0164 /* DeathProveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4407CD2F22EAEB8C00CF0164 /* DeathProveViewController.m */; };
4407CD3622EAEBAA00CF0164 /* SSTerminationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4407CD3522EAEBAA00CF0164 /* SSTerminationViewController.m */; };
4407CD3922EB0B4200CF0164 /* XZDrawView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4407CD3822EB0B4200CF0164 /* XZDrawView.m */; };
4408767A2318AEBC00BD895E /* HealthKitManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 440876792318AEBC00BD895E /* HealthKitManager.m */; };
440876802318FF3C00BD895E /* CQCountDownButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 4408767D2318FF3C00BD895E /* CQCountDownButton.m */; };
440876812318FF3C00BD895E /* NSTimer+CQBlockSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 4408767E2318FF3C00BD895E /* NSTimer+CQBlockSupport.m */; };
440876832319088B00BD895E /* HealthKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 440876822319088B00BD895E /* HealthKit.framework */; };
4408F82622FA5BDA00CFECBD /* RetroactiveView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4408F82522FA5BDA00CFECBD /* RetroactiveView.m */; };
4408F82922FA624200CFECBD /* EnsurePaybackFrontView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4408F82822FA624200CFECBD /* EnsurePaybackFrontView.m */; };
4408F82C22FA83C900CFECBD /* DashLineView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4408F82B22FA83C900CFECBD /* DashLineView.m */; };
4408F82F22FAB5F500CFECBD /* RedPackageSuccessView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4408F82E22FAB5F500CFECBD /* RedPackageSuccessView.m */; };
4408F83522FAE42500CFECBD /* PXXview.m in Sources */ = {isa = PBXBuildFile; fileRef = 4408F83422FAE42500CFECBD /* PXXview.m */; };
4408F83A22FAE8FB00CFECBD /* PXLineChartView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4408F83922FAE8FB00CFECBD /* PXLineChartView.m */; };
440902E2232645760021C56F /* ListPrizeTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 440902E0232645760021C56F /* ListPrizeTableViewCell.m */; };
440902E5232645C20021C56F /* NoDataView.m in Sources */ = {isa = PBXBuildFile; fileRef = 440902E4232645C20021C56F /* NoDataView.m */; };
44090AC922F3DB4000FA6B66 /* BaseView.m in Sources */ = {isa = PBXBuildFile; fileRef = 44090AC822F3DB3F00FA6B66 /* BaseView.m */; };
44090ACC22F3DE4900FA6B66 /* cityData.plist in Resources */ = {isa = PBXBuildFile; fileRef = 44090ACB22F3DE4900FA6B66 /* cityData.plist */; };
44090ACF22F3DEF700FA6B66 /* CYCitySelectedView.m in Sources */ = {isa = PBXBuildFile; fileRef = 44090ACE22F3DEF700FA6B66 /* CYCitySelectedView.m */; };
44090AD322F4624500FA6B66 /* CityTypeSelectView.m in Sources */ = {isa = PBXBuildFile; fileRef = 44090AD222F4624500FA6B66 /* CityTypeSelectView.m */; };
44094C1C2327476A00D9C01E /* my-open@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 44094C1A2327476900D9C01E /* my-open@2x.png */; };
44094C1D2327476A00D9C01E /* my-open@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 44094C1B2327476A00D9C01E /* my-open@3x.png */; };
440A5343231515CF00EA569A /* Home3MiddleBannerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 440A5342231515CF00EA569A /* Home3MiddleBannerCell.m */; };
440A534723151DF700EA569A /* PDBannerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 440A534523151DF600EA569A /* PDBannerView.m */; };
440A87BD22F19627005859D1 /* CTApiProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = 440A87B922F19626005859D1 /* CTApiProxy.m */; };
440A87BE22F19627005859D1 /* CTAPIBaseManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 440A87BB22F19627005859D1 /* CTAPIBaseManager.m */; };
440A87C322F1AA88005859D1 /* LMJScrollTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 440A87C122F1AA87005859D1 /* LMJScrollTextView.m */; };
440A87CC22F2F63F005859D1 /* SocialSecurityPaymentTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 440A87CB22F2F63F005859D1 /* SocialSecurityPaymentTableViewCell.m */; };
440BEB262302938C0070402B /* SSCardWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 440BEB252302938C0070402B /* SSCardWebViewController.m */; };
440CEF3D2321FA730030181A /* CTPrizeDetailProcessTableCellContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = 440CEF3C2321FA730030181A /* CTPrizeDetailProcessTableCellContentView.m */; };
440CEF402322082E0030181A /* CTPrizeDetailProcessTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 440CEF3F2322082E0030181A /* CTPrizeDetailProcessTableViewCell.m */; };
44113B4C230A442D002374CA /* WeakWebViewScriptMessageDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 44113B4B230A442D002374CA /* WeakWebViewScriptMessageDelegate.m */; };
441766EF2307F8D60072A118 /* TYRZSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 441766EA2307F8D50072A118 /* TYRZSDK.framework */; };
441766F02307F8D60072A118 /* CL_ShanYanSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 441766EB2307F8D50072A118 /* CL_ShanYanSDK.framework */; };
441766F12307F8D60072A118 /* sdk_oauth.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 441766EC2307F8D60072A118 /* sdk_oauth.bundle */; };
441766F22307F8D60072A118 /* OAuth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 441766ED2307F8D60072A118 /* OAuth.framework */; };
441766F32307F8D60072A118 /* EAccountApiSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 441766EE2307F8D60072A118 /* EAccountApiSDK.framework */; };
44183CFA22D717D2001F57BB /* GreenChannelImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 44183CF922D717D2001F57BB /* GreenChannelImageView.m */; };
44183D0122D72E0A001F57BB /* UIScrollView+UITouch.m in Sources */ = {isa = PBXBuildFile; fileRef = 44183D0022D72E0A001F57BB /* UIScrollView+UITouch.m */; };
44228386231F589F00E1EC16 /* UIButton+CQBlockSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 44228384231F589F00E1EC16 /* UIButton+CQBlockSupport.m */; };
446935BD22FBC3DB00D465FF /* PXLineChartConst.m in Sources */ = {isa = PBXBuildFile; fileRef = 446935BC22FBC3DB00D465FF /* PXLineChartConst.m */; };
446935C022FBC8B700D465FF /* PXYview.m in Sources */ = {isa = PBXBuildFile; fileRef = 446935BF22FBC8B700D465FF /* PXYview.m */; };
446935C322FBCE5600D465FF /* PXChartBackgroundView.m in Sources */ = {isa = PBXBuildFile; fileRef = 446935C222FBCE5600D465FF /* PXChartBackgroundView.m */; };
446935C622FBEEFA00D465FF /* PointItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 446935C522FBEEF900D465FF /* PointItem.m */; };
446935C922FBEF6500D465FF /* CoinsDetailListVC2.m in Sources */ = {isa = PBXBuildFile; fileRef = 446935C822FBEF6500D465FF /* CoinsDetailListVC2.m */; };
447E5BF42309175600AD02E7 /* WebVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 447E5BF32309175600AD02E7 /* WebVC.m */; };
448158BF230420CE0016E45E /* NSString+Timestamp.m in Sources */ = {isa = PBXBuildFile; fileRef = 448158BE230420CE0016E45E /* NSString+Timestamp.m */; };
4492BAE62320FCAD0088AE01 /* PrizeDetailInfoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4492BAE52320FCAD0088AE01 /* PrizeDetailInfoViewController.m */; };
4492BAE92320FE9E0088AE01 /* PrizeDetailCardView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4492BAE82320FE9E0088AE01 /* PrizeDetailCardView.m */; };
4492BAEC2321299C0088AE01 /* SNXUXIANView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4492BAEB2321299C0088AE01 /* SNXUXIANView.m */; };
4492BAEF23212B840088AE01 /* PrizeDetailProcessView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4492BAEE23212B840088AE01 /* PrizeDetailProcessView.m */; };
4495EE6E231CF06F00CE78DB /* SocialSecurityApproveSuccessVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 4495EE6D231CF06F00CE78DB /* SocialSecurityApproveSuccessVC.m */; };
44A338EB22DAD3FB0076A550 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8D8F83A21D7EA60B00ABF221 /* Assets.xcassets */; };
44ABCB4D230BF59B0006901B /* OfficialAccountsAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 44ABCB4C230BF59B0006901B /* OfficialAccountsAlertView.m */; };
44AD655C231E1BC100FCD9B4 /* MyPrizeListVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 44AD655B231E1BC100FCD9B4 /* MyPrizeListVC.m */; };
44AD6560231E304F00FCD9B4 /* orderHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 44AD655E231E304F00FCD9B4 /* orderHeader.m */; };
44AD6573231E3D8300FCD9B4 /* UITableView+JYEmptyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 44AD656A231E3D8300FCD9B4 /* UITableView+JYEmptyView.m */; };
44AD6574231E3D8300FCD9B4 /* JYEmptyConst.m in Sources */ = {isa = PBXBuildFile; fileRef = 44AD656E231E3D8300FCD9B4 /* JYEmptyConst.m */; };
44AD6575231E3D8300FCD9B4 /* JYEmptyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 44AD6571231E3D8300FCD9B4 /* JYEmptyView.m */; };
44AD6576231E3D8300FCD9B4 /* UIView+Awesome.m in Sources */ = {isa = PBXBuildFile; fileRef = 44AD6572231E3D8300FCD9B4 /* UIView+Awesome.m */; };
44AD657A231E472E00FCD9B4 /* DFTTPushSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 44AD6579231E472E00FCD9B4 /* DFTTPushSDK.framework */; };
44AD6587231E8CEB00FCD9B4 /* OnFootAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 44AD6586231E8CEB00FCD9B4 /* OnFootAlertView.m */; };
44F9A77822D5F663002A3025 /* CoinsDetailFooterView.m in Sources */ = {isa = PBXBuildFile; fileRef = 44F9A77722D5F663002A3025 /* CoinsDetailFooterView.m */; };
44F9A78022D60639002A3025 /* GreenChannelVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 44F9A77F22D60639002A3025 /* GreenChannelVC.m */; };
44FB613222C4E0DA0096B238 /* DFTTFramework_Base.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 44FB613122C4E0D90096B238 /* DFTTFramework_Base.framework */; };
44FD397E23177D0E0010D68E /* OnFootEarnCoinsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 44FD397D23177D0E0010D68E /* OnFootEarnCoinsViewController.m */; };
44FD3982231781F00010D68E /* MQGradientProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = 44FD3980231781F00010D68E /* MQGradientProgressView.m */; };
44FE517A22D2D74D00872A14 /* WithDrawViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 44FE517922D2D74D00872A14 /* WithDrawViewController.m */; };
44FE517D22D2DD8400872A14 /* WithDrawCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 44FE517C22D2DD8400872A14 /* WithDrawCollectionViewCell.m */; };
44FE518022D2EDAA00872A14 /* WithDrawView.m in Sources */ = {isa = PBXBuildFile; fileRef = 44FE517F22D2EDAA00872A14 /* WithDrawView.m */; };
44FE518322D308F700872A14 /* WithDrawFooterView.m in Sources */ = {isa = PBXBuildFile; fileRef = 44FE518222D308F700872A14 /* WithDrawFooterView.m */; };
44FE519F22D349FF00872A14 /* VerticalUIButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 44FE518A22D349FE00872A14 /* VerticalUIButton.m */; };
44FE51AA22D349FF00872A14 /* XMShareView.m in Sources */ = {isa = PBXBuildFile; fileRef = 44FE519E22D349FE00872A14 /* XMShareView.m */; };
44FE746E23067A41004AF3A3 /* HomeSectionHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 44FE746D23067A41004AF3A3 /* HomeSectionHeaderView.m */; };
523DD99959996B435C178886 /* libPods-Open.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 36EC17A7B4CB1A83634CB455 /* libPods-Open.a */; };
8D2389C11D814E8F00B279C6 /* IPViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D2389C01D814E8F00B279C6 /* IPViewController.m */; };
8D2389C41D8261CA00B279C6 /* Http.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D2389C31D8261CA00B279C6 /* Http.m */; };
......@@ -746,7 +778,6 @@
0036F5C122602DC600D9647D /* UIViewController+navibarSetting.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+navibarSetting.m"; sourceTree = "<group>"; };
0036F5C42260672A00D9647D /* KKNewsVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KKNewsVC.h; sourceTree = "<group>"; };
0036F5C52260672A00D9647D /* KKNewsVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KKNewsVC.m; sourceTree = "<group>"; };
0036F5D92264213C00D9647D /* DFTTPushSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = DFTTPushSDK.framework; sourceTree = "<group>"; };
003806681E5FCA3F007B7FA1 /* homePageNewsModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = homePageNewsModel.h; sourceTree = "<group>"; };
003806691E5FCA3F007B7FA1 /* homePageNewsModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = homePageNewsModel.m; sourceTree = "<group>"; };
003806B21E603153007B7FA1 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
......@@ -1458,17 +1489,15 @@
4401C48B22C898E60045FD7E /* BPViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BPViewController.m; sourceTree = "<group>"; };
4401C48D22C8B7400045FD7E /* Tools.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Tools.h; sourceTree = "<group>"; };
4401C48E22C8B7400045FD7E /* Tools.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tools.m; sourceTree = "<group>"; };
4401CA4123137CAD006EDD48 /* CTDiskCacheCenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTDiskCacheCenter.h; sourceTree = "<group>"; };
4401CA4223137CAD006EDD48 /* CTDiskCacheCenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTDiskCacheCenter.m; sourceTree = "<group>"; };
440223442304F2EF003F67CD /* libz.1.2.8.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.1.2.8.tbd; path = usr/lib/libz.1.2.8.tbd; sourceTree = SDKROOT; };
4402D7A022CCA147001430DF /* SettingViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SettingViewController.h; sourceTree = "<group>"; };
4402D7A122CCA147001430DF /* SettingViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SettingViewController.m; sourceTree = "<group>"; };
4402D7A322CCA464001430DF /* SettingTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SettingTableViewCell.h; sourceTree = "<group>"; };
4402D7A422CCA464001430DF /* SettingTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SettingTableViewCell.m; sourceTree = "<group>"; };
4402D7A522CCA464001430DF /* SettingTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SettingTableViewCell.xib; sourceTree = "<group>"; };
4402D7A822CCAC28001430DF /* SettingItemList.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = SettingItemList.plist; sourceTree = "<group>"; };
44036A1722B0FE2A00A919C2 /* TYRZSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = TYRZSDK.framework; sourceTree = "<group>"; };
44036A1822B0FE2A00A919C2 /* CL_ShanYanSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CL_ShanYanSDK.framework; sourceTree = "<group>"; };
44036A1922B0FE2A00A919C2 /* sdk_oauth.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = sdk_oauth.bundle; sourceTree = "<group>"; };
44036A1A22B0FE2A00A919C2 /* OAuth.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = OAuth.framework; sourceTree = "<group>"; };
44036A1B22B0FE2A00A919C2 /* EAccountApiSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = EAccountApiSDK.framework; sourceTree = "<group>"; };
4403E19222F5377C00F7ED8E /* PaymentDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PaymentDetailViewController.h; sourceTree = "<group>"; };
4403E19322F5377C00F7ED8E /* PaymentDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PaymentDetailViewController.m; sourceTree = "<group>"; };
4403E19722F539C600F7ED8E /* PaymentDetailTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PaymentDetailTableViewCell.h; sourceTree = "<group>"; };
......@@ -1547,6 +1576,8 @@
44061E8022E83EF30089A774 /* DashesLineView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DashesLineView.m; sourceTree = "<group>"; };
44061E8322E85EB80089A774 /* NSString+AttributedString.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+AttributedString.h"; sourceTree = "<group>"; };
44061E8422E85EB80089A774 /* NSString+AttributedString.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+AttributedString.m"; sourceTree = "<group>"; };
44064633230EA04300F9B804 /* MiddleBannerCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MiddleBannerCollectionViewCell.h; sourceTree = "<group>"; };
44064634230EA04300F9B804 /* MiddleBannerCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MiddleBannerCollectionViewCell.m; sourceTree = "<group>"; };
44067E1322CB59B30059F569 /* UIColor+Hex.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIColor+Hex.m"; sourceTree = "<group>"; };
44067E1422CB59B30059F569 /* UIColor+Hex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIColor+Hex.h"; sourceTree = "<group>"; };
44067E1622CB59D60059F569 /* LogViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogViewController.h; sourceTree = "<group>"; };
......@@ -1570,14 +1601,19 @@
440746AE22CEEF6A005154FA /* ChangeUserInfoViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ChangeUserInfoViewController.m; sourceTree = "<group>"; };
440746B422CF036A005154FA /* UPViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UPViewController.h; sourceTree = "<group>"; };
440746B522CF036A005154FA /* UPViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UPViewController.m; sourceTree = "<group>"; };
4407CD2622EADB6300CF0164 /* my-open@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "my-open@2x.png"; sourceTree = "<group>"; };
4407CD2722EADB6500CF0164 /* my-open@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "my-open@3x.png"; sourceTree = "<group>"; };
4407CD2E22EAEB8C00CF0164 /* DeathProveViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeathProveViewController.h; sourceTree = "<group>"; };
4407CD2F22EAEB8C00CF0164 /* DeathProveViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DeathProveViewController.m; sourceTree = "<group>"; };
4407CD3422EAEBAA00CF0164 /* SSTerminationViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SSTerminationViewController.h; sourceTree = "<group>"; };
4407CD3522EAEBAA00CF0164 /* SSTerminationViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SSTerminationViewController.m; sourceTree = "<group>"; };
4407CD3722EB0B4200CF0164 /* XZDrawView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XZDrawView.h; sourceTree = "<group>"; };
4407CD3822EB0B4200CF0164 /* XZDrawView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XZDrawView.m; sourceTree = "<group>"; };
440876782318AEBC00BD895E /* HealthKitManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HealthKitManager.h; sourceTree = "<group>"; };
440876792318AEBC00BD895E /* HealthKitManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HealthKitManager.m; sourceTree = "<group>"; };
4408767C2318FF3C00BD895E /* NSTimer+CQBlockSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSTimer+CQBlockSupport.h"; sourceTree = "<group>"; };
4408767D2318FF3C00BD895E /* CQCountDownButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CQCountDownButton.m; sourceTree = "<group>"; };
4408767E2318FF3C00BD895E /* NSTimer+CQBlockSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSTimer+CQBlockSupport.m"; sourceTree = "<group>"; };
4408767F2318FF3C00BD895E /* CQCountDownButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CQCountDownButton.h; sourceTree = "<group>"; };
440876822319088B00BD895E /* HealthKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = HealthKit.framework; path = System/Library/Frameworks/HealthKit.framework; sourceTree = SDKROOT; };
4408F82422FA5BDA00CFECBD /* RetroactiveView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RetroactiveView.h; sourceTree = "<group>"; };
4408F82522FA5BDA00CFECBD /* RetroactiveView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RetroactiveView.m; sourceTree = "<group>"; };
4408F82722FA624200CFECBD /* EnsurePaybackFrontView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EnsurePaybackFrontView.h; sourceTree = "<group>"; };
......@@ -1592,6 +1628,10 @@
4408F83722FAE62200CFECBD /* PXLineChart.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PXLineChart.h; sourceTree = "<group>"; };
4408F83822FAE8FB00CFECBD /* PXLineChartView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PXLineChartView.h; sourceTree = "<group>"; };
4408F83922FAE8FB00CFECBD /* PXLineChartView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PXLineChartView.m; sourceTree = "<group>"; };
440902E0232645760021C56F /* ListPrizeTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ListPrizeTableViewCell.m; sourceTree = "<group>"; };
440902E1232645760021C56F /* ListPrizeTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ListPrizeTableViewCell.h; sourceTree = "<group>"; };
440902E3232645C20021C56F /* NoDataView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NoDataView.h; sourceTree = "<group>"; };
440902E4232645C20021C56F /* NoDataView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NoDataView.m; sourceTree = "<group>"; };
44090AC722F3DB3E00FA6B66 /* BaseView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseView.h; sourceTree = "<group>"; };
44090AC822F3DB3F00FA6B66 /* BaseView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BaseView.m; sourceTree = "<group>"; };
44090ACB22F3DE4900FA6B66 /* cityData.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = cityData.plist; sourceTree = "<group>"; };
......@@ -1599,6 +1639,12 @@
44090ACE22F3DEF700FA6B66 /* CYCitySelectedView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CYCitySelectedView.m; sourceTree = "<group>"; };
44090AD122F4624500FA6B66 /* CityTypeSelectView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CityTypeSelectView.h; sourceTree = "<group>"; };
44090AD222F4624500FA6B66 /* CityTypeSelectView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CityTypeSelectView.m; sourceTree = "<group>"; };
44094C1A2327476900D9C01E /* my-open@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "my-open@2x.png"; sourceTree = "<group>"; };
44094C1B2327476A00D9C01E /* my-open@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "my-open@3x.png"; sourceTree = "<group>"; };
440A5341231515CF00EA569A /* Home3MiddleBannerCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Home3MiddleBannerCell.h; sourceTree = "<group>"; };
440A5342231515CF00EA569A /* Home3MiddleBannerCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Home3MiddleBannerCell.m; sourceTree = "<group>"; };
440A534523151DF600EA569A /* PDBannerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PDBannerView.m; sourceTree = "<group>"; };
440A534623151DF600EA569A /* PDBannerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PDBannerView.h; sourceTree = "<group>"; };
440A87B822F19626005859D1 /* CTApiProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CTApiProxy.h; sourceTree = "<group>"; };
440A87B922F19626005859D1 /* CTApiProxy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CTApiProxy.m; sourceTree = "<group>"; };
440A87BB22F19627005859D1 /* CTAPIBaseManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CTAPIBaseManager.m; sourceTree = "<group>"; };
......@@ -1609,10 +1655,23 @@
440A87CB22F2F63F005859D1 /* SocialSecurityPaymentTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SocialSecurityPaymentTableViewCell.m; sourceTree = "<group>"; };
440BEB242302938C0070402B /* SSCardWebViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SSCardWebViewController.h; sourceTree = "<group>"; };
440BEB252302938C0070402B /* SSCardWebViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SSCardWebViewController.m; sourceTree = "<group>"; };
440CEF3B2321FA730030181A /* CTPrizeDetailProcessTableCellContentView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTPrizeDetailProcessTableCellContentView.h; sourceTree = "<group>"; };
440CEF3C2321FA730030181A /* CTPrizeDetailProcessTableCellContentView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTPrizeDetailProcessTableCellContentView.m; sourceTree = "<group>"; };
440CEF3E2322082E0030181A /* CTPrizeDetailProcessTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTPrizeDetailProcessTableViewCell.h; sourceTree = "<group>"; };
440CEF3F2322082E0030181A /* CTPrizeDetailProcessTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTPrizeDetailProcessTableViewCell.m; sourceTree = "<group>"; };
44113B4A230A442D002374CA /* WeakWebViewScriptMessageDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WeakWebViewScriptMessageDelegate.h; sourceTree = "<group>"; };
44113B4B230A442D002374CA /* WeakWebViewScriptMessageDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WeakWebViewScriptMessageDelegate.m; sourceTree = "<group>"; };
441766EA2307F8D50072A118 /* TYRZSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = TYRZSDK.framework; sourceTree = "<group>"; };
441766EB2307F8D50072A118 /* CL_ShanYanSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CL_ShanYanSDK.framework; sourceTree = "<group>"; };
441766EC2307F8D60072A118 /* sdk_oauth.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = sdk_oauth.bundle; sourceTree = "<group>"; };
441766ED2307F8D60072A118 /* OAuth.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = OAuth.framework; sourceTree = "<group>"; };
441766EE2307F8D60072A118 /* EAccountApiSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = EAccountApiSDK.framework; sourceTree = "<group>"; };
44183CF822D717D2001F57BB /* GreenChannelImageView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GreenChannelImageView.h; sourceTree = "<group>"; };
44183CF922D717D2001F57BB /* GreenChannelImageView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GreenChannelImageView.m; sourceTree = "<group>"; };
44183CFF22D72E0A001F57BB /* UIScrollView+UITouch.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIScrollView+UITouch.h"; sourceTree = "<group>"; };
44183D0022D72E0A001F57BB /* UIScrollView+UITouch.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIScrollView+UITouch.m"; sourceTree = "<group>"; };
44228384231F589F00E1EC16 /* UIButton+CQBlockSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIButton+CQBlockSupport.m"; sourceTree = "<group>"; };
44228385231F589F00E1EC16 /* UIButton+CQBlockSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+CQBlockSupport.h"; sourceTree = "<group>"; };
446935BB22FBC3DB00D465FF /* PXLineChartConst.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PXLineChartConst.h; sourceTree = "<group>"; };
446935BC22FBC3DB00D465FF /* PXLineChartConst.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PXLineChartConst.m; sourceTree = "<group>"; };
446935BE22FBC8B700D465FF /* PXYview.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PXYview.h; sourceTree = "<group>"; };
......@@ -1623,8 +1682,38 @@
446935C522FBEEF900D465FF /* PointItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PointItem.m; sourceTree = "<group>"; };
446935C722FBEF6500D465FF /* CoinsDetailListVC2.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CoinsDetailListVC2.h; sourceTree = "<group>"; };
446935C822FBEF6500D465FF /* CoinsDetailListVC2.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CoinsDetailListVC2.m; sourceTree = "<group>"; };
447E5BF22309175600AD02E7 /* WebVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebVC.h; sourceTree = "<group>"; };
447E5BF32309175600AD02E7 /* WebVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WebVC.m; sourceTree = "<group>"; };
448158BD230420CD0016E45E /* NSString+Timestamp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+Timestamp.h"; sourceTree = "<group>"; };
448158BE230420CE0016E45E /* NSString+Timestamp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+Timestamp.m"; sourceTree = "<group>"; };
4492BAE42320FCAD0088AE01 /* PrizeDetailInfoViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PrizeDetailInfoViewController.h; sourceTree = "<group>"; };
4492BAE52320FCAD0088AE01 /* PrizeDetailInfoViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PrizeDetailInfoViewController.m; sourceTree = "<group>"; };
4492BAE72320FE9E0088AE01 /* PrizeDetailCardView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PrizeDetailCardView.h; sourceTree = "<group>"; };
4492BAE82320FE9E0088AE01 /* PrizeDetailCardView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PrizeDetailCardView.m; sourceTree = "<group>"; };
4492BAEA2321299C0088AE01 /* SNXUXIANView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SNXUXIANView.h; sourceTree = "<group>"; };
4492BAEB2321299C0088AE01 /* SNXUXIANView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SNXUXIANView.m; sourceTree = "<group>"; };
4492BAED23212B840088AE01 /* PrizeDetailProcessView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PrizeDetailProcessView.h; sourceTree = "<group>"; };
4492BAEE23212B840088AE01 /* PrizeDetailProcessView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PrizeDetailProcessView.m; sourceTree = "<group>"; };
4495EE6C231CF06F00CE78DB /* SocialSecurityApproveSuccessVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SocialSecurityApproveSuccessVC.h; sourceTree = "<group>"; };
4495EE6D231CF06F00CE78DB /* SocialSecurityApproveSuccessVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SocialSecurityApproveSuccessVC.m; sourceTree = "<group>"; };
44ABCB4B230BF59B0006901B /* OfficialAccountsAlertView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OfficialAccountsAlertView.h; sourceTree = "<group>"; };
44ABCB4C230BF59B0006901B /* OfficialAccountsAlertView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OfficialAccountsAlertView.m; sourceTree = "<group>"; };
44AD655A231E1BC100FCD9B4 /* MyPrizeListVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyPrizeListVC.h; sourceTree = "<group>"; };
44AD655B231E1BC100FCD9B4 /* MyPrizeListVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyPrizeListVC.m; sourceTree = "<group>"; };
44AD655E231E304F00FCD9B4 /* orderHeader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = orderHeader.m; sourceTree = "<group>"; };
44AD655F231E304F00FCD9B4 /* orderHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = orderHeader.h; sourceTree = "<group>"; };
44AD656A231E3D8300FCD9B4 /* UITableView+JYEmptyView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UITableView+JYEmptyView.m"; sourceTree = "<group>"; };
44AD656B231E3D8300FCD9B4 /* JYEmpty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JYEmpty.h; sourceTree = "<group>"; };
44AD656C231E3D8300FCD9B4 /* UIView+Awesome.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+Awesome.h"; sourceTree = "<group>"; };
44AD656D231E3D8300FCD9B4 /* JYEmptyView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JYEmptyView.h; sourceTree = "<group>"; };
44AD656E231E3D8300FCD9B4 /* JYEmptyConst.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JYEmptyConst.m; sourceTree = "<group>"; };
44AD656F231E3D8300FCD9B4 /* UITableView+JYEmptyView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UITableView+JYEmptyView.h"; sourceTree = "<group>"; };
44AD6570231E3D8300FCD9B4 /* JYEmptyConst.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JYEmptyConst.h; sourceTree = "<group>"; };
44AD6571231E3D8300FCD9B4 /* JYEmptyView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JYEmptyView.m; sourceTree = "<group>"; };
44AD6572231E3D8300FCD9B4 /* UIView+Awesome.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+Awesome.m"; sourceTree = "<group>"; };
44AD6579231E472E00FCD9B4 /* DFTTPushSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = DFTTPushSDK.framework; sourceTree = "<group>"; };
44AD6585231E8CEB00FCD9B4 /* OnFootAlertView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OnFootAlertView.h; sourceTree = "<group>"; };
44AD6586231E8CEB00FCD9B4 /* OnFootAlertView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OnFootAlertView.m; sourceTree = "<group>"; };
44D9B86622AA2ED900EBC3BD /* UIImage+WebP.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+WebP.m"; sourceTree = "<group>"; };
44D9B86722AA2ED900EBC3BD /* MKAnnotationView+WebCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MKAnnotationView+WebCache.m"; sourceTree = "<group>"; };
44D9B86822AA2ED900EBC3BD /* UIImageView+WebCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImageView+WebCache.h"; sourceTree = "<group>"; };
......@@ -1663,6 +1752,10 @@
44F9A77E22D60639002A3025 /* GreenChannelVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GreenChannelVC.h; sourceTree = "<group>"; };
44F9A77F22D60639002A3025 /* GreenChannelVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GreenChannelVC.m; sourceTree = "<group>"; };
44FB613122C4E0D90096B238 /* DFTTFramework_Base.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = DFTTFramework_Base.framework; sourceTree = "<group>"; };
44FD397C23177D0E0010D68E /* OnFootEarnCoinsViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OnFootEarnCoinsViewController.h; sourceTree = "<group>"; };
44FD397D23177D0E0010D68E /* OnFootEarnCoinsViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OnFootEarnCoinsViewController.m; sourceTree = "<group>"; };
44FD3980231781F00010D68E /* MQGradientProgressView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MQGradientProgressView.m; sourceTree = "<group>"; };
44FD3981231781F00010D68E /* MQGradientProgressView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MQGradientProgressView.h; sourceTree = "<group>"; };
44FE517822D2D74D00872A14 /* WithDrawViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WithDrawViewController.h; sourceTree = "<group>"; };
44FE517922D2D74D00872A14 /* WithDrawViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WithDrawViewController.m; sourceTree = "<group>"; };
44FE517B22D2DD8400872A14 /* WithDrawCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WithDrawCollectionViewCell.h; sourceTree = "<group>"; };
......@@ -1676,6 +1769,8 @@
44FE518C22D349FE00872A14 /* XMShareView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMShareView.h; sourceTree = "<group>"; };
44FE518D22D349FE00872A14 /* CommonMarco.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommonMarco.h; sourceTree = "<group>"; };
44FE519E22D349FE00872A14 /* XMShareView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XMShareView.m; sourceTree = "<group>"; };
44FE746C23067A41004AF3A3 /* HomeSectionHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeSectionHeaderView.h; sourceTree = "<group>"; };
44FE746D23067A41004AF3A3 /* HomeSectionHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeSectionHeaderView.m; sourceTree = "<group>"; };
8D2389BF1D814E8F00B279C6 /* IPViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IPViewController.h; path = Open/IPViewController.h; sourceTree = "<group>"; };
8D2389C01D814E8F00B279C6 /* IPViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IPViewController.m; path = Open/IPViewController.m; sourceTree = "<group>"; };
8D2389C21D8261CA00B279C6 /* Http.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Http.h; path = Open/Http.h; sourceTree = "<group>"; };
......@@ -1698,11 +1793,12 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
440223452304F2EF003F67CD /* libz.1.2.8.tbd in Frameworks */,
3E8140191DD2FC65008F7FD6 /* CoreGraphics.framework in Frameworks */,
006F5A381EF3DB0900D8550B /* CFNetwork.framework in Frameworks */,
3E8140251DD2FCC7008F7FD6 /* CoreTelephony.framework in Frameworks */,
441766F32307F8D60072A118 /* EAccountApiSDK.framework in Frameworks */,
3E81401F1DD2FC94008F7FD6 /* Security.framework in Frameworks */,
44036A1C22B0FE2A00A919C2 /* TYRZSDK.framework in Frameworks */,
0076B0422292845200CEF49D /* AdSupport.framework in Frameworks */,
0061D57A2255FDBF000CDC40 /* libxml2.tbd in Frameworks */,
3EAE433A1E13879A00BB8AFB /* AudioToolbox.framework in Frameworks */,
......@@ -1716,11 +1812,13 @@
3E81402B1DD2FCE3008F7FD6 /* MobileCoreServices.framework in Frameworks */,
0061D5722255FD4A000CDC40 /* OpenGLES.framework in Frameworks */,
0061D5702255FD40000CDC40 /* VideoToolbox.framework in Frameworks */,
44AD657A231E472E00FCD9B4 /* DFTTPushSDK.framework in Frameworks */,
3E8140231DD2FCBE008F7FD6 /* libsqlite3.tbd in Frameworks */,
3E81401D1DD2FC85008F7FD6 /* SystemConfiguration.framework in Frameworks */,
0051ABCE1E4DBF5C0006A94E /* libc++.tbd in Frameworks */,
3E81401B1DD2FC7D008F7FD6 /* libsqlite3.0.tbd in Frameworks */,
00C4BF4C229F6FCA001AD030 /* libSocialWeChat.a in Frameworks */,
441766F02307F8D60072A118 /* CL_ShanYanSDK.framework in Frameworks */,
00E121301FEB7A1600013238 /* StoreKit.framework in Frameworks */,
00A6DFB1219A9A0C002824E6 /* UMCommonLog.framework in Frameworks */,
007FB40B1F752B3F0088736D /* CoreText.framework in Frameworks */,
......@@ -1732,17 +1830,15 @@
3E8140151DD2FC52008F7FD6 /* UIKit.framework in Frameworks */,
3E8140171DD2FC5A008F7FD6 /* Foundation.framework in Frameworks */,
006F5A401EF3F57100D8550B /* libresolv.tbd in Frameworks */,
0036F5DA2264213D00D9647D /* DFTTPushSDK.framework in Frameworks */,
00A6DFB5219A9A0C002824E6 /* UMShare.framework in Frameworks */,
006F5A361EF3DAF800D8550B /* CoreFoundation.framework in Frameworks */,
44036A2022B0FE2A00A919C2 /* EAccountApiSDK.framework in Frameworks */,
44036A1F22B0FE2A00A919C2 /* OAuth.framework in Frameworks */,
00A6DFB6219A9A0C002824E6 /* libAPOpenSdk.a in Frameworks */,
006F5A321EF3DAC000D8550B /* UserNotifications.framework in Frameworks */,
0067FCE71EB2DB040027A52F /* CoreImage.framework in Frameworks */,
00A6DF8B219A990E002824E6 /* UMAnalytics.framework in Frameworks */,
003D5F541E6EA58000675FF1 /* AssetsLibrary.framework in Frameworks */,
00A6DFB0219A9A0C002824E6 /* SecurityEnvSDK.framework in Frameworks */,
441766F22307F8D60072A118 /* OAuth.framework in Frameworks */,
0051ABD01E4DBF980006A94E /* ImageIO.framework in Frameworks */,
00A6DFAE219A9A0C002824E6 /* UMCommon.framework in Frameworks */,
3EAE433C1E1387B900BB8AFB /* AddressBook.framework in Frameworks */,
......@@ -1750,11 +1846,12 @@
4403E19E22F542B100F7ED8E /* libTianqijun_V1.0.1.a in Frameworks */,
3EC0D27F1DF0492D00C723E5 /* Contacts.framework in Frameworks */,
44FB613222C4E0DA0096B238 /* DFTTFramework_Base.framework in Frameworks */,
441766EF2307F8D60072A118 /* TYRZSDK.framework in Frameworks */,
007131B72292825F005C5675 /* GTSDK.framework in Frameworks */,
3EC0D27D1DF047C200C723E5 /* AddressBookUI.framework in Frameworks */,
004F4852229E774900DDAC3A /* libGTCountSDK.a in Frameworks */,
440876832319088B00BD895E /* HealthKit.framework in Frameworks */,
00A6DFB4219A9A0C002824E6 /* UShareUI.framework in Frameworks */,
44036A1D22B0FE2A00A919C2 /* CL_ShanYanSDK.framework in Frameworks */,
3EC0D2741DEFEDE700C723E5 /* MapKit.framework in Frameworks */,
00A6DFB7219A9A0C002824E6 /* libSocialAlipayShare.a in Frameworks */,
3EAE43361E13876900BB8AFB /* libc++.1.tbd in Frameworks */,
......@@ -2990,6 +3087,8 @@
0FAAA35D52C1EBBE26156028 /* Frameworks */ = {
isa = PBXGroup;
children = (
440876822319088B00BD895E /* HealthKit.framework */,
440223442304F2EF003F67CD /* libz.1.2.8.tbd */,
0061D5792255FDBF000CDC40 /* libxml2.tbd */,
0061D5772255FD89000CDC40 /* CoreVideo.framework */,
0061D5752255FD7D000CDC40 /* libbz2.tbd */,
......@@ -3269,6 +3368,11 @@
004F4858229E909A00DDAC3A /* LittleProcedureTableViewCell.h */,
004F4859229E909A00DDAC3A /* LittleProcedureTableViewCell.m */,
004F485A229E909A00DDAC3A /* LittleProcedureTableViewCell.xib */,
440A5341231515CF00EA569A /* Home3MiddleBannerCell.h */,
440A5342231515CF00EA569A /* Home3MiddleBannerCell.m */,
440A534423151DF600EA569A /* PDBannerView */,
44064633230EA04300F9B804 /* MiddleBannerCollectionViewCell.h */,
44064634230EA04300F9B804 /* MiddleBannerCollectionViewCell.m */,
);
name = view;
path = ..;
......@@ -3463,6 +3567,7 @@
002C0A62223E45660077678E /* MyTableViewCell_d.m */,
8D75B2881D7FA08B00967DBA /* ViewController.h */,
8D75B2891D7FA08B00967DBA /* ViewController.m */,
44FE7469230679ED004AF3A3 /* Home */,
001A2B1F1FFDD77E00D9E857 /* dataGather(就业信息采集) */,
002A39F71F5D71D3008BB1B4 /* functionAll.h */,
002A39F81F5D71D3008BB1B4 /* functionAll.m */,
......@@ -3696,6 +3801,8 @@
4408F82E22FAB5F500CFECBD /* RedPackageSuccessView.m */,
4408F82A22FA83C900CFECBD /* DashLineView.h */,
4408F82B22FA83C900CFECBD /* DashLineView.m */,
44ABCB4B230BF59B0006901B /* OfficialAccountsAlertView.h */,
44ABCB4C230BF59B0006901B /* OfficialAccountsAlertView.m */,
);
path = View;
sourceTree = "<group>";
......@@ -3798,6 +3905,8 @@
4401C47522C857660045FD7E /* UIButton */ = {
isa = PBXGroup;
children = (
44228385231F589F00E1EC16 /* UIButton+CQBlockSupport.h */,
44228384231F589F00E1EC16 /* UIButton+CQBlockSupport.m */,
4401C47622C857660045FD7E /* UIButton+ImageTitleSpacing.h */,
4401C47722C857660045FD7E /* UIButton+ImageTitleSpacing.m */,
);
......@@ -3837,6 +3946,31 @@
path = View;
sourceTree = "<group>";
};
4401CA3E23137BD0006EDD48 /* Components */ = {
isa = PBXGroup;
children = (
4401CA3F23137BD0006EDD48 /* CacheComponents */,
);
path = Components;
sourceTree = "<group>";
};
4401CA3F23137BD0006EDD48 /* CacheComponents */ = {
isa = PBXGroup;
children = (
4401CA4023137BF2006EDD48 /* CTDiskCacheCenter */,
);
path = CacheComponents;
sourceTree = "<group>";
};
4401CA4023137BF2006EDD48 /* CTDiskCacheCenter */ = {
isa = PBXGroup;
children = (
4401CA4123137CAD006EDD48 /* CTDiskCacheCenter.h */,
4401CA4223137CAD006EDD48 /* CTDiskCacheCenter.m */,
);
path = CTDiskCacheCenter;
sourceTree = "<group>";
};
4402D79C22CCA0A2001430DF /* SetInterface */ = {
isa = PBXGroup;
children = (
......@@ -3876,18 +4010,6 @@
path = View;
sourceTree = "<group>";
};
44036A1622B0FE2A00A919C2 /* ShanYanSDK_iOS_v2.2.0.2 */ = {
isa = PBXGroup;
children = (
44036A1722B0FE2A00A919C2 /* TYRZSDK.framework */,
44036A1822B0FE2A00A919C2 /* CL_ShanYanSDK.framework */,
44036A1922B0FE2A00A919C2 /* sdk_oauth.bundle */,
44036A1A22B0FE2A00A919C2 /* OAuth.framework */,
44036A1B22B0FE2A00A919C2 /* EAccountApiSDK.framework */,
);
path = ShanYanSDK_iOS_v2.2.0.2;
sourceTree = "<group>";
};
4403E19022F5377C00F7ED8E /* PaymentDetail */ = {
isa = PBXGroup;
children = (
......@@ -4105,6 +4227,8 @@
4404C25C22D187C40083B944 /* Coins */ = {
isa = PBXGroup;
children = (
44AD6554231E1B9800FCD9B4 /* Prize */,
44FD397723177CE30010D68E /* EarnCoins */,
4400510622F91759001552DC /* CoinsCentre */,
44FE517422D2D73300872A14 /* Withdraw */,
4404C27A22D1EDCC0083B944 /* DetailList */,
......@@ -4480,6 +4604,17 @@
path = View;
sourceTree = "<group>";
};
4408767B2318FF3C00BD895E /* CQCountDownButton */ = {
isa = PBXGroup;
children = (
4408767C2318FF3C00BD895E /* NSTimer+CQBlockSupport.h */,
4408767D2318FF3C00BD895E /* CQCountDownButton.m */,
4408767E2318FF3C00BD895E /* NSTimer+CQBlockSupport.m */,
4408767F2318FF3C00BD895E /* CQCountDownButton.h */,
);
path = CQCountDownButton;
sourceTree = "<group>";
};
4408F83022FAE39600CFECBD /* PXLineChart */ = {
isa = PBXGroup;
children = (
......@@ -4551,6 +4686,15 @@
path = CacheComponents;
sourceTree = "<group>";
};
440A534423151DF600EA569A /* PDBannerView */ = {
isa = PBXGroup;
children = (
440A534523151DF600EA569A /* PDBannerView.m */,
440A534623151DF600EA569A /* PDBannerView.h */,
);
path = PDBannerView;
sourceTree = "<group>";
};
440A87B622F19613005859D1 /* CFNetWorking */ = {
isa = PBXGroup;
children = (
......@@ -4605,6 +4749,18 @@
path = WEWeatherSDK;
sourceTree = "<group>";
};
441766E92307F8D50072A118 /* ShanYanSDK_iOS_v2.2.0.2 */ = {
isa = PBXGroup;
children = (
441766EA2307F8D50072A118 /* TYRZSDK.framework */,
441766EB2307F8D50072A118 /* CL_ShanYanSDK.framework */,
441766EC2307F8D60072A118 /* sdk_oauth.bundle */,
441766ED2307F8D60072A118 /* OAuth.framework */,
441766EE2307F8D60072A118 /* EAccountApiSDK.framework */,
);
path = ShanYanSDK_iOS_v2.2.0.2;
sourceTree = "<group>";
};
44183CF622D7178C001F57BB /* Model */ = {
isa = PBXGroup;
children = (
......@@ -4636,6 +4792,215 @@
path = UIScrollview;
sourceTree = "<group>";
};
447E5BEE2309171E00AD02E7 /* Web */ = {
isa = PBXGroup;
children = (
447E5BF12309174100AD02E7 /* Controller */,
447E5BEF2309174100AD02E7 /* Model */,
447E5BF02309174100AD02E7 /* View */,
);
path = Web;
sourceTree = "<group>";
};
447E5BEF2309174100AD02E7 /* Model */ = {
isa = PBXGroup;
children = (
);
path = Model;
sourceTree = "<group>";
};
447E5BF02309174100AD02E7 /* View */ = {
isa = PBXGroup;
children = (
);
path = View;
sourceTree = "<group>";
};
447E5BF12309174100AD02E7 /* Controller */ = {
isa = PBXGroup;
children = (
447E5BF22309175600AD02E7 /* WebVC.h */,
447E5BF32309175600AD02E7 /* WebVC.m */,
44113B4A230A442D002374CA /* WeakWebViewScriptMessageDelegate.h */,
44113B4B230A442D002374CA /* WeakWebViewScriptMessageDelegate.m */,
);
path = Controller;
sourceTree = "<group>";
};
4492BAE12320FC900088AE01 /* Controller */ = {
isa = PBXGroup;
children = (
4492BAE42320FCAD0088AE01 /* PrizeDetailInfoViewController.h */,
4492BAE52320FCAD0088AE01 /* PrizeDetailInfoViewController.m */,
);
path = Controller;
sourceTree = "<group>";
};
4492BAE22320FC900088AE01 /* Model */ = {
isa = PBXGroup;
children = (
);
path = Model;
sourceTree = "<group>";
};
4492BAE32320FC910088AE01 /* View */ = {
isa = PBXGroup;
children = (
4492BAE72320FE9E0088AE01 /* PrizeDetailCardView.h */,
4492BAE82320FE9E0088AE01 /* PrizeDetailCardView.m */,
4492BAED23212B840088AE01 /* PrizeDetailProcessView.h */,
4492BAEE23212B840088AE01 /* PrizeDetailProcessView.m */,
4492BAEA2321299C0088AE01 /* SNXUXIANView.h */,
4492BAEB2321299C0088AE01 /* SNXUXIANView.m */,
440CEF3B2321FA730030181A /* CTPrizeDetailProcessTableCellContentView.h */,
440CEF3C2321FA730030181A /* CTPrizeDetailProcessTableCellContentView.m */,
440CEF3E2322082E0030181A /* CTPrizeDetailProcessTableViewCell.h */,
440CEF3F2322082E0030181A /* CTPrizeDetailProcessTableViewCell.m */,
);
path = View;
sourceTree = "<group>";
};
4495EE66231CF04700CE78DB /* MySocialSecurity */ = {
isa = PBXGroup;
children = (
4495EE67231CF04700CE78DB /* Approve */,
);
path = MySocialSecurity;
sourceTree = "<group>";
};
4495EE67231CF04700CE78DB /* Approve */ = {
isa = PBXGroup;
children = (
4495EE68231CF04700CE78DB /* Success */,
);
path = Approve;
sourceTree = "<group>";
};
4495EE68231CF04700CE78DB /* Success */ = {
isa = PBXGroup;
children = (
4495EE69231CF04700CE78DB /* Controller */,
4495EE6A231CF04700CE78DB /* Model */,
4495EE6B231CF04700CE78DB /* View */,
);
path = Success;
sourceTree = "<group>";
};
4495EE69231CF04700CE78DB /* Controller */ = {
isa = PBXGroup;
children = (
4495EE6C231CF06F00CE78DB /* SocialSecurityApproveSuccessVC.h */,
4495EE6D231CF06F00CE78DB /* SocialSecurityApproveSuccessVC.m */,
);
path = Controller;
sourceTree = "<group>";
};
4495EE6A231CF04700CE78DB /* Model */ = {
isa = PBXGroup;
children = (
);
path = Model;
sourceTree = "<group>";
};
4495EE6B231CF04700CE78DB /* View */ = {
isa = PBXGroup;
children = (
);
path = View;
sourceTree = "<group>";
};
44AD6554231E1B9800FCD9B4 /* Prize */ = {
isa = PBXGroup;
children = (
44AD6555231E1B9800FCD9B4 /* PrizeDetailInfo */,
44AD6556231E1B9800FCD9B4 /* PrizeList */,
);
path = Prize;
sourceTree = "<group>";
};
44AD6555231E1B9800FCD9B4 /* PrizeDetailInfo */ = {
isa = PBXGroup;
children = (
4492BAE12320FC900088AE01 /* Controller */,
4492BAE22320FC900088AE01 /* Model */,
4492BAE32320FC910088AE01 /* View */,
);
path = PrizeDetailInfo;
sourceTree = "<group>";
};
44AD6556231E1B9800FCD9B4 /* PrizeList */ = {
isa = PBXGroup;
children = (
44AD6557231E1B9800FCD9B4 /* Controller */,
44AD6558231E1B9800FCD9B4 /* Model */,
44AD6559231E1B9800FCD9B4 /* View */,
);
path = PrizeList;
sourceTree = "<group>";
};
44AD6557231E1B9800FCD9B4 /* Controller */ = {
isa = PBXGroup;
children = (
44AD655A231E1BC100FCD9B4 /* MyPrizeListVC.h */,
44AD655B231E1BC100FCD9B4 /* MyPrizeListVC.m */,
);
path = Controller;
sourceTree = "<group>";
};
44AD6558231E1B9800FCD9B4 /* Model */ = {
isa = PBXGroup;
children = (
);
path = Model;
sourceTree = "<group>";
};
44AD6559231E1B9800FCD9B4 /* View */ = {
isa = PBXGroup;
children = (
440902E3232645C20021C56F /* NoDataView.h */,
440902E4232645C20021C56F /* NoDataView.m */,
440902E1232645760021C56F /* ListPrizeTableViewCell.h */,
440902E0232645760021C56F /* ListPrizeTableViewCell.m */,
44AD6569231E3D8300FCD9B4 /* JYEmpty */,
44AD655D231E304F00FCD9B4 /* DWQView */,
);
path = View;
sourceTree = "<group>";
};
44AD655D231E304F00FCD9B4 /* DWQView */ = {
isa = PBXGroup;
children = (
44AD655F231E304F00FCD9B4 /* orderHeader.h */,
44AD655E231E304F00FCD9B4 /* orderHeader.m */,
);
path = DWQView;
sourceTree = "<group>";
};
44AD6569231E3D8300FCD9B4 /* JYEmpty */ = {
isa = PBXGroup;
children = (
44AD656A231E3D8300FCD9B4 /* UITableView+JYEmptyView.m */,
44AD656B231E3D8300FCD9B4 /* JYEmpty.h */,
44AD656C231E3D8300FCD9B4 /* UIView+Awesome.h */,
44AD656D231E3D8300FCD9B4 /* JYEmptyView.h */,
44AD656E231E3D8300FCD9B4 /* JYEmptyConst.m */,
44AD656F231E3D8300FCD9B4 /* UITableView+JYEmptyView.h */,
44AD6570231E3D8300FCD9B4 /* JYEmptyConst.h */,
44AD6571231E3D8300FCD9B4 /* JYEmptyView.m */,
44AD6572231E3D8300FCD9B4 /* UIView+Awesome.m */,
);
path = JYEmpty;
sourceTree = "<group>";
};
44AD6584231E8CAF00FCD9B4 /* AlertView */ = {
isa = PBXGroup;
children = (
44AD6585231E8CEB00FCD9B4 /* OnFootAlertView.h */,
44AD6586231E8CEB00FCD9B4 /* OnFootAlertView.m */,
);
path = AlertView;
sourceTree = "<group>";
};
44D9B86522AA2ED900EBC3BD /* SDWebImage */ = {
isa = PBXGroup;
children = (
......@@ -4698,6 +5063,61 @@
path = Controller;
sourceTree = "<group>";
};
44FD397723177CE30010D68E /* EarnCoins */ = {
isa = PBXGroup;
children = (
44FD397823177CE30010D68E /* OnFoot */,
);
path = EarnCoins;
sourceTree = "<group>";
};
44FD397823177CE30010D68E /* OnFoot */ = {
isa = PBXGroup;
children = (
44FD397923177CE30010D68E /* Controller */,
44FD397A23177CE30010D68E /* Model */,
44FD397B23177CE30010D68E /* View */,
);
path = OnFoot;
sourceTree = "<group>";
};
44FD397923177CE30010D68E /* Controller */ = {
isa = PBXGroup;
children = (
44FD397C23177D0E0010D68E /* OnFootEarnCoinsViewController.h */,
44FD397D23177D0E0010D68E /* OnFootEarnCoinsViewController.m */,
);
path = Controller;
sourceTree = "<group>";
};
44FD397A23177CE30010D68E /* Model */ = {
isa = PBXGroup;
children = (
4408767B2318FF3C00BD895E /* CQCountDownButton */,
440876782318AEBC00BD895E /* HealthKitManager.h */,
440876792318AEBC00BD895E /* HealthKitManager.m */,
);
path = Model;
sourceTree = "<group>";
};
44FD397B23177CE30010D68E /* View */ = {
isa = PBXGroup;
children = (
44AD6584231E8CAF00FCD9B4 /* AlertView */,
44FD397F231781F00010D68E /* GradientProgress */,
);
path = View;
sourceTree = "<group>";
};
44FD397F231781F00010D68E /* GradientProgress */ = {
isa = PBXGroup;
children = (
44FD3980231781F00010D68E /* MQGradientProgressView.m */,
44FD3981231781F00010D68E /* MQGradientProgressView.h */,
);
path = GradientProgress;
sourceTree = "<group>";
};
44FE517422D2D73300872A14 /* Withdraw */ = {
isa = PBXGroup;
children = (
......@@ -4757,6 +5177,32 @@
path = ExtView;
sourceTree = "<group>";
};
44FE7469230679ED004AF3A3 /* Home */ = {
isa = PBXGroup;
children = (
44FE746A230679ED004AF3A3 /* Model */,
44FE746B230679ED004AF3A3 /* View */,
);
name = Home;
path = Open/Home;
sourceTree = SOURCE_ROOT;
};
44FE746A230679ED004AF3A3 /* Model */ = {
isa = PBXGroup;
children = (
);
path = Model;
sourceTree = "<group>";
};
44FE746B230679ED004AF3A3 /* View */ = {
isa = PBXGroup;
children = (
44FE746C23067A41004AF3A3 /* HomeSectionHeaderView.h */,
44FE746D23067A41004AF3A3 /* HomeSectionHeaderView.m */,
);
path = View;
sourceTree = "<group>";
};
88E98CE46953E49C7B48BA79 /* Pods */ = {
isa = PBXGroup;
children = (
......@@ -4779,18 +5225,16 @@
8D8F838A1D7EA60A00ABF221 = {
isa = PBXGroup;
children = (
44036A1622B0FE2A00A919C2 /* ShanYanSDK_iOS_v2.2.0.2 */,
441766E92307F8D50072A118 /* ShanYanSDK_iOS_v2.2.0.2 */,
00591441229EA01E008405FF /* WeChatSDK1.8.4_NoPay */,
004F484F229E774600DDAC3A /* GTCountSDK.h */,
004F484E229E774400DDAC3A /* libGTCommonSDK.a */,
004F4850229E774900DDAC3A /* libGTCountSDK.a */,
007131B32292825F005C5675 /* GtSdkLib */,
0036F5D92264213C00D9647D /* DFTTPushSDK.framework */,
44FB613122C4E0D90096B238 /* DFTTFramework_Base.framework */,
44AD6579231E472E00FCD9B4 /* DFTTPushSDK.framework */,
00C9DB0C21FF016800B9D043 /* idl-license.face-ios */,
00C9DB0A21FB039100B9D043 /* open_a1242-2208.jpg */,
4407CD2622EADB6300CF0164 /* my-open@2x.png */,
4407CD2722EADB6500CF0164 /* my-open@3x.png */,
00E7FB53211C4E5C000D9233 /* com.baidu.idl.face.faceSDK.bundle */,
00E7FB52211C4E5A000D9233 /* com.baidu.idl.face.model.bundle */,
00E7FB55211C4E5E000D9233 /* IDLFaceSDK.framework */,
......@@ -4805,11 +5249,16 @@
00FB2543218B01B400E220B5 /* catchMoney.gif */,
00F360621FAC17AF0032A2E1 /* iconforImage.png */,
009663CA1F2F218500700714 /* logo01.png */,
44094C1A2327476900D9C01E /* my-open@2x.png */,
44094C1B2327476A00D9C01E /* my-open@3x.png */,
3E431BEA1DE80AD500CE4BA1 /* PrefixHeader.pch */,
0060E8AA21B76B1D000083E5 /* NSDate+Helper.h */,
0060E8AD21B76B8C000083E5 /* NSDate+Helper.m */,
002C0A5C223E41550077678E /* socialNews.plist */,
002A39FA1F5D741B008BB1B4 /* contrant.h */,
4495EE66231CF04700CE78DB /* MySocialSecurity */,
4401CA3E23137BD0006EDD48 /* Components */,
447E5BEE2309171E00AD02E7 /* Web */,
4404A89722FD444D0026FB6A /* SocialSecurity */,
440A87C422F276A0005859D1 /* WEWeatherSDK */,
440A87B622F19613005859D1 /* CFNetWorking */,
......@@ -4903,6 +5352,9 @@
com.apple.BackgroundModes = {
enabled = 1;
};
com.apple.HealthKit = {
enabled = 1;
};
com.apple.Push = {
enabled = 1;
};
......@@ -4975,6 +5427,7 @@
0036F5B72260296900D9647D /* NumberNewsVC.xib in Resources */,
4403E19F22F542B100F7ED8E /* HomeImage.bundle in Resources */,
00E7FB9B211D4344000D9233 /* touch_focus.png in Resources */,
441766F12307F8D60072A118 /* sdk_oauth.bundle in Resources */,
3E9DD2D01DC8455C008EE6CA /* logo.png in Resources */,
0036F5992260259800D9647D /* SpecialDetailVC.xib in Resources */,
00E7FB97211D4344000D9233 /* switch_camera.png in Resources */,
......@@ -4998,7 +5451,6 @@
00FB2544218B01B500E220B5 /* catchMoney.gif in Resources */,
003D5F911E6EA5BB00675FF1 /* close@3x.png in Resources */,
00ACD8161FBE8E5300402560 /* ZZCircleProgress.bundle in Resources */,
44036A1E22B0FE2A00A919C2 /* sdk_oauth.bundle in Resources */,
003D5F521E6E8D5000675FF1 /* apple.png in Resources */,
0036F59B2260259800D9647D /* NewsDetailVC.xib in Resources */,
00E7FB8B211D4344000D9233 /* close_cha_h@2x.png in Resources */,
......@@ -5022,7 +5474,6 @@
004F485C229E909A00DDAC3A /* LittleProcedureTableViewCell.xib in Resources */,
3E88E6B51DCC6A7700B874DA /* address.plist in Resources */,
002C0A5D223E41560077678E /* socialNews.plist in Resources */,
4407CD2922EADB6500CF0164 /* my-open@3x.png in Resources */,
0036F537225F574500D9647D /* README.md in Resources */,
00E093EC200C7A17001E0AD2 /* secondEmployeeGatherViewController.xib in Resources */,
003D5F921E6EA5BB00675FF1 /* ico_check_nomal@2x.png in Resources */,
......@@ -5034,9 +5485,9 @@
3E8FE8741DF7B5070015D390 /* check_unselected.png in Resources */,
00E7FB9A211D4344000D9233 /* switch_camera_h@2x.png in Resources */,
007CE1151E80F3C000D57D63 /* logooooooo.png in Resources */,
44094C1C2327476A00D9C01E /* my-open@2x.png in Resources */,
002E45DF22A518A500BBC627 /* LaunchScreen.storyboard in Resources */,
44067E1D22CB59E90059F569 /* LogTableViewCell.xib in Resources */,
4407CD2822EADB6500CF0164 /* my-open@2x.png in Resources */,
00E7FB8A211D4344000D9233 /* close_cha_h.png in Resources */,
00E7FB96211D4344000D9233 /* shot_h@2x.png in Resources */,
003D5F9F1E6EA5BB00675FF1 /* none.png in Resources */,
......@@ -5047,6 +5498,7 @@
003D5FA41E6EA5BB00675FF1 /* MImaCell.xib in Resources */,
006E08551F7F6E550049DDB1 /* MJRefresh.bundle in Resources */,
00E7FB99211D4344000D9233 /* switch_camera_h.png in Resources */,
44094C1D2327476A00D9C01E /* my-open@3x.png in Resources */,
003D5F961E6EA5BB00675FF1 /* plus@2x.png in Resources */,
00E7FB8D211D4344000D9233 /* flashing_auto.png in Resources */,
003D601B1E6FEFCB00675FF1 /* DOPDropDownMenu-Enhanced.xcassets in Resources */,
......@@ -5124,6 +5576,7 @@
006E08561F7F6E840049DDB1 /* MJRefreshAutoFooter.m in Sources */,
005471891FB40A05007B9A0F /* socialOffLineGatherViewController.m in Sources */,
006F52BF1EC1ACCE00521772 /* WKWebViewController.m in Sources */,
440902E2232645760021C56F /* ListPrizeTableViewCell.m in Sources */,
4403F7A422EE9E75009CA0B3 /* SSPaymenyViewController.m in Sources */,
3EB316671E2CAD8D0064455A /* TADotView.m in Sources */,
4401C47F22C859D20045FD7E /* SMSLoginViewController.m in Sources */,
......@@ -5140,6 +5593,7 @@
4401C48222C85AB20045FD7E /* PasswordLoginViewController.m in Sources */,
006E085E1F7F6E960049DDB1 /* MJRefreshBackGifFooter.m in Sources */,
3E36D15F1DCADB0800440BE1 /* ViewController.m in Sources */,
440CEF3D2321FA730030181A /* CTPrizeDetailProcessTableCellContentView.m in Sources */,
006E08671F7F6EA50049DDB1 /* UIScrollView+MJRefresh.m in Sources */,
006E08651F7F6EA20049DDB1 /* UIScrollView+MJExtension.m in Sources */,
006E085F1F7F6E980049DDB1 /* MJRefreshBackNormalFooter.m in Sources */,
......@@ -5164,6 +5618,8 @@
0036F53B225F574500D9647D /* UIImageView+AFNetworking.m in Sources */,
006E085A1F7F6E8A0049DDB1 /* MJRefreshHeader.m in Sources */,
000CACDD1E5D5E8800D9E8DA /* getPeopleID.m in Sources */,
4408767A2318AEBC00BD895E /* HealthKitManager.m in Sources */,
44AD6574231E3D8300FCD9B4 /* JYEmptyConst.m in Sources */,
003D5F9C1E6EA5BB00675FF1 /* JJOneScrollView.m in Sources */,
4403E1A922F5854700F7ED8E /* InsuredMemberTableViewCell.m in Sources */,
0036F546225F574500D9647D /* AFSecurityPolicy.m in Sources */,
......@@ -5172,16 +5628,20 @@
3E9FFE231E31FEE400CBD7DF /* logViewController.m in Sources */,
440A87BD22F19627005859D1 /* CTApiProxy.m in Sources */,
3E51D8521DDB12960004903D /* MJProperty.m in Sources */,
44AD6573231E3D8300FCD9B4 /* UITableView+JYEmptyView.m in Sources */,
4404C28622D200B80083B944 /* CoinsDetailHeaderView.m in Sources */,
4400D20522F7FE3600BCB760 /* InsuredMemberAddTableViewCell.m in Sources */,
000066B920009241007F436D /* FirstPersonInformationViewController.m in Sources */,
00FB253F218AFE3900E220B5 /* NSObject+ZYSuspensionView.m in Sources */,
4492BAEC2321299C0088AE01 /* SNXUXIANView.m in Sources */,
009663C31F29D9D800700714 /* socialOnceViewController.m in Sources */,
00FC9E5D1EBB291900904608 /* weather.m in Sources */,
000066BF2000B394007F436D /* PersonGatherJobNetManager.m in Sources */,
00DF246A1E70F85700BDB4C5 /* PostCell.m in Sources */,
44FE746E23067A41004AF3A3 /* HomeSectionHeaderView.m in Sources */,
003D60191E6FEF9800675FF1 /* DOPDropDownMenu.m in Sources */,
002D4AED1E67C456004CC8A7 /* postMessageThird.m in Sources */,
440A5343231515CF00EA569A /* Home3MiddleBannerCell.m in Sources */,
00C0A8A9200F34210095771E /* WeatherACell.m in Sources */,
005896F81E9648ED0083C7C6 /* logModel_2.m in Sources */,
004CDF471F3C532D006F9FCE /* TYImageCache.m in Sources */,
......@@ -5192,6 +5652,7 @@
003D5F981E6EA5BB00675FF1 /* MFlowLayOut.m in Sources */,
00E4BF802011EFEA00FDDB63 /* CWDatabase.m in Sources */,
004C7FA71FCE8E9300704F64 /* SearchProgressViewController.m in Sources */,
44113B4C230A442D002374CA /* WeakWebViewScriptMessageDelegate.m in Sources */,
0044769420843D410066F188 /* jobResultModel.m in Sources */,
3E9B09011DFFA243007D0990 /* IDCardNumber_Validate.m in Sources */,
44040FCE2302D15A00D8A10C /* LogGuideView.m in Sources */,
......@@ -5199,6 +5660,7 @@
002A39521F57E17D008BB1B4 /* SVProgressHUD+showAnimation.m in Sources */,
008D71391FFE093C005D0B4D /* FirstEmploymentGatherViewController.m in Sources */,
0038066A1E5FCA3F007B7FA1 /* homePageNewsModel.m in Sources */,
440A534723151DF700EA569A /* PDBannerView.m in Sources */,
00FB253E218AFE3900E220B5 /* ZYSuspensionView.m in Sources */,
3EB3166B1E2CAD8D0064455A /* UIView+SDExtension.m in Sources */,
00305CF1204FE38100EF59AB /* FiveEightCityViewController.m in Sources */,
......@@ -5219,6 +5681,7 @@
002D4AE41E66B1FC004CC8A7 /* HXSearchBar.m in Sources */,
00C5625D229783AD008A2FCC /* NetWorkManager.m in Sources */,
3EB316661E2CAD8D0064455A /* TAAnimatedDotView.m in Sources */,
440902E5232645C20021C56F /* NoDataView.m in Sources */,
00DA61A31F1482690028A0B8 /* artificalViewController.m in Sources */,
4400D20222F7B92000BCB760 /* InsuredMemberAddViewController.m in Sources */,
0036F5932260259800D9647D /* SpecialDetailVC.m in Sources */,
......@@ -5231,6 +5694,7 @@
44FE51AA22D349FF00872A14 /* XMShareView.m in Sources */,
3EC0D27B1DEFFB8800C723E5 /* XWLocationManager.m in Sources */,
440BEB262302938C0070402B /* SSCardWebViewController.m in Sources */,
440876812318FF3C00BD895E /* NSTimer+CQBlockSupport.m in Sources */,
4405350F22C336400037AA0C /* SDWebImageCompat.m in Sources */,
003D600E1E6F9AF300675FF1 /* ZWTopSelectVcView.m in Sources */,
004C7FB61FCFFA2200704F64 /* GetProgressController.m in Sources */,
......@@ -5241,6 +5705,7 @@
3E51D85F1DDBF63E0004903D /* CityNetManager.m in Sources */,
44069CC622E998B100D03251 /* PackageCoinsView.m in Sources */,
44F9A77822D5F663002A3025 /* CoinsDetailFooterView.m in Sources */,
44AD655C231E1BC100FCD9B4 /* MyPrizeListVC.m in Sources */,
3E51D8581DDB12960004903D /* NSObject+MJProperty.m in Sources */,
3E51D8621DDBF65C0004903D /* BaseNetManager.m in Sources */,
00E7FB4C211C41E8000D9233 /* FaceBaseViewController.m in Sources */,
......@@ -5260,6 +5725,8 @@
4403E19922F539C600F7ED8E /* PaymentDetailTableViewCell.m in Sources */,
44067E1822CB59D60059F569 /* LogViewController.m in Sources */,
002D4ACE1E650B4A004CC8A7 /* regardTableViewController.m in Sources */,
440876802318FF3C00BD895E /* CQCountDownButton.m in Sources */,
44ABCB4D230BF59B0006901B /* OfficialAccountsAlertView.m in Sources */,
00DF24901E7A97FD00BDB4C5 /* socallCell.m in Sources */,
003D5FA31E6EA5BB00675FF1 /* MImaCell.m in Sources */,
3E8A4AED1E35AEC2008955E2 /* NewSCell.m in Sources */,
......@@ -5277,6 +5744,8 @@
004C7FAD1FCE907900704F64 /* SPBackgroundCell.m in Sources */,
4402D7A222CCA147001430DF /* SettingViewController.m in Sources */,
002C0A63223E45660077678E /* MyTableViewCell_d.m in Sources */,
44AD6576231E3D8300FCD9B4 /* UIView+Awesome.m in Sources */,
44FD3982231781F00010D68E /* MQGradientProgressView.m in Sources */,
003D5FB61E6F99AE00675FF1 /* postMessgaeTotal.m in Sources */,
3EBFBE771DE3F87800228F54 /* CitytoCityModel.m in Sources */,
003D5F9D1E6EA5BB00675FF1 /* JJPhoto.m in Sources */,
......@@ -5307,6 +5776,7 @@
44183D0122D72E0A001F57BB /* UIScrollView+UITouch.m in Sources */,
00ACD8181FBE8E5300402560 /* ZZCountingLabel.m in Sources */,
00E4BF832011EFEA00FDDB63 /* CWSqliteTableTool.m in Sources */,
44228386231F589F00E1EC16 /* UIButton+CQBlockSupport.m in Sources */,
4400510C22F91770001552DC /* CoinsCenterViewController.m in Sources */,
44090AC922F3DB4000FA6B66 /* BaseView.m in Sources */,
44F9A78022D60639002A3025 /* GreenChannelVC.m in Sources */,
......@@ -5352,8 +5822,10 @@
0023AAFF2005E76200C1262C /* FourthlyViewController.m in Sources */,
00F3605E1FAB33E50032A2E1 /* gatherCell.m in Sources */,
007562BE1FE3BE8F00C22C4A /* ApplePay.m in Sources */,
4492BAE92320FE9E0088AE01 /* PrizeDetailCardView.m in Sources */,
007562BB1FE3757100C22C4A /* ApplePays.m in Sources */,
0018A2D11EFA9CAB0070D088 /* WebViewco.m in Sources */,
44064635230EA04300F9B804 /* MiddleBannerCollectionViewCell.m in Sources */,
003D5FAB1E6EA5BB00675FF1 /* LQPhotoPickerViewController.m in Sources */,
00E7FB4D211C41E8000D9233 /* LivenessViewController.m in Sources */,
3EB153891E48520E0078CFA0 /* SearchCollectionViewController.m in Sources */,
......@@ -5367,16 +5839,21 @@
0036F543225F574500D9647D /* AFURLSessionManager.m in Sources */,
0051ABD31E518BD70006A94E /* VoucherRecordViewController.m in Sources */,
3EB316691E2CAD8D0064455A /* SDCollectionViewCell.m in Sources */,
4401CA4323137CAD006EDD48 /* CTDiskCacheCenter.m in Sources */,
009649D22080A466004FCE82 /* jobBIG.m in Sources */,
3E8A4AE21E35A7CF008955E2 /* Result.m in Sources */,
44AD6587231E8CEB00FCD9B4 /* OnFootAlertView.m in Sources */,
3E0967DF1E4996F4006166A6 /* WebViewController.m in Sources */,
4407CD3322EAEB8C00CF0164 /* DeathProveViewController.m in Sources */,
4400510F22F92687001552DC /* ExchangeMoneyBtn.m in Sources */,
002D4AF61E694BD7004CC8A7 /* postMessageMNet.m in Sources */,
44AD6560231E304F00FCD9B4 /* orderHeader.m in Sources */,
4495EE6E231CF06F00CE78DB /* SocialSecurityApproveSuccessVC.m in Sources */,
0036F53D225F574500D9647D /* UIActivityIndicatorView+AFNetworking.m in Sources */,
002A39FD1F5FD0B1008BB1B4 /* resulTModel.m in Sources */,
00ACD8151FBE8E5300402560 /* ZZCACircleProgress.m in Sources */,
44061E7B22E820600089A774 /* SuccessBaseView.m in Sources */,
44FD397E23177D0E0010D68E /* OnFootEarnCoinsViewController.m in Sources */,
4400514322F98F53001552DC /* SignInSuccessView.m in Sources */,
3E8A4AF21E35F5C8008955E2 /* BaseViewModel.m in Sources */,
446935BD22FBC3DB00D465FF /* PXLineChartConst.m in Sources */,
......@@ -5401,6 +5878,7 @@
00DF24731E7696FE00BDB4C5 /* adviceInfoNetModel.m in Sources */,
007FB4091F7527D20088736D /* fontFZ.m in Sources */,
004CDF4B1F3C532D006F9FCE /* TYTextContainer.m in Sources */,
440CEF402322082E0030181A /* CTPrizeDetailProcessTableViewCell.m in Sources */,
00C562602297EABC008A2FCC /* quickLoginViewController.m in Sources */,
00A6DECD21993310002824E6 /* FandRViewController.m in Sources */,
3E88E6B71DCC6A7700B874DA /* HXProvincialCitiesCountiesPickerview.m in Sources */,
......@@ -5414,6 +5892,7 @@
4404C26922D196240083B944 /* CoinsExchangeCell.m in Sources */,
00E7FB50211C41E8000D9233 /* RemindView.m in Sources */,
002A39F31F5D35F0008BB1B4 /* myJDCell.m in Sources */,
4492BAE62320FCAD0088AE01 /* PrizeDetailInfoViewController.m in Sources */,
0036F53C225F574500D9647D /* UIButton+AFNetworking.m in Sources */,
0036F5962260259800D9647D /* WebDetailVC.m in Sources */,
003D5F9A1E6EA5BB00675FF1 /* MHeadImaView.m in Sources */,
......@@ -5441,6 +5920,7 @@
007562B81FE36A1500C22C4A /* getAppleyPayGeogle.m in Sources */,
448158BF230420CE0016E45E /* NSString+Timestamp.m in Sources */,
005A13261F18B4E80039AFB0 /* XHChatQQ.m in Sources */,
447E5BF42309175600AD02E7 /* WebVC.m in Sources */,
4400514022F9835F001552DC /* CoinCenterTableViewCell.m in Sources */,
00E7FB4A211C41E8000D9233 /* VideoCaptureDevice.m in Sources */,
0036F5B82260296900D9647D /* TypeNewsListVC.m in Sources */,
......@@ -5489,6 +5969,7 @@
44090ACF22F3DEF700FA6B66 /* CYCitySelectedView.m in Sources */,
4400513D22F979F5001552DC /* LineCollectionReusableView.m in Sources */,
00D1E8E4209FEB2800EF5D75 /* LJContactManager.m in Sources */,
44AD6575231E3D8300FCD9B4 /* JYEmptyView.m in Sources */,
002A39F91F5D71D3008BB1B4 /* functionAll.m in Sources */,
006CECE51EA889610053838D /* governmentViewController.m in Sources */,
3E36D1B91DCB3A7F00440BE1 /* NSData+AES.m in Sources */,
......@@ -5496,6 +5977,7 @@
8D2389C11D814E8F00B279C6 /* IPViewController.m in Sources */,
44FE518322D308F700872A14 /* WithDrawFooterView.m in Sources */,
3E62FF9A1DB5D4B9002CF60B /* UIView+XLJExternFrame.m in Sources */,
4492BAEF23212B840088AE01 /* PrizeDetailProcessView.m in Sources */,
003D5FB31E6F998600675FF1 /* postMessageFirstRecommned.m in Sources */,
4401C47822C857660045FD7E /* UIButton+ImageTitleSpacing.m in Sources */,
8D2389C41D8261CA00B279C6 /* Http.m in Sources */,
......@@ -5718,6 +6200,8 @@
"\"$(SRCROOT)/WeChatSDK1.8.4_NoPay/WechatAuthSDK.h\"",
"$(inherited)",
"$(PROJECT_DIR)/WEWeatherSDK",
"$(PROJECT_DIR)/ShareInstallSDK1.2.1",
"$(PROJECT_DIR)/ShareInstallSDK",
);
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
......@@ -5837,6 +6321,8 @@
"\"$(SRCROOT)/WeChatSDK1.8.4_NoPay/WechatAuthSDK.h\"",
"$(inherited)",
"$(PROJECT_DIR)/WEWeatherSDK",
"$(PROJECT_DIR)/ShareInstallSDK1.2.1",
"$(PROJECT_DIR)/ShareInstallSDK",
);
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
......
......@@ -45,6 +45,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
disableMainThreadChecker = "YES"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
......@@ -62,6 +63,13 @@
ReferencedContainer = "container:socialSecurity.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "DYLD_PRINT_STATISTICS"
value = "1"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
......
......@@ -3,262 +3,6 @@
type = "0"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "WKWebViewController.m"
timestampString = "585374912.240563"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "65"
endingLineNumber = "65"
landmarkName = "-viewDidLoad"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "MyPickerViewController.m"
timestampString = "587041331.533771"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "833"
endingLineNumber = "833"
landmarkName = "-artificialWork:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Open/thirdMainViewController/socialSecurityViewController.m"
timestampString = "586420852.870587"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1272"
endingLineNumber = "1272"
landmarkName = "-repeatVerification:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Open/thirdMainViewController/socialSecurityViewController.m"
timestampString = "586420852.87091"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1384"
endingLineNumber = "1384"
landmarkName = "-repeatVerification:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Open/thirdMainViewController/socialSecurityViewController.m"
timestampString = "586420852.871155"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1909"
endingLineNumber = "1909"
landmarkName = "-camerma"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Open/thirdMainViewController/SecondSocialViewController.m"
timestampString = "586503686.4149669"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1756"
endingLineNumber = "1756"
landmarkName = "-Luoji_2"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Open/thirdMainViewController/SecondSocialViewController.m"
timestampString = "586503686.415027"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1850"
endingLineNumber = "1850"
landmarkName = "-prepareForSegue:sender:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Open/thirdMainViewController/SecondSocialViewController.m"
timestampString = "586503686.415071"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1598"
endingLineNumber = "1598"
landmarkName = "-editButLuoJi"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Open/thirdMainViewController/SecondSocialViewController.m"
timestampString = "586503686.4151109"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1589"
endingLineNumber = "1589"
landmarkName = "-hderfsdhfsadfdgh:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Open/thirdMainViewController/socialSecurityViewController.m"
timestampString = "586420852.871497"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1917"
endingLineNumber = "1917"
landmarkName = "-baidu"
landmarkType = "7">
<Locations>
<Location
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "-[socialSecurityViewController baidu]"
moduleName = "Open"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/leijunbo/Desktop/1.5-2.2%E7%9A%84%E5%89%AF%E6%9C%ACnew/Open/thirdMainViewController/socialSecurityViewController.m"
timestampString = "587479646.228562"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1917"
endingLineNumber = "1917"
offsetFromSymbolStart = "76">
</Location>
<Location
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "__37-[socialSecurityViewController baidu]_block_invoke"
moduleName = "Open"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/leijunbo/Desktop/1.5-2.2%E7%9A%84%E5%89%AF%E6%9C%ACnew/Open/thirdMainViewController/socialSecurityViewController.m"
timestampString = "587479646.2301559"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1918"
endingLineNumber = "1918"
offsetFromSymbolStart = "84">
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Open/thirdMainViewController/SecondSocialViewController.m"
timestampString = "586503686.4151779"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1637"
endingLineNumber = "1637"
landmarkName = "-editButLuoJi"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Open/thirdMainViewController/SecondSocialViewController.m"
timestampString = "586503686.415218"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1660"
endingLineNumber = "1660"
landmarkName = "-editButLuoJi"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "weatherObject.m"
timestampString = "586257163.032982"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "26"
endingLineNumber = "26"
landmarkName = "-weathermessage:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "PhotoViewController.m"
timestampString = "587304392.945065"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "553"
endingLineNumber = "553"
landmarkName = "-searchSocial:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
......@@ -266,28 +10,12 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "PhotoViewController.m"
timestampString = "587304392.945134"
timestampString = "589808522.2284321"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "287"
endingLineNumber = "287"
landmarkName = "-getDataCompleteHandle"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "SocialSecurityPayment/View/CityTypeSelectView/CityTypeSelectView.m"
timestampString = "586442415.958271"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "58"
endingLineNumber = "58"
landmarkName = "+showCityTypeViewWithResultBlock:"
startingLineNumber = "436"
endingLineNumber = "436"
landmarkName = "-prepareForSegue:sender:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
......@@ -297,13 +25,13 @@
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "MyPickerViewController.m"
timestampString = "587041331.534652"
filePath = "Open/ViewController.m"
timestampString = "589808522.228706"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "486"
endingLineNumber = "486"
landmarkName = "-prepareForSegue:sender:"
startingLineNumber = "386"
endingLineNumber = "386"
landmarkName = "-changeABC"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
......
......@@ -24,6 +24,7 @@
#import <ZJAnimationPopView.h>
#import "uitableViewController.h"
#import "tabViewController.h"
#import "CoinsCenterViewController.h"
//static NSString* const UMS_Title = @"欢迎使用【看看智能社保】";
//static NSString* const UMS_Text = @"看看智能科技 是一家专注移动互联网的人工智能技术公司,多年从事人脸识别、虹膜识别以及数据安全的研究与应用,具备行业出色人脸识别、虹膜识别、高速活体检测、三维人脸识别算法和快速海量检索能力,拥有成熟、稳定的智慧城市、智慧村镇、智慧社保等综合解决方案。";
//
......@@ -177,6 +178,11 @@
[self.navigationController.navigationBar setBarTintColor:[UIColor colorWithRed:35/255.0 green:168/255.0 blue:222/255.0 alpha:1.0]];
[self.navigationController.navigationBar setShadowImage:[UIImage new]];
//禁止手势返回
id traget = self.navigationController.interactivePopGestureRecognizer.delegate;
UIPanGestureRecognizer * pan = [[UIPanGestureRecognizer alloc]initWithTarget:traget action:nil];
[self.view addGestureRecognizer:pan];
}
- (void)viewDidLoad {
......@@ -247,15 +253,11 @@
if (responseObject) {
NSNumber *code = responseObject[@"code"];
if (code.integerValue == 1007) {
if (code.integerValue == 1006) {
//@1缩放s动画
NSDate *oldDate = [NSDate date];
NSTimeInterval a = [oldDate timeIntervalSince1970]*1000;
NSString *timeString = [NSString stringWithFormat:@"%f", a];
NSInteger oldTime = [timeString longLongValue];
[[NSUserDefaults standardUserDefaults]setInteger:oldTime forKey:@"coinsauthenticationLastTime"];
[[NSUserDefaults standardUserDefaults]setObject:oldDate forKey:@"coinsauthenticationLastTime"];
[[NSUserDefaults standardUserDefaults]synchronize];
[weakSelf showPopAnimationWithAnimationStyle:1];
......@@ -267,21 +269,12 @@
//雷俊博,认证成功获取金币
- (void)loadData{
NSInteger oldTime = [[NSUserDefaults standardUserDefaults]integerForKey:@"coinsauthenticationLastTime"];
if (oldTime) {
NSDate *nowDate = [NSDate date];
NSTimeInterval a = [nowDate timeIntervalSince1970]*1000;
NSString *timeString = [NSString stringWithFormat:@"%f", a];
NSInteger nowTime = [timeString longLongValue];
NSInteger time = (nowTime -oldTime)/1000/60/60/24;
if (time < 1) {
return;
}
NSDate *oldTime = [[NSUserDefaults standardUserDefaults]objectForKey:@"coinsauthenticationLastTime"];
if (oldTime && [self isSameDay:[NSDate date] date2:oldTime]) {
return;
}
NSString *url = [NSString stringWithFormat:@"%@score/increateScore",CoinsBaseUrl];
NSDictionary *dic = @{
......@@ -330,6 +323,19 @@
#pragma mark - private methods
// 判断是否是同一天
- (BOOL)isSameDay:(NSDate*)date1 date2:(NSDate*)date2
{
NSCalendar* calendar = [NSCalendar currentCalendar];
unsigned unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit;
NSDateComponents* comp1 = [calendar components:unitFlags fromDate:date1];
NSDateComponents* comp2 = [calendar components:unitFlags fromDate:date2];
return [comp1 day] == [comp2 day] &&
[comp1 month] == [comp2 month] &&
[comp1 year] == [comp2 year];
}
#pragma mark 显示弹框
- (void)showPopAnimationWithAnimationStyle:(NSInteger)style
{
......@@ -347,7 +353,7 @@
// 2.3 显示时是否监听屏幕旋转
popView.isObserverOrientationChange = NO;
// 2.4 显示时动画时长
// popView.popAnimationDuration = 0.8f;
popView.popAnimationDuration = 1.0f;
// 2.5 移除时动画时长
// popView.dismissAnimationDuration = 0.8f;
......@@ -381,8 +387,10 @@
if (skip) {
[weakPopView dismiss];
[weakSlef.navigationController popToRootViewControllerAnimated:NO];
[weakSlef post];
CoinsCenterViewController *vc = [[CoinsCenterViewController alloc]init];
vc.title = @"金币中心";
[weakSlef.navigationController pushViewController:vc animated:YES];
return ;
}else{
[weakPopView dismiss];
}
......@@ -395,12 +403,9 @@
}
}
- (void)post{
NSNotification *notification = [NSNotification notificationWithName:@"authenticationCoinsSkip" object:nil userInfo:nil];
[[NSNotificationCenter defaultCenter] postNotification:notification];
}
......
......@@ -13,6 +13,14 @@
#import "NSString+AttributedString.h"
#import "NSString+Timestamp.h"
#import "UIColor+Hex.h"
#import "CTAPIBaseManager.h"
//缓存
#import "CTDiskCacheCenter.h"
#import<AdSupport/AdSupport.h>
@interface tabViewController ()
@property(nonatomic,strong)UIViewController *vc;
@property(nonatomic,strong)NSString *UrlStr;
......@@ -20,6 +28,8 @@
@property (nonatomic, strong)NSMutableArray *dataArray;
@property (nonatomic, strong)NSArray *click_tracking_urls;
@end
@implementation tabViewController
......@@ -36,71 +46,48 @@
[self loadAdData];
return;
[NewsNetModel acquirePicture:nil andlocationCoordinate:nil andint:2 complete:^(homePageNewsModel* model, NSError *error) {
//2017年7月11日修改
/*
修改内容:添加无网络的时候手机app的提醒
**/
if(error){
// [SVProgressHUD showErrorWithStatus:@"当前网络状态差"];
[self.vc.view removeFromSuperview];
[self.vc.view setUserInteractionEnabled:NO];
return;
}
NSLog(@"%@",error);
}
#pragma mark - 加载数据
- (void)loadData
{
id response = [CTDiskCacheCenter fetchCachedRecordWithKey:@"marketinAd"];
if (response) {
NSDictionary *dic = (NSDictionary *)response;
NSMutableArray *array1 =[NSMutableArray new];
for (homePageNewsResultModel *str1 in model.Result) {
[array1 addObject:str1.KKImage];
self.UrlStr =str1.targetUrl;
self.ur = str1.KKImage;
[[NSUserDefaults standardUserDefaults]setObject:self.UrlStr forKey:@"urlPath"];
[[NSUserDefaults standardUserDefaults]setObject:str1.KKImage forKey:@"imageu"];
}
// CATransition *applicationLoadViewIn =[CATransition animation];
// [applicationLoadViewIn setDuration:0.2];
// [applicationLoadViewIn setType:kCATransitionReveal];
// [applicationLoadViewIn setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault]];
// [[self.vc.view layer]addAnimation:applicationLoadViewIn forKey:kCATransitionReveal];
[array1 addObject:dic[@"creative_elements"][@"image"]];
self.UrlStr =dic[@"click_through_url"];
self.ur = dic[@"creative_elements"][@"image"];
[self loadOtherData:dic[@"imp_tracking_urls"]];
[[NSUserDefaults standardUserDefaults]setObject:self.UrlStr forKey:@"urlPath"];
[[NSUserDefaults standardUserDefaults]setObject:self.ur forKey:@"imageu"];
self.vc.view.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width,[UIScreen mainScreen].bounds.size.height);
UIImageView *imageV = [[UIImageView alloc]initWithFrame:[UIScreen mainScreen].bounds];
imageV.contentMode = UIViewContentModeScaleAspectFit;
if (array1.count <=0) {
[self.vc.view removeFromSuperview];
return;
}
//
// NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
// AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration];
// NSURL *URL = [NSURL URLWithString:array1[0]];
// NSURLRequest *request = [NSURLRequest requestWithURL:URL];
// NSURLSessionDownloadTask *downloadTask = [manager downloadTaskWithRequest:request progress:nil destination:^NSURL *(NSURL *targetPath, NSURLResponse *response) {
//
// NSURL *documentsDirectoryURL = [[NSFileManager defaultManager] URLForDirectory:NSDocumentDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:NO error:nil];
// return [documentsDirectoryURL URLByAppendingPathComponent:[response suggestedFilename]];
// } completionHandler:^(NSURLResponse *response, NSURL *filePath, NSError *error) {
// NSLog(@"File downloaded to: %@", filePath);
//
// NSData * image = [NSData dataWithContentsOfURL:filePath];
//// [[NSUserDefaults standardUserDefaults]setObject:image forKey:@"imageu"];
// }];
// [downloadTask resume];
// NSMutableData * data = [[NSUserDefaults standardUserDefaults]objectForKey:@"imageu"];
// NSString *strUrl= [[NSUserDefaults standardUserDefaults]objectForKey:@"imageu"];
NSData * ss = [NSData dataWithContentsOfURL:[NSURL URLWithString:self.ur]];
imageV.image = [UIImage imageWithData:ss];
// [imageV sd_setImageWithURL:[NSURL URLWithString:array1[0]] placeholderImage:[UIImage imageNamed:@"0-启动"]];
// NSData * image = [NSData dataWithContentsOfURL:[NSURL URLWithString:array1[0]]];
// [[NSUserDefaults standardUserDefaults]setObject:image forKey:@"imageu"];
[self.vc.view addSubview:imageV];
......@@ -134,30 +121,37 @@
[showDetailBtn addGestureRecognizer:PrivateLetterTap_2];
// [NSTimer scheduledTimerWithTimeInterval:4.0 target:self selector:@selector(removeLun) userInfo:nil repeats:NO];
}];
}else {
[self loadAdData];
}
}
#pragma mark - 加载广告
- (void)loadAdData
{
//NSString *url = @"http://sandbox.mmp.marketin.cn/mmps/v1/req_ad";
NSString *url = @"http://mobquery.marketin.cn/mmps/v1/c_10028/req_ad";
NSString *idfa = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
NSDictionary *params = @{
@"id":[NSString getNowTimeTimestamp],
@"app":@{
@"id":@"10095",
@"id":@"10096",
@"publisher":@{
@"id":@"10028"
}
},
@"device":@{
@"devicetype":[NSNumber numberWithInt:1],
@"model":@"iphone",
@"os":@"1",
@"osv":[[UIDevice currentDevice] systemVersion],
@"screen_orientation":[NSNumber numberWithInt:1],
@"make":@"apple",
@"size":[NSString stringWithFormat:@"%dx%d",(int)[UIScreen mainScreen].bounds.size.width,(int)[UIScreen mainScreen].bounds.size.height]
@"size":[NSString stringWithFormat:@"%dx%d",(int)[UIScreen mainScreen].bounds.size.width,(int)[UIScreen mainScreen].bounds.size.height],
@"ifa":idfa,
@"ifa_md5":[idfa CT_MD5]
},
@"network":@{
@"type":@0,
......@@ -166,7 +160,7 @@
},
@"adpos":@[@{
@"capacity":@1,
@"pos_id":@"10154"
@"pos_id":@"10155"
}]
};
......@@ -190,20 +184,22 @@
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
[request setValue:@"application/json" forHTTPHeaderField:@"Accept"];
[request setValue:[NSString stringWithFormat:@"Bearer %@",token] forHTTPHeaderField:@"Authorization"];
WeakSelf
NSURLSessionDataTask *task = [manager dataTaskWithRequest:request completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) {
NSLog(@"-----responseObject===%@+++++",responseObject);
NSLog(@"-----error%@+++",error);
if(error){
[weakSelf loadMyData];
// [SVProgressHUD showErrorWithStatus:@"当前网络状态差"];
[self.vc.view removeFromSuperview];
[self.vc.view setUserInteractionEnabled:NO];
// [self.vc.view removeFromSuperview];
// [self.vc.view setUserInteractionEnabled:NO];
return;
}
NSNumber *success = responseObject[@"success"];
if (success.boolValue) {
NSNumber *nbr = responseObject[@"nbr"];
if (success.boolValue && nbr.integerValue == 0) {
NSArray *array = responseObject[@"ads"];
......@@ -213,6 +209,13 @@
[array1 addObject:dic[@"creative_elements"][@"image"]];
self.UrlStr =dic[@"click_through_url"];
self.ur = dic[@"creative_elements"][@"image"];
self.click_tracking_urls = dic[@"click_tracking_urls"];
[self loadOtherData:dic[@"imp_tracking_urls"]];
NSTimeInterval cacheTime = 24 * 60 * 60;
[CTDiskCacheCenter saveCacheWithResponse:dic key:@"marketinAd" cacheTime:cacheTime];
[[NSUserDefaults standardUserDefaults]setObject:self.UrlStr forKey:@"urlPath"];
[[NSUserDefaults standardUserDefaults]setObject:self.ur forKey:@"imageu"];
......@@ -221,12 +224,16 @@
self.vc.view.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width,[UIScreen mainScreen].bounds.size.height);
UIImageView *imageV = [[UIImageView alloc]initWithFrame:[UIScreen mainScreen].bounds];
imageV.contentMode = UIViewContentModeScaleAspectFit;
if (array1.count <=0) {
[self.vc.view removeFromSuperview];
return;
}
NSData * ss = [NSData dataWithContentsOfURL:[NSURL URLWithString:self.ur]];
imageV.image = [UIImage imageWithData:ss];
......@@ -246,6 +253,7 @@
showDetailBtn.layer.borderColor = [UIColor whiteColor].CGColor;
showDetailBtn.layer.borderWidth = 1.0f;
showDetailBtn.layer.cornerRadius = 3.0f;
showDetailBtn.backgroundColor = [UIColor colorWithHex:0x000000 alpha:0.3];
imageV.userInteractionEnabled =YES;
// [showDetailBtn addTarget:self action:@selector(showAdDetail:) forControlEvents:UIControlEventTouchUpInside];
[imageV addSubview:showDetailBtn];
......@@ -264,8 +272,10 @@
}else {
[self.vc.view removeFromSuperview];
[self.vc.view setUserInteractionEnabled:NO];
[weakSelf loadMyData];
// [self.vc.view removeFromSuperview];
// [self.vc.view setUserInteractionEnabled:NO];
return;
}
}];
......@@ -273,12 +283,151 @@
[task resume];
}
//返回曝光检测地址请求
- (void)loadOtherData:(NSArray *)array
{
dispatch_group_t group = dispatch_group_create();
dispatch_queue_t searialQueue = dispatch_queue_create("com.hmc3.www", DISPATCH_QUEUE_SERIAL);
for (NSString *urlStr in array) {
dispatch_group_enter(group);
dispatch_group_async(group, searialQueue, ^{
//网络请求1
[CTAPIBaseManager GET:urlStr params:@{} completionHandler:^(id _Nonnull responseObject, NSError * _Nonnull error) {
dispatch_group_leave(group);
}];
});
}
//多个网络请求结束后,刷新UI
dispatch_group_notify(group, searialQueue, ^{
dispatch_async(dispatch_get_global_queue(0, 0), ^{
dispatch_async(dispatch_get_main_queue(), ^{
NSLog(@"返回曝光地址请求");
});
});
});
}
- (void)loadMyData
{
[NewsNetModel acquirePicture:nil andlocationCoordinate:nil andint:2 complete:^(homePageNewsModel* model, NSError *error) {
//2017年7月11日修改
/*
修改内容:添加无网络的时候手机app的提醒
**/
if(error){
// [SVProgressHUD showErrorWithStatus:@"当前网络状态差"];
[self.vc.view removeFromSuperview];
[self.vc.view setUserInteractionEnabled:NO];
return;
}
NSLog(@"%@",error);
NSMutableArray *array1 =[NSMutableArray new];
for (homePageNewsResultModel *str1 in model.Result) {
[array1 addObject:str1.KKImage];
self.UrlStr =str1.targetUrl;
self.ur = str1.KKImage;
[[NSUserDefaults standardUserDefaults]setObject:self.UrlStr forKey:@"urlPath"];
[[NSUserDefaults standardUserDefaults]setObject:str1.KKImage forKey:@"imageu"];
}
// CATransition *applicationLoadViewIn =[CATransition animation];
// [applicationLoadViewIn setDuration:0.2];
// [applicationLoadViewIn setType:kCATransitionReveal];
// [applicationLoadViewIn setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault]];
// [[self.vc.view layer]addAnimation:applicationLoadViewIn forKey:kCATransitionReveal];
self.vc.view.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width,[UIScreen mainScreen].bounds.size.height);
UIImageView *imageV = [[UIImageView alloc]initWithFrame:[UIScreen mainScreen].bounds];
imageV.contentMode = UIViewContentModeScaleAspectFit;
if (array1.count <=0) {
[self.vc.view removeFromSuperview];
return;
}
//
// NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
// AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration];
// NSURL *URL = [NSURL URLWithString:array1[0]];
// NSURLRequest *request = [NSURLRequest requestWithURL:URL];
// NSURLSessionDownloadTask *downloadTask = [manager downloadTaskWithRequest:request progress:nil destination:^NSURL *(NSURL *targetPath, NSURLResponse *response) {
//
// NSURL *documentsDirectoryURL = [[NSFileManager defaultManager] URLForDirectory:NSDocumentDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:NO error:nil];
// return [documentsDirectoryURL URLByAppendingPathComponent:[response suggestedFilename]];
// } completionHandler:^(NSURLResponse *response, NSURL *filePath, NSError *error) {
// NSLog(@"File downloaded to: %@", filePath);
//
// NSData * image = [NSData dataWithContentsOfURL:filePath];
//// [[NSUserDefaults standardUserDefaults]setObject:image forKey:@"imageu"];
// }];
// [downloadTask resume];
// NSMutableData * data = [[NSUserDefaults standardUserDefaults]objectForKey:@"imageu"];
// NSString *strUrl= [[NSUserDefaults standardUserDefaults]objectForKey:@"imageu"];
NSData * ss = [NSData dataWithContentsOfURL:[NSURL URLWithString:self.ur]];
imageV.image = [UIImage imageWithData:ss];
// [imageV sd_setImageWithURL:[NSURL URLWithString:array1[0]] placeholderImage:[UIImage imageNamed:@"0-启动"]];
// NSData * image = [NSData dataWithContentsOfURL:[NSURL URLWithString:array1[0]]];
// [[NSUserDefaults standardUserDefaults]setObject:image forKey:@"imageu"];
[self.vc.view addSubview:imageV];
// 添加按钮
UIButton *showDetailBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[showDetailBtn setTitle:@"跳过>>" forState:UIControlStateNormal];
[showDetailBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[showDetailBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted];
showDetailBtn.titleLabel.font = [UIFont systemFontOfSize:13];
CGRect f = [UIScreen mainScreen].bounds;
showDetailBtn.frame = CGRectMake(f.size.width - 70, 30, 60, 30);
showDetailBtn.layer.borderColor = [UIColor whiteColor].CGColor;
showDetailBtn.layer.borderWidth = 1.0f;
showDetailBtn.layer.cornerRadius = 3.0f;
showDetailBtn.backgroundColor = [UIColor colorWithHex:0x000000 alpha:0.3];
imageV.userInteractionEnabled =YES;
// [showDetailBtn addTarget:self action:@selector(showAdDetail:) forControlEvents:UIControlEventTouchUpInside];
[imageV addSubview:showDetailBtn];
UITapGestureRecognizer * PrivateLetterTap=[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapAvatarView:)];
UITapGestureRecognizer * PrivateLetterTap_2=[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(removeLun)];
PrivateLetterTap.numberOfTouchesRequired = 1; //手指数
PrivateLetterTap.numberOfTapsRequired = 1; //tap次数
PrivateLetterTap_2.numberOfTouchesRequired = 1; //手指数
PrivateLetterTap_2.numberOfTapsRequired = 1; //tap次数
// PrivateLetterTap.delegate= self;
imageV.contentMode = UIViewContentModeScaleAspectFit;
[imageV addGestureRecognizer:PrivateLetterTap];
[showDetailBtn addGestureRecognizer:PrivateLetterTap_2];
// [NSTimer scheduledTimerWithTimeInterval:4.0 target:self selector:@selector(removeLun) userInfo:nil repeats:NO];
}];
}
-(void)tapAvatarView:(UITapGestureRecognizer*)gg
{
if (self.UrlStr) {
NSDictionary *dic = @{
@"url":self.UrlStr
@"url":self.UrlStr,
@"click_tracking_urls":self.click_tracking_urls ? self.click_tracking_urls : @[]
};
[[NSNotificationCenter defaultCenter] postNotificationName:@"ZLPushToAdvert" object:nil userInfo:dic];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment