装扮商城-赠送装扮

This commit is contained in:
chenguilong
2022-07-29 17:09:01 +08:00
parent 8a770de295
commit a45b2e761a
11 changed files with 466 additions and 8 deletions

View File

@@ -279,6 +279,8 @@
9BE01AE128937DBC00B50299 /* XPDressUpShopCardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BE01AE028937DBC00B50299 /* XPDressUpShopCardViewController.m */; };
9BE01AE428937EDE00B50299 /* XPDressUpShopCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BE01AE328937EDE00B50299 /* XPDressUpShopCollectionViewCell.m */; };
9BE01AE728938AB600B50299 /* XPDressUpShopCardTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BE01AE628938AB600B50299 /* XPDressUpShopCardTableViewCell.m */; };
9BE01AEA2893CB4400B50299 /* XPDressSearchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BE01AE92893CB4400B50299 /* XPDressSearchViewController.m */; };
9BE01AED2893D0DF00B50299 /* XPDressShopSearchTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BE01AEC2893D0DF00B50299 /* XPDressShopSearchTableViewCell.m */; };
9BE29A6B27D1BFF700446AB5 /* anchor_room_speak.svga in Resources */ = {isa = PBXBuildFile; fileRef = 9BE29A6927D1BFF700446AB5 /* anchor_room_speak.svga */; };
9BE29A6D27D210A500446AB5 /* anchor_room_bg.svga in Resources */ = {isa = PBXBuildFile; fileRef = 9BE29A6C27D210A500446AB5 /* anchor_room_bg.svga */; };
9BE2FA90288010D300EF3D83 /* AnchorRoomSrollTipView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BE2FA8F288010D300EF3D83 /* AnchorRoomSrollTipView.m */; };
@@ -1442,6 +1444,10 @@
9BE01AE328937EDE00B50299 /* XPDressUpShopCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPDressUpShopCollectionViewCell.m; sourceTree = "<group>"; };
9BE01AE528938AB600B50299 /* XPDressUpShopCardTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPDressUpShopCardTableViewCell.h; sourceTree = "<group>"; };
9BE01AE628938AB600B50299 /* XPDressUpShopCardTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPDressUpShopCardTableViewCell.m; sourceTree = "<group>"; };
9BE01AE82893CB4400B50299 /* XPDressSearchViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPDressSearchViewController.h; sourceTree = "<group>"; };
9BE01AE92893CB4400B50299 /* XPDressSearchViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPDressSearchViewController.m; sourceTree = "<group>"; };
9BE01AEB2893D0DF00B50299 /* XPDressShopSearchTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPDressShopSearchTableViewCell.h; sourceTree = "<group>"; };
9BE01AEC2893D0DF00B50299 /* XPDressShopSearchTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPDressShopSearchTableViewCell.m; sourceTree = "<group>"; };
9BE29A6927D1BFF700446AB5 /* anchor_room_speak.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = anchor_room_speak.svga; sourceTree = "<group>"; };
9BE29A6C27D210A500446AB5 /* anchor_room_bg.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = anchor_room_bg.svga; sourceTree = "<group>"; };
9BE2FA8E288010D300EF3D83 /* AnchorRoomSrollTipView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AnchorRoomSrollTipView.h; sourceTree = "<group>"; };
@@ -4847,6 +4853,8 @@
9BE01AD328927E9C00B50299 /* XPDressUpShopListViewController.m */,
9BE01ADF28937DBC00B50299 /* XPDressUpShopCardViewController.h */,
9BE01AE028937DBC00B50299 /* XPDressUpShopCardViewController.m */,
9BE01AE82893CB4400B50299 /* XPDressSearchViewController.h */,
9BE01AE92893CB4400B50299 /* XPDressSearchViewController.m */,
);
path = View;
sourceTree = "<group>";
@@ -4922,6 +4930,8 @@
9BE01AE328937EDE00B50299 /* XPDressUpShopCollectionViewCell.m */,
9BE01AE528938AB600B50299 /* XPDressUpShopCardTableViewCell.h */,
9BE01AE628938AB600B50299 /* XPDressUpShopCardTableViewCell.m */,
9BE01AEB2893D0DF00B50299 /* XPDressShopSearchTableViewCell.h */,
9BE01AEC2893D0DF00B50299 /* XPDressShopSearchTableViewCell.m */,
);
path = Cell;
sourceTree = "<group>";
@@ -7472,6 +7482,7 @@
E8B846CB26FDD7CD00A777FE /* XPMineRechargeViewController.m in Sources */,
E86596512701A1C000846EBD /* StatisticsService.m in Sources */,
E824544026F58F9400BE8163 /* XPMinePayPwdViewController.m in Sources */,
9BE01AED2893D0DF00B50299 /* XPDressShopSearchTableViewCell.m in Sources */,
E8C1670928067DAA00ECB15C /* XPMineGuildSuperAdminSetViewController.m in Sources */,
E8E859DA28264C2300EE4857 /* SJXCSMIPHelper.m in Sources */,
E890BC04273CF0500007C46B /* XPGiftCountModel.m in Sources */,
@@ -7759,6 +7770,7 @@
E8EE827D272B9A2300A17217 /* XPRoomSendTextView.m in Sources */,
9BD63FAE277EE97A006EB744 /* XPReleaseRadioPresenter.m in Sources */,
9B1FC3D827E49C36006EFFE0 /* XPMineDressBubbleCollectionViewCell.m in Sources */,
9BE01AEA2893CB4400B50299 /* XPDressSearchViewController.m in Sources */,
9B5BF8A827E1BED1005DD346 /* Api+RoomTrumpet.m in Sources */,
9B1B72B528003664003FACE9 /* Api+AnchorPk.m in Sources */,
E8EEB90626FC5772007C6EBA /* XPMineUserInfoEditViewController.m in Sources */,

