Commit ac4bdd2c by 刘卓鑫

bug修复代码

parent 4aec0d14
......@@ -28,7 +28,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "ColorfulSchool/Classes/CustomViews(自定义)/UIView+NineLayoutView.m"
timestampString = "586861564.565377"
timestampString = "587284767.389748"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "235"
......@@ -37,5 +37,53 @@
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "ColorfulSchool/Classes/Login(&#x767b;&#x5f55;&#x6ce8;&#x518c;)/Register/Controller/ZXRegistorViewController.m"
timestampString = "586864596.901405"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "663"
endingLineNumber = "663"
landmarkName = "-OKAction:"
landmarkType = "7">
<Locations>
<Location
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "__37-[ZXRegistorViewController OKAction:]_block_invoke"
moduleName = "ColorfulSchool"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/liuzhuoxin/codeStore/colorfulSchoolReconsitution/ColorfulSchool/ColorfulSchool/Classes/Login(%E7%99%BB%E5%BD%95%E6%B3%A8%E5%86%8C)/Register/Controller/ZXRegistorViewController.m"
timestampString = "587355366.1314549"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "663"
endingLineNumber = "663"
offsetFromSymbolStart = "96">
</Location>
<Location
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "__37-[ZXRegistorViewController OKAction:]_block_invoke_2"
moduleName = "ColorfulSchool"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/liuzhuoxin/codeStore/colorfulSchoolReconsitution/ColorfulSchool/ColorfulSchool/Classes/Login(%E7%99%BB%E5%BD%95%E6%B3%A8%E5%86%8C)/Register/Controller/ZXRegistorViewController.m"
timestampString = "587355366.13421"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "663"
endingLineNumber = "663"
offsetFromSymbolStart = "32">
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
......@@ -197,7 +197,8 @@
[cache clearMemory];
}
- (void)applicationWillResignActive:(UIApplication *)application {
if ([[ZXTool getCurrentVC] isKindOfClass:NSClassFromString(@"ZXSelfHelpViewController")]) {
UIViewController *vc = [ZXTool getCurrentVC];
if ([vc isKindOfClass:NSClassFromString(@"ZXSelfHelpViewController")] || [vc isKindOfClass:NSClassFromString(@"UseCouponsView")] || [vc isKindOfClass:NSClassFromString(@"H5UseCouponsView")]) {
NSString *isNeedLight = [kUserDefaults objectForKey:@"isNeedLight"];
if (isNeedLight && [isNeedLight isEqualToString:@"yes"]) {
CGFloat bre = [[kUserDefaults objectForKey:@"brightness"] floatValue];
......@@ -249,7 +250,7 @@
if ([vc isKindOfClass:NSClassFromString(@"ZXSelfHelpViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXDrinkViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXBathViewController")]) {
[[NSNotificationCenter defaultCenter] postNotificationName:kSelf_help_start_timer object:nil];
}
if ([vc isKindOfClass:NSClassFromString(@"ZXSelfHelpViewController")]) {
if ([vc isKindOfClass:NSClassFromString(@"ZXSelfHelpViewController")] || [vc isKindOfClass:NSClassFromString(@"UseCouponsView")] || [vc isKindOfClass:NSClassFromString(@"H5UseCouponsView")]) {
NSString *isNeedLight = [kUserDefaults objectForKey:@"isNeedLight"];
if (isNeedLight && [isNeedLight isEqualToString:@"yes"]) {
[[UIScreen mainScreen] setBrightness:1];//点亮
......
......@@ -60,6 +60,7 @@
dispatch_async(dispatch_get_main_queue(), ^{
[self.myTableView.mj_header endRefreshing];
[ZXTool hideLoadingAnimation];
if (isNeedReloadData) {
[self.myTableView reloadData];
}
......
......@@ -6,11 +6,11 @@
// Copyright © 2019 Colorful Any Door. All rights reserved.
//
#import "ZXHomePageSupverViewController.h"
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZXHomePageFeedBackViewController : ZXHomePageSupverViewController
@interface ZXHomePageFeedBackViewController : UIViewController
@end
......
......@@ -24,43 +24,51 @@
@property (nonatomic, copy) NSString *lastId;
//当前页码
@property (nonatomic, assign) NSInteger pageNum;
@property (nonatomic, strong) UIImageView *footer;
@end
@implementation ZXHomePageFeedBackViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.titleStr = @"意见反馈";
self.view.backgroundColor = [UIColor whiteColor];
self.title = @"意见反馈";
self.lastId = @"";
self.pageNum = 1;
[self.contentView addSubview:self.myTableView];
[self.view addSubview:self.myTableView];
[self createMessageInput];
[self.myTableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.equalTo(self.contentView);
make.bottom.equalTo(self.contentView.mas_bottom).offset(-75 * k6Scale);
make.left.right.top.equalTo(self.view);
make.bottom.equalTo(self.footer.mas_top);
}];
[self createMessageInput];
[self loadNewData];
}
-(void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
self.navigationController.navigationBar.hidden = NO;
}
//- (void)viewDidAppear:(BOOL)animated {
// NSIndexPath *indexPath = [NSIndexPath indexPathForRow:([self.myTableView numberOfRowsInSection:0]-1) inSection:0];
// [self.myTableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionBottom animated:NO];
//}
#pragma mark - ========== 聊天输入框 ==========
- (void) createMessageInput {
UIImageView *footer = [[UIImageView alloc] init];
[self.contentView addSubview:footer];
footer.userInteractionEnabled = YES;
footer.image = [UIImage imageNamed:@"bg_shurukuang"];
[footer mas_makeConstraints:^(MASConstraintMaker *make) {
self.footer = [[UIImageView alloc] init];
[self.view addSubview:self.footer];
self.footer.userInteractionEnabled = YES;
self.footer.image = [UIImage imageNamed:@"bg_shurukuang"];
[self.footer mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(self.view );
make.bottom.equalTo(self.view.mas_bottom);
}];
UIView *content = [[UIView alloc] init];
[footer addSubview:content];
[self.footer addSubview:content];
[content mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(footer).insets(UIEdgeInsetsMake(15 * k6Scale, 15 * k6Scale, 15 * k6Scale, 15 * k6Scale));
make.edges.equalTo(self.footer).insets(UIEdgeInsetsMake(15 * k6Scale, 15 * k6Scale, 15 * k6Scale, 15 * k6Scale));
}];
self.field = [[ZXTextView alloc] init];
......@@ -199,38 +207,38 @@
return model.cellH;
}
- (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 40 * k6Scale)];
header.backgroundColor = [UIColor whiteColor];
UIView *holder = [[UIView alloc] init];
holder.backgroundColor = [UIColor colorWithHexString:@"#f93d3d"];
holder.layer.cornerRadius = 16 * k6Scale;
holder.clipsToBounds = YES;
[header addSubview:holder];
[holder mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(header);
make.centerY.equalTo(header);
}];
UILabel *la = [[UILabel alloc] init];
la.text = @"每天可反馈三条信息";
la.backgroundColor = [UIColor colorWithHexString:@"#f93d3d"];
la.textColor = [UIColor whiteColor];
la.font = kFontSize(13 * k6Scale);
[holder addSubview:la];
[la mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(holder).insets(UIEdgeInsetsMake(5 * k6Scale, 10 * k6Scale, 5 * k6Scale, 10 * k6Scale));
make.height.mas_equalTo(22 * k6Scale);
}];
return header;
}
- (CGFloat) tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
return 40 * k6Scale;
}
//- (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
// UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 40 * k6Scale)];
// header.backgroundColor = [UIColor whiteColor];
//
// UIView *holder = [[UIView alloc] init];
// holder.backgroundColor = [UIColor colorWithHexString:@"#f93d3d"];
// holder.layer.cornerRadius = 16 * k6Scale;
// holder.clipsToBounds = YES;
// [header addSubview:holder];
// [holder mas_makeConstraints:^(MASConstraintMaker *make) {
// make.centerX.equalTo(header);
// make.centerY.equalTo(header);
// }];
// UILabel *la = [[UILabel alloc] init];
// la.text = @"每天可反馈三条信息";
// la.backgroundColor = [UIColor colorWithHexString:@"#f93d3d"];
// la.textColor = [UIColor whiteColor];
// la.font = kFontSize(13 * k6Scale);
// [holder addSubview:la];
// [la mas_makeConstraints:^(MASConstraintMaker *make) {
// make.edges.equalTo(holder).insets(UIEdgeInsetsMake(5 * k6Scale, 10 * k6Scale, 5 * k6Scale, 10 * k6Scale));
// make.height.mas_equalTo(22 * k6Scale);
// }];
//
// return header;
//}
//
//- (CGFloat) tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
//
// return 40 * k6Scale;
//}
//
#pragma mark - ========== 发送按钮点击 ==========
-(BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text{
......@@ -276,6 +284,8 @@
[ZXTool hideLoadingAnimation];
[self.dataSource addObject:model];
[self.myTableView reloadData];
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:([self.myTableView numberOfRowsInSection:0]-1) inSection:0];
[self.myTableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionBottom animated:NO];
});
}
});
......
......@@ -41,7 +41,7 @@
[super viewDidLoad];
// Do any additional setup after loading the view.
//
[self createUI];
}
......@@ -50,13 +50,12 @@
[super viewWillAppear:animated];
self.navigationController.navigationBar.hidden = YES;
self.tabBarController.tabBar.hidden = NO;
[UIApplication sharedApplication].statusBarStyle = 0;
[UIApplication sharedApplication].statusBarStyle = 1;
self.userNameLabel.text = [kUserDefaults objectForKey:@"username"];
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
[UIApplication sharedApplication].statusBarStyle = 1;
}
#pragma mark - 创建界面
......@@ -68,14 +67,14 @@
}
UIImageView *topImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 190 * k6Scale + margin)];
topImageView.userInteractionEnabled = YES;
topImageView.image = [UIImage imageNamed:@"bg_wode1"];
topImageView.image = [UIImage imageNamed:@"bg_wode"];
[self.view addSubview:topImageView];
UITapGestureRecognizer *userCenter = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(jumpUserCenter)];
[topImageView addGestureRecognizer:userCenter];
self.userNameLabel = [[UILabel alloc] init];
[topImageView addSubview:self.userNameLabel];
self.userNameLabel.font = [UIFont boldSystemFontOfSize:24 * k6Scale];
self.userNameLabel.textColor = [UIColor colorWithHexString:@"#333333"];
self.userNameLabel.textColor = [UIColor whiteColor];
[self.userNameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(topImageView.mas_left).offset(40 * k6Scale);
make.top.equalTo(topImageView.mas_top).offset(kTopHeight);
......@@ -93,7 +92,7 @@
self.telLabel = [[UILabel alloc] init];
[topImageView addSubview:self.telLabel];
self.telLabel.font = kFontSize(12 * k6Scale);
self.telLabel.textColor = [UIColor colorWithHexString:@"#888888"];
self.telLabel.textColor = [UIColor whiteColor];
[self.telLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(topImageView.mas_left).offset(40 * k6Scale);
make.top.equalTo(self.userNameLabel.mas_bottom).offset(4 * k6Scale);
......@@ -102,7 +101,7 @@
self.campusLabel = [[UILabel alloc] init];
[topImageView addSubview:self.campusLabel];
self.campusLabel.font = kFontSize(12 * k6Scale);
self.campusLabel.textColor = [UIColor colorWithHexString:@"#888888"];
self.campusLabel.textColor = [UIColor whiteColor];
[self.campusLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(topImageView.mas_left).offset(40 * k6Scale);
make.top.equalTo(self.telLabel.mas_bottom).offset(4 * k6Scale);
......@@ -135,30 +134,30 @@
bottomMargin = 83;
}
// UITableView *scroll = [[UITableView alloc] init];
// [self.view addSubview:scroll];
// scroll.separatorStyle = UITableViewCellSeparatorStyleNone;
// [scroll mas_makeConstraints:^(MASConstraintMaker *make) {
// make.left.right.equalTo(self.view);
// make.top.equalTo(topImageView.mas_bottom);
// make.bottom.equalTo(self.view.mas_bottom).offset(-bottomMargin);
// }];
// UITableView *scroll = [[UITableView alloc] init];
// [self.view addSubview:scroll];
// scroll.separatorStyle = UITableViewCellSeparatorStyleNone;
// [scroll mas_makeConstraints:^(MASConstraintMaker *make) {
// make.left.right.equalTo(self.view);
// make.top.equalTo(topImageView.mas_bottom);
// make.bottom.equalTo(self.view.mas_bottom).offset(-bottomMargin);
// }];
UIView *gridView = [[UIView alloc] init];
// scroll.tableHeaderView = gridView;
// scroll.tableHeaderView = gridView;
[self.view addSubview:gridView];
[gridView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(self.view);
make.top.equalTo(topImageView.mas_bottom);
make.bottom.equalTo(self.view.mas_bottom).offset(-bottomMargin);
}];
NSArray *datas = @[@{@"title":@"多彩手册", @"index":@(0)}, @{@"title":@"意见反馈", @"index":@(1)},@{@"title":@"个人设置", @"index":@(2)},@{@"title":@"关于多彩", @"index":@(3)}];
NSArray *datas = @[@{@"title":@"校园生活卡", @"index":@(0), @"image":@"ic_xiaoyuanka"}, @{@"title":@"意见反馈", @"index":@(1), @"image":@"ic_fankui"},@{@"title":@"个人设置", @"index":@(2), @"image":@"ic_setting"},@{@"title":@"关于多彩", @"index":@(3), @"image":@"ic_duocai"}];
if ([UserManager sharedUserManager].user) {
datas = @[@{@"title":@"多彩手册", @"index":@(0)},@{@"title":@"我的订单", @"index":@(1)},@{@"title":@"意见反馈", @"index":@(2)},@{@"title":@"个人设置", @"index":@(3)},@{@"title":@"关于多彩", @"index":@(4)}];
datas = @[@{@"title":@"校园生活卡", @"index":@(0), @"image":@"ic_xiaoyuanka"},@{@"title":@"我的订单", @"index":@(1),@"image":@"ic_dingdan"},@{@"title":@"意见反馈", @"index":@(2), @"image":@"ic_fankui"},@{@"title":@"个人设置", @"index":@(3),@"image":@"ic_setting"},@{@"title":@"关于多彩", @"index":@(4),@"image":@"ic_duocai"}];
}
gridView.delegate = self;
[gridView newHomeMePageGrid_itemWithCellWidth:kScreenWidth / 3.0f cellHeight:110 * k6Scale numPerRow:3 totalNum:datas.count viewPadding:0 viewPaddingCell:0 titles:datas];
......@@ -238,26 +237,21 @@
}
- (void)imageReshaperController:(AliImageReshapeController *)reshaper didFinishPickingMediaWithInfo:(UIImage *)image {
NSData *data = UIImageJPEGRepresentation(image, 0.3);
[XMCenter sendRequest:^(XMRequest *request) {
NSString *url = [NSString stringWithFormat:@"%@/app/customer/headpic/upload", [kUserDefaults valueForKey:@"NEW_PAY"]];
request.server = url;
request.requestType = kXMRequestUpload;
request.HttpBody = [[ZXTool dictionaryToJson:@{@"customerId":[kUserDefaults valueForKey:@"userId"]}] mj_JSONData];
request.headers = @{@"token": CacheToken,@"reqSource":@"app", @"Content-Type":@"multipart/form-data", @"clientSource":[ZXTool returnNormalHTTPHeaderJson]};
[request addFormDataWithName:@"temp.jpeg" fileName:@"file.jpeg" mimeType:@"image/jpeg" fileData:data];
} onProgress:^(NSProgress *progress) {
// the progress block is running on the session queue.
if (progress) {
NSLog(@"onProgress: %f", progress.fractionCompleted);
}
} onSuccess:^(id responseObject) {
AFHTTPSessionManager *session = [AFHTTPSessionManager manager];
[session.requestSerializer setValue:@"multipart/form-data" forHTTPHeaderField:@"Content-Type"];
[session.requestSerializer setValue:CacheToken forHTTPHeaderField:@"token"];
[session.requestSerializer setValue:@"app" forHTTPHeaderField:@"reqSource"];
[session.requestSerializer setValue:[ZXTool returnNormalHTTPHeaderJson] forHTTPHeaderField:@"clientSource"];
[session POST:[NSString stringWithFormat:@"%@/app/customer/headpic/upload?customerId=%@", [kUserDefaults valueForKey:@"NEW_PAY"], CacheUserId] parameters:@{@"customerId":[kUserDefaults valueForKey:@"userId"], @"token":CacheToken} constructingBodyWithBlock:^(id<AFMultipartFormData> _Nonnull formData) {
[formData appendPartWithFileData:data name:@"file" fileName:@"temp.jpeg" mimeType:@"multipart/form-data"];
} success:^(NSURLSessionDataTask * _Nonnull task, id _Nonnull responseObject) {
if ([responseObject[@"code"] integerValue] == 1000) {
dispatch_async(dispatch_get_main_queue(), ^{
[self.iconButton setBackgroundImage:image forState:UIControlStateNormal];;
[self.iconButton setBackgroundImage:image forState:UIControlStateNormal];;
});
[UserManager sharedUserManager].user.customerHead = responseObject[@"data"][@"headPic"];
ZXUserModel *user = [ZXUserModel findAll].lastObject;
......@@ -272,13 +266,10 @@
dispatch_async(dispatch_get_main_queue(), ^{
[self.navigationController popViewControllerAnimated:YES];
});
NSLog(@"onSuccess: %@", responseObject);
} onFailure:^(NSError *error) {
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool showText:error.userInfo[@"NSLocalizedDescription"]];
});
} onFinished:^(id responseObject, NSError *error) {
NSLog(@"onFinished");
}];
}
......@@ -369,12 +360,13 @@
[ZXTool checkCurrentUserModeCompleted:^(BOOL isOld) {
@strongify(self);
dispatch_async(dispatch_get_main_queue(), ^{
if (isOld == NO) {
UIViewController * VC=[[NSClassFromString(@"ZXHomePageFeedBackViewController") alloc] init];
if (isOld) {
FeedBackView * VC=[FeedBackView new];
VC.hidesBottomBarWhenPushed=YES;
[self.navigationController pushViewController:VC animated:YES];
} else {
FeedBackView * VC=[FeedBackView new];
UIViewController * VC=[[NSClassFromString(@"ZXHomePageFeedBackViewController") alloc] init];
VC.hidesBottomBarWhenPushed=YES;
[self.navigationController pushViewController:VC animated:YES];
}
......
......@@ -48,6 +48,9 @@
/** 是否已经显示过普通公告提醒 */
@property (nonatomic, assign) BOOL isShowNormalAnnouce;
/** 是否已经显示过首充提醒 */
@property (nonatomic, assign) BOOL isShowFirstRecharge;
@end
@implementation ZXHomePageViewController
......@@ -65,7 +68,7 @@ static NSInteger seq = 0;
[self createUserHeader];
//直接加载最新数据
[self loadNewData];
//每次启动获取一次用户信息
[ZXTool fetchUserInfoCompleted:^(BOOL isOld) {
......@@ -74,7 +77,21 @@ static NSInteger seq = 0;
/*强更*/
[self udateAppVersion];
//切换头像的通知
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeIconAction) name:@"changeIconNotification" object:nil];
//完成支付的通知
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(payCompleted) name:kOrder_Completed_Pay object:nil];
}
- (void)viewWillLayoutSubviews {
[super viewWillLayoutSubviews];
self.tabBarController.tabBar.hidden = NO;
self.navigationController.navigationBar.hidden = YES;
[UIApplication sharedApplication].statusBarHidden = NO;
}
#pragma mark - 收到支付完成的通知
- (void) payCompleted {
self.naHeader.pub.hidden = YES;
}
#pragma mark - 收到修改头像的通知
- (void) changeIconAction {
......@@ -94,20 +111,27 @@ static NSInteger seq = 0;
self.tabBarController.tabBar.hidden = NO;
self.navigationController.navigationBar.hidden = YES;
[UIApplication sharedApplication].statusBarHidden = NO;
if ([[kUserDefaults valueForKey:@"isUploadLog"] integerValue]) {
NSArray *list = [ExpecptionModel findByCriteria:[NSString stringWithFormat:@"where uploadStatus <> 1"]];
if (list.count>10) {
[ExpecptionModel clearTable];
[UIApplication sharedApplication].statusBarStyle = 1;
//查看待支付订单和未读普通公告
[self createNotPayAndAnnouceView];
if (self.isShowFirstRecharge) {
self.isShowFirstRecharge = NO;
} else {
[self fetchFirstChargeConfig];
if ([[kUserDefaults valueForKey:@"isUploadLog"] integerValue]) {
NSArray *list = [ExpecptionModel findByCriteria:[NSString stringWithFormat:@"where uploadStatus <> 1"]];
if (list.count>10) {
[ExpecptionModel clearTable];
} else {
dispatch_async(dispatch_get_global_queue(0, 0), ^{
[self uploadExpectionWithList:list];
});
}
} else {
dispatch_async(dispatch_get_global_queue(0, 0), ^{
[self uploadExpectionWithList:list];
});
[ExpecptionModel clearTable];
}
} else {
[ExpecptionModel clearTable];
}
[self fetchFirstChargeConfig];
}
- (UITableView *)myTableView {
......@@ -157,30 +181,9 @@ static NSInteger seq = 0;
[self showPublishWithItem:publish];
});
}];
//待支付订单view
[self.service loadNotPayOrderCompleted:^(BOOL isNeedReloadData) {
@strongify(self);
if (isNeedReloadData) {
ZXNotPay *order = [ZXNotPay findAll].lastObject;
dispatch_async(dispatch_get_main_queue(), ^{
self.naHeader.order = order;
});
} else {
if (self.isShowNormalAnnouce == NO) {//只显示一次
// -- 拉取最新的普通公告
[self.service loadLatestNewNormalAnnounceCompleted:^(ZXHomePageAnnouce * _Nullable publish) {
@strongify(self);
self.isShowNormalAnnouce = YES;
//显示
dispatch_async(dispatch_get_main_queue(), ^{
self.naHeader.annouce = publish;
});
}];
}
}
}];
//待支付订单和普通公共提示view
[self createNotPayAndAnnouceView];
}
#pragma mark - ========== 显示公告 ==========
......@@ -514,10 +517,14 @@ static NSInteger seq = 0;
}
#pragma mark - 首冲
- (void) fetchFirstChargeConfig {
if (self.isShowFirstRecharge) {
return;
}
self.isShowFirstRecharge = YES;
if ([CacherechargeStatus isKindOfClass:[NSString class]] && [CacherechargeStatus isEqualToString:@"1"]) {
return;
}
@weakify(self);
[ZXTool fetchUserInfoCompleted:^(BOOL isOld) {
@strongify(self);
......@@ -530,21 +537,23 @@ static NSInteger seq = 0;
NSDictionary * dic=responseObject;
if ([dic[@"code"] isEqualToString:@"0"]) {
[self showFirstRechargeAlertByMsg:dic[@"data"][@"rechargeNotice"]];
dispatch_async(dispatch_get_main_queue(), ^{
[self showFirstRechargeAlertByMsg:dic[@"data"][@"rechargeNotice"]];
});
}
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
}];
}
});
} else {
if ([CacherechargeStatus isEqualToString:@"1"]) {
return ;
}
[ZXTool requestDataHideLoadingToastWithType:kXMHTTPMethodGET url:[NSString stringWithFormat:@"%@/dcxy/api/paymentAndActiveConf/getFirstRechargeConfContent?areaId=%@", [kUserDefaults objectForKey:@"SX_MONEY"], CacheCampusId] para:nil completed:^(CommonModel *common, NSString *error) {
@strongify(self);
if (error == nil) {
[self showFirstRechargeAlertByMsg:common.data];
}
dispatch_async(dispatch_get_main_queue(), ^{
if (error == nil) {
[self showFirstRechargeAlertByMsg:common.data];
}
});
}];
}
}];
......@@ -554,9 +563,11 @@ static NSInteger seq = 0;
if (msg == nil || [msg isEqualToString:@""]) {
return;
}
@weakify(self);
ZXHomePaeFirstRecahrgeView *firstRechargeView = [[ZXHomePaeFirstRecahrgeView alloc] initWithFirstRechargeDesc:msg rightAction:^{
@strongify(self);
self.isShowFirstRecharge = NO;
AimiWalletViewController * view = [[AimiWalletViewController alloc]init];
view.hidesBottomBarWhenPushed = YES;
view.comeFrom=@"firstTopUp";
......@@ -565,7 +576,31 @@ static NSInteger seq = 0;
firstRechargeView.frame = [UIScreen mainScreen].bounds;
[self.tabBarController.view addSubview:firstRechargeView];
}
- (void) createNotPayAndAnnouceView {
//待支付订单view
@weakify(self);
[self.service loadNotPayOrderCompleted:^(BOOL isNeedReloadData) {
@strongify(self);
if (isNeedReloadData) {
ZXNotPay *order = [ZXNotPay findAll].lastObject;
dispatch_async(dispatch_get_main_queue(), ^{
self.naHeader.order = order;
});
} else {
if (self.isShowNormalAnnouce == NO) {//只显示一次
// -- 拉取最新的普通公告
[self.service loadLatestNewNormalAnnounceCompleted:^(ZXHomePageAnnouce * _Nullable publish) {
@strongify(self);
self.isShowNormalAnnouce = YES;
//显示
dispatch_async(dispatch_get_main_queue(), ^{
self.naHeader.annouce = publish;
});
}];
}
}
}];
}
- (void) createScrollToTopBtn {
if (self.goTop) {
return;
......
......@@ -30,13 +30,16 @@
});
}
if (self.htmlStr) {
NSString *str = [NSString stringWithFormat:@"<html><header><meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0'></header><body>%@</body></html>", self.htmlStr];
NSString *str = [self getHtmlData:self.htmlStr];
[self.webView loadHTMLString:str baseURL:nil];
}
}
-(NSString *) getHtmlData:(NSString *)bodyHTML {
NSString *head = [NSString stringWithFormat:@"<html>%@%@%@%@<body>%@ </body></html>", @"<head>", @"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, user-scalable=no\"> ", @"<style>body{word-wrap:break-word;font-family:Arial}img{max-width: 100%; width:auto; height:auto;}</style>", @"</head>", bodyHTML];
return head;
}
- (WKWebView *)webView {
if (!_webView) {
_webView = [[WKWebView alloc] init];
......
......@@ -65,6 +65,8 @@ NS_ASSUME_NONNULL_BEGIN
/** 来源平台 1腾讯 02百度 03瑞狮 04友盟 05多彩 06京东联盟 */
@property (nonatomic, copy) NSString *source;
@property (nonatomic, copy) NSString *sourceName;
/** 同步信息 */
@property (nonatomic, copy) NSString *synchWay;
......
......@@ -44,7 +44,7 @@
}
}];
self.contentLabel = [[UILabel alloc] init];
self.contentLabel.font = [UIFont boldSystemFontOfSize:16 * k6Scale];
self.contentLabel.font = [UIFont boldSystemFontOfSize:15 * k6Scale];
self.contentLabel.textColor = [UIColor colorWithHexString:@"#333333"];
[self.contentView addSubview:self.contentLabel];
......@@ -65,29 +65,35 @@
[self.contentView addSubview:self.fromLabel];
[self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.contentView.mas_left).offset(20 * k6Scale);
make.top.equalTo(self.contentView.mas_top).offset(10 * k6Scale);
make.right.equalTo(self.contentView.mas_right).offset(-20 * k6Scale);
}];
[self.imagesView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.contentLabel.mas_left);
make.right.equalTo(self.contentLabel.mas_right);
make.top.equalTo(self.contentLabel.mas_bottom).offset(10 * k6Scale);
make.top.equalTo(self.contentView.mas_top).offset(10 * k6Scale);
make.height.mas_equalTo(90 * k6Scale);
}];
[self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.contentView.mas_left).offset(20 * k6Scale);
make.top.equalTo(self.imagesView.mas_bottom).offset(10 * k6Scale);
make.right.equalTo(self.contentView.mas_right).offset(-20 * k6Scale);
}];
[self.noteCountLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.contentLabel);
make.top.equalTo(self.imagesView.mas_bottom).offset(10 * k6Scale);
make.right.lessThanOrEqualTo(self.contentLabel.mas_right);
make.top.equalTo(self.contentLabel.mas_bottom).offset(10 * k6Scale);
}];
[self.fromLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.noteCountLabel.mas_right).offset(20 * k6Scale);
make.top.equalTo(self.imagesView.mas_bottom).offset(10 * k6Scale);
make.left.equalTo(self.noteCountLabel.mas_right).offset(10 * k6Scale);
make.right.equalTo(self.contentLabel.mas_right);
make.centerY.equalTo(self.noteCountLabel.mas_centerY);
}];
[self.noteCountLabel setContentCompressionResistancePriority:UILayoutPriorityRequired
forAxis:UILayoutConstraintAxisHorizontal];
UIView *line = [[UIView alloc] init];
line.backgroundColor = RGB(243, 243, 243);
[self.contentView addSubview:line];
......@@ -107,6 +113,6 @@
self.imagesView.imageNameList = [_info.itemImgs componentsSeparatedByString:@","];
self.contentLabel.text = _info.itemTitle;
self.fromLabel.text = _info.itemCreateAt;
self.noteCountLabel.text = [NSString stringWithFormat:@"来源: %@", _info.source];;
self.noteCountLabel.text = [NSString stringWithFormat:@"来源: %@", _info.sourceName];;
}
@end
......@@ -51,7 +51,7 @@
self.contentImageView = [[UIImageView alloc] init];
self.titleLabel = [[UILabel alloc] init];
self.titleLabel.font = [UIFont boldSystemFontOfSize:16 * k6Scale];;
self.titleLabel.font = [UIFont boldSystemFontOfSize:15 * k6Scale];
self.titleLabel.textColor = [UIColor colorWithHexString:@"#333333"];
self.titleLabel.numberOfLines = 0;
......@@ -80,6 +80,8 @@
make.bottom.equalTo(self.contentView.mas_bottom);
make.height.mas_equalTo(1);
}];
[self.fromLabel setContentCompressionResistancePriority:UILayoutPriorityRequired
forAxis:UILayoutConstraintAxisHorizontal];
}
return self;
}
......@@ -88,9 +90,9 @@
_child = child;
[self.contentImageView sd_setImageWithURL:[NSURL URLWithString:[_child.itemImgs componentsSeparatedByString:@","].firstObject] placeholderImage:[UIImage imageNamed:@"home_quanyuan_def_pic"]];
self.titleLabel.text = _child.itemTitle;
self.fromLabel.text = [NSString stringWithFormat:@"来源: %@", _child.source];
self.fromLabel.text = [NSString stringWithFormat:@"来源: %@", _child.sourceName];
self.dateLabel.text = _child.itemCreateAt;
if ([_child.imgPosition isEqualToString:@"2"]) {//上
......@@ -111,11 +113,13 @@
[self.fromLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.titleLabel.mas_bottom).offset(10 * k6Scale);
make.left.equalTo(self.contentImageView.mas_left);
make.right.lessThanOrEqualTo(self.contentView.mas_right).offset(-20 * k6Scale);
}];
[self.dateLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(self.fromLabel);
make.left.equalTo(self.fromLabel.mas_right).offset(20 * k6Scale);
make.left.equalTo(self.fromLabel.mas_right).offset(10 * k6Scale);
make.right.equalTo(self.contentImageView.mas_right);
}];
......@@ -133,12 +137,14 @@
make.bottom.equalTo(self.contentImageView.mas_bottom);
make.left.equalTo(self.contentView.mas_left).offset(20 * k6Scale);
make.height.mas_equalTo(15 * k6Scale);
make.right.lessThanOrEqualTo(self.contentImageView.mas_left).offset(-20 * k6Scale);
}];
[self.dateLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(self.contentImageView.mas_bottom);
make.left.equalTo(self.fromLabel.mas_right).offset(20 * k6Scale);
make.height.mas_equalTo(15 * k6Scale);
make.right.lessThanOrEqualTo(self.contentImageView.mas_left).offset(-15 * k6Scale);
}];
self.titleLabel.numberOfLines = 0;
......@@ -161,11 +167,13 @@
[self.fromLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(self.contentImageView.mas_top).offset(-10 * k6Scale);
make.left.equalTo(self.contentImageView.mas_left);
make.right.lessThanOrEqualTo(self.contentView.mas_right).offset(-20 * k6Scale);
}];
[self.dateLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(self.fromLabel);
make.left.equalTo(self.fromLabel.mas_right).offset(20 * k6Scale);
make.right.equalTo(self.contentView.mas_right).offset(-20 * k6Scale);
}];
self.titleLabel.numberOfLines = 1;
......@@ -185,6 +193,7 @@
[self.fromLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(self.contentImageView.mas_bottom);
make.left.equalTo(self.contentImageView.mas_right).offset(15 * k6Scale);
make.right.lessThanOrEqualTo(self.contentView.mas_right).offset(-20 * k6Scale);
make.height.mas_equalTo(15 * k6Scale);
}];
......@@ -192,13 +201,14 @@
make.bottom.equalTo(self.contentImageView.mas_bottom);
make.left.equalTo(self.fromLabel.mas_right).offset(20 * k6Scale);
make.height.mas_equalTo(15 * k6Scale);
make.right.equalTo(self.contentView.mas_right).offset(-20 * k6Scale);
}];
self.titleLabel.numberOfLines = 0;
[self.titleLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.contentImageView.mas_right).offset(15 * k6Scale);
make.top.equalTo(self.contentImageView.mas_top);
make.right.mas_equalTo(self.contentView.mas_right).offset(-20 * k6Scale);
make.right.equalTo(self.contentView.mas_right).offset(-20 * k6Scale);
make.bottom.mas_lessThanOrEqualTo(self.fromLabel.mas_top).offset(-10 * k6Scale);
}];
}
......
......@@ -77,7 +77,9 @@
}];
@weakify(self);
[[lelftBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
@strongify(self);
self.hidden = YES;
[self removeFromSuperview];
[ZXTool showText:@"正在退出登录,请稍后"];
[ZXTool backToLoginAndOperationInterface];
}];
......@@ -93,6 +95,8 @@
make.top.equalTo(bottomLine.mas_bottom);
}];
[[rightBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
self.hidden = YES;
[self removeFromSuperview];
rightAction();
}];
}
......
......@@ -85,11 +85,34 @@
}
- (void)setHtmlStr:(NSString *)htmlStr {
_htmlStr = htmlStr;
NSString *str = [NSString stringWithFormat:@"<html><header><meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0'></header><body>%@</body></html>", _htmlStr];
// NSString *str = [NSString stringWithFormat:@"<html><header><meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0'></header><body>%@</body></html>", _htmlStr];
[self.webView loadHTMLString:str baseURL:nil];
[self.webView loadHTMLString:[self getHtmlData:_htmlStr] baseURL:nil];
}
-(NSString *) getHtmlData:(NSString *)bodyHTML {
NSString *head = [NSString stringWithFormat:@"<html>%@%@%@%@<body>%@ </body></html>", @"<head>", @"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, user-scalable=no\"> ", @"<style>body{word-wrap:break-word;font-family:Arial}img{max-width: 100%; width:auto; height:auto;}</style>", @"</head>", bodyHTML];
return head;
}
- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation {
@weakify(self);
[webView evaluateJavaScript:@"document.body.scrollHeight" completionHandler:^(id _Nullable content, NSError * _Nullable error) {
@strongify(self);
float height = [content floatValue];
CGFloat webH = self.webView.frame.size.height;
if (height <= webH) {
dispatch_async(dispatch_get_main_queue(), ^{
[self.agreedBtn mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(40 * k6Scale);
}];
self.agreedBtn.hidden = NO;
});
}
}];
[ZXTool hideLoadingAnimation];
}
#pragma mark - ==========确定事件==========
- (void) okAction:(UIButton *) sender {
self.hidden =YES;
......
......@@ -31,9 +31,9 @@
self.titleLabel = [[UILabel alloc] init];
[self.contentView addSubview:self.titleLabel];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.contentView).insets(UIEdgeInsetsMake(0, 20 * k6Scale, 0, 0));
make.edges.equalTo(self.contentView).insets(UIEdgeInsetsMake(0, 20 * k6Scale, 0, 20 * k6Scale));
}];
self.titleLabel.font = [UIFont boldSystemFontOfSize:16 * k6Scale];
self.titleLabel.font = [UIFont boldSystemFontOfSize:17 * k6Scale];
self.titleLabel.textColor = [UIColor blackColor];
}
......
......@@ -41,7 +41,7 @@
UILabel *label2 = [[UILabel alloc] initWithFrame:CGRectMake(32 * k6Scale, 80 * k6Scale, 100 , 20 * k6Scale)];
label2.textColor = [UIColor colorWithHexString:@"#8c95fa"];
label2.font = kFontSize(13 * k6Scale);
label2.font = [UIFont boldSystemFontOfSize:14 * k6Scale];
[bgView addSubview:label2];
label2.text = [NSString stringWithFormat:@"V%@", model.version];
......
......@@ -9,6 +9,7 @@
#import <UIKit/UIKit.h>
#import "ZXHomePageAnnouce.h"
#import "ZXNotPay.h"
#import "ZXHomePagePublishView.h"
NS_ASSUME_NONNULL_BEGIN
@interface ZXHomePageUserInfoHeader : UIView
......@@ -23,6 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
/** 待支付订单 */
@property (nonatomic, strong) ZXNotPay *order;
@property (nonatomic, strong) ZXHomePagePublishView *pub;
......
......@@ -8,7 +8,7 @@
#import "ZXHomePageUserInfoHeader.h"
#import "enlargeClickRegionBtn.h"
#import "ZXHomePagePublishView.h"
#import "ZXAnnouceListViewController.h"
#import "ZXHomePageService.h"
#import "ZXHomePageWebViewController.h"
......@@ -25,14 +25,13 @@
/** 学校 */
@property (nonatomic, strong) UILabel *schoolLabel;
@property (nonatomic, strong) ZXHomePagePublishView *pub;
/** 新的公告红点标记 */
@property (nonatomic, strong) UIView *annouceNode;
/** */
@property (nonatomic, strong) enlargeClickRegionBtn *userIconBtn;
@property (nonatomic, strong) UIImageView *userIconBtn;
/** 当前是显示的订单还是公告 */
@property (nonatomic, assign) BOOL isShowPublish;
......@@ -90,29 +89,29 @@
self.schoolLabel.textColor = [UIColor colorWithHexString:@"#ffffff"];
self.userIconBtn = [[enlargeClickRegionBtn alloc] init];
self.userIconBtn = [[UIImageView alloc] init];
[self addSubview:self.userIconBtn];
[self.userIconBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.mas_right).offset(-23 * k6Scale);
make.centerY.equalTo(self.userNameLabel.mas_bottom);
make.width.and.height.mas_equalTo(30 * k6Scale);
}];
[[self.userIconBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
if ([UserManager sharedUserManager].user) {
UserInfoViewController * VC=[UserInfoViewController new];
VC.hidesBottomBarWhenPushed=YES;
VC.user=[UserManager sharedUserManager].user;
[self.fromVc.navigationController pushViewController:VC animated:YES];
} else {
Old_UserInfoViewController * VC=[Old_UserInfoViewController new];
VC.hidesBottomBarWhenPushed=YES;
VC.userCenterItem=[UserManager sharedUserManager].oldUser;
[self.fromVc.navigationController pushViewController:VC animated:YES];
}
}];
kViewRadius(self.userIconBtn, 15 * k6Scale);
// [[self.userIconBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
//
// if ([UserManager sharedUserManager].user) {
// UserInfoViewController * VC=[UserInfoViewController new];
// VC.hidesBottomBarWhenPushed=YES;
// VC.user=[UserManager sharedUserManager].user;
// [self.fromVc.navigationController pushViewController:VC animated:YES];
// } else {
// Old_UserInfoViewController * VC=[Old_UserInfoViewController new];
// VC.hidesBottomBarWhenPushed=YES;
// VC.userCenterItem=[UserManager sharedUserManager].oldUser;
// [self.fromVc.navigationController pushViewController:VC animated:YES];
// }
//
// }];
enlargeClickRegionBtn *publishBtn = [[enlargeClickRegionBtn alloc] init];
......@@ -128,9 +127,10 @@
[[publishBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
kStrongSelf(self);
self.annouceNode.hidden = YES;
self.pub.hidden = YES;
ZXAnnouceListViewController *annouces = [[ZXAnnouceListViewController alloc] init];
annouces.titleStr = @"公 告";
self.annouceNode.hidden = YES;
[self.fromVc.navigationController pushViewController:annouces animated:YES];
}];
......@@ -166,14 +166,12 @@
if (self.annouce) {
self.annouce.whetherClicked = YES;
self.annouce = self.annouce;
self.pub.hidden = YES;
[ZXHomePageService loadAnnouceAttbuitesMsgByNoticeCode:self.annouce.noticeCode completed:^(ZXHomePageAnnouce * _Nullable publish) {
kStrongSelf(self);
dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool hideLoadingAnimation];
//隐藏提示窗体
self.pub.hidden = YES;
//跳转H5页面 渲染富文本
ZXHomePageWebViewController *attVc = [[ZXHomePageWebViewController alloc] init];
......@@ -185,6 +183,7 @@
} else {
self.order.whetherClicked = YES;
self.order = self.order;
self.pub.hidden = YES;
ZXOrderPayController *jumpPay = [[ZXOrderPayController alloc] init];
jumpPay.orderId = self.order.orderId;
[self.fromVc.navigationController pushViewController:jumpPay animated:YES];
......@@ -192,7 +191,7 @@
};
self.userNameLabel.text = [kUserDefaults valueForKey:@"username"];
self.telLabel.text = CacheAccount;
self.telLabel.text = [CacheAccount stringByReplacingOccurrencesOfString:[CacheAccount substringWithRange:NSMakeRange(3, 4)] withString:@"****"];
self.schoolLabel.text = [kUserDefaults valueForKey:@"campusName"];
[self settingUserIcon];
......@@ -209,7 +208,8 @@
} else {
imageName = @"bg_touxiang_girl";
}
[self.userIconBtn sd_setBackgroundImageWithURL:[NSURL URLWithString:[UserManager sharedUserManager].user.customerHead] forState:UIControlStateNormal placeholderImage:[UIImage imageNamed:imageName]];
[self.userIconBtn sd_setImageWithURL:[NSURL URLWithString:[UserManager sharedUserManager].user.customerHead] placeholderImage:[UIImage imageNamed:imageName]];
// [self.userIconBtn sd_setBackgroundImageWithURL:[NSURL URLWithString:[UserManager sharedUserManager].user.customerHead] forState:UIControlStateNormal placeholderImage:[UIImage imageNamed:imageName]];
}
- (void)setAnnouce:(ZXHomePageAnnouce *)annouce {
......@@ -228,12 +228,13 @@
- (void)setOrder:(ZXNotPay *)order {
_order = order;
self.isShowPublish = NO;
self.annouceNode.hidden = YES;
if (_order == nil) {
self.pub.hidden = YES;
} else {
self.pub.hidden = NO;
self.pub.order = _order;
self.annouceNode.hidden = _order.whetherClicked;
}
}
......
......@@ -50,6 +50,14 @@
});
} else {
NSArray *founctions = [ZXHomePageFouction mj_objectArrayWithKeyValuesArray:common.data[@"functionData"]];
founctions = [founctions sortedArrayUsingComparator:^NSComparisonResult(ZXHomePageFouction* _Nonnull obj1, ZXHomePageFouction *obj2) {
//此处的规则含义为:若前一元素比后一元素小,则返回降序(即后一元素在前,为从大到小排列)
if (obj1.sortId > obj2.sortId) {
return NSOrderedDescending;
} else {
return NSOrderedAscending;
}
}];
NSArray *sections = [ZXHomeSectionInfo mj_objectArrayWithKeyValuesArray:common.data[@"plateData"]];
[self.functions removeAllObjects];
[self.functions addObject:founctions];
......@@ -74,7 +82,9 @@
} else {
NSArray *arr = [ZXHomePageAnnouce mj_objectArrayWithKeyValuesArray:common.data];
[self.announceSource removeAllObjects];
[self.announceSource addObjectsFromArray:arr];
completed(YES);
}
}];
......@@ -91,9 +101,10 @@
});
} else {
ZXHomePageAnnouce *an = [ZXHomePageAnnouce mj_objectWithKeyValues:common.data];
if (an) {
completed(an);
}
dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool hideLoadingAnimation];
});
completed(an);
}
}];
}
......
//
//
......@@ -156,7 +156,6 @@
-(void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
self.navigationController.navigationBar.hidden = NO;
// self.navigationController.navigationBar.translucent = YES;
self.tabBarController.tabBar.hidden = NO;
[self.tabBarController.tabBar hideBadgeOnItemIndex:1];
}
......
//
//
......@@ -289,7 +289,7 @@ static NSInteger seq = 0;
[super viewWillAppear:animated];
[UIApplication sharedApplication].statusBarStyle = 0;
[UIApplication sharedApplication].statusBarHidden = NO; self.navigationController.navigationBar.hidden = YES;
// self.navigationController.navigationBar.translucent = YES;
self.tabBarController.tabBar.hidden = NO;
......
//
//
......@@ -312,11 +312,6 @@
#pragma mark - ========== 忘记密码 ==========
- (void) forgetPwd:(enlargeClickRegionBtn *) sender {
forgetPasswordViewController *forgetVc = [[forgetPasswordViewController alloc] init];
@weakify(self);
forgetVc.backBlock = ^{
@strongify(self);
// self.navigationController.navigationBar.translucent = NO;
};
[self.navigationController pushViewController:forgetVc animated:YES];
}
#pragma mark - ========== UITableView/Delegate/Datasource ==========
......
//
//
......@@ -257,12 +257,7 @@
#pragma mark - ========== 忘记密码 ==========
- (void) forgetPwd:(enlargeClickRegionBtn *) sender {
forgetPasswordViewController *forgetVc = [[forgetPasswordViewController alloc] init];
@weakify(self);
forgetVc.backBlock = ^{
@strongify(self);
// self.navigationController.navigationBar.translucent = NO;
};
[self.navigationController pushViewController:forgetVc animated:YES];
}
#pragma mark - ========== UITableView/Delegate/Datasource ==========
......
//
//
......@@ -266,11 +266,6 @@
#pragma mark - ========== 忘记密码 ==========
- (void) forgetPwd:(enlargeClickRegionBtn *) sender {
forgetPasswordViewController *forgetVc = [[forgetPasswordViewController alloc] init];
@weakify(self);
forgetVc.backBlock = ^{
@strongify(self);
// self.navigationController.navigationBar.translucent = NO;
};
[self.navigationController pushViewController:forgetVc animated:YES];
}
#pragma mark - ========== UITableView/Delegate/Datasource ==========
......
//
//
......@@ -497,33 +497,42 @@
}
- (void)imageReshaperController:(AliImageReshapeController *)reshaper didFinishPickingMediaWithInfo:(UIImage *)image {
NSData *data = UIImageJPEGRepresentation(image, 0.3);
self.iconImageView.image =image;
[XMCenter sendRequest:^(XMRequest *request) {
request.server = [NSString stringWithFormat:@"%@/app/customer/headpic/upload?customerId=%@", [kUserDefaults valueForKey:@"NEW_PAY"], [kUserDefaults valueForKey:@"userId"]];
request.requestType = kXMRequestUpload;
[request addFormDataWithName:@"file" fileName:@"file.jpeg" mimeType:@"image/jpeg" fileData:data];
} onProgress:^(NSProgress *progress) {
// the progress block is running on the session queue.
if (progress) {
NSLog(@"onProgress: %f", progress.fractionCompleted);
}
} onSuccess:^(id responseObject) {
AFHTTPSessionManager *session = [AFHTTPSessionManager manager];
[session.requestSerializer setValue:@"multipart/form-data" forHTTPHeaderField:@"Content-Type"];
[session.requestSerializer setValue:CacheToken forHTTPHeaderField:@"token"];
[session.requestSerializer setValue:@"app" forHTTPHeaderField:@"reqSource"];
[session.requestSerializer setValue:[ZXTool returnNormalHTTPHeaderJson] forHTTPHeaderField:@"clientSource"];
[session POST:[NSString stringWithFormat:@"%@/app/customer/headpic/upload?customerId=%@", [kUserDefaults valueForKey:@"NEW_PAY"], CacheUserId] parameters:@{@"customerId":[kUserDefaults valueForKey:@"userId"], @"token":CacheToken} constructingBodyWithBlock:^(id<AFMultipartFormData> _Nonnull formData) {
[formData appendPartWithFileData:data name:@"file" fileName:@"temp.jpeg" mimeType:@"multipart/form-data"];
} success:^(NSURLSessionDataTask * _Nonnull task, id _Nonnull responseObject) {
if ([responseObject[@"code"] integerValue] == 1000) {
self.user.customerHead = responseObject[@"data"][@"headPic"];
[self.user update];
dispatch_async(dispatch_get_main_queue(), ^{
self.iconImageView.image =image;
});
if ([responseObject[@"code"] integerValue] == 1000) {
self.user.customerHead = responseObject[@"data"][@"headPic"];
[self.user update];
}
dispatch_async(dispatch_get_main_queue(), ^{
self.completed();
[self.navigationController popViewControllerAnimated:YES];
});
} else {
dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool showText:responseObject[@"msg"]];
});
}
dispatch_async(dispatch_get_main_queue(), ^{
self.completed();
[self.navigationController popViewControllerAnimated:YES];
});
NSLog(@"onSuccess: %@", responseObject);
} onFailure:^(NSError *error) {
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool showText:error.userInfo[@"NSLocalizedDescription"]];
});
} onFinished:^(id responseObject, NSError *error) {
NSLog(@"onFinished");
}];
}
#pragma mark - ========== 上传头像 ==========
......
//
//
......@@ -123,7 +123,7 @@ kSINGLETON_FOR_CLASS(APIManager)
[userDefaults setObject:@"http://shower-app-server.dcrym.com" forKey:@"BATH"];
[userDefaults setObject:@"http://shower-app-server.dcrym.com" forKey:@"AppointBATH"];
[userDefaults setObject:@"http://ex-test-dcxy-home-app.168cad.top" forKey:@"HomePage"];
[userDefaults setObject:@"http://dcxy-home-app.dcrym.com" forKey:@"HomePage"];
[userDefaults synchronize];
break;
}
......
//
//
......@@ -247,9 +247,10 @@
[button setImage:[UIImage imageNamed:normal] forState:UIControlStateNormal];
[button setImage:[UIImage imageNamed:select] forState:UIControlStateDisabled];
[button setTitle:title forState:UIControlStateNormal];
[button setTitleColor:[[UIColor darkTextColor] colorWithAlphaComponent:0.4] forState:UIControlStateNormal];
[button setTitle:@"●" forState:UIControlStateDisabled];
[button setTitleColor:[UIColor colorWithHexString:@"999999"] forState:UIControlStateNormal];
button.layoutStyle = style;
[button setTitleColor:[UIColor colorWithHexString:@"#8c95fa"] forState:UIControlStateDisabled];
[button setTitleColor:RGB(255, 165, 80) forState:UIControlStateDisabled];
button.titleLabel.font = kFontSize(12 * k6Scale);
button.midSpacing = 2;
return button;
......
//
//
......@@ -476,7 +476,7 @@
[btn setTitleColor:[UIColor colorWithHexString:@"#333333"] forState:UIControlStateNormal];
[self addSubview:btn];
//[btn sd_setImageWithURL:[NSURL URLWithString:[common.itemImgs componentsSeparatedByString:@","].firstObject] forState:UIControlStateNormal placeholderImage:[UIImage imageNamed:@"home_quanyuan_def_pic"]];
[btn setImage:[UIImage imageNamed:@"home_quanyuan_def_pic"] forState:UIControlStateNormal];
[btn setImage:[UIImage imageNamed:common[@"image"]] forState:UIControlStateNormal];
objc_setAssociatedObject(btn, @selector(delegate), common, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
[btn addTarget:self action:@selector(touchMeItem:) forControlEvents:UIControlEventTouchUpInside];
[btn setTitle:common[@"title"] forState:UIControlStateNormal];
......
//
//
......@@ -25,11 +25,11 @@
[navBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
CGSize size = CGSizeMake(kWidth, kTopHeight);
// //设置颜色数组
//UIColor *leftColor = kRGB(171, 178, 247);
//UIColor *rightColor = kRGB(144, 152, 247);
UIColor *leftColor = kRGB(171, 178, 247);
UIColor *rightColor = kRGB(144, 152, 247);
UIColor *leftColor = [UIColor colorWithHexString:@"#ff8809"];
UIColor *rightColor = [UIColor colorWithHexString:@"#fe5b0b"];
// UIColor *leftColor = [UIColor colorWithHexString:@"#ff8809"];
// UIColor *rightColor = [UIColor colorWithHexString:@"#fe5b0b"];
//设置颜色
NSArray * colors = @[leftColor, rightColor];
......
//
//
......@@ -117,7 +117,7 @@
[super viewWillAppear:animated];
self.tabBarController.tabBar.hidden = YES;
self.navigationController.navigationBar.hidden = NO;
// self.navigationController.navigationBar.translucent = NO;
[UIApplication sharedApplication].statusBarHidden = NO;
}
-(void)webView:(WKWebView *)webView didFailNavigation:(WKNavigation *)navigation withError:(NSError *)error {
......
//
//
......@@ -88,12 +88,10 @@
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:NO];
// self.navigationController.navigationBar.translucent = NO;
self.navigationController.navigationBar.hidden = NO;
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
// self.navigationController.navigationBar.translucent = YES;
if (self.backBlock) {
self.backBlock();
}
......
//
//
......@@ -143,8 +143,7 @@
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
if (self.isFromSimple) {
// self.navigationController.navigationBar.hidden = YES;
// self.navigationController.navigationBar.translucent = NO;
} else {
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:NO];
......
//
//
......@@ -267,8 +267,8 @@
- (void)payWithData:(payModelItem*)payItem AliData:(NSString *)aliData{
if ([self.payType isEqualToString:@"2"]) {
// 微信支付
[WXApi registerApp:payItem.appid];
if (![WXApi isWXAppInstalled]) {
// 未安装微信
......
//
//
......@@ -149,7 +149,7 @@
self.tableView.dataSource=self;
self.tableView.tableFooterView=[UIView new];
kViewRadius(self.iconImageView, 40);
[self settingUserIcon];
self.nameLabel.text=self.userCenterItem.username;
self.countLabel.text=self.userCenterItem.account;
......
//
//
......@@ -83,7 +83,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
[self loadData];
kViewRadius(self.iconImageView, 40);
_allDataArray = [[NSArray alloc]init];
self.naConstant.constant = kStatusBarHeight + 6;
......
//
//
......@@ -176,11 +176,6 @@
- (IBAction)forgetPassword:(id)sender {
forgetPasswordViewController * VC=[forgetPasswordViewController new];
@weakify(self);
VC.backBlock = ^{
@strongify(self);
// self.navigationController.navigationBar.translucent = NO;
};
[self.navigationController pushViewController:VC animated:YES];
}
- (IBAction)sureBtnClick:(id)sender {
......@@ -241,11 +236,11 @@
[ZXTool checkCurrentUserModeCompleted:^(BOOL isOld) {
if (isOld) {
dispatch_async(dispatch_get_main_queue(), ^{
[_changeDevicePwdModel changeDevicePasswordWithOldPassword:_currentPassword.text newPassword:str];
[self.changeDevicePwdModel changeDevicePasswordWithOldPassword:self.currentPassword.text newPassword:str];
});
} else {
dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool requestDataWithType:kXMHTTPMethodPOST url:[NSString stringWithFormat:@"%@/app/customer/hardware/pwd", [kUserDefaults valueForKey:@"NEW_PAY"]] para:@{@"customerId": CacheUserId,@"oldPassword": _currentPassword.text,@"password":self.seconBlockTextFeild1.text} completed:^(CommonModel *common, NSString *error) {
[ZXTool requestDataWithType:kXMHTTPMethodPOST url:[NSString stringWithFormat:@"%@/app/customer/hardware/pwd", [kUserDefaults valueForKey:@"NEW_PAY"]] para:@{@"customerId": CacheUserId,@"oldPassword": self.currentPassword.text,@"password":self.seconBlockTextFeild1.text} completed:^(CommonModel *common, NSString *error) {
dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool hideLoadingAnimation];
if (error) {
......@@ -259,8 +254,6 @@
});
}
}];
}else{
//去掉首尾字符串空格;
NSString * str1= [_seconBlockTextFeild1.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
......
//
//
......@@ -558,7 +558,7 @@ typedef void(^isCanChange)(BOOL iCan);
self.navigationController.navigationBar.hidden = NO;
}
#pragma mark - ========== 单独加载是否开启密支付 ==========
#pragma mark - ========== 单独加载是否开启密支付 ==========
- (void) loadIsOpenFreePay {
[ZXTool requestDataWithType:kXMHTTPMethodGET url:[NSString stringWithFormat:@"%@/app/customer/balance/state?customerId=%@", [kUserDefaults valueForKey:@"NEW_PAY"],CacheUserId] para:nil completed:^(CommonModel *common, NSString *error) {
dispatch_async(dispatch_get_main_queue(), ^{
......
//
//
......@@ -816,18 +816,29 @@ static NSInteger seq = 0;
if (isOld) {
dispatch_async(dispatch_get_global_queue(0, 0), ^{
if ([CacherechargeStatus isEqualToString:@"0"]) {
[self.firstTopupModel JudgeFirstTopUp];
GetData * data=[GetData shareData];
[data JudgeFirstTopUpSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
NSDictionary * dic=responseObject;
if ([dic[@"code"] isEqualToString:@"0"]) {
dispatch_async(dispatch_get_main_queue(), ^{
[self showFirstRechargeAlertByMsg:dic[@"data"][@"rechargeNotice"]];
});
}
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
}];
}
});
} else {
if ([CacherechargeStatus isEqualToString:@"1"]) {
return ;
}
[ZXTool requestDataHideLoadingToastWithType:kXMHTTPMethodGET url:[NSString stringWithFormat:@"%@/dcxy/api/paymentAndActiveConf/getFirstRechargeConfContent?areaId=%@", [kUserDefaults objectForKey:@"SX_MONEY"], CacheCampusId] para:nil completed:^(CommonModel *common, NSString *error) {
@strongify(self);
if (error == nil) {
[self showFirstRechargeAlertByMsg:common.data];
}
dispatch_async(dispatch_get_main_queue(), ^{
if (error == nil) {
[self showFirstRechargeAlertByMsg:common.data];
}
});
}];
}
}];
......
//
//
......@@ -113,7 +113,7 @@
self.tabBarController.tabBar.hidden = YES;
self.navigationController.navigationBar.hidden = YES;
self.navigationController.navigationBar.hidden = NO;
// self.navigationController.navigationBar.translucent = NO;
self.webView.scrollView.decelerationRate = UIScrollViewDecelerationRateNormal;
if (@available(iOS 11.0, *)) {
self.webView.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
......@@ -276,7 +276,7 @@
[super viewWillDisappear:animated];
self.navigationController.navigationBar.hidden = NO;
self.tabBarController.tabBar.hidden = NO;
// self.navigationController.navigationBar.translucent = YES;
NSLog(@"已经清理所有的绑定");
for (NSString *str in self.indentifierList) {
[self.webView.configuration.userContentController removeScriptMessageHandlerForName:str];
......
//
//
......@@ -51,9 +51,8 @@
/// 准备导航栏
- (void)prepareNavigationBar {
// 1> 背景颜色
[self.navigationController.navigationBar setBarTintColor:[UIColor colorWithWhite:0.1 alpha:1.0]];
// self.navigationController.navigationBar.translucent = YES;
self.navigationController.navigationBar.shadowImage = [[UIImage alloc] init];
// [self.navigationController.navigationBar setBarTintColor:[UIColor colorWithWhite:0.1 alpha:1.0]];
// self.navigationController.navigationBar.shadowImage = [[UIImage alloc] init];
// 2> 标题
self.title = @"我的名片";
......
//
//
......@@ -122,37 +122,17 @@
}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
// 屏幕最亮
// AppDelegate *appDelegate=(AppDelegate *)[UIApplication sharedApplication].delegate;
// appDelegate.currentVC=NSStringFromClass([self class]);
NSString *defaultBright = [NSString stringWithFormat:@"%f", [UIScreen mainScreen].brightness];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setObject:defaultBright forKey:@"defaultBright"];
[defaults setObject:@"1" forKey:@"isOnH5UsePage"];
[defaults synchronize];
[[UIScreen mainScreen] setBrightness:1];
CGFloat currentLight = [[UIScreen mainScreen] brightness];
[kUserDefaults setObject:@(currentLight) forKey:@"brightness"];
[[UIScreen mainScreen] setBrightness:1];//点亮
[kUserDefaults setObject:@"yes" forKey:@"isNeedLight"];
}
-(void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
// 屏幕亮度默认
CGFloat defaultBright = [[[NSUserDefaults standardUserDefaults] objectForKey:@"defaultBright"] floatValue];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setObject:@"0" forKey:@"isOnH5UsePage"];
if (defaultBright)
{
[[UIScreen mainScreen] setBrightness:defaultBright];
}
else
{
[[UIScreen mainScreen] setBrightness:0.5];
}
[[UIScreen mainScreen] setBrightness:[[kUserDefaults objectForKey:@"brightness"] floatValue]];//恢复
[kUserDefaults setObject:@"no" forKey:@"isNeedLight"];
}
- (void)didReceiveMemoryWarning {
......
//
//
......@@ -35,6 +35,19 @@
[self setInfo];
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
[[UIScreen mainScreen] setBrightness:[[kUserDefaults objectForKey:@"brightness"] floatValue]];//恢复
[kUserDefaults setObject:@"no" forKey:@"isNeedLight"];
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
CGFloat currentLight = [[UIScreen mainScreen] brightness];
[kUserDefaults setObject:@(currentLight) forKey:@"brightness"];
[[UIScreen mainScreen] setBrightness:1];//点亮
[kUserDefaults setObject:@"yes" forKey:@"isNeedLight"];
}
-(void)setInfo
{
_label5.text = [NSString stringWithFormat:@"购买时间:%@", self.ticketItem.addtime];
......
//
//
......@@ -117,7 +117,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
// self.navigationController.navigationBar.translucent = NO;
[self loadData];
[self addGestureForTopView];
self.fetchTicketDeviceModel =[FetchTicketAndDevice new];
......
//
//
......@@ -1206,39 +1206,39 @@ void ProviderReleaseData (void *info, const void *data, size_t size){
+(void) firstPageRefreshAddNotPayView:(UIView *) v {
//暂时注释掉
if ([ZXPayManager sharedZXPayManager].notPayOrderView == nil) {
UIView *notPayView;
CGFloat bottomMargin = 49;
if (iPhoneX) {
bottomMargin = 83;
}
notPayView = [[UIView alloc] init];
notPayView.backgroundColor = [UIColor whiteColor];
[v addSubview:notPayView];
[notPayView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(v);
make.height.mas_equalTo(0 * k6Scale);
make.bottom.equalTo(v.mas_bottom).offset(-bottomMargin);
}];
[ZXPayManager sharedZXPayManager].notPayOrderView = notPayView;
[self createNotPayOrderView:notPayView];//创建广告view
}
if ([ZXNotPay findByCriteria:[NSString stringWithFormat:@"where userId = '%@'", CacheUserId]].count) {
ZXNotPay *m = [ZXNotPay findByCriteria:[NSString stringWithFormat:@"where userId = '%@'", CacheUserId]].lastObject;
[ZXPayManager sharedZXPayManager].orderId = m.orderId;
if ([ZXPayManager sharedZXPayManager].notPayOrderView.subviews.count) {
dispatch_async(dispatch_get_main_queue(), ^{
[[ZXPayManager sharedZXPayManager].notPayOrderView mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(50);
}];
});
} else {
[self createNotPayOrderView:[ZXPayManager sharedZXPayManager].notPayOrderView];
}
} else {
[self createNotPayOrderView:[ZXPayManager sharedZXPayManager].notPayOrderView];
}
// if ([ZXPayManager sharedZXPayManager].notPayOrderView == nil) {
// UIView *notPayView;
// CGFloat bottomMargin = 49;
// if (iPhoneX) {
// bottomMargin = 83;
// }
// notPayView = [[UIView alloc] init];
// notPayView.backgroundColor = [UIColor whiteColor];
// [v addSubview:notPayView];
// [notPayView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.left.right.equalTo(v);
// make.height.mas_equalTo(0 * k6Scale);
// make.bottom.equalTo(v.mas_bottom).offset(-bottomMargin);
// }];
// [ZXPayManager sharedZXPayManager].notPayOrderView = notPayView;
// [self createNotPayOrderView:notPayView];//创建广告view
// }
// if ([ZXNotPay findByCriteria:[NSString stringWithFormat:@"where userId = '%@'", CacheUserId]].count) {
// ZXNotPay *m = [ZXNotPay findByCriteria:[NSString stringWithFormat:@"where userId = '%@'", CacheUserId]].lastObject;
// [ZXPayManager sharedZXPayManager].orderId = m.orderId;
// if ([ZXPayManager sharedZXPayManager].notPayOrderView.subviews.count) {
// dispatch_async(dispatch_get_main_queue(), ^{
// [[ZXPayManager sharedZXPayManager].notPayOrderView mas_updateConstraints:^(MASConstraintMaker *make) {
// make.height.mas_equalTo(50);
// }];
// });
//
// } else {
// [self createNotPayOrderView:[ZXPayManager sharedZXPayManager].notPayOrderView];
// }
// } else {
// [self createNotPayOrderView:[ZXPayManager sharedZXPayManager].notPayOrderView];
// }
}
......
//
//
......@@ -183,8 +183,7 @@
if (self.cancelButtonWidth == 0) { // Just adapt iOS 11.2
[self viewDidLayoutSubviews];
}
// self.navigationController.navigationBar.translucent = NO;
// Adjust the view according to the `navigationBar.translucent`
if (NO == self.navigationController.navigationBar.translucent) {
self.baseSearchTableView.contentInset = UIEdgeInsetsMake(0, 0, self.view.py_y, 0);
self.searchSuggestionVC.view.frame = CGRectMake(0, CGRectGetMaxY(self.navigationController.navigationBar.frame) - self.view.py_y, self.view.py_width, self.view.py_height + self.view.py_y);
......@@ -197,7 +196,6 @@
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
// self.navigationController.navigationBar.translucent = NO;
[self.searchBar resignFirstResponder];
}
......
//
//
......@@ -33,7 +33,7 @@
// _markVC.title = @"书签";
self.viewControllers = @[_catalogueVC];
// self.tabBar.translucent = NO;
[self.tabBar setBarTintColor:READ_BACKGROUND_COLOC];
for (UITabBarItem *item in self.tabBar.items) {
[item setTitlePositionAdjustment:UIOffsetMake(0, -13)];
......
//
//
......@@ -116,15 +116,18 @@
[confirmBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
confirmBtn.titleLabel.font = [UIFont systemFontOfSize:17.0];
[confirmBtn addTarget:self action:@selector(confirmBtnFuc) forControlEvents:UIControlEventTouchUpInside];
[confirmBtn addTarget:self action:@selector(confirmBtnFuc:) forControlEvents:UIControlEventTouchUpInside];
confirmBtn.layer.cornerRadius = 4.0;
[footerView addSubview:confirmBtn];
self.myTableView.tableFooterView = footerView;
}
#pragma mark - ========== 确定支付事件 ==========
- (void) confirmBtnFuc {
- (void) confirmBtnFuc:(UIButton *) sender {
sender.enabled = NO;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
sender.enabled = YES;
});
int callType = 1;
BOOL isCanOpenYWT = [kApplication canOpenURL:[NSURL URLWithString:@"cmbmobilebank://"]];
if ([self.payType.payType isEqualToString:@"5"] && !isCanOpenYWT) {
......
//
//
......@@ -176,9 +176,11 @@
self.deviceAddressLabel.font = kFontSize(14 * k6Scale);
[self.deviceAddressLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.contentView.mas_right).offset(-16 * k6Scale);
make.left.equalTo(label7.mas_right).offset(10 * k6Scale);
make.centerY.equalTo(label7);
}];
[label7 setContentCompressionResistancePriority:UILayoutPriorityRequired
forAxis:UILayoutConstraintAxisHorizontal];
UIImageView *line = [[UIImageView alloc] init];
[self.contentView addSubview:line];
......
//
//
......@@ -172,8 +172,11 @@
self.deviceAddressLabel.font = kFontSize(14 * k6Scale);
[self.deviceAddressLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.contentView.mas_right).offset(-16 * k6Scale);
make.left.equalTo(label7.mas_right).offset(10 * k6Scale);
make.centerY.equalTo(label7);
}];
[label7 setContentCompressionResistancePriority:UILayoutPriorityRequired
forAxis:UILayoutConstraintAxisHorizontal];
UIView *bottomView = [[UIView alloc] init];
[self.contentView addSubview:bottomView];
bottomView.backgroundColor = [UIColor whiteColor];
......
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_dingdan.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_dingdan@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_dingdan@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_duocai.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_duocai@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_duocai@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_fankui.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_fankui@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_fankui@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_setting.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_setting@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_setting@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_wode_boy.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_wode_boy@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_wode_boy@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_wode_girl.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_wode_girl@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_wode_girl@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_xiaoyuanka.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_xiaoyuanka@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_xiaoyuanka@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
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