代码提交
This commit is contained in:
parent
b020b9c196
commit
16acc90cd8
@ -2766,11 +2766,11 @@
|
|||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
B038487828141AD100F47C18 /* WLUnitField.h */,
|
B038487828141AD100F47C18 /* WLUnitField.h */,
|
||||||
B038487928141AD100F47C18 /* WLUnitFieldTextRange.m */,
|
|
||||||
B038487A28141AD100F47C18 /* WLUnitFieldTextPosition.h */,
|
|
||||||
B038487B28141AD100F47C18 /* WLUnitFieldTextRange.h */,
|
|
||||||
B038487C28141AD100F47C18 /* WLUnitField.m */,
|
B038487C28141AD100F47C18 /* WLUnitField.m */,
|
||||||
|
B038487A28141AD100F47C18 /* WLUnitFieldTextPosition.h */,
|
||||||
B038487D28141AD100F47C18 /* WLUnitFieldTextPosition.m */,
|
B038487D28141AD100F47C18 /* WLUnitFieldTextPosition.m */,
|
||||||
|
B038487B28141AD100F47C18 /* WLUnitFieldTextRange.h */,
|
||||||
|
B038487928141AD100F47C18 /* WLUnitFieldTextRange.m */,
|
||||||
);
|
);
|
||||||
path = WLUnitField;
|
path = WLUnitField;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -4323,7 +4323,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)/TreeHole/Code/WechatSDK/OpenSDK2.0.2",
|
"$(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_BUNDLE_IDENTIFIER = com.zncdts.app123;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
@ -4385,7 +4385,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)/TreeHole/Code/WechatSDK/OpenSDK2.0.2",
|
"$(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_BUNDLE_IDENTIFIER = com.zncdts.app123;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
|||||||
22
xdts-ios 3/TreeHole/Assets.xcassets/settings/near_icon.imageset/Contents.json
vendored
Normal file
22
xdts-ios 3/TreeHole/Assets.xcassets/settings/near_icon.imageset/Contents.json
vendored
Normal file
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
xdts-ios 3/TreeHole/Assets.xcassets/settings/near_icon.imageset/Slice 372@2x.png
vendored
Normal file
BIN
xdts-ios 3/TreeHole/Assets.xcassets/settings/near_icon.imageset/Slice 372@2x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
BIN
xdts-ios 3/TreeHole/Assets.xcassets/settings/near_icon.imageset/Slice 372@3x.png
vendored
Normal file
BIN
xdts-ios 3/TreeHole/Assets.xcassets/settings/near_icon.imageset/Slice 372@3x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.0 KiB |
22
xdts-ios 3/TreeHole/Assets.xcassets/settings/pwd_icon.imageset/Contents.json
vendored
Normal file
22
xdts-ios 3/TreeHole/Assets.xcassets/settings/pwd_icon.imageset/Contents.json
vendored
Normal file
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
xdts-ios 3/TreeHole/Assets.xcassets/settings/pwd_icon.imageset/Slice 364@2x.png
vendored
Normal file
BIN
xdts-ios 3/TreeHole/Assets.xcassets/settings/pwd_icon.imageset/Slice 364@2x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
BIN
xdts-ios 3/TreeHole/Assets.xcassets/settings/pwd_icon.imageset/Slice 364@3x.png
vendored
Normal file
BIN
xdts-ios 3/TreeHole/Assets.xcassets/settings/pwd_icon.imageset/Slice 364@3x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
22
xdts-ios 3/TreeHole/Assets.xcassets/settings/yaoqing.imageset/Contents.json
vendored
Normal file
22
xdts-ios 3/TreeHole/Assets.xcassets/settings/yaoqing.imageset/Contents.json
vendored
Normal file
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
xdts-ios 3/TreeHole/Assets.xcassets/settings/yaoqing.imageset/Slice 362@2x.png
vendored
Normal file
BIN
xdts-ios 3/TreeHole/Assets.xcassets/settings/yaoqing.imageset/Slice 362@2x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
xdts-ios 3/TreeHole/Assets.xcassets/settings/yaoqing.imageset/Slice 362@3x.png
vendored
Normal file
BIN
xdts-ios 3/TreeHole/Assets.xcassets/settings/yaoqing.imageset/Slice 362@3x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
@ -108,7 +108,12 @@ static AppConfig *gAppConfig;
|
|||||||
if ([path isEqualToString:@"open_clone"]) { //
|
if ([path isEqualToString:@"open_clone"]) { //
|
||||||
config.cancelTitle = @"取消";
|
config.cancelTitle = @"取消";
|
||||||
config.otherTitle = @"下一步";
|
config.otherTitle = @"下一步";
|
||||||
|
} else if ([message containsString:@"缘分匹配"]) {
|
||||||
|
config.otherTitle = @"开通VIP";
|
||||||
|
} else if ([message containsString:@"发布次数"]) {
|
||||||
|
config.otherTitle = @"开通VIP";
|
||||||
}
|
}
|
||||||
|
|
||||||
config.otherHandler = ^(MTAlertButton *button) {
|
config.otherHandler = ^(MTAlertButton *button) {
|
||||||
[self showVipVC:source];
|
[self showVipVC:source];
|
||||||
};
|
};
|
||||||
|
|||||||
@ -22,18 +22,18 @@ typedef enum : NSUInteger {
|
|||||||
|
|
||||||
#if IS_DEBUG
|
#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
|
#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
|
#endif
|
||||||
|
|||||||
@ -115,7 +115,7 @@
|
|||||||
if ([_titleStr isEqualToString:@"高级筛选"]) {
|
if ([_titleStr isEqualToString:@"高级筛选"]) {
|
||||||
if ([UserService currentUser].vip_kind != 10) {
|
if ([UserService currentUser].vip_kind != 10) {
|
||||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
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"];
|
[PYAppService showVipVC:@"vip_page"];
|
||||||
|
|||||||
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
// _dataDict = [NSMutableDictionary dictionaryWithDictionary: @{@"age":@"",@"gender_str":@"",@"online":@"1",@"new":@"1",@"vip":@"1"}];
|
// _dataDict = [NSMutableDictionary dictionaryWithDictionary: @{@"age":@"",@"gender_str":@"",@"online":@"1",@"new":@"1",@"vip":@"1"}];
|
||||||
for (NSInteger i = 0; i < titleArray.count; i++) {
|
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.titleStr = titleArray[i];
|
||||||
cellView.selectContentArray = contentArray[i];
|
cellView.selectContentArray = contentArray[i];
|
||||||
cellView.selectContentStrBlockClick = ^(NSString * _Nonnull titleStr, NSString * _Nonnull selectStr) {
|
cellView.selectContentStrBlockClick = ^(NSString * _Nonnull titleStr, NSString * _Nonnull selectStr) {
|
||||||
|
|||||||
@ -643,7 +643,7 @@
|
|||||||
titleLab.textColor = COLOR_WITH_RGB(0xFFFFFF);
|
titleLab.textColor = COLOR_WITH_RGB(0xFFFFFF);
|
||||||
[_openVipAlertView addSubview:titleLab];
|
[_openVipAlertView addSubview:titleLab];
|
||||||
UILabel* subTitleLab = [[UILabel alloc]initWithFrame:CGRectMake(0, titleLab.bottom + 20, SCREEN_WIDTH, 60)];
|
UILabel* subTitleLab = [[UILabel alloc]initWithFrame:CGRectMake(0, titleLab.bottom + 20, SCREEN_WIDTH, 60)];
|
||||||
subTitleLab.text = @"开通VIP后,才能查看更多附近的同好,也可以根据您的喜好、年龄等筛选想要认识的人,还可以获得其他九大会员特权,拥有更多不一样的体验~";
|
subTitleLab.text = @"开通VIP后,才能查看更多附近的同好,也可以根据您的喜好、年龄等筛选想要认识的人,还可以获得其他十五种会员特权,拥有更多不一样的体验~";
|
||||||
subTitleLab.textAlignment = NSTextAlignmentCenter;
|
subTitleLab.textAlignment = NSTextAlignmentCenter;
|
||||||
subTitleLab.numberOfLines = 0;
|
subTitleLab.numberOfLines = 0;
|
||||||
subTitleLab.font = MT_FONT_MEDIUM_NO_SCALE_SIZE(14);
|
subTitleLab.font = MT_FONT_MEDIUM_NO_SCALE_SIZE(14);
|
||||||
|
|||||||
@ -7,8 +7,9 @@
|
|||||||
|
|
||||||
#import "C2CChatViewController.h"
|
#import "C2CChatViewController.h"
|
||||||
#import "TZImagePickerController+MTImagePicker.h"
|
#import "TZImagePickerController+MTImagePicker.h"
|
||||||
|
#import "PYHTTPManager.h"
|
||||||
|
|
||||||
@interface C2CChatViewController ()
|
@interface C2CChatViewController ()<TInputControllerDelegate>
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@ -37,4 +38,23 @@
|
|||||||
[self.navigationController presentViewController:imagePicker animated:YES completion:nil];
|
[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
|
@end
|
||||||
|
|||||||
@ -422,7 +422,7 @@
|
|||||||
|
|
||||||
if (![LoginService isClone]){
|
if (![LoginService isClone]){
|
||||||
if (self.needVipToClone > 0) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -90,8 +90,9 @@
|
|||||||
// [self unitFieldEditingChanged:self.uniField];
|
// [self unitFieldEditingChanged:self.uniField];
|
||||||
});
|
});
|
||||||
#else
|
#else
|
||||||
[self.uniField becomeFirstResponder];
|
|
||||||
#endif
|
#endif
|
||||||
|
[self.uniField becomeFirstResponder];
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - WLUnitFieldDelegate
|
#pragma mark - WLUnitFieldDelegate
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
- (void)viewDidLoad {
|
- (void)viewDidLoad {
|
||||||
[super viewDidLoad];
|
[super viewDidLoad];
|
||||||
GenderPickerView *genderPickerView = [GenderPickerView pickerViewWithMultiple:NO];
|
GenderPickerView *genderPickerView = [GenderPickerView pickerViewWithMultiple:NO selectedArr:@[]];
|
||||||
genderPickerView.y = FIX_SIZE(55);
|
genderPickerView.y = FIX_SIZE(55);
|
||||||
[self.cardView addSubview:genderPickerView];
|
[self.cardView addSubview:genderPickerView];
|
||||||
PYThemeButton *nextButton = [PYThemeButton nextButtonWithAction:^(UIButton * _Nonnull button) {
|
PYThemeButton *nextButton = [PYThemeButton nextButtonWithAction:^(UIButton * _Nonnull button) {
|
||||||
|
|||||||
@ -155,7 +155,7 @@
|
|||||||
if (!_wantGenderTextField) {
|
if (!_wantGenderTextField) {
|
||||||
WeakSelf(self);
|
WeakSelf(self);
|
||||||
// User *user = [UserService currentUser];
|
// User *user = [UserService currentUser];
|
||||||
GenderPickerView *genderPickerView = [GenderPickerView pickerViewWithMultiple:YES];
|
GenderPickerView *genderPickerView = [GenderPickerView pickerViewWithMultiple:YES selectedArr:weakself.wantGendersArray];
|
||||||
_wantGenderTextField = [[UITextField alloc] init];
|
_wantGenderTextField = [[UITextField alloc] init];
|
||||||
_wantGenderTextField.delegate = self;
|
_wantGenderTextField.delegate = self;
|
||||||
_wantGenderTextField.inputView = [MTPickerView pickerViewWithCustomView:genderPickerView done:^(NSArray<NSString *> * _Nonnull selectedValues) {
|
_wantGenderTextField.inputView = [MTPickerView pickerViewWithCustomView:genderPickerView done:^(NSArray<NSString *> * _Nonnull selectedValues) {
|
||||||
|
|||||||
@ -12,8 +12,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
@interface GenderPickerView : MTGridSelectView
|
@interface GenderPickerView : MTGridSelectView
|
||||||
|
|
||||||
+ (GenderPickerView *)pickerViewWithMultiple:(BOOL)multiple;
|
//+ (GenderPickerView *)pickerViewWithMultiple:(BOOL)multiple;
|
||||||
|
+ (GenderPickerView *)pickerViewWithMultiple:(BOOL)multiple selectedArr:(NSArray<NSString*> *)Arr;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
@implementation GenderPickerView
|
@implementation GenderPickerView
|
||||||
|
|
||||||
+ (GenderPickerView *)pickerViewWithMultiple:(BOOL)multiple {
|
+ (GenderPickerView *)pickerViewWithMultiple:(BOOL)multiple selectedArr:(NSArray<NSString*> *)Arr {
|
||||||
NSInteger pickButtonTag = 666;
|
NSInteger pickButtonTag = 666;
|
||||||
GenderPickerView *genderPickerView = [GenderPickerView gridSelectViewWithItemModels:@[@"CD", @"TS", @"ZN"] setupConfig:^(MTGridSelectConfig * _Nonnull config) {
|
GenderPickerView *genderPickerView = [GenderPickerView gridSelectViewWithItemModels:@[@"CD", @"TS", @"ZN"] setupConfig:^(MTGridSelectConfig * _Nonnull config) {
|
||||||
config.itemSize = CGSizeMake(FIX_SIZE(94), FIX_SIZE(94));
|
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_unpick") forState:UIControlStateNormal];
|
||||||
[pickButton setBackgroundImage:ImageNamed(@"TH_login_picked") forState:UIControlStateSelected];
|
[pickButton setBackgroundImage:ImageNamed(@"TH_login_picked") forState:UIControlStateSelected];
|
||||||
pickButton.right = itemImageView.width;
|
pickButton.right = itemImageView.width;
|
||||||
|
if ([Arr containsObject:itemModel]) {
|
||||||
|
pickButton.selected = true;
|
||||||
|
}
|
||||||
pickButton.tag = pickButtonTag;
|
pickButton.tag = pickButtonTag;
|
||||||
[itemImageView addSubview:pickButton];
|
[itemImageView addSubview:pickButton];
|
||||||
return itemImageView;
|
return itemImageView;
|
||||||
|
|||||||
@ -204,7 +204,7 @@
|
|||||||
[self.view addSubview:wantGenderTextField];
|
[self.view addSubview:wantGenderTextField];
|
||||||
self.wantGenderTextField = wantGenderTextField;
|
self.wantGenderTextField = wantGenderTextField;
|
||||||
wantGenderTextField.delegate = self;
|
wantGenderTextField.delegate = self;
|
||||||
GenderPickerView *genderPickerView = [GenderPickerView pickerViewWithMultiple:YES];
|
GenderPickerView *genderPickerView = [GenderPickerView pickerViewWithMultiple:YES selectedArr:user.want_genders];
|
||||||
self.genderPickerView = genderPickerView;
|
self.genderPickerView = genderPickerView;
|
||||||
wantGenderTextField.inputView = [MTPickerView pickerViewWithCustomView:genderPickerView done:^(NSArray<NSString *> * _Nonnull selectedValues) {
|
wantGenderTextField.inputView = [MTPickerView pickerViewWithCustomView:genderPickerView done:^(NSArray<NSString *> * _Nonnull selectedValues) {
|
||||||
[UserService updateUserToRemoteWithParams:@{
|
[UserService updateUserToRemoteWithParams:@{
|
||||||
|
|||||||
@ -31,6 +31,7 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli
|
|||||||
@property (nonatomic, strong) UIView *emptyTipsView;
|
@property (nonatomic, strong) UIView *emptyTipsView;
|
||||||
|
|
||||||
@property (nonatomic, strong) UICollectionView *collectionView;
|
@property (nonatomic, strong) UICollectionView *collectionView;
|
||||||
|
@property (nonatomic, strong) UISwitch* nearSwitch;
|
||||||
|
|
||||||
@property (nonatomic, strong)UIButton* openVipBtn;
|
@property (nonatomic, strong)UIButton* openVipBtn;
|
||||||
@property (nonatomic, strong)UILabel* openVipLab;
|
@property (nonatomic, strong)UILabel* openVipLab;
|
||||||
@ -39,7 +40,7 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli
|
|||||||
@property (nonatomic,strong) NSMutableArray *infoArray;
|
@property (nonatomic,strong) NSMutableArray *infoArray;
|
||||||
|
|
||||||
@property (nonatomic, strong) NSMutableArray<ProfilePhoto *> *photosM;
|
@property (nonatomic, strong) NSMutableArray<ProfilePhoto *> *photosM;
|
||||||
|
@property (nonatomic,strong) NSString *statusStr;
|
||||||
|
|
||||||
@property (nonatomic, strong) MTActionSheet *moreSheet;
|
@property (nonatomic, strong) MTActionSheet *moreSheet;
|
||||||
@property (nonatomic, strong) MTActionSheet *photoSheet;
|
@property (nonatomic, strong) MTActionSheet *photoSheet;
|
||||||
@ -76,14 +77,14 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli
|
|||||||
|
|
||||||
|
|
||||||
[UserService getUserInfoWithCompletion:^(User * _Nonnull user) {
|
[UserService getUserInfoWithCompletion:^(User * _Nonnull user) {
|
||||||
|
[self getUserstatData];
|
||||||
[self getNoticeCount];
|
// [self getNoticeCount];
|
||||||
[self loadPhotosData];
|
// [self loadPhotosData];
|
||||||
[self refreshVIPInfo];
|
[self refreshVIPInfo];
|
||||||
|
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
[self geRstatData];
|
||||||
|
|
||||||
self.navigationController.navigationBar.hidden = true;
|
self.navigationController.navigationBar.hidden = true;
|
||||||
|
|
||||||
@ -92,9 +93,36 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli
|
|||||||
- (void)viewWillDisappear:(BOOL)animated {
|
- (void)viewWillDisappear:(BOOL)animated {
|
||||||
[super viewWillDisappear:animated];
|
[super viewWillDisappear:animated];
|
||||||
self.navigationController.navigationBar.hidden = false;
|
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 {
|
- (void)refreshVIPInfo {
|
||||||
[PYHTTPManager postWithPath:@"myvipcard" params:nil callback:^(id _Nullable rsp, NSError * _Nullable error) {
|
[PYHTTPManager postWithPath:@"myvipcard" params:nil callback:^(id _Nullable rsp, NSError * _Nullable error) {
|
||||||
|
|
||||||
@ -154,18 +182,18 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli
|
|||||||
[view removeFromSuperview];
|
[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];
|
[self.contentScrollView addSubview:self.userView];
|
||||||
|
|
||||||
NSArray * xibArray = [[NSBundle mainBundle]loadNibNamed:NSStringFromClass(THMineHeaderView.class) owner:nil options:nil] ;
|
// NSArray * xibArray = [[NSBundle mainBundle]loadNibNamed:NSStringFromClass(THMineHeaderView.class) owner:nil options:nil] ;
|
||||||
|
//
|
||||||
THMineHeaderView *headerView = xibArray.firstObject;
|
// THMineHeaderView *headerView = xibArray.firstObject;
|
||||||
headerView.frame = CGRectMake(0, 0, SCREEN_WIDTH, 30);
|
// headerView.frame = CGRectMake(0, 0, SCREEN_WIDTH, 30);
|
||||||
|
//
|
||||||
[_userView addSubview:headerView];
|
// [_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.contentMode = UIViewContentModeScaleToFill;
|
||||||
userImgV.layer.cornerRadius = userImgV.width/2.0;
|
userImgV.layer.cornerRadius = userImgV.width/2.0;
|
||||||
userImgV.layer.masksToBounds = YES;
|
userImgV.layer.masksToBounds = YES;
|
||||||
@ -343,56 +371,58 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli
|
|||||||
[self.contentScrollView addSubview:self.openVipBtn];
|
[self.contentScrollView addSubview:self.openVipBtn];
|
||||||
|
|
||||||
|
|
||||||
NSArray * newxibArray = [[NSBundle mainBundle]loadNibNamed:NSStringFromClass(THMineTypeNavView.class) owner:nil options:nil] ;
|
// NSArray * newxibArray = [[NSBundle mainBundle]loadNibNamed:NSStringFromClass(THMineTypeNavView.class) owner:nil options:nil] ;
|
||||||
|
//
|
||||||
THMineTypeNavView *navView = newxibArray.firstObject;
|
// THMineTypeNavView *navView = newxibArray.firstObject;
|
||||||
navView.frame = CGRectMake(0, self.openVipBtn.qmui_bottom + 20,SCREEN_WIDTH, 40);
|
// navView.frame = CGRectMake(0, self.openVipBtn.qmui_bottom + 20,SCREEN_WIDTH, 40);
|
||||||
[navView.upBtn addTarget:self action:@selector(upLoadAction) forControlEvents:UIControlEventTouchUpInside];
|
// [navView.upBtn addTarget:self action:@selector(upLoadAction) forControlEvents:UIControlEventTouchUpInside];
|
||||||
[self.contentScrollView addSubview:navView];
|
// [self.contentScrollView addSubview:navView];
|
||||||
|
|
||||||
|
|
||||||
UIView *emptyTipsView = [[UIView alloc] init];
|
// UIView *emptyTipsView = [[UIView alloc] init];
|
||||||
emptyTipsView.backgroundColor = [UIColor clearColor];
|
// emptyTipsView.backgroundColor = [UIColor clearColor];
|
||||||
emptyTipsView.width = SCREEN_WIDTH;
|
// emptyTipsView.width = SCREEN_WIDTH;
|
||||||
UIImageView *emptyIconView = [[UIImageView alloc] initWithImage:ImageNamed(@"TH_pro_photo_icon")];
|
// UIImageView *emptyIconView = [[UIImageView alloc] initWithImage:ImageNamed(@"TH_pro_photo_icon")];
|
||||||
emptyIconView.size = CGSizeMake(FIX_SIZE(49), FIX_SIZE(49));
|
// emptyIconView.size = CGSizeMake(FIX_SIZE(49), FIX_SIZE(49));
|
||||||
emptyIconView.centerX = emptyTipsView.width * 0.5;
|
// emptyIconView.centerX = emptyTipsView.width * 0.5;
|
||||||
emptyIconView.y = FIX_SIZE(30);
|
// emptyIconView.y = FIX_SIZE(30);
|
||||||
[emptyTipsView addSubview:emptyIconView];
|
// [emptyTipsView addSubview:emptyIconView];
|
||||||
UILabel *emptyTipsLabel = [UILabel mt_titleLabelWithText:@"上传你的照片\n让别人了解你"];
|
// UILabel *emptyTipsLabel = [UILabel mt_titleLabelWithText:@"上传你的照片\n让别人了解你"];
|
||||||
emptyTipsLabel.font = NORMAL_FONT;
|
// emptyTipsLabel.font = NORMAL_FONT;
|
||||||
[emptyTipsLabel sizeToFit];
|
// [emptyTipsLabel sizeToFit];
|
||||||
emptyTipsLabel.centerX = emptyIconView.centerX;
|
// emptyTipsLabel.centerX = emptyIconView.centerX;
|
||||||
emptyTipsLabel.y = emptyIconView.bottom + FIX_SIZE(6);
|
// emptyTipsLabel.y = emptyIconView.bottom + FIX_SIZE(6);
|
||||||
[emptyTipsView addSubview:emptyTipsLabel];
|
// [emptyTipsView addSubview:emptyTipsLabel];
|
||||||
|
//
|
||||||
emptyTipsView.height = emptyTipsLabel.bottom;
|
// emptyTipsView.height = emptyTipsLabel.bottom;
|
||||||
emptyTipsView.y = navView.bottom + FIX_SIZE(3);
|
// emptyTipsView.y = navView.bottom + FIX_SIZE(3);
|
||||||
|
//
|
||||||
self.emptyTipsView = emptyTipsView;
|
// self.emptyTipsView = emptyTipsView;
|
||||||
|
//
|
||||||
[self.contentScrollView addSubview:self.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];
|
[self.contentScrollView addSubview:self.contentTableView];
|
||||||
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.contentSize = CGSizeMake(SCREEN_WIDTH,TabBarHeight + self.contentTableView.qmui_bottom );
|
||||||
// [self.contentScrollView addSubview:self.contentTableView];
|
// self.contentScrollView.contentSize = CGSizeMake(SCREEN_WIDTH,FIX_SIZE(1000));
|
||||||
// self.contentScrollView.contentSize = CGSizeMake(SCREEN_WIDTH,TAB_BAR_HEIGHT + self.collectionView.qmui_bottom);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -448,7 +478,7 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli
|
|||||||
|
|
||||||
-(UIView *)contentTableView{
|
-(UIView *)contentTableView{
|
||||||
if (!_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);
|
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 = [[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);
|
_contentTableView.layer.cornerRadius = FIX_SIZE(6);
|
||||||
@ -458,7 +488,9 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli
|
|||||||
|
|
||||||
for (NSInteger i = 0; i < dataArray.count ; i++) {
|
for (NSInteger i = 0; i < dataArray.count ; i++) {
|
||||||
UIButton* cellBtn = [[UIButton alloc]initWithFrame:CGRectMake(0, FIX_SIZE(10) + cellH*i, _contentTableView.width, cellH)];
|
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 setTitleColor:HEX_COLOR_A(0x000000, 0) forState:UIControlStateNormal];
|
||||||
[cellBtn addTarget:self action:@selector(cellBtnClick:) forControlEvents:UIControlEventTouchUpInside];
|
[cellBtn addTarget:self action:@selector(cellBtnClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
[_contentTableView addSubview:cellBtn];
|
[_contentTableView addSubview:cellBtn];
|
||||||
@ -474,6 +506,31 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli
|
|||||||
leftCellBtnLab.textColor = HEX_COLOR_A(0xFFFFFF, 1);
|
leftCellBtnLab.textColor = HEX_COLOR_A(0xFFFFFF, 1);
|
||||||
[cellBtn addSubview:leftCellBtnLab];
|
[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))];
|
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.text = [NSString stringWithFormat:@"%@",dataArray[i][@"subTitle"]];
|
||||||
rightSubCellBtnLab.textAlignment = NSTextAlignmentRight;
|
rightSubCellBtnLab.textAlignment = NSTextAlignmentRight;
|
||||||
@ -486,13 +543,22 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli
|
|||||||
rightArrowImgV.image = [UIImage imageNamed:@"TH_pro_right_arrow_white"];
|
rightArrowImgV.image = [UIImage imageNamed:@"TH_pro_right_arrow_white"];
|
||||||
[cellBtn addSubview:rightArrowImgV];
|
[cellBtn addSubview:rightArrowImgV];
|
||||||
}else{
|
}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);
|
onSwitch.onTintColor = HEX_COLOR(0xFFAD10);
|
||||||
BOOL canOpen = [UserService isSecurityCodeOpen];
|
if ([title isEqualToString:@"附近隐身"]) {
|
||||||
onSwitch.on = canOpen;
|
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];
|
[onSwitch addTarget:self action:@selector(onSwitchClick:) forControlEvents:UIControlEventValueChanged];
|
||||||
[cellBtn addSubview:onSwitch];
|
[cellBtn addSubview:onSwitch];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return _contentTableView;
|
return _contentTableView;
|
||||||
@ -535,15 +601,39 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli
|
|||||||
|
|
||||||
-(void)onSwitchClick:(UISwitch*)sender{
|
-(void)onSwitchClick:(UISwitch*)sender{
|
||||||
if (sender.isOn) {
|
if (sender.isOn) {
|
||||||
if ([UserService currentUser].security_code.length != SecurityCodeLength) {
|
if (sender.tag == 0) {
|
||||||
[sender setOn:NO animated:NO];
|
[self setIsOpenNear:sender.isOn sender:sender];
|
||||||
[AlertInputView showWithTitle:@"设置密码" content:nil maxLength:SecurityCodeLength action:^BOOL(NSString * _Nonnull content) {
|
} else {
|
||||||
if (content.length != SecurityCodeLength) {
|
if ([UserService currentUser].security_code.length != SecurityCodeLength) {
|
||||||
[ToastUtil showToast:[NSString stringWithFormat:@"请输入%lu位数字", (unsigned long)SecurityCodeLength] position:CSToastPositionTop];
|
[sender setOn:NO animated:NO];
|
||||||
return 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:@{
|
[UserService updateUserSecurityToRemote:@{
|
||||||
@"security_code" : content ?: @"",
|
@"security_code" : [UserService currentUser].security_code,
|
||||||
@"is_security_on" : @(1),
|
@"is_security_on" : @(1),
|
||||||
} completion:^(id _Nullable rsp, NSError * _Nullable error) {
|
} completion:^(id _Nullable rsp, NSError * _Nullable error) {
|
||||||
if (error) {
|
if (error) {
|
||||||
@ -553,31 +643,11 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
} else { // 设置成功
|
} else { // 设置成功
|
||||||
[sender setOn:YES animated:YES];
|
|
||||||
[UserService currentUser].security_code = content;
|
|
||||||
[UserService currentUser].is_security_on = 1;
|
[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 {
|
} else {
|
||||||
[UserService updateUserSecurityToRemote:@{
|
[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{
|
-(void)userImgVAlertClick:(UITapGestureRecognizer*)tap{
|
||||||
UIImageView* userImgV = (UIImageView*)tap.view;
|
UIImageView* userImgV = (UIImageView*)tap.view;
|
||||||
BigUserImgAlertView* alertView = [[BigUserImgAlertView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
|
BigUserImgAlertView* alertView = [[BigUserImgAlertView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
|
||||||
|
|||||||
@ -81,9 +81,9 @@
|
|||||||
|
|
||||||
|
|
||||||
- (void)getUserstatData {
|
- (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) {
|
if (error == nil) {
|
||||||
self.statusStr = [NSString stringWithFormat:@"%@",rsp];
|
self.statusStr = [NSString stringWithFormat:@"%@",rsp[@"is_hide"]];
|
||||||
[self reloadData];
|
[self reloadData];
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
@ -159,7 +159,7 @@
|
|||||||
{
|
{
|
||||||
MTCommonListTableConfig *config = [MTCommonListTableConfig defaultConfigWithCellStyle:MTCommonListTableCellStyleDisclosureIndicator rowsCountForSections:@[@(6), @(2), @(2)]];
|
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.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 = @"更多";
|
config.tableTitle = @"更多";
|
||||||
@ -201,7 +201,7 @@
|
|||||||
|
|
||||||
if ([cellConfig.accessoryTitle isEqualToString:@"未开启"]){
|
if ([cellConfig.accessoryTitle isEqualToString:@"未开启"]){
|
||||||
if([UserService currentUser].vip_kind == 10){
|
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) {
|
if (error == nil) {
|
||||||
self.statusStr = @"1";
|
self.statusStr = @"1";
|
||||||
[self reloadData];
|
[self reloadData];
|
||||||
@ -210,7 +210,7 @@
|
|||||||
} else {
|
} else {
|
||||||
[MTAlertView showWithSetupBlcok:^(MTAlertViewConfig *config) {
|
[MTAlertView showWithSetupBlcok:^(MTAlertViewConfig *config) {
|
||||||
config.message = @"";
|
config.message = @"";
|
||||||
config.title = @"开通年VIP才能使用隐身功能";
|
config.title = @"开通年vip后就可以在附近隐身啦,还可以获得其他十九种会员特权哦";
|
||||||
|
|
||||||
config.otherTitle = @"去开通";
|
config.otherTitle = @"去开通";
|
||||||
config.cancelTitle = @"取消";
|
config.cancelTitle = @"取消";
|
||||||
@ -222,7 +222,7 @@
|
|||||||
|
|
||||||
} else {
|
} 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) {
|
if (error == nil) {
|
||||||
self.statusStr = @"0";
|
self.statusStr = @"0";
|
||||||
[self reloadData];
|
[self reloadData];
|
||||||
|
|||||||
@ -349,9 +349,11 @@ static NSMutableDictionary<NSString *, UserOtherInfo *> *gUserOtherInfoDicM;
|
|||||||
}
|
}
|
||||||
|
|
||||||
+ (void)getC2CUnreadMsgCountWithCompletion:(PYHTTPManagerCallback)completion {
|
+ (void)getC2CUnreadMsgCountWithCompletion:(PYHTTPManagerCallback)completion {
|
||||||
[PYHTTPManager postWithPath:@"c2cunreadmessagenum" params:@{
|
if ([LoginService token].length > 0) {
|
||||||
@"account_type": [LoginService isClone] ? @(1) : @(2) // 1获取主账户(默认),2获取分身账户
|
[PYHTTPManager postWithPath:@"c2cunreadmessagenum" params:@{
|
||||||
} callback:completion];
|
@"account_type": [LoginService isClone] ? @(1) : @(2) // 1获取主账户(默认),2获取分身账户
|
||||||
|
} callback:completion];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 获取用户相册
|
/// 获取用户相册
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user