View File

@@ -91,6 +91,13 @@ NS_ASSUME_NONNULL_BEGIN
/// @param dressId 装扮id
+ (void)requestDressUpShopBuy:(HttpRequestHelperCompletion)completion dressType:(NSString *)dressType dressId:(NSString *)dressId;
/// 赠送装扮
/// @param completion 完成
/// @param dressType 装扮类型
/// @param dressId 装扮ID
/// @param targetUid 目标用户UID
+ (void)requestSendDress:(HttpRequestHelperCompletion)completion dressType:(NSString *)dressType dressId:(NSString *)dressId targetUid:(NSString *)targetUid;
@end
NS_ASSUME_NONNULL_END

View File

@@ -121,4 +121,13 @@
[self makeRequest:@"dress/shop/buy" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, dressType, dressId, nil];
}
///
/// @param completion
/// @param dressType
/// @param dressId ID
/// @param targetUid UID
+ (void)requestSendDress:(HttpRequestHelperCompletion)completion dressType:(NSString *)dressType dressId:(NSString *)dressId targetUid:(NSString *)targetUid {
[self makeRequest:@"dress/shop/give" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, dressType, dressId, targetUid, nil];
}
@end

View File

@@ -0,0 +1,26 @@
//
// XPDressShopSearchTableViewCell.h
// xplan-ios
//
// Created by GreenLand on 2022/7/29.
//
#import <UIKit/UIKit.h>
#import "HomeSearchResultModel.h"
NS_ASSUME_NONNULL_BEGIN
@class XPDressShopSearchTableViewCell;
@protocol XPDressShopSearchTableViewCellDelegate <NSObject>
- (void)xPDressShopSearchTableViewCellSendButtonClick:(XPDressShopSearchTableViewCell *)cell;
@end
@interface XPDressShopSearchTableViewCell : UITableViewCell
@property (nonatomic, strong) HomeSearchResultModel *data;
@property (nonatomic, weak) id<XPDressShopSearchTableViewCellDelegate> delegate;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,183 @@
//
// XPDressShopSearchTableViewCell.m
// xplan-ios
//
// Created by GreenLand on 2022/7/29.
//
#import "XPDressShopSearchTableViewCell.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "ThemeColor.h"
#import "UIImage+Utils.h"
///Model
#import "HomeSearchResultModel.h"
///View
#import "NetImageView.h"
@interface XPDressShopSearchTableViewCell ()
///
@property (nonatomic,strong) NetImageView *avatarImageView;
///
@property (nonatomic,strong) UIStackView *nameStackView;
///
@property (nonatomic,strong) UILabel *nickLabel;
///
@property (nonatomic,strong) UIImageView *sexImageView;
///id
@property (nonatomic,strong) UILabel *idLabel;
///线
@property (nonatomic,strong) UIView * lineView;
///
@property (nonatomic, strong) UIButton *sendButton;
@end
@implementation XPDressShopSearchTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
#pragma mark - Public Method
- (void)setData:(HomeSearchResultModel *)data {
if (data) {
self.avatarImageView.imageUrl = data.avatar;
self.nickLabel.text = data.nick;
self.idLabel.text = [NSString stringWithFormat:@"%@号:%@",AppName, data.erbanNo];
self.sexImageView.image = data.gender == GenderType_Female ? [UIImage imageNamed:@"common_female"] : [UIImage imageNamed:@"common_male"];
}
}
#pragma mark - Private Method
- (void)initSubViews {
self.selectionStyle = UITableViewCellSelectionStyleNone;
self.backgroundColor = [UIColor clearColor];
[self.contentView addSubview:self.avatarImageView];
[self.contentView addSubview:self.nameStackView];
[self.contentView addSubview:self.idLabel];
[self.contentView addSubview:self.sendButton];
[self.contentView addSubview:self.lineView];
[self.nameStackView addArrangedSubview:self.nickLabel];
[self.nameStackView addArrangedSubview:self.sexImageView];
}
- (void)initSubViewConstraints {
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(45, 45));
make.left.mas_equalTo(self.contentView).offset(15);
make.centerY.mas_equalTo(self.contentView);
}];
[self.nameStackView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.avatarImageView.mas_right).offset(13);
make.height.mas_equalTo(20);
make.bottom.mas_equalTo(self.avatarImageView.mas_centerY).offset(-1.5);
}];
[self.idLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.nameStackView);
make.top.mas_equalTo(self.avatarImageView.mas_centerY).offset(1.5);
}];
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.nameStackView);
make.right.mas_equalTo(self.contentView).offset(-15);
make.bottom.mas_equalTo(self.contentView);
make.height.mas_equalTo(1);
}];
[self.sendButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(self.contentView).offset(-15);
make.centerY.mas_equalTo(self.contentView);
make.size.mas_equalTo(CGSizeMake(72, 24));
}];
}
#pragma mark - Event Response
- (void)sendButtonAction:(UIButton *)sender {
if (self.delegate && [self.delegate respondsToSelector:@selector(xPDressShopSearchTableViewCellSendButtonClick:)]) {
[self.delegate xPDressShopSearchTableViewCellSendButtonClick:self];
}
}
#pragma mark - Getters And Setters
- (NetImageView *)avatarImageView {
if (!_avatarImageView) {
NetImageConfig * config = [[NetImageConfig alloc] init];
config.imageType = ImageTypeUserIcon;
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
_avatarImageView = [[NetImageView alloc] initWithConfig:config];
_avatarImageView.layer.masksToBounds = YES;
_avatarImageView.layer.cornerRadius = 45/2;
_avatarImageView.contentMode = UIViewContentModeScaleAspectFill;
}
return _avatarImageView;
}
- (UIStackView *)nameStackView {
if (!_nameStackView) {
_nameStackView = [[UIStackView alloc] init];
_nameStackView.axis = UILayoutConstraintAxisHorizontal;
_nameStackView.distribution = UIStackViewDistributionFill;
_nameStackView.alignment = UIStackViewAlignmentCenter;
_nameStackView.spacing = 2;
}
return _nameStackView;
}
- (UILabel *)nickLabel {
if (!_nickLabel) {
_nickLabel = [[UILabel alloc] init];
_nickLabel.text = @"";
_nickLabel.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:15];
_nickLabel.textColor = [ThemeColor secondTextColor];
}
return _nickLabel;
}
- (UIImageView *)sexImageView {
if (!_sexImageView) {
_sexImageView = [[UIImageView alloc] init];
}
return _sexImageView;
}
- (UILabel *)idLabel {
if (!_idLabel) {
_idLabel = [[UILabel alloc] init];
_idLabel.font = [UIFont systemFontOfSize:13];
_idLabel.textColor = [ThemeColor textThirdColor];
}
return _idLabel;
}
- (UIView *)lineView {
if (!_lineView) {
_lineView = [[UIView alloc] init];
_lineView.backgroundColor = [ThemeColor dividerColor];
}
return _lineView;
}
- (UIButton *)sendButton {
if (!_sendButton) {
_sendButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_sendButton setTitle:@"赠送" forState:UIControlStateNormal];
[_sendButton setTitleColor:[ThemeColor confirmButtonTextColor] forState:UIControlStateNormal];
[_sendButton addTarget:self action:@selector(sendButtonAction:) forControlEvents:UIControlEventTouchUpInside];
_sendButton.layer.masksToBounds = YES;
_sendButton.layer.cornerRadius = 24/2;
_sendButton.titleLabel.font = [UIFont systemFontOfSize:12];
[_sendButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
}
return _sendButton;
}
@end

