This commit is contained in:
2026-03-10 11:25:10 +08:00
parent 0af7428353
commit 72142b0b71
5 changed files with 109 additions and 17 deletions

View File

@@ -50,6 +50,9 @@ static const CGFloat JXheightForHeaderInSection = 39;
@property (nonatomic, strong) UIView *bottomContainer;
@property (nonatomic, strong) UIButton *payButton;
@property (nonatomic, strong) UILabel *agreementLabel;
@property (nonatomic, strong) UIView *documentContainer;
@property (nonatomic, strong) UIButton *privacyButton;
@property (nonatomic, strong) UILabel *documentSeparatorLabel;
@property (nonatomic, strong) UIButton *agreementButton;
/// Deep link pending config ( VIP )
@@ -214,16 +217,33 @@ static const CGFloat JXheightForHeaderInSection = 39;
[self.view addSubview:self.bottomContainer];
[self.bottomContainer addSubview:self.payButton];
[self.bottomContainer addSubview:self.agreementLabel];
[self.bottomContainer addSubview:self.agreementButton];
[self.bottomContainer addSubview:self.documentContainer];
[self.documentContainer addSubview:self.privacyButton];
[self.documentContainer addSubview:self.documentSeparatorLabel];
[self.documentContainer addSubview:self.agreementButton];
[self.bottomContainer mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.equalTo(self.view);
}];
[self.agreementButton mas_makeConstraints:^(MASConstraintMaker *make) {
[self.documentContainer mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.bottomContainer);
make.bottom.equalTo(self.bottomContainer).offset(-KB_SAFE_BOTTOM - 15);
}];
[self.privacyButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.bottom.equalTo(self.documentContainer);
}];
[self.documentSeparatorLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.privacyButton.mas_right).offset(6);
make.centerY.equalTo(self.documentContainer);
}];
[self.agreementButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.documentSeparatorLabel.mas_right).offset(6);
make.top.right.bottom.equalTo(self.documentContainer);
}];
[self.agreementLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.bottomContainer);
@@ -354,6 +374,10 @@ static const CGFloat JXheightForHeaderInSection = 39;
[KBWebViewViewController presentLegalDocumentType:KBLegalDocumentTypeMembershipAgreement fromViewController:self];
}
- (void)onTapPrivacyButton {
[KBWebViewViewController presentLegalDocumentType:KBLegalDocumentTypePrivacyPolicy fromViewController:self];
}
- (void)onTapRestoreButton {
[[KBMaiPointReporter sharedReporter] reportClickWithEventName:@"click_vip_restore_btn"
pageId:@"vip_pay"
@@ -436,6 +460,34 @@ static const CGFloat JXheightForHeaderInSection = 39;
return _agreementLabel;
}
- (UIView *)documentContainer {
if (!_documentContainer) {
_documentContainer = [UIView new];
}
return _documentContainer;
}
- (UIButton *)privacyButton {
if (!_privacyButton) {
_privacyButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_privacyButton setTitle:KBLocalized(@"Privacy Policy") forState:UIControlStateNormal];
[_privacyButton setTitleColor:[UIColor colorWithHex:KBColorValue] forState:UIControlStateNormal];
_privacyButton.titleLabel.font = [KBFont regular:12];
[_privacyButton addTarget:self action:@selector(onTapPrivacyButton) forControlEvents:UIControlEventTouchUpInside];
}
return _privacyButton;
}
- (UILabel *)documentSeparatorLabel {
if (!_documentSeparatorLabel) {
_documentSeparatorLabel = [UILabel new];
_documentSeparatorLabel.text = @"|";
_documentSeparatorLabel.textColor = [UIColor colorWithHex:KBBlackValue];
_documentSeparatorLabel.font = [KBFont regular:12];
}
return _documentSeparatorLabel;
}
- (UIButton *)agreementButton {
if (!_agreementButton) {
_agreementButton = [UIButton buttonWithType:UIButtonTypeCustom];