修正 UI 反馈
This commit is contained in:
21
YuMi/Assets.xcassets/jm/mine_game_order_reduce_icon_disable.imageset/Contents.json
vendored
Normal file
21
YuMi/Assets.xcassets/jm/mine_game_order_reduce_icon_disable.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "mine_game_order_reduce_icon_disable@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
@@ -306,6 +306,8 @@
|
||||
[self.uploadImageButton setTitle:@"" forState:UIControlStateNormal];
|
||||
|
||||
UIColor *placeholderColor = UIColorFromRGB(0xacb0b7);
|
||||
self.contactTextField.layer.cornerRadius = 8;
|
||||
self.contactTextField.layer.masksToBounds = YES;
|
||||
self.contactTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:YMLocalizedString(@"FeedBackViewController5")
|
||||
attributes:@{NSForegroundColorAttributeName: placeholderColor}];
|
||||
|
||||
@@ -458,9 +460,9 @@
|
||||
make.bottom.mas_equalTo(self.feedbackTextView).offset(-8);
|
||||
make.width.mas_equalTo(40);
|
||||
if (isMSRTL()) {
|
||||
make.left.mas_equalTo(self.feedbackTextView).offset(8);
|
||||
make.left.mas_equalTo(self.feedbackTextView).offset(4);
|
||||
} else {
|
||||
make.right.mas_equalTo(self.feedbackTextView).offset(-8);
|
||||
make.right.mas_equalTo(self.feedbackTextView).offset(-4);
|
||||
}
|
||||
}];
|
||||
|
||||
|
@@ -51,7 +51,7 @@
|
||||
<action selector="didTapCloseKeyboardButton:" destination="-1" eventType="touchUpInside" id="bL1-HI-yzv"/>
|
||||
</connections>
|
||||
</button>
|
||||
<textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="手机号或邮箱" textAlignment="natural" minimumFontSize="17" id="CwH-vq-rQN">
|
||||
<textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="手机号或邮箱" textAlignment="natural" minimumFontSize="17" id="CwH-vq-rQN">
|
||||
<rect key="frame" x="14" y="405" width="361" height="34"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" red="0.95294117649999999" green="0.96078431369999995" blue="0.98039215690000003" alpha="1" colorSpace="calibratedRGB"/>
|
||||
|
@@ -82,7 +82,7 @@
|
||||
}];
|
||||
|
||||
[self.subTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(8);
|
||||
make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(4);
|
||||
make.left.mas_equalTo(9.5);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(-9.5);
|
||||
|
@@ -219,7 +219,7 @@
|
||||
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
|
||||
_avatarImageView = [[NetImageView alloc] initWithConfig:config];
|
||||
_avatarImageView.layer.masksToBounds = YES;
|
||||
_avatarImageView.layer.cornerRadius = 25/2;
|
||||
_avatarImageView.layer.cornerRadius = 12.5;
|
||||
_avatarImageView.hidden = YES;
|
||||
}
|
||||
return _avatarImageView;
|
||||
|
@@ -148,7 +148,7 @@
|
||||
subTitleStack.axis = UILayoutConstraintAxisVertical;
|
||||
subTitleStack.alignment = UIStackViewAlignmentTop;
|
||||
subTitleStack.distribution = UIStackViewDistributionEqualSpacing;
|
||||
subTitleStack.spacing = 17;
|
||||
subTitleStack.spacing = 10;
|
||||
[subTitleStack addArrangedSubview:subTitleLabel_1];
|
||||
[subTitleStack addArrangedSubview:subTitleLabel_2];
|
||||
[self addSubview:subTitleStack];
|
||||
@@ -257,15 +257,15 @@
|
||||
if (self.round<1) {
|
||||
self.round = 1;
|
||||
}
|
||||
self.reduceButton.enabled = self.round >= 1;
|
||||
self.numberLabel.text = @(self.round).stringValue;
|
||||
|
||||
|
||||
[self updatePriceContent];
|
||||
}
|
||||
|
||||
- (IBAction)didTapIncreaseButton:(id)sender {
|
||||
self.round ++;
|
||||
self.numberLabel.text = @(self.round).stringValue;
|
||||
self.reduceButton.enabled = self.round >= 1;
|
||||
[self updatePriceContent];
|
||||
}
|
||||
|
||||
@@ -312,8 +312,10 @@
|
||||
- (UIButton *)reduceButton {
|
||||
if (!_reduceButton) {
|
||||
_reduceButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
_reduceButton.enabled = NO;
|
||||
[_reduceButton addTarget:self action:@selector(didTapReduceButton:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[_reduceButton setImage:kImage(@"mine_game_order_reduce_icon") forState:UIControlStateNormal];
|
||||
[_reduceButton setImage:kImage(@"mine_game_order_reduce_icon_disable") forState:UIControlStateDisabled];
|
||||
[_reduceButton enlargeTouchArea:UIEdgeInsetsMake(10, 10, 10, 10)];
|
||||
}
|
||||
return _reduceButton;
|
||||
|
@@ -99,19 +99,19 @@
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
self.contentView.backgroundColor = [UIColor clearColor];
|
||||
|
||||
UIView *shadowView = [[UIView alloc] init];
|
||||
shadowView.backgroundColor = [UIColor clearColor];
|
||||
shadowView.layer.shadowColor = [UIColor redColor].CGColor;
|
||||
shadowView.layer.shadowOpacity = 0.5;
|
||||
shadowView.layer.shadowOffset = CGSizeMake(10, 30);
|
||||
shadowView.layer.shadowRadius = 5;
|
||||
[self.contentView addSubview:shadowView];
|
||||
[shadowView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(0);
|
||||
make.left.mas_equalTo(14);
|
||||
make.right.mas_equalTo(-14);
|
||||
make.bottom.mas_equalTo(-16);
|
||||
}];
|
||||
// UIView *shadowView = [[UIView alloc] init];
|
||||
// shadowView.backgroundColor = [UIColor clearColor];
|
||||
// shadowView.layer.shadowColor = [UIColor redColor].CGColor;
|
||||
// shadowView.layer.shadowOpacity = 0.5;
|
||||
// shadowView.layer.shadowOffset = CGSizeMake(10, 30);
|
||||
// shadowView.layer.shadowRadius = 5;
|
||||
// [self.contentView addSubview:shadowView];
|
||||
// [shadowView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.top.mas_equalTo(0);
|
||||
// make.left.mas_equalTo(14);
|
||||
// make.right.mas_equalTo(-14);
|
||||
// make.bottom.mas_equalTo(-16);
|
||||
// }];
|
||||
|
||||
UIView *container = [[UIView alloc] init];
|
||||
container.backgroundColor = [UIColor whiteColor];
|
||||
@@ -141,7 +141,7 @@
|
||||
userInfoStack.axis = UILayoutConstraintAxisVertical;
|
||||
userInfoStack.distribution = UIStackViewDistributionFill;
|
||||
userInfoStack.alignment = UIStackViewAlignmentTop;
|
||||
userInfoStack.spacing = 8;
|
||||
userInfoStack.spacing = 15.5;
|
||||
[userInfoStack addArrangedSubview:self.nameLabel];
|
||||
[userInfoStack addArrangedSubview:self.userIDLabel];
|
||||
[container addSubview:userInfoStack];
|
||||
@@ -154,7 +154,8 @@
|
||||
}
|
||||
}];
|
||||
|
||||
UIImageView *line = [[UIImageView alloc] initWithImage:kImage(@"mine_game_order_line")];
|
||||
UIView *line = [[UIView alloc] init];
|
||||
line.backgroundColor = UIColorFromRGB(0xf4f4f4);
|
||||
[container addSubview:line];
|
||||
[line mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(0);
|
||||
@@ -224,16 +225,16 @@
|
||||
|
||||
UIStackView *titleStack = [[UIStackView alloc] init];
|
||||
titleStack.axis = UILayoutConstraintAxisVertical;
|
||||
titleStack.distribution = UIStackViewDistributionFill;
|
||||
titleStack.alignment = UIStackViewAlignmentTop;
|
||||
titleStack.spacing = 8;
|
||||
titleStack.distribution = UIStackViewDistributionFillEqually;
|
||||
titleStack.alignment = UIStackViewAlignmentLeading;
|
||||
titleStack.spacing = 15.5;
|
||||
[titleStack addArrangedSubview:[self titleLabel:YMLocalizedString(@"GameOrderContent_11")]];
|
||||
[titleStack addArrangedSubview:[self titleLabel:YMLocalizedString(@"GameOrderContent_12")]];
|
||||
[titleStack addArrangedSubview:[self titleLabel:YMLocalizedString(@"GameOrderContent_13")]];
|
||||
[titleStack addArrangedSubview:[self titleLabel:YMLocalizedString(@"GameOrderContent_14")]];
|
||||
[container addSubview:titleStack];
|
||||
[titleStack mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(line.mas_bottom).offset(13.5);
|
||||
make.top.mas_equalTo(line).offset(11.5);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(self.avatarImageView).offset(-11.5);
|
||||
} else {
|
||||
@@ -244,15 +245,15 @@
|
||||
UIStackView *informationStack = [[UIStackView alloc] init];
|
||||
informationStack.axis = UILayoutConstraintAxisVertical;
|
||||
informationStack.distribution = UIStackViewDistributionFill;
|
||||
informationStack.alignment = UIStackViewAlignmentTop;
|
||||
informationStack.spacing = 8;
|
||||
informationStack.alignment = UIStackViewAlignmentLeading;
|
||||
informationStack.spacing = 15.5;
|
||||
[informationStack addArrangedSubview:self.gameNameLabel];
|
||||
[informationStack addArrangedSubview:priceStack];
|
||||
[informationStack addArrangedSubview:self.timeLabel];
|
||||
[informationStack addArrangedSubview:orderIdStack];
|
||||
[container addSubview:informationStack];
|
||||
[informationStack mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(line.mas_bottom).offset(13.5);
|
||||
make.top.bottom.mas_equalTo(titleStack);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(titleStack.mas_left).offset(-8);
|
||||
make.left.mas_equalTo(container).offset(8);
|
||||
@@ -268,13 +269,14 @@
|
||||
[line_2 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(0);
|
||||
make.height.mas_equalTo(0.5);
|
||||
make.bottom.mas_equalTo(container.mas_bottom).offset(-49);
|
||||
// make.bottom.mas_equalTo(container.mas_bottom).offset(-49);
|
||||
make.top.mas_equalTo(informationStack.mas_bottom).offset(12.5);
|
||||
}];
|
||||
|
||||
UIStackView *buttonsStack = [[UIStackView alloc] init];
|
||||
buttonsStack.axis = UILayoutConstraintAxisHorizontal;
|
||||
buttonsStack.distribution = UIStackViewDistributionFill;
|
||||
buttonsStack.alignment = UIStackViewAlignmentTrailing;
|
||||
buttonsStack.alignment = UIStackViewAlignmentCenter;
|
||||
buttonsStack.spacing = 26;
|
||||
[buttonsStack addArrangedSubview:self.againButton];
|
||||
[buttonsStack addArrangedSubview:self.messageButton];
|
||||
@@ -285,17 +287,17 @@
|
||||
} else {
|
||||
make.right.mas_equalTo(-13);
|
||||
}
|
||||
make.top.mas_equalTo(line_2.mas_bottom);
|
||||
make.bottom.mas_equalTo(container).offset(-13.5);
|
||||
make.top.mas_equalTo(line_2.mas_bottom).offset(10);
|
||||
// make.bottom.mas_equalTo(container).offset(-13.5);
|
||||
}];
|
||||
}
|
||||
|
||||
- (UIStackView *)horizontalStack {
|
||||
UIStackView *stack = [[UIStackView alloc] init];
|
||||
UIStackView *stack = [[UIStackView alloc] initWithFrame:CGRectMake(0, 0, 300, 18)];
|
||||
stack.axis = UILayoutConstraintAxisHorizontal;
|
||||
stack.distribution = UIStackViewDistributionFill;
|
||||
stack.alignment = UIStackViewAlignmentCenter;
|
||||
stack.spacing = 5;
|
||||
stack.spacing = 2;
|
||||
return stack;
|
||||
}
|
||||
|
||||
|
@@ -336,10 +336,10 @@ typedef enum : NSUInteger {
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
|
||||
switch (section) {
|
||||
case GameMate:
|
||||
return self.gameInfos.count > 0 ? 30 : 0;
|
||||
return self.gameInfos.count > 0 ? 40 : 0;
|
||||
break;
|
||||
case Album:
|
||||
return 30;
|
||||
return 40;
|
||||
break;
|
||||
case Medal:
|
||||
return self.medalInfo.medalCount == 0 ? 0 : 30;
|
||||
@@ -351,7 +351,7 @@ typedef enum : NSUInteger {
|
||||
return 50;
|
||||
break;
|
||||
default:
|
||||
return 30;
|
||||
return 40;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -239,7 +239,7 @@
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return 262 + 16;
|
||||
return 262 + 16 + 16;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
|
@@ -93,7 +93,7 @@
|
||||
forControlEvents:UIControlEventTouchUpInside];
|
||||
[_topControlView addSubview:_recommendButton];
|
||||
[_recommendButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self.topControlView).offset(-8);
|
||||
make.bottom.mas_equalTo(self.topControlView);//.offset(-8);
|
||||
make.width.mas_greaterThanOrEqualTo(40);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(self.topControlView).offset(-16);
|
||||
@@ -109,7 +109,7 @@
|
||||
forControlEvents:UIControlEventTouchUpInside];
|
||||
[_topControlView addSubview:_mineButton];
|
||||
[_mineButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self.topControlView).offset(-8);
|
||||
make.bottom.mas_equalTo(self.topControlView);//.offset(-8);
|
||||
make.width.mas_greaterThanOrEqualTo(40);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(_recommendButton.mas_left).offset(-32);
|
||||
@@ -139,9 +139,9 @@
|
||||
_tabMarks.contentMode = UIViewContentModeScaleAspectFill;
|
||||
[_topControlView addSubview:_tabMarks];
|
||||
[_tabMarks mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self.topControlView).offset(-8);
|
||||
make.bottom.mas_equalTo(self.topControlView).offset(-16);
|
||||
make.width.mas_equalTo(14);
|
||||
make.height.mas_equalTo(4);
|
||||
make.height.mas_equalTo(5);
|
||||
make.centerX.mas_equalTo(self.recommendButton.mas_centerX);
|
||||
}];
|
||||
}
|
||||
@@ -153,7 +153,7 @@
|
||||
[_recommendButton setTitleColor:UIColorRGBAlpha(0x0c1d18, 0.6) forState:UIControlStateNormal];
|
||||
|
||||
[self.tabMarks mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self.topControlView).offset(-8);
|
||||
make.bottom.mas_equalTo(self.topControlView);//.offset(-8);
|
||||
make.width.mas_equalTo(14);
|
||||
make.height.mas_equalTo(4);
|
||||
make.centerX.mas_equalTo(self.mineButton.mas_centerX);
|
||||
@@ -167,7 +167,7 @@
|
||||
[_mineButton setTitleColor:UIColorRGBAlpha(0x0c1d18, 0.6) forState:UIControlStateNormal];
|
||||
|
||||
[self.tabMarks mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self.topControlView).offset(-8);
|
||||
make.bottom.mas_equalTo(self.topControlView);//.offset(-8);
|
||||
make.width.mas_equalTo(14);
|
||||
make.height.mas_equalTo(4);
|
||||
make.centerX.mas_equalTo(self.recommendButton.mas_centerX);
|
||||
|
@@ -522,9 +522,6 @@ NSString * const kJSOpenPaymentCallback = @"openPaymentCallback";
|
||||
|
||||
#pragma mark - Payment Method
|
||||
- (void)handleOpenPayment:(NSString *)chargeProdId {
|
||||
#if DEBUG
|
||||
chargeProdId = @"com.hflighting.yumi.first.10";
|
||||
#endif
|
||||
if (chargeProdId.length == 0) {
|
||||
[self showErrorToast:@"no charge ID"];
|
||||
return;
|
||||
@@ -536,6 +533,7 @@ NSString * const kJSOpenPaymentCallback = @"openPaymentCallback";
|
||||
[Api requestIAPRecharge:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
@kStrongify(self);
|
||||
|
||||
[self hideHUD];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
switch (code) {
|
||||
case 200: {
|
||||
@@ -547,9 +545,8 @@ NSString * const kJSOpenPaymentCallback = @"openPaymentCallback";
|
||||
}
|
||||
break;
|
||||
case 50000:
|
||||
[self showErrorToast:msg];
|
||||
break;
|
||||
default:
|
||||
[self showErrorToast:msg];
|
||||
break;
|
||||
}
|
||||
});
|
||||
@@ -622,9 +619,9 @@ NSString * const kJSOpenPaymentCallback = @"openPaymentCallback";
|
||||
[Api checkReceipt:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
@kStrongify(self);
|
||||
if (code == 200) {
|
||||
|
||||
[self checkReceiptSuccess:transactionIdentifier];
|
||||
} else {
|
||||
|
||||
[XNDJTDDLoadingTool showErrorWithMessage:msg];
|
||||
}
|
||||
}
|
||||
chooseEnv:@"true"
|
||||
@@ -688,9 +685,11 @@ NSString * const kJSOpenPaymentCallback = @"openPaymentCallback";
|
||||
productID:(NSString *)productID {
|
||||
NSDictionary *dic = @{@"code":@(code), @"orderId":orderID, @"productId":productID};
|
||||
NSString *js = [NSString stringWithFormat:@"openPaymentCallback(%@)", dic.toJSONString];
|
||||
@kWeakify(self);
|
||||
[self.webview evaluateJavaScript:js
|
||||
completionHandler:^(id _Nullable result, NSError * _Nullable error) {
|
||||
|
||||
@kStrongify(self);
|
||||
[self hideHUD];
|
||||
}];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user