View File

@@ -0,0 +1,19 @@
//
// XPDressSearchViewController.h
// xplan-ios
//
// Created by GreenLand on 2022/7/29.
//
#import "MvpViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPDressSearchViewController : MvpViewController
@property (nonatomic, assign) NSInteger dressType;
@property (nonatomic, copy) NSString *dressId;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,181 @@
//
// XPDressSearchViewController.m
// xplan-ios
//
// Created by GreenLand on 2022/7/29.
//
#import "XPDressSearchViewController.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "ThemeColor.h"
#import "XPMacro.h"
#import "Api+DressUp.h"
///Model
#import "HomeSearchResultModel.h"
///View
#import "XPDressShopSearchTableViewCell.h"
#import "XPHomeSearchNavView.h"
///P
#import "XPHomeSearchPresenter.h"
#import "XPHomeSearchProtocol.h"
///VC
#import "XPRoomViewController.h"
#import "XPMineUserInfoViewController.h"
@interface XPDressSearchViewController ()<UITableViewDelegate, UITableViewDataSource,XPHomeSearchProtocol, XPHomeSearchNavViewDelegate, UITextFieldDelegate, XPDressShopSearchTableViewCellDelegate>
///
@property (nonatomic,strong) XPHomeSearchNavView *searchView;
///
@property (nonatomic,strong) UITableView *tableView;
///
@property (nonatomic,strong) NSArray *datasource;
@end
@implementation XPDressSearchViewController
- (XPHomeSearchPresenter *)createPresenter {
return [[XPHomeSearchPresenter alloc] init];
}
- (BOOL)isHiddenNavBar {
return YES;
}
- (void)viewDidLoad {
[super viewDidLoad];
[self initSubViews];
[self initSubViewConstraints];
}
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
[self.view endEditing:YES];
}
#pragma mark - Public Method
- (void)searchText:(NSString *)text {
NSString * type = @"2";
[self.presenter searchRoomList:text type:type];
}
#pragma mark - Private Method
- (void)initSubViews {
[self.view addSubview:self.searchView];
[self.view addSubview:self.tableView];
}
- (void)initSubViewConstraints {
[self.searchView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.mas_equalTo(self.view);
make.height.mas_equalTo(kNavigationHeight);
}];
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.bottom.right.mas_equalTo(self.view);
make.top.mas_equalTo(self.searchView.mas_bottom);
}];
}
#pragma mark - UITableViewDelegate And UITableViewDataSource
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
return 74;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return self.datasource.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
XPDressShopSearchTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPDressShopSearchTableViewCell class])];
if (cell == nil) {
cell = [[XPDressShopSearchTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPDressShopSearchTableViewCell class])];
}
HomeSearchResultModel * resultModel = [self.datasource objectAtIndex:indexPath.row];
cell.data = resultModel;
cell.delegate = self;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
#pragma mark - XPDressShopSearchTableViewCellDelegate
- (void)xPDressShopSearchTableViewCellSendButtonClick:(XPDressShopSearchTableViewCell *)cell {
NSIndexPath *indexPath = [self.tableView indexPathForCell:cell];
HomeSearchResultModel * resultModel = [self.datasource objectAtIndex:indexPath.row];
[self showLoading];
[Api requestSendDress:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
[self hideHUD];
if (code == 200) {
[self showSuccessToast:@"赠送成功"];
}
} dressType:[NSString stringWithFormat:@"%zd", self.dressType] dressId:self.dressId targetUid:resultModel.uid];
}
#pragma mark - XPHomeSearchProtocol
- (void)searchRoomSuccess:(NSArray *)data {
self.datasource = data;
[self.tableView reloadData];
}
#pragma mark - <JXCategoryListContentViewDelegate>
- (UIView *)listView {
return self.view;
}
#pragma mark - UITextFieldDelegate
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
if (textField.text.length > 0) {
[textField resignFirstResponder];
[self searchText:textField.text];
} else {
[self showErrorToast:@"请输入需要搜索的内容"];
}
return YES;
}
#pragma mark -XPHomeSearchNavViewDelegate
- (void)xPHomeSearchNavView:(XPHomeSearchNavView *)view didClickSearch:(UIButton *)sender {
if (view.searchTextField.text.length > 0) {
[view.searchTextField resignFirstResponder];
[self searchText:view.searchTextField.text];
} else {
[self showErrorToast:@"请输入需要搜索的内容"];
}
}
- (void)xPHomeSearchNavView:(XPHomeSearchNavView *)view didClickBack:(UIButton *)sender {
[view.searchTextField resignFirstResponder];
[self.navigationController popViewControllerAnimated:YES];
}
#pragma mark - Getters And Setters
- (UITableView *)tableView {
if (!_tableView) {
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
_tableView.delegate = self;
_tableView.dataSource = self;
_tableView.tableHeaderView = [UIView new];
_tableView.tableFooterView = [UIView new];
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_tableView.backgroundColor = [UIColor clearColor];
if (@available(iOS 11.0, *)) {
_tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}
[_tableView registerClass:[XPDressShopSearchTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPDressShopSearchTableViewCell class])];
}
return _tableView;
}
- (XPHomeSearchNavView *)searchView {
if (!_searchView) {
_searchView = [[XPHomeSearchNavView alloc] init];
_searchView.delegate = self;
_searchView.searchTextField.delegate = self;
}
return _searchView;
}
@end

