fix
This commit is contained in:
parent
94ce6d3e14
commit
52222aa995
|
|
@ -2,22 +2,4 @@
|
||||||
<Bucket
|
<Bucket
|
||||||
type = "0"
|
type = "0"
|
||||||
version = "2.0">
|
version = "2.0">
|
||||||
<Breakpoints>
|
|
||||||
<BreakpointProxy
|
|
||||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
||||||
<BreakpointContent
|
|
||||||
shouldBeEnabled = "No"
|
|
||||||
ignoreCount = "0"
|
|
||||||
continueAfterRunningActions = "No"
|
|
||||||
filePath = "GIGA/Modules/Mask/Controller/GIGaMaskShareViewController.m"
|
|
||||||
timestampString = "561021149.454651"
|
|
||||||
startingColumnNumber = "9223372036854775807"
|
|
||||||
endingColumnNumber = "9223372036854775807"
|
|
||||||
startingLineNumber = "224"
|
|
||||||
endingLineNumber = "224"
|
|
||||||
landmarkName = "-viewControllers"
|
|
||||||
landmarkType = "7">
|
|
||||||
</BreakpointContent>
|
|
||||||
</BreakpointProxy>
|
|
||||||
</Breakpoints>
|
|
||||||
</Bucket>
|
</Bucket>
|
||||||
|
|
|
||||||
|
|
@ -51,8 +51,24 @@
|
||||||
[GiGaBaseAPiRequest userTokenTimeOutGologinFromVC:self.window.rootViewController];
|
[GiGaBaseAPiRequest userTokenTimeOutGologinFromVC:self.window.rootViewController];
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
|
// 未登录同步默认面膜时间
|
||||||
|
GiGaBaseAPiRequest *api = [GiGaBaseAPiRequest initWithRequestPath:kUserDefaultMaskTime method:RequestPostMethod parms:nil];
|
||||||
|
[api requstDataWithResult:^(GiGaAPIResult *result) {
|
||||||
|
if (result.success) {
|
||||||
|
|
||||||
|
float minute = [result.dic[@"minute"] floatValue];
|
||||||
|
if (minute !=0) {
|
||||||
|
|
||||||
|
[GiGaUserDefault savaMaskeTime:minute*60];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//用户关闭后台权限 提醒开启
|
||||||
if ([[UIApplication sharedApplication] backgroundRefreshStatus] != UIBackgroundRefreshStatusAvailable ) {
|
if ([[UIApplication sharedApplication] backgroundRefreshStatus] != UIBackgroundRefreshStatusAvailable ) {
|
||||||
[self.window.rootViewController jxt_showAlertWithTitle:@"温馨提示" message:@"为保证您正常使用面膜时间,需要您开启后台刷新,请在 设置->面膜时间->应用程序后台刷新 开启" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
|
[self.window.rootViewController jxt_showAlertWithTitle:@"温馨提示" message:@"为保证您正常使用面膜时间,需要您开启后台刷新,请在 设置->面膜时间->应用程序后台刷新 开启" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
|
||||||
alertMaker.addActionCancelTitle(@"下次");
|
alertMaker.addActionCancelTitle(@"下次");
|
||||||
|
|
@ -128,10 +144,10 @@
|
||||||
|
|
||||||
// [[GiGaLocalNotificationManager localNotifiationCenter] sendLocalNotification:@"闹钟提醒!" fireTimeInterval:2 alertAction:@"面膜时间已添加闹钟提醒!" withIdentifier:kLOCALNotifiID_APPTERMINAL];
|
// [[GiGaLocalNotificationManager localNotifiationCenter] sendLocalNotification:@"闹钟提醒!" fireTimeInterval:2 alertAction:@"面膜时间已添加闹钟提醒!" withIdentifier:kLOCALNotifiID_APPTERMINAL];
|
||||||
//进程结束 长期保持后台前提下 用户主动挂起 取消本地推送。
|
//进程结束 长期保持后台前提下 用户主动挂起 取消本地推送。
|
||||||
[[GiGaLocalNotificationManager localNotifiationCenter] cancelAllLocalNoitification];
|
|
||||||
}
|
|
||||||
// [[GiGaLocalNotificationManager localNotifiationCenter] cancelAllLocalNoitification];
|
// [[GiGaLocalNotificationManager localNotifiationCenter] cancelAllLocalNoitification];
|
||||||
}
|
}
|
||||||
|
[[GiGaLocalNotificationManager localNotifiationCenter] cancelAllLocalNoitification];
|
||||||
|
}
|
||||||
|
|
||||||
-(void)remoteControlReceivedWithEvent:(UIEvent *)event
|
-(void)remoteControlReceivedWithEvent:(UIEvent *)event
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "img_product@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 60 KiB |
|
|
@ -18,7 +18,7 @@ NSString *const kGiGaToken = @"GiGatoken";
|
||||||
NSString *const kMaskeTime= @"userMaskeTime";
|
NSString *const kMaskeTime= @"userMaskeTime";
|
||||||
NSString *const kWeiXinCodeInfo = @"WeiXinCodeinfo";
|
NSString *const kWeiXinCodeInfo = @"WeiXinCodeinfo";
|
||||||
NSString *const kShowUserTested = @"kShowUserTested";
|
NSString *const kShowUserTested = @"kShowUserTested";
|
||||||
#define MASKTIME_DEFAULT 20;
|
#define MASKTIME_DEFAULT 17.5;
|
||||||
|
|
||||||
@implementation GiGaUserDefault
|
@implementation GiGaUserDefault
|
||||||
|
|
||||||
|
|
@ -145,13 +145,12 @@ NSString *const kShowUserTested = @"kShowUserTested";
|
||||||
|
|
||||||
NSTimeInterval time = [UD_STADARDUD doubleForKey:kMaskeTime];
|
NSTimeInterval time = [UD_STADARDUD doubleForKey:kMaskeTime];
|
||||||
if (time == 0) {
|
if (time == 0) {
|
||||||
//默认17.5 分钟
|
//默认17.5 分钟 已改调用接口同步默认
|
||||||
time = 17.5 * 60;
|
time = 17.5 * 60;
|
||||||
//time = MASKTIME_DEFAULT;
|
//time = MASKTIME_DEFAULT;
|
||||||
}
|
}
|
||||||
//time = 5;
|
//time = 10;
|
||||||
return time;
|
return time;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+(void)saveUserTestFlag:(BOOL)tested{
|
+(void)saveUserTestFlag:(BOOL)tested{
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ const static NSInteger GIGADB_USER_VER = 0;//当前数据库版本号
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
if (errorCodeMsg) {
|
if (errorCodeMsg) {
|
||||||
errorCodeMsg(requst.resultDict);
|
errorCodeMsg(result.dic);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,5 +73,8 @@
|
||||||
//正式
|
//正式
|
||||||
#define kIMPRITNT @"http://app.mianmoshijian.com/imprint.html?device=ios"
|
#define kIMPRITNT @"http://app.mianmoshijian.com/imprint.html?device=ios"
|
||||||
|
|
||||||
|
//获取默认面膜时间
|
||||||
|
#define kUserDefaultMaskTime @"activity/maskuselog/v1/minute"
|
||||||
|
|
||||||
|
|
||||||
#endif /* ApiRequestConfig_h */
|
#endif /* ApiRequestConfig_h */
|
||||||
|
|
|
||||||
|
|
@ -19,13 +19,14 @@
|
||||||
case 0://测试环境
|
case 0://测试环境
|
||||||
{
|
{
|
||||||
|
|
||||||
[[NSUserDefaults standardUserDefaults] setValue:@"http://apiyts.s1.natapp.cc/v1/" forKey:@"MainUrl"];
|
// [[NSUserDefaults standardUserDefaults] setValue:@"http://apiyts.s1.natapp.cc/v1/" forKey:@"MainUrl"];
|
||||||
[[NSUserDefaults standardUserDefaults] setValue:@"http://wsyts.s1.natapp.cc" forKey:@"gigasocketUrl"];
|
// [[NSUserDefaults standardUserDefaults] setValue:@"http://wsyts.s1.natapp.cc" forKey:@"gigasocketUrl"];
|
||||||
// [[NSUserDefaults standardUserDefaults] setValue:@"https://api.mianmoshijian.com/v1/" forKey:@"MainUrl"];
|
[[NSUserDefaults standardUserDefaults] setValue:@"https://api.mianmoshijian.com/v1/" forKey:@"MainUrl"];
|
||||||
// [[NSUserDefaults standardUserDefaults] setValue:@"https://ws.mianmoshijian.com" forKey:@"gigasocketUrl"];
|
[[NSUserDefaults standardUserDefaults] setValue:@"https://ws.mianmoshijian.com" forKey:@"gigasocketUrl"];
|
||||||
//
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1: //生产环境
|
case 1: //生产环境
|
||||||
{
|
{
|
||||||
//https://api.mianmoshijian.com/v1/
|
//https://api.mianmoshijian.com/v1/
|
||||||
|
|
@ -34,7 +35,6 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1.6.3</string>
|
<string>1.6.5</string>
|
||||||
<key>LSApplicationQueriesSchemes</key>
|
<key>LSApplicationQueriesSchemes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>weixin</string>
|
<string>weixin</string>
|
||||||
|
|
|
||||||
|
|
@ -192,6 +192,9 @@
|
||||||
|
|
||||||
// NSDictionary *weixinInfoDic = [GiGaUserDefault getWeiXinAccessToenDic];
|
// NSDictionary *weixinInfoDic = [GiGaUserDefault getWeiXinAccessToenDic];
|
||||||
NSString *wechatCode = [GiGaUserDefault getWeiXinCode];
|
NSString *wechatCode = [GiGaUserDefault getWeiXinCode];
|
||||||
|
if (wechatCode==nil) {
|
||||||
|
wechatCode = @"";
|
||||||
|
}
|
||||||
NSDictionary *params = nil;
|
NSDictionary *params = nil;
|
||||||
params = @{
|
params = @{
|
||||||
@"mobile":self.acountTextField.text,
|
@"mobile":self.acountTextField.text,
|
||||||
|
|
@ -313,44 +316,43 @@
|
||||||
if ([responseDict[@"code"] integerValue] == 0) {
|
if ([responseDict[@"code"] integerValue] == 0) {
|
||||||
[self userloginSussecess:responseDict];
|
[self userloginSussecess:responseDict];
|
||||||
|
|
||||||
}else if([responseDict[@"code"] integerValue] == 500){
|
|
||||||
//登录流程待定
|
|
||||||
//[self.view makeToast:responseDict[@"msg"] duration:2.0 position:CSToastPositionCenter];
|
|
||||||
[self jxt_showAlertWithTitle:@"温馨提示" message:responseDict[@"msg"] appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
|
|
||||||
alertMaker.addActionCancelTitle(@"知道了");
|
|
||||||
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
|
|
||||||
}];
|
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
[self.view makeToast:responseDict[@"msg"] duration:2.0 position:CSToastPositionCenter];
|
[self.view makeToast:responseDict[@"msg"] duration:2.0 position:CSToastPositionCenter];
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
[self.view makeToast:@"用户信息提交异常"];
|
[self.view makeToast:@"用户信息提交异常"];
|
||||||
GILog(@"上传微信用户信息error:\n%@",error.localizedDescription);
|
GILog(@"上传微信用户信息error:\n%@",error.localizedDescription);
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
//请求用户数据
|
||||||
-(void)userloginSussecess:(NSDictionary *)resDic{
|
-(void)userloginSussecess:(NSDictionary *)resDic{
|
||||||
|
|
||||||
//token 登陆标志
|
//token 登陆标志
|
||||||
[GiGaUserDefault saveToken:resDic[@"token"]];
|
[GiGaUserDefault saveToken:resDic[@"token"]];
|
||||||
|
weakify(self);
|
||||||
|
[[GiGaUserManager shareUser] synsisUserInfo:^(GiGaUser *user) {
|
||||||
|
|
||||||
|
GILog(@"user.userId:%@",user.userId);
|
||||||
|
|
||||||
//埋点
|
//埋点
|
||||||
[MobClick endEvent:MobClick_UserLogin];
|
[MobClick endEvent:MobClick_UserLogin];
|
||||||
GIGA_WIndowTost(@"登录成功!");
|
GIGA_WIndowTost(@"登录成功!");
|
||||||
//请求用户数据
|
|
||||||
|
|
||||||
[[GiGaUserManager shareUser] synsisUserInfo:^(GiGaUser *user) {
|
|
||||||
GILog(@"user.userId:%@",user.userId);
|
|
||||||
NC_POST_NAME_OBJECT(kUserLoginSuccessNoti, nil);
|
NC_POST_NAME_OBJECT(kUserLoginSuccessNoti, nil);
|
||||||
|
[weakSelf dismissViewControllerAnimated:YES completion:nil];
|
||||||
|
|
||||||
} userErrorMsgBlock:^(NSDictionary *errorCodemsg) {
|
} userErrorMsgBlock:^(NSDictionary *errorCodemsg) {
|
||||||
|
|
||||||
|
if (errorCodemsg) {
|
||||||
|
NSString *msg = errorCodemsg[@"msg"];
|
||||||
|
if (msg) {
|
||||||
|
GIGA_ShowToast(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
}];
|
}];
|
||||||
|
|
||||||
[self dismissViewControllerAnimated:YES completion:nil];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//接收注册成功通知
|
//接收注册成功通知
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,9 @@
|
||||||
cell.minuteLab.text = [NSString stringWithFormat:@"%@min",self.model.minute];
|
cell.minuteLab.text = [NSString stringWithFormat:@"%@min",self.model.minute];
|
||||||
cell.timeLable.text = [NSString stringWithFormat:@"这是您敷面膜的第:%@张",self.model.monthMaskNum];
|
cell.timeLable.text = [NSString stringWithFormat:@"这是您敷面膜的第:%@张",self.model.monthMaskNum];
|
||||||
if (self.model.productImgUrl && ![self.model.productImgUrl isKindOfClass:[NSNull class]]) {
|
if (self.model.productImgUrl && ![self.model.productImgUrl isKindOfClass:[NSNull class]]) {
|
||||||
[cell.holdImagView sd_setImageWithURL:[NSURL URLWithString:self.model.productImgUrl]];
|
//[cell.holdImagView sd_setImageWithURL:[NSURL URLWithString:self.model.productImgUrl]];
|
||||||
|
[cell.holdImagView sd_setImageWithURL:[NSURL URLWithString:self.model.productImgUrl] placeholderImage:[UIImage imageNamed:@"img_product"]];
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -257,7 +257,7 @@
|
||||||
[self setUpNav];
|
[self setUpNav];
|
||||||
[self initUI];
|
[self initUI];
|
||||||
[self addNotify];
|
[self addNotify];
|
||||||
//[self creatBackGroundMusic];
|
[self creatBackGroundMusic];
|
||||||
[self creatMaskTimeSatrtMusic];
|
[self creatMaskTimeSatrtMusic];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -266,7 +266,7 @@
|
||||||
-(void)maskupSwipeGesture{
|
-(void)maskupSwipeGesture{
|
||||||
[self animaMask];
|
[self animaMask];
|
||||||
}
|
}
|
||||||
#pragma mark 点击手势结束面膜时间
|
#pragma mark 点击手势面膜时间
|
||||||
-(void)maskTapAction{
|
-(void)maskTapAction{
|
||||||
[self animaMask];
|
[self animaMask];
|
||||||
}
|
}
|
||||||
|
|
@ -284,18 +284,17 @@
|
||||||
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
|
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
|
||||||
if (buttonIndex == 1) {
|
if (buttonIndex == 1) {
|
||||||
[self.cicleProgressView stop];
|
[self.cicleProgressView stop];
|
||||||
|
//手动结束时结束peding通知
|
||||||
|
[[GiGaLocalNotificationManager localNotifiationCenter] cancelAllLocalNoitification];
|
||||||
[self maskTimeEnd];
|
[self maskTimeEnd];
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#pragma mark - 开始面膜时间动画 合并
|
#pragma mark - 开始面膜时间动画 合并
|
||||||
-(void)animaMask{
|
-(void)animaMask{
|
||||||
|
|
||||||
|
|
||||||
self.swipeGaurdimagView.hidden = YES;
|
self.swipeGaurdimagView.hidden = YES;
|
||||||
self.startMaskButton.hidden = YES;
|
self.startMaskButton.hidden = YES;
|
||||||
[self.view layoutIfNeeded];
|
[self.view layoutIfNeeded];
|
||||||
|
|
@ -506,7 +505,7 @@
|
||||||
}
|
}
|
||||||
delegate.isMasking = YES;
|
delegate.isMasking = YES;
|
||||||
[_startMaskMusic play];
|
[_startMaskMusic play];
|
||||||
//[_musicPalyer play];
|
[_musicPalyer play];
|
||||||
// [self setBackGroundPlayingInfo];//锁屏音频信息
|
// [self setBackGroundPlayingInfo];//锁屏音频信息
|
||||||
|
|
||||||
//总时间隔 s
|
//总时间隔 s
|
||||||
|
|
@ -568,13 +567,12 @@
|
||||||
//面膜时间结束时设置 全局变量 不再发送本地通知 提醒
|
//面膜时间结束时设置 全局变量 不再发送本地通知 提醒
|
||||||
AppDelegate *delegate =(AppDelegate *) [[UIApplication sharedApplication] delegate];
|
AppDelegate *delegate =(AppDelegate *) [[UIApplication sharedApplication] delegate];
|
||||||
delegate.isMasking = NO;
|
delegate.isMasking = NO;
|
||||||
//[_musicPalyer stop];
|
[_musicPalyer stop];
|
||||||
|
|
||||||
//震动 需用户手动开启震动模式
|
//震动 需用户手动开启震动模式
|
||||||
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
|
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
|
||||||
//复原动画
|
//复原动画
|
||||||
[self endMaskAnimation];
|
[self endMaskAnimation];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark 开始测试
|
#pragma mark 开始测试
|
||||||
|
|
@ -744,8 +742,11 @@
|
||||||
-(void)refreshUserIcon:(NSString *)imageUrl{
|
-(void)refreshUserIcon:(NSString *)imageUrl{
|
||||||
|
|
||||||
NSURL *url = [NSURL URLWithString:imageUrl];
|
NSURL *url = [NSURL URLWithString:imageUrl];
|
||||||
[self.rightNavUserBtn sd_setImageWithURL:url forState:UIControlStateNormal];
|
// [self.rightNavUserBtn sd_setImageWithURL:url forState:UIControlStateNormal];
|
||||||
|
|
||||||
|
[self.rightNavUserBtn sd_setImageWithURL:url forState:UIControlStateNormal placeholderImage:[UIImage imageNamed:@"nav_circle_avatar"] completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
|
||||||
|
|
||||||
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark 消息 action
|
#pragma mark 消息 action
|
||||||
|
|
@ -870,8 +871,10 @@
|
||||||
|
|
||||||
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
|
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
|
||||||
if (isUserLogin) {
|
if (isUserLogin) {
|
||||||
|
|
||||||
NSTimeInterval timeInterVal = [GiGaUserDefault getUserMaskeTime];
|
NSTimeInterval timeInterVal = [GiGaUserDefault getUserMaskeTime];
|
||||||
NSString *minute = [NSString stringWithFormat:@"%.f",timeInterVal /60];
|
NSString *minute = [NSString stringWithFormat:@"%.1f",timeInterVal / 60];
|
||||||
|
|
||||||
GiGaBaseAPiRequest *api = [GiGaBaseAPiRequest initWithRequestPath:KApiBeginMaskTime method:RequestPostMethod parms:@{@"minute":minute}];
|
GiGaBaseAPiRequest *api = [GiGaBaseAPiRequest initWithRequestPath:KApiBeginMaskTime method:RequestPostMethod parms:@{@"minute":minute}];
|
||||||
[api requstDataWithResult:^(GiGaAPIResult *result) {
|
[api requstDataWithResult:^(GiGaAPIResult *result) {
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
|
|
|
||||||
|
|
@ -141,8 +141,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return cell;
|
return cell;
|
||||||
}
|
}else if (indexPath.row == 2){
|
||||||
else if (indexPath.row == 2){
|
|
||||||
MaskShareBoootomViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MaskShareBoootomViewCell"];
|
MaskShareBoootomViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MaskShareBoootomViewCell"];
|
||||||
if (!cell) {
|
if (!cell) {
|
||||||
cell = [[[NSBundle mainBundle] loadNibNamed:@"MaskShareBoootomViewCell" owner:self options:nil] lastObject];
|
cell = [[[NSBundle mainBundle] loadNibNamed:@"MaskShareBoootomViewCell" owner:self options:nil] lastObject];
|
||||||
|
|
@ -403,7 +402,9 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return _viewControllers;
|
return _viewControllers;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OSF-Gb-h1M">
|
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OSF-Gb-h1M">
|
||||||
<rect key="frame" x="6" y="12" width="329" height="217"/>
|
<rect key="frame" x="6" y="12" width="329" height="217"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bg_logo" translatesAutoresizingMaskIntoConstraints="NO" id="iJy-9p-48y">
|
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="img_product" translatesAutoresizingMaskIntoConstraints="NO" id="iJy-9p-48y">
|
||||||
<rect key="frame" x="8" y="8" width="313" height="175"/>
|
<rect key="frame" x="8" y="8" width="313" height="175"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<constraint firstAttribute="height" constant="175" id="0Jj-uy-CDT"/>
|
<constraint firstAttribute="height" constant="175" id="0Jj-uy-CDT"/>
|
||||||
|
|
@ -107,7 +107,7 @@
|
||||||
</tableViewCell>
|
</tableViewCell>
|
||||||
</objects>
|
</objects>
|
||||||
<resources>
|
<resources>
|
||||||
<image name="bg_logo" width="88" height="88"/>
|
<image name="img_product" width="164" height="121"/>
|
||||||
<image name="masktie_clock" width="20" height="19"/>
|
<image name="masktie_clock" width="20" height="19"/>
|
||||||
</resources>
|
</resources>
|
||||||
</document>
|
</document>
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@
|
||||||
@interface GiMaskTimeHistoryVC ()<UITableViewDelegate,UITableViewDataSource>
|
@interface GiMaskTimeHistoryVC ()<UITableViewDelegate,UITableViewDataSource>
|
||||||
|
|
||||||
@property(nonatomic,strong) NSMutableArray *dataArr;
|
@property(nonatomic,strong) NSMutableArray *dataArr;
|
||||||
@property(nonatomic) NSUInteger currentPage;
|
@property(nonatomic) int currentPage;
|
||||||
@property(nonatomic,assign) NSInteger totalMinute;
|
@property(nonatomic,copy) NSString *totalMinute;
|
||||||
@property(nonatomic,assign) NSInteger ranking;
|
@property(nonatomic,assign) NSInteger ranking;
|
||||||
@property(nonatomic,assign) NSUInteger totalPage;
|
@property(nonatomic,assign) NSUInteger totalPage;
|
||||||
//@property(nonatomic,strong) MaskHistryRecordlist *record;
|
//@property(nonatomic,strong) MaskHistryRecordlist *record;
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
[super viewDidLoad];
|
[super viewDidLoad];
|
||||||
self.dataArr = [[NSMutableArray alloc] init];
|
self.dataArr = [[NSMutableArray alloc] init];
|
||||||
_currentPage = 1;
|
_currentPage = 1;
|
||||||
_totalMinute = 0;
|
_totalMinute = @"0.0";
|
||||||
_ranking = 0;
|
_ranking = 0;
|
||||||
_isFreshing = NO;
|
_isFreshing = NO;
|
||||||
[self addNavTitile:@"历史记录"];
|
[self addNavTitile:@"历史记录"];
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
self.tableView.rowHeight = UITableViewAutomaticDimension;
|
self.tableView.rowHeight = UITableViewAutomaticDimension;
|
||||||
|
|
||||||
[self creatRefreshView];
|
[self creatRefreshView];
|
||||||
[self loadDataWtih:[NSString stringWithFormat:@"%ld",_currentPage] isFresh:YES];
|
[self loadDataWtih:[NSString stringWithFormat:@"%d",_currentPage] isFresh:YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
|
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
|
||||||
|
|
@ -84,7 +84,7 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cell.timeLabe.text = [NSString stringWithFormat:@"%ld",(long)self.totalMinute];
|
cell.timeLabe.text = [NSString stringWithFormat:@"%@",self.totalMinute];
|
||||||
|
|
||||||
if (self.exquisitePercent) {
|
if (self.exquisitePercent) {
|
||||||
NSString *text = [NSString stringWithFormat:@"本月超过%@用户",self.exquisitePercent];
|
NSString *text = [NSString stringWithFormat:@"本月超过%@用户",self.exquisitePercent];
|
||||||
|
|
@ -111,7 +111,6 @@
|
||||||
return cell;
|
return cell;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
|
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
|
||||||
if (section == 0) {
|
if (section == 0) {
|
||||||
return 1;
|
return 1;
|
||||||
|
|
@ -154,7 +153,7 @@
|
||||||
NSDictionary *reDic =result.dic;
|
NSDictionary *reDic =result.dic;
|
||||||
|
|
||||||
self.ranking = [[reDic valueForKey:@"ranking"] integerValue];
|
self.ranking = [[reDic valueForKey:@"ranking"] integerValue];
|
||||||
self.totalMinute = [[reDic valueForKey:@"totalMinute"] integerValue] ;
|
self.totalMinute = [reDic valueForKey:@"totalMinute"];
|
||||||
self.exquisitePercent = [reDic valueForKey:@"exquisitePercent"];
|
self.exquisitePercent = [reDic valueForKey:@"exquisitePercent"];
|
||||||
self.guizeUrl = [reDic valueForKey:@"ruleUrl"];
|
self.guizeUrl = [reDic valueForKey:@"ruleUrl"];
|
||||||
|
|
||||||
|
|
@ -220,10 +219,9 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (_currentPage < _totalPage) {
|
if (_currentPage < _totalPage) {
|
||||||
_currentPage ++;
|
_currentPage ++;
|
||||||
[self loadDataWtih:[NSString stringWithFormat:@"%ld",self.currentPage] isFresh:NO];
|
[self loadDataWtih:[NSString stringWithFormat:@"%d",self.currentPage] isFresh:NO];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
@property(nonatomic,assign) int sexCode;
|
@property(nonatomic,assign) int sexCode;
|
||||||
@property(nonatomic,copy) NSString *sexName;
|
@property(nonatomic,copy) NSString *sexName;
|
||||||
@property(nonatomic,copy) NSString *weixin;
|
@property(nonatomic,copy) NSString *weixin;
|
||||||
@property(nonatomic) int minute;
|
|
||||||
|
@property(nonatomic) float minute;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue