This commit is contained in:
lianxiang
2018-09-26 00:33:06 +08:00
parent 69522b22fc
commit d0230f55ed
68 changed files with 1599 additions and 209 deletions
+10 -7
View File
@@ -39,7 +39,7 @@
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ns1-dj-ePW">
<rect key="frame" x="68.5" y="313" width="238" height="88"/>
<rect key="frame" x="68.5" y="289" width="238" height="88"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="客服热线: 400-0000-000" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fQZ-vC-DAg">
<rect key="frame" x="44" y="25" width="151" height="17"/>
@@ -64,7 +64,10 @@
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="当前版本: v 1.0" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="O00-AN-ESn">
<rect key="frame" x="142.5" y="405" width="90" height="17"/>
<rect key="frame" x="142.5" y="382" width="90" height="28"/>
<constraints>
<constraint firstAttribute="height" constant="28" id="6TJ-hh-QMB"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="12"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
@@ -76,7 +79,7 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="CopyRight @ 极迦生物 2018 - 2020" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uqu-At-cU5">
<rect key="frame" x="103.5" y="640" width="168" height="14"/>
<rect key="frame" x="103.5" y="628" width="168" height="14"/>
<fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="10"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
@@ -94,14 +97,14 @@
<constraint firstItem="CaV-Vg-83Z" firstAttribute="top" secondItem="KQS-5b-EYm" secondAttribute="bottom" constant="8" id="0Ca-ma-0Xq"/>
<constraint firstItem="aZZ-3P-qGO" firstAttribute="top" secondItem="uWt-SH-yKP" secondAttribute="top" constant="599" id="4aq-UH-aog"/>
<constraint firstItem="KQS-5b-EYm" firstAttribute="centerX" secondItem="uWt-SH-yKP" secondAttribute="centerX" id="743-r4-R1X"/>
<constraint firstAttribute="bottom" secondItem="uqu-At-cU5" secondAttribute="bottom" constant="31" id="F3V-4E-z1P"/>
<constraint firstItem="O00-AN-ESn" firstAttribute="top" secondItem="ns1-dj-ePW" secondAttribute="bottom" constant="4" id="VBQ-rU-lZq"/>
<constraint firstAttribute="bottom" secondItem="uqu-At-cU5" secondAttribute="bottom" constant="12" id="F3V-4E-z1P"/>
<constraint firstItem="O00-AN-ESn" firstAttribute="top" secondItem="ns1-dj-ePW" secondAttribute="bottom" constant="5" id="VBQ-rU-lZq"/>
<constraint firstItem="ns1-dj-ePW" firstAttribute="centerX" secondItem="uWt-SH-yKP" secondAttribute="centerX" id="Vgi-dq-8gh"/>
<constraint firstItem="YGv-MC-rGM" firstAttribute="top" secondItem="uWt-SH-yKP" secondAttribute="top" constant="60" id="WYS-WQ-DAP"/>
<constraint firstItem="O00-AN-ESn" firstAttribute="centerX" secondItem="uWt-SH-yKP" secondAttribute="centerX" id="bbr-sV-JYk"/>
<constraint firstItem="uqu-At-cU5" firstAttribute="top" secondItem="aZZ-3P-qGO" secondAttribute="bottom" constant="24" id="bn8-GO-D8j"/>
<constraint firstItem="uqu-At-cU5" firstAttribute="top" secondItem="aZZ-3P-qGO" secondAttribute="bottom" constant="12" id="bn8-GO-D8j"/>
<constraint firstAttribute="trailing" secondItem="uqu-At-cU5" secondAttribute="trailing" constant="104" id="f5C-j2-JuY"/>
<constraint firstItem="ns1-dj-ePW" firstAttribute="top" secondItem="CaV-Vg-83Z" secondAttribute="bottom" constant="91" id="guj-Ca-B2n"/>
<constraint firstItem="ns1-dj-ePW" firstAttribute="top" secondItem="CaV-Vg-83Z" secondAttribute="bottom" constant="67" id="guj-Ca-B2n"/>
<constraint firstItem="YGv-MC-rGM" firstAttribute="centerX" secondItem="uWt-SH-yKP" secondAttribute="centerX" id="nXD-1v-Onf"/>
<constraint firstItem="aZZ-3P-qGO" firstAttribute="centerX" secondItem="uWt-SH-yKP" secondAttribute="centerX" id="o8Y-VR-Tgb"/>
<constraint firstItem="KQS-5b-EYm" firstAttribute="top" secondItem="YGv-MC-rGM" secondAttribute="bottom" constant="22" id="u8C-WB-j66"/>
+14 -10
View File
@@ -8,6 +8,9 @@
#import "GIGaChangePassVC.h"
#import "GiGaBaseAPiRequest.h"
#import "GiGaNetManager.h"
#import "GiGaServerConfig.h"
#import "GiGaAPIResult.h"
@interface GIGaChangePassVC ()
@@ -79,22 +82,23 @@
@"newPassword":self.xinPassFiled.text,
@"newPasswordConfirm":self.reNewPassFiled.text
};
GiGaBaseAPiRequest *requst = [GiGaBaseAPiRequest initWithRequestPath:kPAiUSerEditpwd method:RequestPostMethod parms:params];
[requst requstDataWithResult:^(GiGaAPIResult *result) {
NSString *url = [NSString stringWithFormat:@"%@%@",[GiGaServerConfig getMainUrl],kPAiUSerEditpwd];
[GiGaNetManager userbodyRequest:url params:params completionHandler:^(NSURLResponse *response, NSDictionary *resDic, NSError * _Nullable error) {
GiGaAPIResult *reult = [[GiGaAPIResult alloc] initWithDictionary:resDic];
[self.view hideToastActivity];
btn.userInteractionEnabled = YES;
if (result.success) {
GIGA_WIndowTost(result.message);
if (reult.success) {
GIGA_WIndowTost(reult.message);
[self.navigationController popViewControllerAnimated:YES];
}else{
if (result.code == 401) {
//token失效
[GiGaBaseAPiRequest userTokenTimeOutGologinFromVC:self];
}
GIGA_WIndowTost(result.message);
if (reult.code == 401) {
//token失效
[GiGaBaseAPiRequest userTokenTimeOutGologinFromVC:self];
}
GIGA_WIndowTost(reult.message);
}
}];
}
@@ -9,7 +9,7 @@
#import "GiGaChangePhoneNumberVC.h"
#import "GIGaUserChangeMobleCell.h"
#import "GiGaBaseAPiRequest.h"
#import "NSTimer+Convenience.h"
//typedef NS_ENUM(NSInteger,PohoneCodeType)
//{
// PohoneCodeTypeOld = 0,//原手机号
@@ -23,6 +23,9 @@
@property(nonatomic) BOOL nextSteep;
@property(nonatomic,copy) NSString *oldCode;
@property(nonatomic,copy) NSString *xinCode;
@property(nonatomic,strong) NSTimer*timer;
@property(nonatomic) NSInteger time;
@property(nonatomic,strong) UIButton *codeBtn;
@end
@implementation GiGaChangePhoneNumberVC
@@ -31,6 +34,7 @@
[super viewDidLoad];
[self addNavTitile:@"修改手机号"];
_nextSteep = NO;
_time = 60;
// Do any additional setup after loading the view from its nib.
[self.view addSubview:self.tableView];
self.tableView.delegate = self;
@@ -63,8 +67,11 @@
}
[cell.codeSendBtn addTarget:self action:@selector(sendCodeBtnAction:) forControlEvents:UIControlEventTouchUpInside];
self.codeBtn = cell.codeSendBtn;
if (_nextSteep) {
cell.numberTexFiled.userInteractionEnabled = YES;
cell.numberTexFiled.text = @"";
cell.numberTexFiled.placeholder = @"请输入新手机号";
cell.oldBtn.backgroundColor = GIGARGB(227, 227, 227, 1);
NSAttributedString *atti1 = [GiGaHelper stringWithText:@"1.验证原号码" textColor:GIGARGB(165,165, 165, 1) textFont:GIGA_TEXTFONTMEDIUM(13) leterSpace:0];
@@ -78,6 +85,10 @@
}else{
GiGaUser *user = [[GiGaUserManager shareUser] getCurrentUser];
if (user.mobileMask) {
cell.numberTexFiled.text = user.mobileMask;
}
cell.numberTexFiled.userInteractionEnabled = NO;
}
@@ -117,6 +128,7 @@
NSAttributedString *attrititle = [GiGaHelper stringWithText:@"完成" textColor:[UIColor whiteColor] textFont:GIGA_TEXTFONTBOLD(16) leterSpace:0];
[nextBtn setAttributedTitle:attrititle forState:UIControlStateNormal];
}
[view addSubview:nextBtn];
UILabel *tishiLab = [[UILabel alloc] init];
@@ -212,6 +224,8 @@
#pragma mark - 发送验证码
-(void)sendCodeBtnAction:(UIButton *)btn{
if (_nextSteep) {
GIGaUserChangeMobleCell *cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
@@ -219,7 +233,9 @@
GIGA_ShowToast(@"请输新手机号");
return;
}
btn.userInteractionEnabled = NO;
[self startTimer:btn];
self.xinCode = cell.codeTexFiled.text;
[self sendCodeWith:cell.numberTexFiled.text];
@@ -230,11 +246,32 @@
GILog(@"手机号为空");
return;
}
btn.userInteractionEnabled = NO;
[self startTimer:btn];
[self sendCodeWith:user.mobile];
}
}
//计时
-(void)startTimer:(UIButton *)btn{
if (_time>0) {
_timer = [NSTimer scheduledTimerWithTimeInterval:1 count:60 callback:^{
NSString *timeStr=[NSString stringWithFormat:@"%lds",(long)self->_time];
[btn setTitle:timeStr forState:UIControlStateNormal];
self->_time--;
if (self->_time==0) {
[self codeBtnStateNormal];
}
}];
[[NSRunLoop currentRunLoop] addTimer:self.timer forMode:NSRunLoopCommonModes];
}
}
-(void)sendCodeWith:(NSString *)phone{
NSString *utl = nil;
if (_nextSteep) {
@@ -244,14 +281,27 @@
}
GiGaBaseAPiRequest *api = [GiGaBaseAPiRequest initWithRequestPath:utl method:RequestPostMethod parms:@{@"mobile":phone}];
[api requstDataWithResult:^(GiGaAPIResult *result) {
if (result.success) {
GIGA_ShowToast(@"已发送");
}else{
[self codeBtnStateNormal];
GIGA_ShowToast(result.message);
}
}];
}
-(void)codeBtnStateNormal{
NSAttributedString *att = [GiGaHelper stringWithText:@"发送验证码" textColor:[UIColor whiteColor] textFont:GIGA_TEXTFONTBOLD(10) leterSpace:0];
[self.codeBtn setAttributedTitle:att forState:UIControlStateNormal];
self.time =60;
self.codeBtn.userInteractionEnabled = YES;
}
#pragma mark - 验证手机验证码
-(void)verifyPhoneCode:(NSString *)phonenumber code:(NSString *)code btn:(UIButton *)btn
{
@@ -261,7 +311,9 @@
[api requstDataWithResult:^(GiGaAPIResult *result) {
if (result.success) {
if (self.nextSteep) {
//验证码通过 完成
[self finishBtn:btn wtihNewPhone:phonenumber];
@@ -270,6 +322,7 @@
[self.view hideToastActivity];
self.nextSteep = YES;
self.oldCode = code;
[self codeBtnStateNormal];
[self.tableView reloadData];
}
@@ -281,7 +334,10 @@
}];
}
-(void)dealloc{
[self.timer invalidate];
self.timer = nil;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
@@ -20,6 +20,8 @@
@interface GiGaFeedBackViewController ()
@property(nonatomic,strong) NSMutableArray *imagesUrl;
@property(nonatomic,copy) NSString *kinCode;
@property(nonatomic,strong) UIButton *tijiaoBtn;
@end
@@ -29,6 +31,7 @@
[super viewDidLoad];
[self addNavTitile:@"意见反馈"];
_imagesUrl = [NSMutableArray new];
self.kinCode = @"1";
[self.view addSubview:self.tableView];
self.tableView.delegate = self;
self.tableView.dataSource = self;
@@ -50,9 +53,10 @@
btn.frame = CGRectMake((self.view.frame.size.width - 245) /2 , 20, 245,40);
btn.backgroundColor = [UIColor whiteColor];
NSAttributedString *atti = [GiGaHelper stringWithText:@"提交" textColor:GIGA_MAIN_BGCOLOR textFont:GIGA_TEXTFONTBOLD(18) leterSpace:0];
[btn addTarget:self action:@selector(tijiaoAction) forControlEvents:UIControlEventTouchUpInside];
[btn addTarget:self action:@selector(tijiaoAction:) forControlEvents:UIControlEventTouchUpInside];
[btn setAttributedTitle:atti forState:UIControlStateNormal];
[footer addSubview:btn];
self.tijiaoBtn = btn;
self.tableView.tableFooterView = footer;
@@ -93,13 +97,12 @@
__weak typeof(cell) weakCell = cell;
cell.pickerBalock = ^{
[[SJPhotoPicker shareSJPhotoPicker] showPhotoPickerToController:self pickedAssets:^(NSArray<PHAsset *> *assets) {
// 添加按钮6张以上被遮挡可不写
// if ((weakCell.images.count + assets.count) > 6) {
// GIGA_ShowToast(@"最多六张");
// return ;
// }
if ((weakCell.images.count + assets.count) > 6) {
GIGA_ShowToast(@"最多六张");
return ;
}
[weakCell.images addObjectsFromArray:assets];
//weakSelf.images = [NSMutableArray arrayWithArray:assets];
[weakCell.collectionView reloadData];
}];
@@ -115,9 +118,11 @@
if (indexPath.section == 0) {
GiGaFeedBackKindView *piker = [GiGaFeedBackKindView showAt:self atRow:0];
piker.selectedItemBlock = ^(NSString *tile) {
GiGaFeedLeiIingViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
cell.kidLabel.text = tile;
piker.selectedItemBlock = ^(GIGaFeedKind *kind) {
GiGaFeedLeiIingViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
cell.kidLabel.text = kind.dictLabel;
self.kinCode = kind.dictCode;
};
}
@@ -166,7 +171,7 @@
#pragma mark 提交
-(void)tijiaoAction{
-(void)tijiaoAction:(UIButton *)btn{
@@ -190,19 +195,27 @@
NSDictionary *dic =nil;
NSString *qqcom = qqcell.QTextFiled.text;
if (!qqcom) {
dic = @{@"type":kindcell.kidLabel.text,@"content":contencell.contentFiled.text};
}else{
dic = @{@"type":kindcell.kidLabel.text,@"content":contencell.contentFiled.text,@"contact":qqcom
};
qqcom = @"contact";
}
[self.imagesUrl removeAllObjects];
[self uploadImags:dic];
dic = @{@"type":self.kinCode,@"content":contencell.contentFiled.text,@"contact":qqcom
};
//图片非必选
if (self.imagesUrl.count <= 0) {
//未选择图片 设置空数组
[self uploadFeedinfo:dic imgUrlList:self.imagesUrl];
}else{
////获取图片链接
[self uploadImags:dic];
}
}
//先上传图片获取到 imageurls 再 提交内容信息
}
//先上传图片获取到 imageurls 再 提交内容信息
-(void)uploadImags:(NSDictionary *)params{
[self.imagesUrl removeAllObjects];
GIGaFeedPhontosViewCell *cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:3]];
NSArray *names =cell.imageNames;
@@ -233,15 +246,14 @@
});
}
}
// 单张上传
-(void)uploadImage:(NSData *)imageData name:(NSString *)name info:(NSDictionary *)info totalCount:(NSInteger)count{
[self.view makeToastActivity:CSToastPositionCenter];
self.tijiaoBtn.userInteractionEnabled = NO;
NSString *url = [NSString stringWithFormat:@"%@%@",[GiGaServerConfig getMainUrl],kUploadFeed];
[GiGaNetManager uploadImage:url imgData:imageData parms:@{@"file":@"file"} responseBlock:^(NSDictionary *responseDict, NSDictionary *responseHeaderFields, NSError *error) {
[self.view hideToastActivity];
@@ -251,7 +263,8 @@
NSString *url = responseDict[@"url"];
if (url) {
[self.imagesUrl addObject:url];
NSDictionary *dic = [NSDictionary dictionaryWithObject:url forKey:@"imgUrl"];
[self.imagesUrl addObject:dic];
NSLog(@"上船图片%@成功",name);
NSLog(@"当前获取图片数组:%@",self.imagesUrl);
if (self.imagesUrl.count == count) {
@@ -260,25 +273,29 @@
}
}else if (result.code == 401){
self.tijiaoBtn.userInteractionEnabled = YES;
GIGA_WIndowTost(@"登录超时,请重新登录");
[GiGaBaseAPiRequest userTokenTimeOutGologinFromVC:self];
}else{
GIGA_ShowToast(result.message);
self.tijiaoBtn.userInteractionEnabled = YES;
}
}];
}
//body 传参数
//body 传参数
-(void)uploadFeedinfo:(NSDictionary*)params imgUrlList:(NSArray *)urlArr{
NSMutableDictionary *finallyparam = [NSMutableDictionary dictionaryWithDictionary:params];
[finallyparam setObject:urlArr forKey:@"imgUrlList"];
NSLog(@"finallyparam%@",finallyparam);
[self.view makeToastActivity:CSToastPositionCenter];
NSString *url = [NSString stringWithFormat:@"%@%@",[GiGaServerConfig getMainUrl],kAPiUpLoadFeeeds];
[GiGaNetManager userbodyRequest:url params:finallyparam completionHandler:^(NSURLResponse *response, NSDictionary *resDic, NSError * _Nullable error) {
self.tijiaoBtn.userInteractionEnabled = YES;
[self.view hideToastActivity];
if (error) {
GILog(@"err:%@",error.localizedDescription);
@@ -289,7 +306,10 @@
GiGaAPIResult *result = [[GiGaAPIResult alloc] initWithDictionary:resDic];
if (result.success) {
GIGA_ShowToast(@"🙏感谢提出宝贵意见!🙏");
GIGA_WIndowTost(@"感谢提出宝贵意见!");
[self.navigationController popViewControllerAnimated:YES];
}else if (result.code == 401){
GIGA_WIndowTost(@"登录超时,请重新登录");
[GiGaBaseAPiRequest userTokenTimeOutGologinFromVC:self];
@@ -326,6 +346,7 @@
// }
// }];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
@@ -18,6 +18,7 @@
#import "UIImageView+WebCache.h"
#import "GiGaUserInfoVC.h"
#import "GIGaMaskTimeUseRecordVC.h"
#import "MaskTestResultVC.h"
@interface GiGaMeViewController ()
@property (nonatomic,strong) GiGaUser *user;
@@ -152,9 +153,11 @@
[self.navigationController pushViewController:historyVC animated:YES];
}else if (indexPath.section == 1 && indexPath.row == 1){
//使用记录
GIGaMaskTimeUseRecordVC *historyVC= [[GIGaMaskTimeUseRecordVC alloc] init];
[self.navigationController pushViewController:historyVC animated:YES];
//历史测试
// GIGaMaskTimeUseRecordVC *historyVC= [[GIGaMaskTimeUseRecordVC alloc] init];
// [self.navigationController pushViewController:historyVC animated:YES];
MaskTestResultVC *reult = [[MaskTestResultVC alloc] init];
[self.navigationController pushViewController:reult animated:YES];
}else{
//系统设置
@@ -113,12 +113,12 @@
cell = [[[NSBundle mainBundle] loadNibNamed:@"GIGaUserIDViewCell" owner:self options:nil] lastObject];
}
[cell loadCellData:indexPath user: self.user];
return cell;
}else if (indexPath.section == 1 && indexPath.row <= 2){
GIGaUserWeChatViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"GIGaUserWeChatViewCell"];
if(!cell){
cell = [[[NSBundle mainBundle] loadNibNamed:@"GIGaUserWeChatViewCell" owner:self options:nil] lastObject];
@@ -157,14 +157,23 @@
cell = [[GiGaUserJobViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellID];
}
[cell userSelectjobAction:^() {
self.jobSpread = !self.jobSpread;
[tableView reloadSections:[NSIndexSet indexSetWithIndex:3] withRowAnimation:UITableViewRowAnimationNone];
[UIView performWithoutAnimation:^{
[tableView reloadSections:[NSIndexSet indexSetWithIndex:3] withRowAnimation:UITableViewRowAnimationNone];
}];
}];
[cell setButtnImage:self.jobSpread with:self.jobArr];
[cell userSelectjob:^(NSString *title) {
self.user.occupationCode = title;
[tableView reloadRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:3 inSection:2]] withRowAnimation:UITableViewRowAnimationNone];
[UIView performWithoutAnimation:^{
[tableView reloadRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:3 inSection:2]] withRowAnimation:UITableViewRowAnimationNone];
}];
}];
return cell;
@@ -180,7 +189,7 @@
weakify(self);
[LYSDatePickerController customdidSelectDatePicker:^(NSDate *date) {
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"yyyy/MM/dd"];
[dateFormat setDateFormat:@"yyyy-MM-dd"];
NSString *currentDate = [dateFormat stringFromDate:date];
GIGaUserCityViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
weakSelf.user.birthday = currentDate;
@@ -507,9 +516,10 @@
if (newurl) {
user.headImgUrl = newurl;
}
[[GiGaUserManager shareUser] saveUser:user];
NC_POST_NAME_OBJECT(kUserAvatorUpdateNoti, nil);
GIGA_ShowToast(@"👮‍♀️修改成功")
GIGA_ShowToast(@"修改成功")
}else{
GIGA_ShowToast(reullt.message);
}
@@ -7,8 +7,23 @@
//
#import "GiMaskTimeHistoryVC.h"
#import "MaskHistoryListViewCell.h"
#import "MasHistoryFirstViewCell.h"
#import "GiGaBaseAPiRequest.h"
#import "MaskHistryRecord.h"
#import <MJRefresh/MJRefresh.h>
#import "GiGaWebViewController.h"
@interface GiMaskTimeHistoryVC ()<UITableViewDelegate,UITableViewDataSource>
@property(nonatomic,strong) NSMutableArray *dataArr;
@property(nonatomic) NSUInteger currentPage;
@property(nonatomic,assign) NSInteger totalMinute;
@property(nonatomic,assign) NSInteger ranking;
@property(nonatomic,assign) NSUInteger totalPage;
//@property(nonatomic,strong) MaskHistryRecordlist *record;
@property(nonatomic,copy) NSString * guizeUrl;
@property(nonatomic) BOOL isFreshing;
@interface GiMaskTimeHistoryVC ()
@end
@@ -16,8 +31,131 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.dataArr = [[NSMutableArray alloc] init];
_currentPage = 1;
_totalMinute = 0;
_ranking = 0;
_isFreshing = NO;
[self addNavTitile:@"历史记录"];
// Do any additional setup after loading the view.
[self.view addSubview:self.tableView];
self.tableView.delegate = self;
self.tableView.dataSource = self;
self.tableView.backgroundColor = [UIColor whiteColor];
self.tableView.separatorStyle = UITableViewCellSelectionStyleNone;
self.tableView.sectionFooterHeight = 0;
self.tableView.estimatedSectionFooterHeight= 0;
self.tableView.estimatedSectionHeaderHeight = 0;
self.tableView.frame = CGRectMake(0,2, KMainW, self.view.bounds.size.height - SAFE_NAV_HEIGHT);
self.tableView.estimatedRowHeight = 170;
self.tableView.rowHeight = UITableViewAutomaticDimension;
[self creatRefreshView];
[self loadDataWtih:[NSString stringWithFormat:@"%ld",_currentPage] isFresh:YES];
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
return 2;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
if(indexPath.section ==0){
MasHistoryFirstViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MasHistoryFirstViewCell"];
if(!cell){
cell = [[[NSBundle mainBundle] loadNibNamed:@"MasHistoryFirstViewCell" owner:self options:nil] lastObject];
}
cell.timeLabe.text = [NSString stringWithFormat:@"%ld",(long)self.totalMinute];
cell.rankLabe.text = [NSString stringWithFormat:@"全国排行榜第%ld名",(long)self.ranking];
[cell.guizeBtn addTarget:self action:@selector(guizeShow) forControlEvents:UIControlEventTouchUpInside];
return cell;
}
MaskHistoryListViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MaskHistoryListViewCell"];
if(!cell){
cell = [[[NSBundle mainBundle] loadNibNamed:@"MaskHistoryListViewCell" owner:self options:nil] lastObject];
}
MaskHistryRecord *recod = self.dataArr[indexPath.row];
[cell loadCellDataAt:indexPath recod:recod];
return cell;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
if (section == 0) {
return 1;
}
return self.dataArr.count;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return UITableViewAutomaticDimension;
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
if (section == 1) {
return 6;
}
return 0.1;
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
UIView *view = [[UIView alloc] init];
view.backgroundColor = GIGARGB(235, 235, 235, 1);
return view;
}
-(void)loadDataWtih:(NSString *)page isFresh:(BOOL)isFresh{
self.isFreshing = YES;
[self.view makeToastActivity:CSToastPositionCenter];
GiGaBaseAPiRequest *api = [GiGaBaseAPiRequest initWithRequestPath:kApiUserHistoryList method:RequestPostMethod parms:@{@"page":page,@"limit":@"10"}];
[api requstDataWithResult:^(GiGaAPIResult *result) {
[self.view hideToastActivity];
self.isFreshing = NO;
if (isFresh) {
[self.tableView.mj_header endRefreshing];
}else{
[self.tableView.mj_footer endRefreshing];
}
if (result.success) {
NSDictionary *reDic =result.dic;
self.ranking = [[reDic valueForKey:@"ranking"] integerValue];
self.totalMinute = [[reDic valueForKey:@"totalMinute"] integerValue] ;
self.guizeUrl = [reDic valueForKey:@"ruleUrl"];
NSDictionary *pageDic = reDic[@"page"];
//self.currentPage = [pageDic valueForKey:@"currPage"];
MaskHistryRecordlist *list = [[MaskHistryRecordlist alloc] initWithDictionary:pageDic error:nil];
self.totalPage = [pageDic[@"totalPage"] integerValue];
NSArray *listA = list.list;
if (isFresh) {
[self.dataArr removeAllObjects];
}
for (MaskHistryRecord *recod in listA) {
[self.dataArr addObject:recod];
}
[self.tableView reloadData];
}else if (result.code == 401) {
//token失效
[GiGaBaseAPiRequest userTokenTimeOutGologinFromVC:self];
}else{
GIGA_ShowToast(result.message);
}
}];
}
- (void)didReceiveMemoryWarning {
@@ -25,14 +163,55 @@
// Dispose of any resources that can be recreated.
}
/*
#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.
-(void)creatRefreshView{
self.tableView.mj_header = [MJRefreshHeader headerWithRefreshingTarget:self refreshingAction:@selector(headerRefresh)];
self.tableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMore)];
}
*/
-(void)headerRefresh{
if (_isFreshing) {
[self.tableView.mj_header endRefreshing];
return;
}
[self loadDataWtih:@"0" isFresh:YES];
}
-(void)loadMore{
if (_isFreshing) {
[self.tableView.mj_footer endRefreshing];
return;
}
if (_currentPage == _totalPage) {
[self.tableView.mj_footer endRefreshingWithNoMoreData];
return;
}
if (_currentPage < _totalPage) {
_currentPage ++;
[self loadDataWtih:[NSString stringWithFormat:@"%ld",self.currentPage] isFresh:NO];
}
}
//规则
-(void)guizeShow{
if (self.guizeUrl) {
GiGaWebViewController *web = [[GiGaWebViewController alloc] init];
web.souceType = WebSourceTypeUrlLink;
web.url = self.guizeUrl;
[self.navigationController pushViewController:web animated:YES];
}
}
@end
+11 -7
View File
@@ -14,7 +14,7 @@
#import "AppVerionDescriptionVC.h"
#import "GIGaAboutUsVC.h"
#import "GiGaFeedBackViewController.h"
#import "GiGaWebViewController.h"
@interface GiSysSettingsVC ()
@end
@@ -78,11 +78,16 @@
GIGaAboutUsVC *usVC= [[GIGaAboutUsVC alloc] init];
[self.navigationController pushViewController:usVC animated:YES];
}else if (indexPath.row == 3){
AppVerionDescriptionVC *verVC =[[AppVerionDescriptionVC alloc] init];
[self.navigationController pushViewController:verVC animated:YES];
// AppVerionDescriptionVC *verVC =[[AppVerionDescriptionVC alloc] init];
// [self.navigationController pushViewController:verVC animated:YES];
GiGaWebViewController *webVC = [[GiGaWebViewController alloc] init];
webVC.url = @"";
webVC.souceType = WebSourceTypeUrlLink;
[self.navigationController pushViewController:webVC animated:YES];
}
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
@@ -107,11 +112,10 @@
[btn setTitle:@"退出登录" forState:UIControlStateNormal];
btn.layer.masksToBounds = YES;
btn.layer.cornerRadius = btn.frame.size.height / 2;
btn.backgroundColor = GIGA_MAIN_BGCOLOR;
btn.backgroundColor = GIGARGB(181, 14, 14, 1);
[btn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[btn addTarget:self action:@selector(userLogOutAction) forControlEvents:UIControlEventTouchUpInside];
[view addSubview:btn];
return view;
}
+2
View File
@@ -11,5 +11,7 @@
@interface GIGaFeedKind : JSONModel
@property (nonatomic,copy) NSString *feed_id;
@property (nonatomic,copy) NSString *remarks;
@property (nonatomic,copy) NSString *dictLabel;
@property (nonatomic,copy) NSString *dictCode;
@end
+40
View File
@@ -0,0 +1,40 @@
//
// MaskHistryRecord.h
// GIGA
//
// Created by lianxiang on 2018/9/25.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <JSONModel/JSONModel.h>
//@class MaskHistryRecordlist;
@interface MaskHistryRecord : JSONModel
@property(nonatomic,copy) NSString *reocrd_id;
@property(nonatomic,copy) NSString *memberId;
@property(nonatomic,copy) NSString *skinType;
@property(nonatomic,copy) NSString *minute;
@property(nonatomic,copy) NSString *beginTime;
@property(nonatomic,copy) NSString *endTime;
@property(nonatomic,copy) NSString *dayNum;
@property(nonatomic,copy) NSString *num;
@property(nonatomic,copy) NSString *finishNum;
@property(nonatomic,copy) NSString *finishStatus;
@property(nonatomic,copy) NSString *useDate;
@property(nonatomic,copy) NSString *createTime;
@property(nonatomic,copy) NSString *updateTime;
@property(nonatomic,copy) NSString *skinTypeName;
@end
@protocol MaskHistryRecord;
@interface MaskHistryRecordlist:JSONModel
@property(nonatomic) NSInteger totalCount;
@property(nonatomic) NSInteger pageSize;
@property(nonatomic) NSInteger totalPage;
@property(nonatomic) NSInteger currPage;
@property(nonatomic) NSArray <MaskHistryRecord> *list;
@property(nonatomic,copy) NSString *ruleUrl;
@end
+36
View File
@@ -0,0 +1,36 @@
//
// MaskHistryRecord.m
// GIGA
//
// Created by lianxiang on 2018/9/25.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "MaskHistryRecord.h"
@implementation MaskHistryRecord
+(JSONKeyMapper *)keyMapper{
return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{@"reocrd_id":@"id"}];
}
+ (BOOL)propertyIsOptional:(NSString *)propertyName{
return YES;
}
@end
@implementation MaskHistryRecordlist
//+(JSONKeyMapper *)keyMapper{
// return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{@"reocrd_id":@"id"}];
//}
+ (BOOL)propertyIsOptional:(NSString *)propertyName{
return YES;
}
@end
@@ -112,7 +112,6 @@
if ([self.imageNames containsObject: name]) {
[self.imageNames removeObject:name];
}
[self.imageNames addObject:name];
}];
@@ -140,8 +139,7 @@
-(CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section
{
//设置最小的列间
//设置最小的列间
return 22.0f;
}
@@ -164,12 +162,13 @@
}
-(void)addBtnAction:(UIButton*)btn{
if (self.pickerBalock) {
if (self.pickerBalock){
self.pickerBalock();
}
}
- (void)photoPikerComplete:(GiGaPhotoPickerBlock)pikerComplete{
@@ -7,12 +7,13 @@
//
#import <UIKit/UIKit.h>
#import "GIGaFeedKind.h"
@interface GiGaFeedBackKindView : UIViewController
typedef void (^SelectedItemBlock)(NSString *tile);
typedef void (^SelectedItemBlock)(GIGaFeedKind *kind);
+(GiGaFeedBackKindView *)showAt:(UIViewController *)vc atRow:(NSInteger)row;
@property(nonatomic,copy)NSString *showStr;
@property(nonatomic,strong)GIGaFeedKind *showKind;
@property(nonatomic) NSInteger defultRow;
@property (nonatomic, copy) SelectedItemBlock selectedItemBlock;
@@ -50,7 +50,7 @@
[self.pickerView selectRow:self.defultRow inComponent:0 animated:YES];
GIGaFeedKind *mode = self.pickerDataArr[self.defultRow];
if (mode) {
self.showStr =mode.remarks;
self.showKind =mode;
}
}else{
@@ -123,7 +123,7 @@
label.textAlignment = NSTextAlignmentCenter;
label.textColor = [UIColor blackColor];
GIGaFeedKind *mode = self.pickerDataArr[row];
label.text = mode.remarks;
label.text = mode.dictLabel;
}
return label;
}
@@ -135,8 +135,8 @@
if (self.pickerDataArr.count > 0 ) {
GIGaFeedKind *mode = self.pickerDataArr[row];
self.showStr = mode.remarks;
self.selectedItemBlock(self.showStr);
self.showKind = mode;
self.selectedItemBlock(mode);
}
}
@@ -145,11 +145,12 @@
-(void)done:(UIButton *)btn{
if (self.selectedItemBlock) {
if ([self.showStr isEqualToString:@"未知"]) {
if ([self.showKind.dictLabel isEqualToString:@"未知"]) {
[self hide];
return;
}
self.selectedItemBlock(self.showStr);
self.selectedItemBlock(self.showKind);
}
@@ -189,8 +190,10 @@
if (self = [super init]) {
self.modalPresentationStyle = UIModalPresentationOverCurrentContext;
self.showStr = @"未知";
self.showKind = [[GIGaFeedKind alloc] init];
self.showKind.dictLabel = @"未知";
[self requstData];
}
@@ -0,0 +1,19 @@
//
// MasHistoryFirstViewCell.h
// GIGA
//
// Created by lianxiang on 2018/9/24.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MasHistoryFirstViewCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIButton *guizeBtn;
@property (weak, nonatomic) IBOutlet UILabel *timeLabe;
@property (weak, nonatomic) IBOutlet UILabel *rankLabe;
@property (weak, nonatomic) IBOutlet UIView *timeView;
@end
@@ -0,0 +1,56 @@
//
// MasHistoryFirstViewCell.m
// GIGA
//
// Created by lianxiang on 2018/9/24.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "MasHistoryFirstViewCell.h"
@implementation MasHistoryFirstViewCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
NSMutableAttributedString *attri = [[NSMutableAttributedString alloc] init];
NSTextAttachment *attch = [[NSTextAttachment alloc] init];
attch.image = [UIImage imageNamed:@"history_heart"];
attch.bounds = CGRectMake(0,-4, 12.9, 12.5);
NSAttributedString *imastr=[NSAttributedString attributedStringWithAttachment:attch];
[attri appendAttributedString:imastr];
NSAttributedString *titleStr = [[NSAttributedString alloc] initWithString:@" 清零小规则" attributes:@{NSFontAttributeName:[UIFont fontWithName:@"PingFangSC-Semibold" size:10],NSForegroundColorAttributeName:[UIColor whiteColor]}];
[attri appendAttributedString:titleStr];
[self.guizeBtn setAttributedTitle:attri forState:UIControlStateNormal];
}
- (void)layoutSubviews{
[super layoutSubviews];
}
- (void)layoutIfNeeded{
[super layoutIfNeeded];
self.timeView.layer.masksToBounds = NO;
self.timeView.layer.cornerRadius = self.timeView.frame.size.height /2;
self.timeView.layer.shadowOpacity = 0.3;
self.timeView.layer.shadowOffset = CGSizeMake(1, 1);
self.timeView.layer.shadowColor = [UIColor blackColor].CGColor;
self.timeView.layer.borderWidth = 5;
self.timeView.layer.borderColor = GIGARGB(253, 191,191, 1).CGColor;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="MasHistoryFirstViewCell" rowHeight="170" id="KGk-i7-Jjw" customClass="MasHistoryFirstViewCell">
<rect key="frame" x="0.0" y="0.0" width="320" height="170"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="320" height="169.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="f8a-yz-Ecb">
<rect key="frame" x="16" y="3" width="81" height="45"/>
<constraints>
<constraint firstAttribute="height" constant="45" id="5xr-Xm-HtO"/>
<constraint firstAttribute="width" constant="81" id="zdf-g5-TQv"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="10"/>
<inset key="titleEdgeInsets" minX="-80" minY="0.0" maxX="0.0" maxY="0.0"/>
<state key="normal" title="清零小规则" image="history_rule"/>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kdE-Q9-u1i">
<rect key="frame" x="22" y="42" width="57" height="26"/>
<constraints>
<constraint firstAttribute="width" constant="57" id="HVg-ED-OKU"/>
<constraint firstAttribute="height" constant="26" id="n41-cc-XrC"/>
</constraints>
<string key="text">* 请在80小时内
再次使用面膜</string>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="8"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="全国总排行第 2 名" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gnX-9k-8vZ">
<rect key="frame" x="102" y="139" width="116" height="20"/>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="14"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XgR-jp-VUJ">
<rect key="frame" x="109" y="11" width="100" height="100"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="共敷" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="7" translatesAutoresizingMaskIntoConstraints="NO" id="yat-Uk-2j1">
<rect key="frame" x="32" y="12" width="37" height="25.5"/>
<fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="18"/>
<color key="textColor" red="1" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="min" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aJM-2t-hFP">
<rect key="frame" x="38.5" y="64" width="24.5" height="20"/>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="14"/>
<color key="textColor" red="1" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="180" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fqH-WX-zEA">
<rect key="frame" x="22" y="25" width="58" height="50.5"/>
<fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="36"/>
<color key="textColor" red="1" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="yat-Uk-2j1" firstAttribute="top" secondItem="XgR-jp-VUJ" secondAttribute="top" constant="12" id="3xZ-MZ-f3I"/>
<constraint firstItem="aJM-2t-hFP" firstAttribute="centerX" secondItem="XgR-jp-VUJ" secondAttribute="centerX" id="P2i-aA-ZJF"/>
<constraint firstItem="fqH-WX-zEA" firstAttribute="centerX" secondItem="XgR-jp-VUJ" secondAttribute="centerX" constant="1" id="dhW-15-2LC"/>
<constraint firstAttribute="width" secondItem="XgR-jp-VUJ" secondAttribute="height" multiplier="1:1" id="fVj-dY-YeA"/>
<constraint firstAttribute="bottom" secondItem="aJM-2t-hFP" secondAttribute="bottom" constant="16" id="pvb-40-kKm"/>
<constraint firstItem="yat-Uk-2j1" firstAttribute="centerX" secondItem="XgR-jp-VUJ" secondAttribute="centerX" constant="0.5" id="t5T-IV-EBK"/>
<constraint firstItem="fqH-WX-zEA" firstAttribute="centerY" secondItem="XgR-jp-VUJ" secondAttribute="centerY" id="vdQ-y0-8o5"/>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="88" id="zgI-yU-SUl"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" red="1" green="0.70196078431372544" blue="0.70196078431372544" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="kdE-Q9-u1i" firstAttribute="top" secondItem="f8a-yz-Ecb" secondAttribute="bottom" constant="-6" id="33L-Pm-zjw"/>
<constraint firstItem="XgR-jp-VUJ" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="11" id="F2r-eg-vAz"/>
<constraint firstAttribute="trailing" secondItem="XgR-jp-VUJ" secondAttribute="trailing" constant="111" id="UwV-Lm-aak"/>
<constraint firstItem="f8a-yz-Ecb" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="VMM-iR-qKh"/>
<constraint firstItem="gnX-9k-8vZ" firstAttribute="top" secondItem="XgR-jp-VUJ" secondAttribute="bottom" constant="28" id="ZbD-KV-Yoz"/>
<constraint firstItem="f8a-yz-Ecb" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="3" id="fed-Wy-3U8"/>
<constraint firstItem="XgR-jp-VUJ" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="109" id="mKf-YY-Itt"/>
<constraint firstItem="kdE-Q9-u1i" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="22" id="ts5-1h-1Td"/>
<constraint firstAttribute="bottom" secondItem="gnX-9k-8vZ" secondAttribute="bottom" constant="10.5" id="vj7-z2-psS"/>
<constraint firstItem="gnX-9k-8vZ" firstAttribute="centerX" secondItem="H2p-sc-9uM" secondAttribute="centerX" id="yyH-1k-nnl"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
<connections>
<outlet property="guizeBtn" destination="f8a-yz-Ecb" id="SD6-Nh-Jyz"/>
<outlet property="rankLabe" destination="gnX-9k-8vZ" id="t9F-Tk-4eP"/>
<outlet property="timeLabe" destination="fqH-WX-zEA" id="mMl-Mr-UNW"/>
<outlet property="timeView" destination="XgR-jp-VUJ" id="4GT-I5-bsa"/>
</connections>
<point key="canvasLocation" x="-16" y="21"/>
</tableViewCell>
</objects>
<resources>
<image name="history_rule" width="81" height="22"/>
</resources>
</document>
@@ -0,0 +1,19 @@
//
// MaskHistoryListViewCell.h
// GIGA
//
// Created by lianxiang on 2018/9/24.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "MaskHistryRecord.h"
@interface MaskHistoryListViewCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIButton *skinBtn;
@property (weak, nonatomic) IBOutlet UIButton *timeBtn;
@property (weak, nonatomic) IBOutlet UILabel *timeLabe;
@property (weak, nonatomic) IBOutlet UILabel *timesLabe;
-(void)loadCellDataAt:(NSIndexPath *)indepath recod:(MaskHistryRecord*)model;
@end
@@ -0,0 +1,48 @@
//
// MaskHistoryListViewCell.m
// GIGA
//
// Created by lianxiang on 2018/9/24.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "MaskHistoryListViewCell.h"
@implementation MaskHistoryListViewCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
self.timeBtn.layer.masksToBounds = YES;
self.timeBtn.layer.cornerRadius = 4;
self.skinBtn.layer.masksToBounds = YES;
self.skinBtn.layer.cornerRadius = 4;
}
-(void)loadCellDataAt:(NSIndexPath *)indepath recod:(MaskHistryRecord*)model
{
self.timesLabe.text = [NSString stringWithFormat:@"第%@天敷面膜",model.dayNum];
self.timeLabe.text = model.createTime;
if (![model.skinTypeName isKindOfClass:[NSNull class]] && model.skinTypeName) {
NSAttributedString *atrtskin = [GiGaHelper stringWithText:model.skinTypeName textColor:[UIColor whiteColor] textFont:GIGA_TEXTFONTMEDIUM(10) leterSpace:0];
[self.skinBtn setAttributedTitle:atrtskin forState:UIControlStateNormal];
}
if (![model.minute isKindOfClass:[NSNull class]] && model.minute) {
NSAttributedString *atrtskin = [GiGaHelper stringWithText:[NSString stringWithFormat:@"倒计时%@分钟",model.minute] textColor:[UIColor whiteColor] textFont:GIGA_TEXTFONTMEDIUM(10) leterSpace:0];
[self.timeBtn setAttributedTitle:atrtskin forState:UIControlStateNormal];
}
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="KGk-i7-Jjw" customClass="MaskHistoryListViewCell">
<rect key="frame" x="0.0" y="0.0" width="320" height="90"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="320" height="89.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="第1天敷面膜" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1Mm-qt-QLb">
<rect key="frame" x="16" y="10" width="65" height="17"/>
<constraints>
<constraint firstAttribute="height" constant="17" id="NtX-Gc-7DK"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="12"/>
<color key="textColor" red="0.36078431372549019" green="0.36078431372549019" blue="0.36078431372549019" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2018-08-28 13:25:54" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2o1-kY-jHA">
<rect key="frame" x="16" y="35" width="111" height="14"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="10"/>
<color key="textColor" red="0.58431372549019611" green="0.58431372549019611" blue="0.58431372549019611" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="TIW-fP-uXf">
<rect key="frame" x="16" y="57" width="80" height="22"/>
<color key="backgroundColor" red="1" green="0.70196078429999997" blue="0.70196078429999997" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="22" id="0YO-kY-Taa"/>
<constraint firstAttribute="width" constant="80" id="mIe-rt-3fF"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="10"/>
<state key="normal" title="油性皮肤"/>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xUV-cj-Gt5">
<rect key="frame" x="104" y="57" width="80" height="22"/>
<color key="backgroundColor" red="0.51372549019607838" green="0.039215686274509803" blue="0.039215686274509803" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="22" id="RmH-dv-yZm"/>
<constraint firstAttribute="width" constant="80" id="jvK-Kd-xnz"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="10"/>
<state key="normal" title="倒计时17分钟"/>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yqe-qC-fXL">
<rect key="frame" x="0.0" y="89" width="320" height="1"/>
<color key="backgroundColor" red="0.92156862745098034" green="0.92156862745098034" blue="0.92156862745098034" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="mA6-fk-aTf"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="TIW-fP-uXf" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="6Vu-gO-3O6"/>
<constraint firstItem="yqe-qC-fXL" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="HBX-nh-PB3"/>
<constraint firstAttribute="bottom" secondItem="yqe-qC-fXL" secondAttribute="bottom" constant="-0.5" id="PGB-TX-GMK"/>
<constraint firstItem="xUV-cj-Gt5" firstAttribute="centerY" secondItem="TIW-fP-uXf" secondAttribute="centerY" id="PNM-wS-Fbg"/>
<constraint firstItem="2o1-kY-jHA" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="QHa-BT-Kdi"/>
<constraint firstItem="1Mm-qt-QLb" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="Taa-On-Jut"/>
<constraint firstItem="xUV-cj-Gt5" firstAttribute="leading" secondItem="TIW-fP-uXf" secondAttribute="trailing" constant="8" id="gai-Tc-IfZ"/>
<constraint firstItem="1Mm-qt-QLb" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="10" id="giX-Bb-4ad"/>
<constraint firstAttribute="trailing" secondItem="yqe-qC-fXL" secondAttribute="trailing" id="goy-Cj-fyR"/>
<constraint firstItem="yqe-qC-fXL" firstAttribute="top" secondItem="TIW-fP-uXf" secondAttribute="bottom" constant="10" id="kyx-fN-eLe"/>
<constraint firstItem="TIW-fP-uXf" firstAttribute="top" secondItem="2o1-kY-jHA" secondAttribute="bottom" constant="8" id="xpc-On-9Xs"/>
<constraint firstItem="2o1-kY-jHA" firstAttribute="top" secondItem="1Mm-qt-QLb" secondAttribute="bottom" constant="8" id="yij-7s-itY"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
<connections>
<outlet property="skinBtn" destination="TIW-fP-uXf" id="54G-fF-tNQ"/>
<outlet property="timeBtn" destination="xUV-cj-Gt5" id="Wt0-LN-jz0"/>
<outlet property="timeLabe" destination="2o1-kY-jHA" id="GLQ-Cw-isR"/>
<outlet property="timesLabe" destination="1Mm-qt-QLb" id="10I-Ke-pHj"/>
</connections>
<point key="canvasLocation" x="-50" y="-57"/>
</tableViewCell>
</objects>
</document>
@@ -9,6 +9,8 @@
#import <UIKit/UIKit.h>
@interface GIGaUserChangeMobleCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIButton *codeSendBtn;
@property (weak, nonatomic) IBOutlet UIButton *oldBtn;
@property (weak, nonatomic) IBOutlet UIButton *xinPhoneBtn;
@@ -16,4 +18,6 @@
@property (weak, nonatomic) IBOutlet UITextField *numberTexFiled;
@property (weak, nonatomic) IBOutlet UITextField *codeTexFiled;
@end
@@ -7,6 +7,7 @@
//
#import "GIGaUserChangeMobleCell.h"
#import "NSTimer+Convenience.h"
@implementation GIGaUserChangeMobleCell
@@ -75,7 +75,7 @@
</constraints>
<color key="textColor" red="0.73333333333333328" green="0.73333333333333328" blue="0.73333333333333328" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="13"/>
<textInputTraits key="textInputTraits"/>
<textInputTraits key="textInputTraits" keyboardType="numberPad"/>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Xj0-4q-Lcf">
<rect key="frame" x="25" y="137" width="271" height="1"/>
@@ -91,7 +91,7 @@
<constraint firstAttribute="height" constant="30" id="8iy-aa-Gc9"/>
<constraint firstAttribute="width" constant="59" id="eTQ-av-rBv"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="10"/>
<fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="10"/>
<state key="normal" title="发送验证码"/>
</button>
</subviews>