diff --git a/xdts-ios 3/TreeHole.xcodeproj/project.pbxproj b/xdts-ios 3/TreeHole.xcodeproj/project.pbxproj index 5edd965..c990c0a 100644 --- a/xdts-ios 3/TreeHole.xcodeproj/project.pbxproj +++ b/xdts-ios 3/TreeHole.xcodeproj/project.pbxproj @@ -2766,11 +2766,11 @@ isa = PBXGroup; children = ( B038487828141AD100F47C18 /* WLUnitField.h */, - B038487928141AD100F47C18 /* WLUnitFieldTextRange.m */, - B038487A28141AD100F47C18 /* WLUnitFieldTextPosition.h */, - B038487B28141AD100F47C18 /* WLUnitFieldTextRange.h */, B038487C28141AD100F47C18 /* WLUnitField.m */, + B038487A28141AD100F47C18 /* WLUnitFieldTextPosition.h */, B038487D28141AD100F47C18 /* WLUnitFieldTextPosition.m */, + B038487B28141AD100F47C18 /* WLUnitFieldTextRange.h */, + B038487928141AD100F47C18 /* WLUnitFieldTextRange.m */, ); path = WLUnitField; sourceTree = ""; @@ -4323,7 +4323,7 @@ "$(inherited)", "$(PROJECT_DIR)/TreeHole/Code/WechatSDK/OpenSDK2.0.2", ); - MARKETING_VERSION = 2.4.1; + MARKETING_VERSION = 2.4.2; PRODUCT_BUNDLE_IDENTIFIER = com.zncdts.app123; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -4385,7 +4385,7 @@ "$(inherited)", "$(PROJECT_DIR)/TreeHole/Code/WechatSDK/OpenSDK2.0.2", ); - MARKETING_VERSION = 2.4.1; + MARKETING_VERSION = 2.4.2; PRODUCT_BUNDLE_IDENTIFIER = com.zncdts.app123; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/settings/near_icon.imageset/Contents.json b/xdts-ios 3/TreeHole/Assets.xcassets/settings/near_icon.imageset/Contents.json new file mode 100644 index 0000000..0b0e832 --- /dev/null +++ b/xdts-ios 3/TreeHole/Assets.xcassets/settings/near_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Slice 372@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Slice 372@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/settings/near_icon.imageset/Slice 372@2x.png b/xdts-ios 3/TreeHole/Assets.xcassets/settings/near_icon.imageset/Slice 372@2x.png new file mode 100644 index 0000000..a95b987 Binary files /dev/null and b/xdts-ios 3/TreeHole/Assets.xcassets/settings/near_icon.imageset/Slice 372@2x.png differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/settings/near_icon.imageset/Slice 372@3x.png b/xdts-ios 3/TreeHole/Assets.xcassets/settings/near_icon.imageset/Slice 372@3x.png new file mode 100644 index 0000000..9ae45c0 Binary files /dev/null and b/xdts-ios 3/TreeHole/Assets.xcassets/settings/near_icon.imageset/Slice 372@3x.png differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/settings/pwd_icon.imageset/Contents.json b/xdts-ios 3/TreeHole/Assets.xcassets/settings/pwd_icon.imageset/Contents.json new file mode 100644 index 0000000..c760a3c --- /dev/null +++ b/xdts-ios 3/TreeHole/Assets.xcassets/settings/pwd_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Slice 364@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Slice 364@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/settings/pwd_icon.imageset/Slice 364@2x.png b/xdts-ios 3/TreeHole/Assets.xcassets/settings/pwd_icon.imageset/Slice 364@2x.png new file mode 100644 index 0000000..10bb7d8 Binary files /dev/null and b/xdts-ios 3/TreeHole/Assets.xcassets/settings/pwd_icon.imageset/Slice 364@2x.png differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/settings/pwd_icon.imageset/Slice 364@3x.png b/xdts-ios 3/TreeHole/Assets.xcassets/settings/pwd_icon.imageset/Slice 364@3x.png new file mode 100644 index 0000000..a8f1a95 Binary files /dev/null and b/xdts-ios 3/TreeHole/Assets.xcassets/settings/pwd_icon.imageset/Slice 364@3x.png differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/settings/yaoqing.imageset/Contents.json b/xdts-ios 3/TreeHole/Assets.xcassets/settings/yaoqing.imageset/Contents.json new file mode 100644 index 0000000..bc1f7b3 --- /dev/null +++ b/xdts-ios 3/TreeHole/Assets.xcassets/settings/yaoqing.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Slice 362@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Slice 362@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/settings/yaoqing.imageset/Slice 362@2x.png b/xdts-ios 3/TreeHole/Assets.xcassets/settings/yaoqing.imageset/Slice 362@2x.png new file mode 100644 index 0000000..73e8c4b Binary files /dev/null and b/xdts-ios 3/TreeHole/Assets.xcassets/settings/yaoqing.imageset/Slice 362@2x.png differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/settings/yaoqing.imageset/Slice 362@3x.png b/xdts-ios 3/TreeHole/Assets.xcassets/settings/yaoqing.imageset/Slice 362@3x.png new file mode 100644 index 0000000..9622e21 Binary files /dev/null and b/xdts-ios 3/TreeHole/Assets.xcassets/settings/yaoqing.imageset/Slice 362@3x.png differ diff --git a/xdts-ios 3/TreeHole/Code/Base/PYAppService.m b/xdts-ios 3/TreeHole/Code/Base/PYAppService.m index bbb477c..4caabcd 100755 --- a/xdts-ios 3/TreeHole/Code/Base/PYAppService.m +++ b/xdts-ios 3/TreeHole/Code/Base/PYAppService.m @@ -108,7 +108,12 @@ static AppConfig *gAppConfig; if ([path isEqualToString:@"open_clone"]) { // config.cancelTitle = @"取消"; config.otherTitle = @"下一步"; + } else if ([message containsString:@"缘分匹配"]) { + config.otherTitle = @"开通VIP"; + } else if ([message containsString:@"发布次数"]) { + config.otherTitle = @"开通VIP"; } + config.otherHandler = ^(MTAlertButton *button) { [self showVipVC:source]; }; diff --git a/xdts-ios 3/TreeHole/Code/Base/PYHTTPManager.h b/xdts-ios 3/TreeHole/Code/Base/PYHTTPManager.h index 415ee57..ccc9e69 100755 --- a/xdts-ios 3/TreeHole/Code/Base/PYHTTPManager.h +++ b/xdts-ios 3/TreeHole/Code/Base/PYHTTPManager.h @@ -22,18 +22,18 @@ typedef enum : NSUInteger { #if IS_DEBUG -//#define PYHttpBaseUrl @"http://192.168.3.55:8890/v1/" +#define PYHttpBaseUrl @"http://192.168.3.55:8890/v1/" ///正式 -#define PYHttpBaseUrl @"https://xidi.iquanpai.com/app-service/v1/" +//#define PYHttpBaseUrl @"https://xidi.iquanpai.com/app-service/v1/" #else //本地 -//#define PYHttpBaseUrl @"http://192.168.3.55:8890/v1/" +#define PYHttpBaseUrl @"http://192.168.3.55:8890/v1/" ///正式 -#define PYHttpBaseUrl @"https://xidi.iquanpai.com/app-service/v1/" +//#define PYHttpBaseUrl @"https://xidi.iquanpai.com/app-service/v1/" #endif diff --git a/xdts-ios 3/TreeHole/Code/Features/Bottle/View/BottleShaiXuanCellView.m b/xdts-ios 3/TreeHole/Code/Features/Bottle/View/BottleShaiXuanCellView.m index 4106d2e..24b38fd 100644 --- a/xdts-ios 3/TreeHole/Code/Features/Bottle/View/BottleShaiXuanCellView.m +++ b/xdts-ios 3/TreeHole/Code/Features/Bottle/View/BottleShaiXuanCellView.m @@ -115,7 +115,7 @@ if ([_titleStr isEqualToString:@"高级筛选"]) { if ([UserService currentUser].vip_kind != 10) { dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - [SVProgressHUD showErrorWithStatus:@"高级筛选是年VIP的专属特权,开通才能使用哦~"]; + [SVProgressHUD showErrorWithStatus:@"开通年vip后就可以无限筛选啦,还可以获得其他十九种会员特权哦"]; }); [PYAppService showVipVC:@"vip_page"]; diff --git a/xdts-ios 3/TreeHole/Code/Features/Bottle/View/BottleUserNearbyShaiXuanAlertView.m b/xdts-ios 3/TreeHole/Code/Features/Bottle/View/BottleUserNearbyShaiXuanAlertView.m index fe0f084..8fcb336 100644 --- a/xdts-ios 3/TreeHole/Code/Features/Bottle/View/BottleUserNearbyShaiXuanAlertView.m +++ b/xdts-ios 3/TreeHole/Code/Features/Bottle/View/BottleUserNearbyShaiXuanAlertView.m @@ -52,7 +52,7 @@ // _dataDict = [NSMutableDictionary dictionaryWithDictionary: @{@"age":@"",@"gender_str":@"",@"online":@"1",@"new":@"1",@"vip":@"1"}]; for (NSInteger i = 0; i < titleArray.count; i++) { - BottleShaiXuanCellView* cellView = [[BottleShaiXuanCellView alloc]initWithFrame:CGRectMake(0, _contentTopView.bottom + 25 + (53+25)*i, SCREEN_WIDTH, 53)]; + BottleShaiXuanCellView* cellView = [[BottleShaiXuanCellView alloc]initWithFrame:CGRectMake(0, _contentTopView.bottom + 25 + (53+25)*i, SCREEN_WIDTH, 73)]; cellView.titleStr = titleArray[i]; cellView.selectContentArray = contentArray[i]; cellView.selectContentStrBlockClick = ^(NSString * _Nonnull titleStr, NSString * _Nonnull selectStr) { diff --git a/xdts-ios 3/TreeHole/Code/Features/Bottle/ViewController/BottleNerbyViewController.m b/xdts-ios 3/TreeHole/Code/Features/Bottle/ViewController/BottleNerbyViewController.m index 28a6d46..cdcd2bc 100644 --- a/xdts-ios 3/TreeHole/Code/Features/Bottle/ViewController/BottleNerbyViewController.m +++ b/xdts-ios 3/TreeHole/Code/Features/Bottle/ViewController/BottleNerbyViewController.m @@ -643,7 +643,7 @@ titleLab.textColor = COLOR_WITH_RGB(0xFFFFFF); [_openVipAlertView addSubview:titleLab]; UILabel* subTitleLab = [[UILabel alloc]initWithFrame:CGRectMake(0, titleLab.bottom + 20, SCREEN_WIDTH, 60)]; - subTitleLab.text = @"开通VIP后,才能查看更多附近的同好,也可以根据您的喜好、年龄等筛选想要认识的人,还可以获得其他九大会员特权,拥有更多不一样的体验~"; + subTitleLab.text = @"开通VIP后,才能查看更多附近的同好,也可以根据您的喜好、年龄等筛选想要认识的人,还可以获得其他十五种会员特权,拥有更多不一样的体验~"; subTitleLab.textAlignment = NSTextAlignmentCenter; subTitleLab.numberOfLines = 0; subTitleLab.font = MT_FONT_MEDIUM_NO_SCALE_SIZE(14); diff --git a/xdts-ios 3/TreeHole/Code/Features/Chat/ViewController/C2CChatViewController.m b/xdts-ios 3/TreeHole/Code/Features/Chat/ViewController/C2CChatViewController.m index bb3e243..b4a448e 100644 --- a/xdts-ios 3/TreeHole/Code/Features/Chat/ViewController/C2CChatViewController.m +++ b/xdts-ios 3/TreeHole/Code/Features/Chat/ViewController/C2CChatViewController.m @@ -7,8 +7,9 @@ #import "C2CChatViewController.h" #import "TZImagePickerController+MTImagePicker.h" +#import "PYHTTPManager.h" -@interface C2CChatViewController () +@interface C2CChatViewController () @end @@ -37,4 +38,23 @@ [self.navigationController presentViewController:imagePicker animated:YES completion:nil]; } +- (void)inputController:(TUIInputController *)inputController didSendMessage:(V2TIMMessage *)msg { + [PYHTTPManager getWithPath:@"friend" params:@{ + @"uid":[self.conversationData.userID componentsSeparatedByString:@"_"].lastObject, + + } callback:^(id _Nullable rsp, NSError * _Nullable error) { + NSLog(@"%@",rsp); + if (error == nil) { + [self.messageController sendMessage:msg]; + } else { + NSString *codeStr = [NSString stringWithFormat:@"%@",error.userInfo[@"code"]]; + if (codeStr.intValue == 10) { + [PYAppService showVipVC:@"vip_page"]; + } + } + }]; + +} + + @end diff --git a/xdts-ios 3/TreeHole/Code/Features/Chat/ViewController/MsgListViewController.m b/xdts-ios 3/TreeHole/Code/Features/Chat/ViewController/MsgListViewController.m index 3433534..4f26809 100644 --- a/xdts-ios 3/TreeHole/Code/Features/Chat/ViewController/MsgListViewController.m +++ b/xdts-ios 3/TreeHole/Code/Features/Chat/ViewController/MsgListViewController.m @@ -422,7 +422,7 @@ if (![LoginService isClone]){ if (self.needVipToClone > 0) { - [PYAppService showVipAlertWithPath:@"open_clone" title:@"多一个身份,便多几段缘分" msg:@"和更多想认识的人放肆聊~\n这是送给会员的福利,赶紧开启会员吧!" source:@"open_clone"]; + [PYAppService showVipAlertWithPath:@"open_clone" title:@"多一个身份,便多几段缘分" msg:@"开通VIP就可以无限切换分身啦~还可以获得其他十五种会员特权,拥有更多不一样的体验~" source:@"open_clone"]; return; } } diff --git a/xdts-ios 3/TreeHole/Code/Features/Login/ViewController/GetSmsCodeViewController.m b/xdts-ios 3/TreeHole/Code/Features/Login/ViewController/GetSmsCodeViewController.m index 498456e..a4a0bd8 100644 --- a/xdts-ios 3/TreeHole/Code/Features/Login/ViewController/GetSmsCodeViewController.m +++ b/xdts-ios 3/TreeHole/Code/Features/Login/ViewController/GetSmsCodeViewController.m @@ -90,8 +90,9 @@ // [self unitFieldEditingChanged:self.uniField]; }); #else - [self.uniField becomeFirstResponder]; + #endif + [self.uniField becomeFirstResponder]; } #pragma mark - WLUnitFieldDelegate diff --git a/xdts-ios 3/TreeHole/Code/Features/Login/ViewController/SetGenderViewController.m b/xdts-ios 3/TreeHole/Code/Features/Login/ViewController/SetGenderViewController.m index 5b17c92..441528a 100644 --- a/xdts-ios 3/TreeHole/Code/Features/Login/ViewController/SetGenderViewController.m +++ b/xdts-ios 3/TreeHole/Code/Features/Login/ViewController/SetGenderViewController.m @@ -25,7 +25,7 @@ - (void)viewDidLoad { [super viewDidLoad]; - GenderPickerView *genderPickerView = [GenderPickerView pickerViewWithMultiple:NO]; + GenderPickerView *genderPickerView = [GenderPickerView pickerViewWithMultiple:NO selectedArr:@[]]; genderPickerView.y = FIX_SIZE(55); [self.cardView addSubview:genderPickerView]; PYThemeButton *nextButton = [PYThemeButton nextButtonWithAction:^(UIButton * _Nonnull button) { diff --git a/xdts-ios 3/TreeHole/Code/Features/Login/ViewController/SetLoginUserInfoViewController.m b/xdts-ios 3/TreeHole/Code/Features/Login/ViewController/SetLoginUserInfoViewController.m index 2d402d7..fca4ced 100644 --- a/xdts-ios 3/TreeHole/Code/Features/Login/ViewController/SetLoginUserInfoViewController.m +++ b/xdts-ios 3/TreeHole/Code/Features/Login/ViewController/SetLoginUserInfoViewController.m @@ -155,7 +155,7 @@ if (!_wantGenderTextField) { WeakSelf(self); // User *user = [UserService currentUser]; - GenderPickerView *genderPickerView = [GenderPickerView pickerViewWithMultiple:YES]; + GenderPickerView *genderPickerView = [GenderPickerView pickerViewWithMultiple:YES selectedArr:weakself.wantGendersArray]; _wantGenderTextField = [[UITextField alloc] init]; _wantGenderTextField.delegate = self; _wantGenderTextField.inputView = [MTPickerView pickerViewWithCustomView:genderPickerView done:^(NSArray * _Nonnull selectedValues) { diff --git a/xdts-ios 3/TreeHole/Code/Features/Profile/View/GenderPickerView.h b/xdts-ios 3/TreeHole/Code/Features/Profile/View/GenderPickerView.h index c356b42..a53f4ec 100644 --- a/xdts-ios 3/TreeHole/Code/Features/Profile/View/GenderPickerView.h +++ b/xdts-ios 3/TreeHole/Code/Features/Profile/View/GenderPickerView.h @@ -12,8 +12,8 @@ NS_ASSUME_NONNULL_BEGIN @interface GenderPickerView : MTGridSelectView -+ (GenderPickerView *)pickerViewWithMultiple:(BOOL)multiple; - +//+ (GenderPickerView *)pickerViewWithMultiple:(BOOL)multiple; ++ (GenderPickerView *)pickerViewWithMultiple:(BOOL)multiple selectedArr:(NSArray *)Arr; @end NS_ASSUME_NONNULL_END diff --git a/xdts-ios 3/TreeHole/Code/Features/Profile/View/GenderPickerView.m b/xdts-ios 3/TreeHole/Code/Features/Profile/View/GenderPickerView.m index b7a43c9..6b45fc2 100644 --- a/xdts-ios 3/TreeHole/Code/Features/Profile/View/GenderPickerView.m +++ b/xdts-ios 3/TreeHole/Code/Features/Profile/View/GenderPickerView.m @@ -9,7 +9,7 @@ @implementation GenderPickerView -+ (GenderPickerView *)pickerViewWithMultiple:(BOOL)multiple { ++ (GenderPickerView *)pickerViewWithMultiple:(BOOL)multiple selectedArr:(NSArray *)Arr { NSInteger pickButtonTag = 666; GenderPickerView *genderPickerView = [GenderPickerView gridSelectViewWithItemModels:@[@"CD", @"TS", @"ZN"] setupConfig:^(MTGridSelectConfig * _Nonnull config) { config.itemSize = CGSizeMake(FIX_SIZE(94), FIX_SIZE(94)); @@ -27,6 +27,9 @@ [pickButton setBackgroundImage:ImageNamed(@"TH_login_unpick") forState:UIControlStateNormal]; [pickButton setBackgroundImage:ImageNamed(@"TH_login_picked") forState:UIControlStateSelected]; pickButton.right = itemImageView.width; + if ([Arr containsObject:itemModel]) { + pickButton.selected = true; + } pickButton.tag = pickButtonTag; [itemImageView addSubview:pickButton]; return itemImageView; diff --git a/xdts-ios 3/TreeHole/Code/Features/Profile/ViewController/EditProfileViewController.m b/xdts-ios 3/TreeHole/Code/Features/Profile/ViewController/EditProfileViewController.m index 9f450bc..06bf4c3 100644 --- a/xdts-ios 3/TreeHole/Code/Features/Profile/ViewController/EditProfileViewController.m +++ b/xdts-ios 3/TreeHole/Code/Features/Profile/ViewController/EditProfileViewController.m @@ -204,7 +204,7 @@ [self.view addSubview:wantGenderTextField]; self.wantGenderTextField = wantGenderTextField; wantGenderTextField.delegate = self; - GenderPickerView *genderPickerView = [GenderPickerView pickerViewWithMultiple:YES]; + GenderPickerView *genderPickerView = [GenderPickerView pickerViewWithMultiple:YES selectedArr:user.want_genders]; self.genderPickerView = genderPickerView; wantGenderTextField.inputView = [MTPickerView pickerViewWithCustomView:genderPickerView done:^(NSArray * _Nonnull selectedValues) { [UserService updateUserToRemoteWithParams:@{ diff --git a/xdts-ios 3/TreeHole/Code/Features/Profile/ViewController/MineViewController.m b/xdts-ios 3/TreeHole/Code/Features/Profile/ViewController/MineViewController.m index 3b7717d..971283f 100644 --- a/xdts-ios 3/TreeHole/Code/Features/Profile/ViewController/MineViewController.m +++ b/xdts-ios 3/TreeHole/Code/Features/Profile/ViewController/MineViewController.m @@ -31,6 +31,7 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli @property (nonatomic, strong) UIView *emptyTipsView; @property (nonatomic, strong) UICollectionView *collectionView; +@property (nonatomic, strong) UISwitch* nearSwitch; @property (nonatomic, strong)UIButton* openVipBtn; @property (nonatomic, strong)UILabel* openVipLab; @@ -39,7 +40,7 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli @property (nonatomic,strong) NSMutableArray *infoArray; @property (nonatomic, strong) NSMutableArray *photosM; - +@property (nonatomic,strong) NSString *statusStr; @property (nonatomic, strong) MTActionSheet *moreSheet; @property (nonatomic, strong) MTActionSheet *photoSheet; @@ -76,14 +77,14 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli [UserService getUserInfoWithCompletion:^(User * _Nonnull user) { - - [self getNoticeCount]; - [self loadPhotosData]; + [self getUserstatData]; +// [self getNoticeCount]; +// [self loadPhotosData]; [self refreshVIPInfo]; }]; - + [self geRstatData]; self.navigationController.navigationBar.hidden = true; @@ -92,9 +93,36 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli - (void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; self.navigationController.navigationBar.hidden = false; + } + +- (void)geRstatData { + [PYHTTPManager getWithPath:@"userstat" params:nil callback:^(id _Nullable rsp, NSError * _Nullable error) { + if (error == nil) { + self.statusStr = [NSString stringWithFormat:@"%@",rsp[@"is_hide"]]; + if (self.nearSwitch != nil) { + self.nearSwitch.on = self.statusStr.intValue == 1; + } + + }}]; +} + +- (void)getUserstatData { + [PYHTTPManager getWithPath:@"userstat" params:nil callback:^(id _Nullable rsp, NSError * _Nullable error) { + if (error == nil) { + self.statusStr = [NSString stringWithFormat:@"%@",rsp[@"is_hide"]]; + if (self.nearSwitch != nil) { + self.nearSwitch.on = self.statusStr.intValue == 1; + } + [self getNoticeCount]; + +// [self reloadData]; + } + }]; +} + - (void)refreshVIPInfo { [PYHTTPManager postWithPath:@"myvipcard" params:nil callback:^(id _Nullable rsp, NSError * _Nullable error) { @@ -154,18 +182,18 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli [view removeFromSuperview]; } - _userView= [[UIView alloc]initWithFrame:CGRectMake(0, STATUS_BAR_HEIGHT + FIX_SIZE(12), SCREEN_WIDTH, FIX_SIZE(212))]; + _userView= [[UIView alloc]initWithFrame:CGRectMake(0, STATUS_BAR_HEIGHT + FIX_SIZE(12), SCREEN_WIDTH, FIX_SIZE(182))]; [self.contentScrollView addSubview:self.userView]; - NSArray * xibArray = [[NSBundle mainBundle]loadNibNamed:NSStringFromClass(THMineHeaderView.class) owner:nil options:nil] ; - - THMineHeaderView *headerView = xibArray.firstObject; - headerView.frame = CGRectMake(0, 0, SCREEN_WIDTH, 30); - - [_userView addSubview:headerView]; +// NSArray * xibArray = [[NSBundle mainBundle]loadNibNamed:NSStringFromClass(THMineHeaderView.class) owner:nil options:nil] ; +// +// THMineHeaderView *headerView = xibArray.firstObject; +// headerView.frame = CGRectMake(0, 0, SCREEN_WIDTH, 30); +// +// [_userView addSubview:headerView]; - UIImageView* userImgV = [[UIImageView alloc]initWithFrame:CGRectMake(FIX_SIZE(20), FIX_SIZE(40), FIX_SIZE(68), FIX_SIZE(68))]; + UIImageView* userImgV = [[UIImageView alloc]initWithFrame:CGRectMake(FIX_SIZE(20), FIX_SIZE(10), FIX_SIZE(68), FIX_SIZE(68))]; userImgV.contentMode = UIViewContentModeScaleToFill; userImgV.layer.cornerRadius = userImgV.width/2.0; userImgV.layer.masksToBounds = YES; @@ -343,56 +371,58 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli [self.contentScrollView addSubview:self.openVipBtn]; - NSArray * newxibArray = [[NSBundle mainBundle]loadNibNamed:NSStringFromClass(THMineTypeNavView.class) owner:nil options:nil] ; - - THMineTypeNavView *navView = newxibArray.firstObject; - navView.frame = CGRectMake(0, self.openVipBtn.qmui_bottom + 20,SCREEN_WIDTH, 40); - [navView.upBtn addTarget:self action:@selector(upLoadAction) forControlEvents:UIControlEventTouchUpInside]; - [self.contentScrollView addSubview:navView]; +// NSArray * newxibArray = [[NSBundle mainBundle]loadNibNamed:NSStringFromClass(THMineTypeNavView.class) owner:nil options:nil] ; +// +// THMineTypeNavView *navView = newxibArray.firstObject; +// navView.frame = CGRectMake(0, self.openVipBtn.qmui_bottom + 20,SCREEN_WIDTH, 40); +// [navView.upBtn addTarget:self action:@selector(upLoadAction) forControlEvents:UIControlEventTouchUpInside]; +// [self.contentScrollView addSubview:navView]; - UIView *emptyTipsView = [[UIView alloc] init]; - emptyTipsView.backgroundColor = [UIColor clearColor]; - emptyTipsView.width = SCREEN_WIDTH; - UIImageView *emptyIconView = [[UIImageView alloc] initWithImage:ImageNamed(@"TH_pro_photo_icon")]; - emptyIconView.size = CGSizeMake(FIX_SIZE(49), FIX_SIZE(49)); - emptyIconView.centerX = emptyTipsView.width * 0.5; - emptyIconView.y = FIX_SIZE(30); - [emptyTipsView addSubview:emptyIconView]; - UILabel *emptyTipsLabel = [UILabel mt_titleLabelWithText:@"上传你的照片\n让别人了解你"]; - emptyTipsLabel.font = NORMAL_FONT; - [emptyTipsLabel sizeToFit]; - emptyTipsLabel.centerX = emptyIconView.centerX; - emptyTipsLabel.y = emptyIconView.bottom + FIX_SIZE(6); - [emptyTipsView addSubview:emptyTipsLabel]; - - emptyTipsView.height = emptyTipsLabel.bottom; - emptyTipsView.y = navView.bottom + FIX_SIZE(3); - - self.emptyTipsView = emptyTipsView; - - [self.contentScrollView addSubview:self.emptyTipsView]; +// UIView *emptyTipsView = [[UIView alloc] init]; +// emptyTipsView.backgroundColor = [UIColor clearColor]; +// emptyTipsView.width = SCREEN_WIDTH; +// UIImageView *emptyIconView = [[UIImageView alloc] initWithImage:ImageNamed(@"TH_pro_photo_icon")]; +// emptyIconView.size = CGSizeMake(FIX_SIZE(49), FIX_SIZE(49)); +// emptyIconView.centerX = emptyTipsView.width * 0.5; +// emptyIconView.y = FIX_SIZE(30); +// [emptyTipsView addSubview:emptyIconView]; +// UILabel *emptyTipsLabel = [UILabel mt_titleLabelWithText:@"上传你的照片\n让别人了解你"]; +// emptyTipsLabel.font = NORMAL_FONT; +// [emptyTipsLabel sizeToFit]; +// emptyTipsLabel.centerX = emptyIconView.centerX; +// emptyTipsLabel.y = emptyIconView.bottom + FIX_SIZE(6); +// [emptyTipsView addSubview:emptyTipsLabel]; +// +// emptyTipsView.height = emptyTipsLabel.bottom; +// emptyTipsView.y = navView.bottom + FIX_SIZE(3); +// +// self.emptyTipsView = emptyTipsView; +// +// [self.contentScrollView addSubview:self.emptyTipsView]; +// +// +// UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; +// layout.minimumLineSpacing = 1; +// layout.minimumInteritemSpacing = 1; +// CGFloat itemWidth = (self.view.width - 3) / 3.0; +// CGFloat itemHeight = itemWidth * 165.0 / 125.0; +// layout.itemSize = CGSizeMake(itemWidth, itemHeight); +// self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, navView.qmui_bottom + 10, SCREEN_WIDTH, 170 * 3) collectionViewLayout:layout]; +// [self.collectionView registerClass:ProfilePhotoCell.class forCellWithReuseIdentifier:ProfilePhotoCellID]; +// [self.view addSubview:self.collectionView]; +// self.collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; +// self.collectionView.alwaysBounceVertical = YES; +// self.collectionView.delegate = self; +// self.collectionView.dataSource = self; +// self.collectionView.backgroundColor = [UIColor clearColor]; +// [self.contentScrollView addSubview:self.collectionView]; - UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; - layout.minimumLineSpacing = 1; - layout.minimumInteritemSpacing = 1; - CGFloat itemWidth = (self.view.width - 3) / 3.0; - CGFloat itemHeight = itemWidth * 165.0 / 125.0; - layout.itemSize = CGSizeMake(itemWidth, itemHeight); - self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, navView.qmui_bottom + 10, SCREEN_WIDTH, 170 * 3) collectionViewLayout:layout]; - [self.collectionView registerClass:ProfilePhotoCell.class forCellWithReuseIdentifier:ProfilePhotoCellID]; - [self.view addSubview:self.collectionView]; - self.collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; - self.collectionView.alwaysBounceVertical = YES; - self.collectionView.delegate = self; - self.collectionView.dataSource = self; - self.collectionView.backgroundColor = [UIColor clearColor]; - [self.contentScrollView addSubview:self.collectionView]; + [self.contentScrollView addSubview:self.contentTableView]; - -// [self.contentScrollView addSubview:self.contentTableView]; -// self.contentScrollView.contentSize = CGSizeMake(SCREEN_WIDTH,TAB_BAR_HEIGHT + self.collectionView.qmui_bottom); + self.contentScrollView.contentSize = CGSizeMake(SCREEN_WIDTH,TabBarHeight + self.contentTableView.qmui_bottom ); +// self.contentScrollView.contentSize = CGSizeMake(SCREEN_WIDTH,FIX_SIZE(1000)); } @@ -448,7 +478,7 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli -(UIView *)contentTableView{ if (!_contentTableView) { - NSArray* dataArray = @[@{@"img":@"TH_pro_yqyj",@"title":@"邀请有奖",@"subTitle":@"免费领取会员",@"isHaveSwitch":@"NO"},@{@"img":@"TH_pro_wdpz",@"title":@"我的瓶子",@"subTitle":@"",@"isHaveSwitch":@"NO"},@{@"img":@"TH_pro_mms",@"title":@"APP密码锁",@"subTitle":@"",@"isHaveSwitch":@"YES"},@{@"img":@"TH_pro_yjfk",@"title":@"意见反馈",@"subTitle":@"有事就找我哈",@"isHaveSwitch":@"NO"},@{@"img":@"TH_pro_gd",@"title":@"更多",@"subTitle":@"",@"isHaveSwitch":@"NO"}]; + NSArray* dataArray = @[@{@"img":@"near_icon",@"title":@"附近隐身",@"subTitle":@"",@"isHaveSwitch": @"YES"},@{@"img":@"pwd_icon",@"title":@"APP密码锁",@"subTitle":@"",@"isHaveSwitch":@"YES"},@{@"img":@"yaoqing",@"title":@"邀请有奖",@"subTitle":@"免费领取会员",@"isHaveSwitch":@"NO"},@{@"img":@"TH_pro_yjfk",@"title":@"意见反馈",@"subTitle":@"有事就找我哈",@"isHaveSwitch":@"NO"},@{@"img":@"TH_pro_gd",@"title":@"更多",@"subTitle":@"",@"isHaveSwitch":@"NO"}]; CGFloat cellH = FIX_SIZE(44); _contentTableView = [[UIView alloc]initWithFrame:CGRectMake(FIX_SIZE(12), _openVipBtn.bottom + FIX_SIZE(25), SCREEN_WIDTH - FIX_SIZE(24) , dataArray.count*cellH + FIX_SIZE(20))]; _contentTableView.layer.cornerRadius = FIX_SIZE(6); @@ -458,7 +488,9 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli for (NSInteger i = 0; i < dataArray.count ; i++) { UIButton* cellBtn = [[UIButton alloc]initWithFrame:CGRectMake(0, FIX_SIZE(10) + cellH*i, _contentTableView.width, cellH)]; - [cellBtn setTitle:dataArray[i][@"title"] forState:UIControlStateNormal]; + NSString *title = dataArray[i][@"title"]; + [cellBtn setTitle:title forState:UIControlStateNormal]; + [cellBtn setTitleColor:HEX_COLOR_A(0x000000, 0) forState:UIControlStateNormal]; [cellBtn addTarget:self action:@selector(cellBtnClick:) forControlEvents:UIControlEventTouchUpInside]; [_contentTableView addSubview:cellBtn]; @@ -474,6 +506,31 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli leftCellBtnLab.textColor = HEX_COLOR_A(0xFFFFFF, 1); [cellBtn addSubview:leftCellBtnLab]; + + if ([title isEqualToString:@"附近隐身"]) { + UIView* nianVipView = [[UIView alloc]initWithFrame:CGRectMake(FIX_SIZE(115), leftCellBtnLab.y + (leftCellBtnLab.height - FIX_SIZE(16))/2.0, 34, FIX_SIZE(16))]; + nianVipView.layer.cornerRadius = 8; + nianVipView.layer.masksToBounds = YES; + // gradient + CAGradientLayer *gl = [CAGradientLayer layer]; + gl.frame = CGRectMake(0,0,nianVipView.width,nianVipView.height); + gl.startPoint = CGPointMake(0, 0.5); + gl.endPoint = CGPointMake(1, 0.5); + gl.colors = @[(__bridge id)HEX_COLOR(0xE4B18B).CGColor, (__bridge id)HEX_COLOR(0xFFF4EC).CGColor, (__bridge id)HEX_COLOR(0xE4B18B).CGColor]; + gl.locations = @[@(0), @(0.5f), @(1.0f)]; + [nianVipView.layer addSublayer:gl]; + UILabel* nianVipLab = [[UILabel alloc]initWithFrame:nianVipView.bounds]; + + nianVipLab.text = @"年VIP"; + + nianVipLab.textColor = HEX_COLOR(0x000000); + nianVipLab.textAlignment = NSTextAlignmentCenter; + nianVipLab.font = MT_FONT_MEDIUM_SIZE(10); + [nianVipView addSubview:nianVipLab]; + [cellBtn addSubview:nianVipView]; + } + + UILabel* rightSubCellBtnLab = [[UILabel alloc]initWithFrame:CGRectMake(cellBtn.width - FIX_SIZE(37) - FIX_SIZE(120), iconImgV.y, FIX_SIZE(120), FIX_SIZE(24))]; rightSubCellBtnLab.text = [NSString stringWithFormat:@"%@",dataArray[i][@"subTitle"]]; rightSubCellBtnLab.textAlignment = NSTextAlignmentRight; @@ -486,13 +543,22 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli rightArrowImgV.image = [UIImage imageNamed:@"TH_pro_right_arrow_white"]; [cellBtn addSubview:rightArrowImgV]; }else{ - UISwitch* onSwitch = [[UISwitch alloc]initWithFrame:CGRectMake(cellBtn.width - FIX_SIZE(10) - 51, (cellBtn.height - 31)/2.0, 51, 31)]; + UISwitch* onSwitch = [[UISwitch alloc]initWithFrame:CGRectMake(cellBtn.width - FIX_SIZE(10) - 51, (leftCellBtnLab.height - 31)/2.0, 51, 31)]; onSwitch.onTintColor = HEX_COLOR(0xFFAD10); - BOOL canOpen = [UserService isSecurityCodeOpen]; - onSwitch.on = canOpen; + if ([title isEqualToString:@"附近隐身"]) { + onSwitch.tag = 0; + onSwitch.on = self.statusStr.intValue == 1; + self.nearSwitch = onSwitch; + } else { + onSwitch.tag = 1; + BOOL canOpen = [UserService isSecurityCodeOpen]; + onSwitch.on = canOpen; + } + [onSwitch addTarget:self action:@selector(onSwitchClick:) forControlEvents:UIControlEventValueChanged]; [cellBtn addSubview:onSwitch]; } + } } return _contentTableView; @@ -535,15 +601,39 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli -(void)onSwitchClick:(UISwitch*)sender{ if (sender.isOn) { - if ([UserService currentUser].security_code.length != SecurityCodeLength) { - [sender setOn:NO animated:NO]; - [AlertInputView showWithTitle:@"设置密码" content:nil maxLength:SecurityCodeLength action:^BOOL(NSString * _Nonnull content) { - if (content.length != SecurityCodeLength) { - [ToastUtil showToast:[NSString stringWithFormat:@"请输入%lu位数字", (unsigned long)SecurityCodeLength] position:CSToastPositionTop]; - return NO; - } + if (sender.tag == 0) { + [self setIsOpenNear:sender.isOn sender:sender]; + } else { + if ([UserService currentUser].security_code.length != SecurityCodeLength) { + [sender setOn:NO animated:NO]; + [AlertInputView showWithTitle:@"设置密码" content:nil maxLength:SecurityCodeLength action:^BOOL(NSString * _Nonnull content) { + if (content.length != SecurityCodeLength) { + [ToastUtil showToast:[NSString stringWithFormat:@"请输入%lu位数字", (unsigned long)SecurityCodeLength] position:CSToastPositionTop]; + return NO; + } + [UserService updateUserSecurityToRemote:@{ + @"security_code" : content ?: @"", + @"is_security_on" : @(1), + } completion:^(id _Nullable rsp, NSError * _Nullable error) { + if (error) { + [sender setOn:NO animated:YES]; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [SVProgressHUD showErrorWithStatus:[error.userInfo objectForKey:@"message"]]; + }); + return; + } else { // 设置成功 + [sender setOn:YES animated:YES]; + [UserService currentUser].security_code = content; + [UserService currentUser].is_security_on = 1; + } + }]; + return YES; + }]; + return; + }else{ + [sender setOn:NO animated:NO]; [UserService updateUserSecurityToRemote:@{ - @"security_code" : content ?: @"", + @"security_code" : [UserService currentUser].security_code, @"is_security_on" : @(1), } completion:^(id _Nullable rsp, NSError * _Nullable error) { if (error) { @@ -553,31 +643,11 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli }); return; } else { // 设置成功 - [sender setOn:YES animated:YES]; - [UserService currentUser].security_code = content; [UserService currentUser].is_security_on = 1; + [sender setOn:YES animated:YES]; } }]; - return YES; - }]; - return; - }else{ - [sender setOn:NO animated:NO]; - [UserService updateUserSecurityToRemote:@{ - @"security_code" : [UserService currentUser].security_code, - @"is_security_on" : @(1), - } completion:^(id _Nullable rsp, NSError * _Nullable error) { - if (error) { - [sender setOn:NO animated:YES]; - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - [SVProgressHUD showErrorWithStatus:[error.userInfo objectForKey:@"message"]]; - }); - return; - } else { // 设置成功 - [UserService currentUser].is_security_on = 1; - [sender setOn:YES animated:YES]; - } - }]; + } } } else { [UserService updateUserSecurityToRemote:@{ @@ -598,6 +668,43 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli } } +- (void)setIsOpenNear:(BOOL)isOpen sender:(UISwitch*)sender { + if (isOpen){ + if([UserService currentUser].vip_kind == 10){ + [PYHTTPManager postWithPath:@"userhide" params:@{@"state":@1} callback:^(id _Nullable rsp, NSError * _Nullable error) { + if (error == nil) { + self.statusStr = @"1"; + } else { + sender.on = false; + } + }]; + } else { + sender.on = false; + [MTAlertView showWithSetupBlcok:^(MTAlertViewConfig *config) { + config.message = @""; + config.title = @"开通年vip后就可以在附近隐身啦,还可以获得其他十九种会员特权哦"; + + config.otherTitle = @"去开通"; + config.cancelTitle = @"取消"; + config.otherHandler = ^(MTAlertButton *button) { + [PYAppService showVipVC:@"vip_page"]; + }; + }]; + } + + } else { + + [PYHTTPManager postWithPath:@"userhide" params:@{@"state":@0} callback:^(id _Nullable rsp, NSError * _Nullable error) { + if (error == nil) { + self.statusStr = @"0"; + + } else { + sender.on = true; + } + }]; + } +} + -(void)userImgVAlertClick:(UITapGestureRecognizer*)tap{ UIImageView* userImgV = (UIImageView*)tap.view; BigUserImgAlertView* alertView = [[BigUserImgAlertView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)]; diff --git a/xdts-ios 3/TreeHole/Code/Features/Settings/ViewController/SettingsViewController.m b/xdts-ios 3/TreeHole/Code/Features/Settings/ViewController/SettingsViewController.m index fe5a12d..3fa4fcd 100644 --- a/xdts-ios 3/TreeHole/Code/Features/Settings/ViewController/SettingsViewController.m +++ b/xdts-ios 3/TreeHole/Code/Features/Settings/ViewController/SettingsViewController.m @@ -81,9 +81,9 @@ - (void)getUserstatData { - [PYHTTPManager postWithPath:@"userstat" params:nil callback:^(id _Nullable rsp, NSError * _Nullable error) { + [PYHTTPManager getWithPath:@"userstat" params:nil callback:^(id _Nullable rsp, NSError * _Nullable error) { if (error == nil) { - self.statusStr = [NSString stringWithFormat:@"%@",rsp]; + self.statusStr = [NSString stringWithFormat:@"%@",rsp[@"is_hide"]]; [self reloadData]; } }]; @@ -159,7 +159,7 @@ { MTCommonListTableConfig *config = [MTCommonListTableConfig defaultConfigWithCellStyle:MTCommonListTableCellStyleDisclosureIndicator rowsCountForSections:@[@(6), @(2), @(2)]]; // 版本更新 邀请有奖 隐身 设置密码锁 修改密码锁 修改手机号 - config.cellTitles = @[@"版本更新",@"邀请有奖", @"隐身",@"设置密码锁",@"修改密码锁", @"修改手机号",@"黑名单", @"隐私设置", @"意见反馈", @"清理缓存"]; + config.cellTitles = @[@"版本更新",@"邀请有奖", @"附近隐身",@"设置密码锁",@"修改密码锁", @"修改手机号",@"黑名单", @"隐私设置", @"意见反馈", @"清理缓存"]; config.cellImageNames = @[@"version",@"TH_pro_yqyj",@"yin",@"TH_pro_mms",@"TH_pro_set_password_icon",@"TH_pro_set_phone_icon", @"TH_pro_set_blacklist_icon", @"TH_pro_set_privacy_icon", @"TH_pro_set_opinion_icon", @"TH_pro_set_icon_dump"]; config.tableTitle = @"更多"; @@ -201,7 +201,7 @@ if ([cellConfig.accessoryTitle isEqualToString:@"未开启"]){ if([UserService currentUser].vip_kind == 10){ - [PYHTTPManager postWithPath:@"updatesecurity" params:@{@"state":@1} callback:^(id _Nullable rsp, NSError * _Nullable error) { + [PYHTTPManager postWithPath:@"userhide" params:@{@"state":@1} callback:^(id _Nullable rsp, NSError * _Nullable error) { if (error == nil) { self.statusStr = @"1"; [self reloadData]; @@ -210,7 +210,7 @@ } else { [MTAlertView showWithSetupBlcok:^(MTAlertViewConfig *config) { config.message = @""; - config.title = @"开通年VIP才能使用隐身功能"; + config.title = @"开通年vip后就可以在附近隐身啦,还可以获得其他十九种会员特权哦"; config.otherTitle = @"去开通"; config.cancelTitle = @"取消"; @@ -222,7 +222,7 @@ } else { - [PYHTTPManager postWithPath:@"updatesecurity" params:@{@"state":@0} callback:^(id _Nullable rsp, NSError * _Nullable error) { + [PYHTTPManager postWithPath:@"userhide" params:@{@"state":@0} callback:^(id _Nullable rsp, NSError * _Nullable error) { if (error == nil) { self.statusStr = @"0"; [self reloadData]; diff --git a/xdts-ios 3/TreeHole/Code/Features/User/UserService.m b/xdts-ios 3/TreeHole/Code/Features/User/UserService.m index 0987896..ae86ce1 100644 --- a/xdts-ios 3/TreeHole/Code/Features/User/UserService.m +++ b/xdts-ios 3/TreeHole/Code/Features/User/UserService.m @@ -349,9 +349,11 @@ static NSMutableDictionary *gUserOtherInfoDicM; } + (void)getC2CUnreadMsgCountWithCompletion:(PYHTTPManagerCallback)completion { - [PYHTTPManager postWithPath:@"c2cunreadmessagenum" params:@{ - @"account_type": [LoginService isClone] ? @(1) : @(2) // 1获取主账户(默认),2获取分身账户 - } callback:completion]; + if ([LoginService token].length > 0) { + [PYHTTPManager postWithPath:@"c2cunreadmessagenum" params:@{ + @"account_type": [LoginService isClone] ? @(1) : @(2) // 1获取主账户(默认),2获取分身账户 + } callback:completion]; + } } /// 获取用户相册