View File

@@ -13,6 +13,7 @@
///View
#import "XPMineDressEmptyTableViewCell.h"
#import "XPDressUpShopCardTableViewCell.h"
#import "XPDressSearchViewController.h"
///P
#import "XPDressUpShopPresenter.h"
///Model
@@ -52,7 +53,10 @@
#pragma mark - XPDressUpShopCardTableViewCellDelegate
///
- (void)xPDressUpShopCardTableViewCellSendDress:(XPDressUpShopCardTableViewCell *)view dressId:(NSString *)dressId {
XPDressSearchViewController *vc = [[XPDressSearchViewController alloc] init];
vc.dressType = self.type;
vc.dressId = dressId;
[self.navigationController pushViewController:vc animated:YES];
}
///

View File

@@ -13,6 +13,7 @@
///View
#import "XPMineDressEmptyCollectionViewCell.h"
#import "XPDressUpShopCollectionViewCell.h"
#import "XPDressSearchViewController.h"
///P
#import "XPDressUpShopPresenter.h"
///Model
@@ -52,7 +53,10 @@
#pragma mark - XPDressUpShopCollectionViewCellDelegate
- (void)xPDressUpShopCollectionViewCellSendDress:(XPDressUpShopCollectionViewCell *)view dressId:(NSString *)dressId {
XPDressSearchViewController *vc = [[XPDressSearchViewController alloc] init];
vc.dressType = self.type;
vc.dressId = dressId;
[self.navigationController pushViewController:vc animated:YES];
}
- (void)xPDressUpShopCollectionViewCellBuyDress:(XPDressUpShopCollectionViewCell *)view dressId:(NSString *)dressId {

View File

@@ -69,13 +69,17 @@
- (void)viewDidLoad {
[super viewDidLoad];
[self requestActivityList];
[self requestWallet];
[self initSubViews];
[self initSubViewConstraints];
[self addNavigationItemWithTitles:@[@"我的装扮"] titleColor:[ThemeColor textThirdColor] isLeft:NO target:self action:@selector(rightButtonAction:) tags:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(buyDressSuccess) name:@"buyDressSuccessNoti" object:nil];
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self requestWallet];
}
#pragma mark - Private Method
- (void)initSubViews {
self.title = @"装扮商城";

View File

@@ -19,6 +19,7 @@
#import "Api+Room.h"
#import "Api+RoomSetting.h"
#import "AccountInfoStorage.h"
#import "ClientConfig.h"
///Model
#import "XPMineItemModel.h"
#import "UserInfoModel.h"
@@ -118,15 +119,10 @@
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.presenter getUserInfo];
[self.presenter getClanDetailInfo];
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[self.presenter getUserWalletInfo];
[self.presenter getPersonItemList];
[self.presenter getLittleGameList];
[self.presenter getMineBannerList];
}
#pragma mark - Response
@@ -437,6 +433,19 @@
}
- (void)onGetUserInfoSuccess:(UserInfoModel *)userInfo {
///401
if (!userInfo.isBindPhone && [ClientConfig shareConfig].iosPhoneBind) {
return;
}
if (userInfo.nick == nil || userInfo.avatar == nil) {
return;
}
[self.presenter getClanDetailInfo];
[self.presenter getUserWalletInfo];
[self.presenter getPersonItemList];
[self.presenter getLittleGameList];
[self.presenter getMineBannerList];
self.userInfo = userInfo;
self.headView.userInfo = userInfo;
[self.tableView reloadData];