2.2.0版本发版 此commit置顶
This commit is contained in:
@@ -42,7 +42,20 @@
|
||||
if (code == 200) {
|
||||
self.retryCount = 0;
|
||||
NSDictionary * initData = data.data;
|
||||
self.canOpen = ![initData[@"aModel"] boolValue];
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
self.canOpen = ![initData[@"aModel"] boolValue];
|
||||
|
||||
#else
|
||||
if(isEnterprise == YES){
|
||||
self.canOpen = ![initData[@"aModel"] boolValue];
|
||||
}else{
|
||||
self.canOpen = YES;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
self.iosPhoneBind = [initData[@"iosPhoneBind"] boolValue];
|
||||
//糖果树配置
|
||||
self.openCandyTree = [initData[@"openBoxSwitch"] boolValue];
|
||||
|
@@ -105,11 +105,24 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
[self.authBubbleView addSubview:self.authBubbleLabel];
|
||||
|
||||
if (@available(iOS 13.0, *)) {
|
||||
[self.stackView addArrangedSubview:self.appleButton];
|
||||
#ifdef DEBUG
|
||||
|
||||
|
||||
|
||||
[self.stackView addArrangedSubview:self.appleButton];
|
||||
|
||||
|
||||
|
||||
#else
|
||||
if(isEnterprise == YES){
|
||||
[self.stackView addArrangedSubview:self.appleButton];
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
[self.stackView addArrangedSubview:self.googleButtonView];
|
||||
[self.stackView addArrangedSubview:self.fbButtonView];
|
||||
[self.stackView addArrangedSubview:self.lineButtonView];
|
||||
[self.stackView addArrangedSubview:self.fbButtonView];
|
||||
[self.stackView addArrangedSubview:self.lineButtonView];
|
||||
|
||||
|
||||
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -159,11 +172,28 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
make.left.mas_equalTo(8);
|
||||
make.bottom.mas_equalTo(self.authBubbleView).mas_offset(-6);
|
||||
}];
|
||||
if (@available(iOS 13.0, *)) {
|
||||
#ifdef DEBUG
|
||||
|
||||
|
||||
[self.appleButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(kGetScaleWidth(295));
|
||||
make.height.mas_equalTo(kGetScaleWidth(46));
|
||||
}];
|
||||
|
||||
|
||||
|
||||
#else
|
||||
if(isEnterprise == YES){
|
||||
[self.appleButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(kGetScaleWidth(295));
|
||||
make.height.mas_equalTo(kGetScaleWidth(46));
|
||||
}];
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
[self.appleButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(kGetScaleWidth(295));
|
||||
make.height.mas_equalTo(kGetScaleWidth(46));
|
||||
}];
|
||||
[self.googleButtonView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(kGetScaleWidth(295));
|
||||
make.height.mas_equalTo(kGetScaleWidth(46));
|
||||
@@ -222,22 +252,22 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
}
|
||||
|
||||
- (void)loginDidClick:(UIButton *)sender {
|
||||
if (self.agreeBtn.selected) {
|
||||
ThirdLoginType type = sender.tag - 1000;
|
||||
if(type == ThirdLoginType_Gmail){
|
||||
[self.presenter thirdLoginByGoogleWithPresentingViewController:self configuration:self.configuration];
|
||||
return;
|
||||
if (self.agreeBtn.selected) {
|
||||
ThirdLoginType type = sender.tag - 1000;
|
||||
if(type == ThirdLoginType_Gmail){
|
||||
[self.presenter thirdLoginByGoogleWithPresentingViewController:self configuration:self.configuration];
|
||||
return;
|
||||
}else if(type == ThirdLoginType_FB){
|
||||
[self.presenter thirdLoginByFBWithPresentingViewController:self];
|
||||
return;
|
||||
}
|
||||
[self.presenter thirdLoginWithType:type];
|
||||
[self.presenter thirdLoginWithType:type];
|
||||
|
||||
} else {
|
||||
} else {
|
||||
[UIView animateWithDuration:0.5 animations:^{
|
||||
self.authBubbleView.alpha = 1.0;
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -276,9 +306,9 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
/// 点击一键登录
|
||||
- (void)quickLoginBtnClicked {
|
||||
if (self.agreeBtn.isSelected) {
|
||||
XPLoginPhoneViewController *phoneVC = [[XPLoginPhoneViewController alloc] init];
|
||||
[self.navigationController pushViewController:phoneVC animated:YES];
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventLoginPhoneClick];
|
||||
XPLoginPhoneViewController *phoneVC = [[XPLoginPhoneViewController alloc] init];
|
||||
[self.navigationController pushViewController:phoneVC animated:YES];
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventLoginPhoneClick];
|
||||
} else {
|
||||
[UIView animateWithDuration:0.5 animations:^{
|
||||
self.authBubbleView.alpha = 1.0;
|
||||
@@ -375,14 +405,14 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
}
|
||||
|
||||
- (UIStackView *)stackView {
|
||||
if (!_stackView) {
|
||||
_stackView = [[UIStackView alloc] init];
|
||||
_stackView.axis = UILayoutConstraintAxisVertical;
|
||||
_stackView.distribution = UIStackViewDistributionFillEqually;
|
||||
_stackView.alignment = UIStackViewAlignmentFill;
|
||||
_stackView.spacing = kGetScaleWidth(16);
|
||||
}
|
||||
return _stackView;
|
||||
if (!_stackView) {
|
||||
_stackView = [[UIStackView alloc] init];
|
||||
_stackView.axis = UILayoutConstraintAxisVertical;
|
||||
_stackView.distribution = UIStackViewDistributionFillEqually;
|
||||
_stackView.alignment = UIStackViewAlignmentFill;
|
||||
_stackView.spacing = kGetScaleWidth(16);
|
||||
}
|
||||
return _stackView;
|
||||
}
|
||||
|
||||
- (UILabel *)authBubbleLabel {
|
||||
@@ -396,9 +426,9 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
}
|
||||
|
||||
- (UIButton *)fbButtonView {
|
||||
if (!_fbButtonView) {
|
||||
_fbButtonView = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_fbButtonView setImage: [UIImage imageNamed:@"login_facebook"] forState:UIControlStateNormal];
|
||||
if (!_fbButtonView) {
|
||||
_fbButtonView = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_fbButtonView setImage: [UIImage imageNamed:@"login_facebook"] forState:UIControlStateNormal];
|
||||
[_fbButtonView setTitle:YMLocalizedString(@"XPLoginViewController14") forState:UIControlStateNormal];
|
||||
_fbButtonView.titleLabel.font = kFontMedium(16);
|
||||
[_fbButtonView setTitleColor:UIColorFromRGB(0x6D6B89) forState:UIControlStateNormal];
|
||||
@@ -406,16 +436,16 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
_fbButtonView.backgroundColor = UIColorFromRGB(0xF3F5FA);
|
||||
_fbButtonView.layer.cornerRadius = kGetScaleWidth(46)/2;
|
||||
_fbButtonView.layer.masksToBounds = YES;
|
||||
_fbButtonView.tag = 1000 + ThirdLoginType_FB;
|
||||
[_fbButtonView addTarget:self action:@selector(loginDidClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _fbButtonView;
|
||||
_fbButtonView.tag = 1000 + ThirdLoginType_FB;
|
||||
[_fbButtonView addTarget:self action:@selector(loginDidClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _fbButtonView;
|
||||
}
|
||||
|
||||
- (UIButton *)googleButtonView {
|
||||
if (!_googleButtonView) {
|
||||
_googleButtonView = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_googleButtonView setImage: [UIImage imageNamed:@"login_gmail"] forState:UIControlStateNormal];
|
||||
if (!_googleButtonView) {
|
||||
_googleButtonView = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_googleButtonView setImage: [UIImage imageNamed:@"login_gmail"] forState:UIControlStateNormal];
|
||||
[_googleButtonView setTitle:YMLocalizedString(@"XPLoginViewController13") forState:UIControlStateNormal];
|
||||
_googleButtonView.titleLabel.font = kFontMedium(16);
|
||||
[_googleButtonView setTitleColor:UIColorFromRGB(0x6D6B89) forState:UIControlStateNormal];
|
||||
@@ -423,16 +453,16 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
_googleButtonView.backgroundColor = UIColorFromRGB(0xF3F5FA);
|
||||
_googleButtonView.layer.cornerRadius = kGetScaleWidth(46)/2;
|
||||
_googleButtonView.layer.masksToBounds = YES;
|
||||
_googleButtonView.tag = 1000 + ThirdLoginType_Gmail;
|
||||
[_googleButtonView addTarget:self action:@selector(loginDidClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _googleButtonView;
|
||||
_googleButtonView.tag = 1000 + ThirdLoginType_Gmail;
|
||||
[_googleButtonView addTarget:self action:@selector(loginDidClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _googleButtonView;
|
||||
}
|
||||
|
||||
- (UIButton *)lineButtonView {
|
||||
if (!_lineButtonView) {
|
||||
_lineButtonView = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_lineButtonView setImage: [UIImage imageNamed:@"login_line"] forState:UIControlStateNormal];
|
||||
if (!_lineButtonView) {
|
||||
_lineButtonView = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_lineButtonView setImage: [UIImage imageNamed:@"login_line"] forState:UIControlStateNormal];
|
||||
[_lineButtonView setTitle:YMLocalizedString(@"XPLoginViewController15") forState:UIControlStateNormal];
|
||||
_lineButtonView.titleLabel.font = kFontMedium(16);
|
||||
[_lineButtonView setTitleColor:UIColorFromRGB(0x6D6B89) forState:UIControlStateNormal];
|
||||
@@ -440,10 +470,10 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
_lineButtonView.backgroundColor = UIColorFromRGB(0xF3F5FA);
|
||||
_lineButtonView.layer.cornerRadius = kGetScaleWidth(46)/2;
|
||||
_lineButtonView.layer.masksToBounds = YES;
|
||||
_lineButtonView.tag = 1000 + ThirdLoginType_Line;
|
||||
[_lineButtonView addTarget:self action:@selector(loginDidClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _lineButtonView;
|
||||
_lineButtonView.tag = 1000 + ThirdLoginType_Line;
|
||||
[_lineButtonView addTarget:self action:@selector(loginDidClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _lineButtonView;
|
||||
}
|
||||
- (UIButton *)appleButton {
|
||||
if (!_appleButton) {
|
||||
@@ -464,18 +494,18 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
|
||||
|
||||
- (GIDConfiguration *)configuration{
|
||||
if (!_configuration){
|
||||
NSString * number = [AESUtils aesDecrypt:@"ScLBu7ctIiyGCKPro3Jj6XMdsdCCpNT9L4wyjHEF+bguqubkXNSayFBGMKmoDwe1hjfAc958XSaBdMyEaFXLO38Bwq3xURYVNpgEM4b14zg="];
|
||||
_configuration = [[GIDConfiguration alloc] initWithClientID:number];
|
||||
}
|
||||
return _configuration;
|
||||
if (!_configuration){
|
||||
NSString * number = [AESUtils aesDecrypt:@"ScLBu7ctIiyGCKPro3Jj6XMdsdCCpNT9L4wyjHEF+bguqubkXNSayFBGMKmoDwe1hjfAc958XSaBdMyEaFXLO38Bwq3xURYVNpgEM4b14zg="];
|
||||
_configuration = [[GIDConfiguration alloc] initWithClientID:number];
|
||||
}
|
||||
return _configuration;
|
||||
}
|
||||
- (UIImageView *)bgImageView{
|
||||
if(!_bgImageView){
|
||||
_bgImageView = [[UIImageView alloc]init];
|
||||
_bgImageView.image = kImage(@"pi_app_logo_new_bg");
|
||||
_bgImageView.contentMode = 2;
|
||||
}
|
||||
}
|
||||
return _bgImageView;
|
||||
}
|
||||
- (UIImageView *)logoView{
|
||||
|
@@ -180,7 +180,17 @@
|
||||
}
|
||||
- (NSArray *)listData{
|
||||
if(!_listData){
|
||||
#ifdef DEBUG
|
||||
_listData = @[YMLocalizedString(@"XPNobleCenterPayView2"),@"Apple Pay"];
|
||||
#else
|
||||
if(isEnterprise == YES){
|
||||
_listData = @[YMLocalizedString(@"XPNobleCenterPayView2"),@"Apple Pay"];
|
||||
}else{
|
||||
_listData = @[YMLocalizedString(@"XPNobleCenterPayView2")];
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
return _listData;
|
||||
}
|
||||
|
Reference in New Issue
Block a user