diff --git a/xdts-ios 3/Pods/TUIChat/TUIChat/UI/Input/TUIInputBar.m b/xdts-ios 3/Pods/TUIChat/TUIChat/UI/Input/TUIInputBar.m index f5f273f..66c28b4 100644 --- a/xdts-ios 3/Pods/TUIChat/TUIChat/UI/Input/TUIInputBar.m +++ b/xdts-ios 3/Pods/TUIChat/TUIChat/UI/Input/TUIInputBar.m @@ -145,6 +145,8 @@ return; } + + [_delegate inputBar:self didSendText:self.inputTextView.text]; [self clearInput]; diff --git a/xdts-ios 3/TreeHole.xcodeproj/project.pbxproj b/xdts-ios 3/TreeHole.xcodeproj/project.pbxproj index 493439d..c4d5ce5 100644 --- a/xdts-ios 3/TreeHole.xcodeproj/project.pbxproj +++ b/xdts-ios 3/TreeHole.xcodeproj/project.pbxproj @@ -11,6 +11,10 @@ 5FF295EA8835717BF58B93F6 /* Pods_HoleNotification.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 74C6371F8879CD5C14B77D4D /* Pods_HoleNotification.framework */; }; 8110E00B2A724EEC0050F3E0 /* THLVTipView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8110E00A2A724EEC0050F3E0 /* THLVTipView.m */; }; 8110E00D2A724EF80050F3E0 /* THLVTipView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8110E00C2A724EF80050F3E0 /* THLVTipView.xib */; }; + 8110E0102A7352050050F3E0 /* THMineHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8110E00F2A7352040050F3E0 /* THMineHeaderView.m */; }; + 8110E0122A7352260050F3E0 /* THMineHeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8110E0112A7352260050F3E0 /* THMineHeaderView.xib */; }; + 8110E0152A736DAE0050F3E0 /* THMineTypeNavView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8110E0142A736DAE0050F3E0 /* THMineTypeNavView.m */; }; + 8110E0172A736DC30050F3E0 /* THMineTypeNavView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8110E0162A736DC30050F3E0 /* THMineTypeNavView.xib */; }; 8117270729D67CAB00259C1B /* THLanternAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8117255729D67CAA00259C1B /* THLanternAnimationController.m */; }; 8117270829D67CAB00259C1B /* THHomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8117255A29D67CAA00259C1B /* THHomeViewController.m */; }; 8117270929D67CAB00259C1B /* THBottleModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8117255D29D67CAA00259C1B /* THBottleModel.m */; }; @@ -467,6 +471,12 @@ 8110E0092A724EEC0050F3E0 /* THLVTipView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = THLVTipView.h; sourceTree = ""; }; 8110E00A2A724EEC0050F3E0 /* THLVTipView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = THLVTipView.m; sourceTree = ""; }; 8110E00C2A724EF80050F3E0 /* THLVTipView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = THLVTipView.xib; sourceTree = ""; }; + 8110E00E2A7352040050F3E0 /* THMineHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = THMineHeaderView.h; sourceTree = ""; }; + 8110E00F2A7352040050F3E0 /* THMineHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = THMineHeaderView.m; sourceTree = ""; }; + 8110E0112A7352260050F3E0 /* THMineHeaderView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = THMineHeaderView.xib; sourceTree = ""; }; + 8110E0132A736DAE0050F3E0 /* THMineTypeNavView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = THMineTypeNavView.h; sourceTree = ""; }; + 8110E0142A736DAE0050F3E0 /* THMineTypeNavView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = THMineTypeNavView.m; sourceTree = ""; }; + 8110E0162A736DC30050F3E0 /* THMineTypeNavView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = THMineTypeNavView.xib; sourceTree = ""; }; 8117255729D67CAA00259C1B /* THLanternAnimationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = THLanternAnimationController.m; sourceTree = ""; }; 8117255829D67CAA00259C1B /* THHomeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = THHomeViewController.h; sourceTree = ""; }; 8117255929D67CAA00259C1B /* THLanternAnimationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = THLanternAnimationController.h; sourceTree = ""; }; @@ -3099,6 +3109,12 @@ B0842D3428AD2BB40096ADEF /* GenderPickerView.m */, D93C3B752925E3AE00E840FD /* BigUserImgAlertView.h */, D93C3B762925E3AE00E840FD /* BigUserImgAlertView.m */, + 8110E00E2A7352040050F3E0 /* THMineHeaderView.h */, + 8110E00F2A7352040050F3E0 /* THMineHeaderView.m */, + 8110E0112A7352260050F3E0 /* THMineHeaderView.xib */, + 8110E0132A736DAE0050F3E0 /* THMineTypeNavView.h */, + 8110E0142A736DAE0050F3E0 /* THMineTypeNavView.m */, + 8110E0162A736DC30050F3E0 /* THMineTypeNavView.xib */, ); path = View; sourceTree = ""; @@ -3523,12 +3539,14 @@ 8117271429D67CAB00259C1B /* ProvinceCityArea.geojson in Resources */, B0DB7A8D28293A15002A5170 /* TH_login_enter.png in Resources */, B012AA6D282CF37500BBACA2 /* LaunchScreen.storyboard in Resources */, + 8110E0172A736DC30050F3E0 /* THMineTypeNavView.xib in Resources */, 8110E00D2A724EF80050F3E0 /* THLVTipView.xib in Resources */, B07834BA284A41DC0031FB16 /* README.md in Resources */, 8117271B29D67CAB00259C1B /* Images.xcassets in Resources */, B038497E28141AD200F47C18 /* province.json in Resources */, B00FC7C628839E08002D2FA7 /* ZZCircleProgress.bundle in Resources */, FC8C57ED2935A3F6006E5110 /* BRAddressPickerView.bundle in Resources */, + 8110E0122A7352260050F3E0 /* THMineHeaderView.xib in Resources */, B038477828141A4200F47C18 /* Assets.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -3647,6 +3665,7 @@ 811727AA29D67CAB00259C1B /* NSURL+QMUI.m in Sources */, B038493B28141AD200F47C18 /* PYThemeButton.m in Sources */, B03849D628141AD200F47C18 /* SetAvatarViewController.m in Sources */, + 8110E0152A736DAE0050F3E0 /* THMineTypeNavView.m in Sources */, B038494528141AD200F47C18 /* PYHUD.m in Sources */, 8117279829D67CAB00259C1B /* UIBlurEffect+QMUI.m in Sources */, B038495F28141AD200F47C18 /* NSDictionary+BlocksKit.m in Sources */, @@ -3751,6 +3770,7 @@ 8117273329D67CAB00259C1B /* QMUIEmotionInputManager.m in Sources */, B07834D6284A49310031FB16 /* KSPhotoView.m in Sources */, 8117270A29D67CAB00259C1B /* THBottleInfoModel.m in Sources */, + 8110E0102A7352050050F3E0 /* THMineHeaderView.m in Sources */, B038494E28141AD200F47C18 /* UIImage+PHAsset.m in Sources */, B038497828141AD200F47C18 /* UITextField+MTLimit.m in Sources */, D9FD6AC12920A95F00923069 /* ShareInviteCodeAlertView.m in Sources */, @@ -4266,12 +4286,10 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = TreeHole/TreeHole.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = ""; - "DEVELOPMENT_TEAM[sdk=iphoneos*]" = Y797QLF5AW; + DEVELOPMENT_TEAM = C39VUKAY2Z; ENABLE_BITCODE = NO; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "$(inherited)"; FRAMEWORK_SEARCH_PATHS = ( @@ -4302,10 +4320,9 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 2.4.0; - PRODUCT_BUNDLE_IDENTIFIER = com.zncdts.app; + PRODUCT_BUNDLE_IDENTIFIER = com.zncdts.app123; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = app1; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; @@ -4326,12 +4343,10 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = TreeHole/TreeHole.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = ""; - "DEVELOPMENT_TEAM[sdk=iphoneos*]" = Y797QLF5AW; + DEVELOPMENT_TEAM = C39VUKAY2Z; ENABLE_BITCODE = NO; EXCLUDED_ARCHS = ""; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "$(inherited)"; @@ -4363,10 +4378,9 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 2.4.0; - PRODUCT_BUNDLE_IDENTIFIER = com.zncdts.app; + PRODUCT_BUNDLE_IDENTIFIER = com.zncdts.app123; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = app1; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_mms.imageset/Contents.json b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_mms.imageset/Contents.json index 0137f4b..c760a3c 100644 --- a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_mms.imageset/Contents.json +++ b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_mms.imageset/Contents.json @@ -1,7 +1,6 @@ { "images" : [ { - "filename" : "Slice 364.png", "idiom" : "universal", "scale" : "1x" }, diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_mms.imageset/Slice 364.png b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_mms.imageset/Slice 364.png deleted file mode 100644 index 3c8bb77..0000000 Binary files a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_mms.imageset/Slice 364.png and /dev/null differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_mms.imageset/Slice 364@2x.png b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_mms.imageset/Slice 364@2x.png index 10bb7d8..b1a4366 100644 Binary files a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_mms.imageset/Slice 364@2x.png and b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_mms.imageset/Slice 364@2x.png differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_mms.imageset/Slice 364@3x.png b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_mms.imageset/Slice 364@3x.png index 3e0bda6..81949ff 100644 Binary files a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_mms.imageset/Slice 364@3x.png and b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_mms.imageset/Slice 364@3x.png differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_N.imageset/Contents.json b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_N.imageset/Contents.json index 83f282f..5c75440 100644 --- a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_N.imageset/Contents.json +++ b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_N.imageset/Contents.json @@ -1,7 +1,6 @@ { "images" : [ { - "filename" : "Slice 154.png", "idiom" : "universal", "scale" : "1x" }, diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_N.imageset/Slice 154.png b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_N.imageset/Slice 154.png deleted file mode 100644 index 2609dc5..0000000 Binary files a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_N.imageset/Slice 154.png and /dev/null differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_N.imageset/Slice 154@2x.png b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_N.imageset/Slice 154@2x.png index 179505d..4ea2d15 100644 Binary files a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_N.imageset/Slice 154@2x.png and b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_N.imageset/Slice 154@2x.png differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_N.imageset/Slice 154@3x.png b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_N.imageset/Slice 154@3x.png index 8b92f25..f045119 100644 Binary files a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_N.imageset/Slice 154@3x.png and b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_N.imageset/Slice 154@3x.png differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_S.imageset/Contents.json b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_S.imageset/Contents.json index 83f282f..5c75440 100644 --- a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_S.imageset/Contents.json +++ b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_S.imageset/Contents.json @@ -1,7 +1,6 @@ { "images" : [ { - "filename" : "Slice 154.png", "idiom" : "universal", "scale" : "1x" }, diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_S.imageset/Slice 154.png b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_S.imageset/Slice 154.png deleted file mode 100644 index 8e478b9..0000000 Binary files a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_S.imageset/Slice 154.png and /dev/null differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_S.imageset/Slice 154@2x.png b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_S.imageset/Slice 154@2x.png index fece979..9923c28 100644 Binary files a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_S.imageset/Slice 154@2x.png and b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_S.imageset/Slice 154@2x.png differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_S.imageset/Slice 154@3x.png b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_S.imageset/Slice 154@3x.png index f5ab77e..ad45ae7 100644 Binary files a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_S.imageset/Slice 154@3x.png and b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_vip_card_content_S.imageset/Slice 154@3x.png differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_yqyj.imageset/Contents.json b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_yqyj.imageset/Contents.json index 80f3e16..d153c5b 100644 --- a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_yqyj.imageset/Contents.json +++ b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_yqyj.imageset/Contents.json @@ -1,17 +1,16 @@ { "images" : [ { - "filename" : "Slice 362.png", "idiom" : "universal", "scale" : "1x" }, { - "filename" : "Slice 362@2x.png", + "filename" : "邀请有奖@2x.png", "idiom" : "universal", "scale" : "2x" }, { - "filename" : "Slice 362@3x.png", + "filename" : "邀请有奖@3x.png", "idiom" : "universal", "scale" : "3x" } diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_yqyj.imageset/Slice 362.png b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_yqyj.imageset/Slice 362.png deleted file mode 100644 index e627db1..0000000 Binary files a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_yqyj.imageset/Slice 362.png and /dev/null differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_yqyj.imageset/Slice 362@2x.png b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_yqyj.imageset/Slice 362@2x.png deleted file mode 100644 index d3b7348..0000000 Binary files a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_yqyj.imageset/Slice 362@2x.png and /dev/null differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_yqyj.imageset/Slice 362@3x.png b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_yqyj.imageset/Slice 362@3x.png deleted file mode 100644 index f876dea..0000000 Binary files a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_yqyj.imageset/Slice 362@3x.png and /dev/null differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_yqyj.imageset/邀请有奖@2x.png b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_yqyj.imageset/邀请有奖@2x.png new file mode 100644 index 0000000..c8d6946 Binary files /dev/null and b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_yqyj.imageset/邀请有奖@2x.png differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_yqyj.imageset/邀请有奖@3x.png b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_yqyj.imageset/邀请有奖@3x.png new file mode 100644 index 0000000..681db16 Binary files /dev/null and b/xdts-ios 3/TreeHole/Assets.xcassets/profile/TH_pro_yqyj.imageset/邀请有奖@3x.png differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/line.imageset/Contents.json b/xdts-ios 3/TreeHole/Assets.xcassets/profile/line.imageset/Contents.json new file mode 100644 index 0000000..8bfbb84 --- /dev/null +++ b/xdts-ios 3/TreeHole/Assets.xcassets/profile/line.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Frame 2041@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Frame 2041@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/line.imageset/Frame 2041@2x.png b/xdts-ios 3/TreeHole/Assets.xcassets/profile/line.imageset/Frame 2041@2x.png new file mode 100644 index 0000000..85884df Binary files /dev/null and b/xdts-ios 3/TreeHole/Assets.xcassets/profile/line.imageset/Frame 2041@2x.png differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/line.imageset/Frame 2041@3x.png b/xdts-ios 3/TreeHole/Assets.xcassets/profile/line.imageset/Frame 2041@3x.png new file mode 100644 index 0000000..aa31296 Binary files /dev/null and b/xdts-ios 3/TreeHole/Assets.xcassets/profile/line.imageset/Frame 2041@3x.png differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/qa.imageset/Contents.json b/xdts-ios 3/TreeHole/Assets.xcassets/profile/qa.imageset/Contents.json new file mode 100644 index 0000000..5c4d3b1 --- /dev/null +++ b/xdts-ios 3/TreeHole/Assets.xcassets/profile/qa.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Frame@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Frame@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/qa.imageset/Frame@2x.png b/xdts-ios 3/TreeHole/Assets.xcassets/profile/qa.imageset/Frame@2x.png new file mode 100644 index 0000000..ce4c3f7 Binary files /dev/null and b/xdts-ios 3/TreeHole/Assets.xcassets/profile/qa.imageset/Frame@2x.png differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/qa.imageset/Frame@3x.png b/xdts-ios 3/TreeHole/Assets.xcassets/profile/qa.imageset/Frame@3x.png new file mode 100644 index 0000000..cb35c78 Binary files /dev/null and b/xdts-ios 3/TreeHole/Assets.xcassets/profile/qa.imageset/Frame@3x.png differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/set_icon.imageset/Contents.json b/xdts-ios 3/TreeHole/Assets.xcassets/profile/set_icon.imageset/Contents.json new file mode 100644 index 0000000..acedfc7 --- /dev/null +++ b/xdts-ios 3/TreeHole/Assets.xcassets/profile/set_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "set_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "set_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/set_icon.imageset/set_icon@2x.png b/xdts-ios 3/TreeHole/Assets.xcassets/profile/set_icon.imageset/set_icon@2x.png new file mode 100644 index 0000000..58da62f Binary files /dev/null and b/xdts-ios 3/TreeHole/Assets.xcassets/profile/set_icon.imageset/set_icon@2x.png differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/set_icon.imageset/set_icon@3x.png b/xdts-ios 3/TreeHole/Assets.xcassets/profile/set_icon.imageset/set_icon@3x.png new file mode 100644 index 0000000..0306c55 Binary files /dev/null and b/xdts-ios 3/TreeHole/Assets.xcassets/profile/set_icon.imageset/set_icon@3x.png differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/version.imageset/Contents.json b/xdts-ios 3/TreeHole/Assets.xcassets/profile/version.imageset/Contents.json new file mode 100644 index 0000000..052dbfe --- /dev/null +++ b/xdts-ios 3/TreeHole/Assets.xcassets/profile/version.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "版本更新@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "版本更新@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/version.imageset/版本更新@2x.png b/xdts-ios 3/TreeHole/Assets.xcassets/profile/version.imageset/版本更新@2x.png new file mode 100644 index 0000000..9fbe36e Binary files /dev/null and b/xdts-ios 3/TreeHole/Assets.xcassets/profile/version.imageset/版本更新@2x.png differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/version.imageset/版本更新@3x.png b/xdts-ios 3/TreeHole/Assets.xcassets/profile/version.imageset/版本更新@3x.png new file mode 100644 index 0000000..f870ea0 Binary files /dev/null and b/xdts-ios 3/TreeHole/Assets.xcassets/profile/version.imageset/版本更新@3x.png differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/yin.imageset/Contents.json b/xdts-ios 3/TreeHole/Assets.xcassets/profile/yin.imageset/Contents.json new file mode 100644 index 0000000..b8d6cd6 --- /dev/null +++ b/xdts-ios 3/TreeHole/Assets.xcassets/profile/yin.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "附近隐身@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "附近隐身@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/yin.imageset/附近隐身@2x.png b/xdts-ios 3/TreeHole/Assets.xcassets/profile/yin.imageset/附近隐身@2x.png new file mode 100644 index 0000000..5194f10 Binary files /dev/null and b/xdts-ios 3/TreeHole/Assets.xcassets/profile/yin.imageset/附近隐身@2x.png differ diff --git a/xdts-ios 3/TreeHole/Assets.xcassets/profile/yin.imageset/附近隐身@3x.png b/xdts-ios 3/TreeHole/Assets.xcassets/profile/yin.imageset/附近隐身@3x.png new file mode 100644 index 0000000..7fccb8f Binary files /dev/null and b/xdts-ios 3/TreeHole/Assets.xcassets/profile/yin.imageset/附近隐身@3x.png differ diff --git a/xdts-ios 3/TreeHole/Code/Base/PYHTTPManager.h b/xdts-ios 3/TreeHole/Code/Base/PYHTTPManager.h index ccc9e69..415ee57 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/ViewController/BottleNerbyViewController.m b/xdts-ios 3/TreeHole/Code/Features/Bottle/ViewController/BottleNerbyViewController.m index 39d8030..28a6d46 100644 --- a/xdts-ios 3/TreeHole/Code/Features/Bottle/ViewController/BottleNerbyViewController.m +++ b/xdts-ios 3/TreeHole/Code/Features/Bottle/ViewController/BottleNerbyViewController.m @@ -162,7 +162,7 @@ [ud synchronize]; - self.city = user.city; + self.nextPage = 1; @@ -442,7 +442,7 @@ [PYHTTPManager postWithPath:@"usernearby1" params:_nearbyParamDict callback:^(id _Nullable rsp, NSError * _Nullable error) { // NSLog(@"是的rsp : %@==%@",rsp[@"isRecommend"],error); if (!error) { - + self.city = city; [[NSUserDefaults standardUserDefaults]setObject:rsp[@"isRecommend"] forKey:@"isRecommend"]; [[NSUserDefaults standardUserDefaults] synchronize]; @@ -477,9 +477,23 @@ } _blockSelf.tableMDataArray = newArray; + [_blockSelf.contentTableView reloadData]; + + } else { + NSString *code = [NSString stringWithFormat:@"%@",error.userInfo[@"code"]]; + if(code.intValue == 1300) { + NSString *msg = error.userInfo[@"message"]; + [MTAlertView showWithSetupBlcok:^(MTAlertViewConfig *config) { + config.message = msg; + config.otherTitle = @"去开通会员"; + config.cancelTitle = @"取消"; + config.otherHandler = ^(MTAlertButton *button) { + [PYAppService showVipVC:@"vip_page"]; + }; + }]; + } } - [_blockSelf.contentTableView reloadData]; [_blockSelf.contentTableView.mj_header endRefreshing]; [_blockSelf.contentTableView.mj_footer endRefreshing]; }]; diff --git a/xdts-ios 3/TreeHole/Code/Features/Chat/UIPatch/TUITool+TUIPatch.m b/xdts-ios 3/TreeHole/Code/Features/Chat/UIPatch/TUITool+TUIPatch.m index 371a058..2c5159c 100644 --- a/xdts-ios 3/TreeHole/Code/Features/Chat/UIPatch/TUITool+TUIPatch.m +++ b/xdts-ios 3/TreeHole/Code/Features/Chat/UIPatch/TUITool+TUIPatch.m @@ -65,11 +65,16 @@ config.title = @"聊天提示"; if ([msg containsString:@"需要互关/VIP才能聊天才能发送图片和语音"]) { config.message = [msg stringByReplacingOccurrencesOfString:@"互关/" withString:@""]; + config.otherTitle = @"去开通会员"; + config.otherHandler = ^(MTAlertButton *button) { + [PYAppService showVipVC:@"vip_page"]; + }; } else { config.message = msg; + config.otherTitle = @"OK"; } - config.otherTitle = @"OK"; + }]; }else{ [self patch_makeToastError:error msg:msg]; diff --git a/xdts-ios 3/TreeHole/Code/Features/Login/JWTDecoder/JWTDecoder.m b/xdts-ios 3/TreeHole/Code/Features/Login/JWTDecoder/JWTDecoder.m index 85ce600..b3d88b0 100644 --- a/xdts-ios 3/TreeHole/Code/Features/Login/JWTDecoder/JWTDecoder.m +++ b/xdts-ios 3/TreeHole/Code/Features/Login/JWTDecoder/JWTDecoder.m @@ -12,6 +12,7 @@ + (NSDictionary*)decodeJWTToken:(NSString*)jwtToken { + if (jwtToken.length == 0) return @{}; NSArray* segments = [jwtToken componentsSeparatedByString:@"."]; NSString* base64String = [segments objectAtIndex:1]; // (Header, Payload, Signature) diff --git a/xdts-ios 3/TreeHole/Code/Features/Profile/View/THMineHeaderView.h b/xdts-ios 3/TreeHole/Code/Features/Profile/View/THMineHeaderView.h new file mode 100644 index 0000000..887fed8 --- /dev/null +++ b/xdts-ios 3/TreeHole/Code/Features/Profile/View/THMineHeaderView.h @@ -0,0 +1,18 @@ +// +// THMineHeaderView.h +// TreeHole +// +// Created by iOS on 2023/7/28. +// Copyright © 2023 CYH. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface THMineHeaderView : UIView +@property (weak, nonatomic) IBOutlet UILabel *descLbl; + +@end + +NS_ASSUME_NONNULL_END diff --git a/xdts-ios 3/TreeHole/Code/Features/Profile/View/THMineHeaderView.m b/xdts-ios 3/TreeHole/Code/Features/Profile/View/THMineHeaderView.m new file mode 100644 index 0000000..0402a88 --- /dev/null +++ b/xdts-ios 3/TreeHole/Code/Features/Profile/View/THMineHeaderView.m @@ -0,0 +1,50 @@ +// +// THMineHeaderView.m +// TreeHole +// +// Created by iOS on 2023/7/28. +// Copyright © 2023 CYH. All rights reserved. +// + +#import "THMineHeaderView.h" +#import "PYAppService.h" +#import "FeedbackViewController.h" +#import "SettingsViewController.h" +#import "EditProfileViewController.h" + + +@implementation THMineHeaderView + +- (void)layoutSubviews { + [super layoutSubviews]; + + NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:self.descLbl.text]; + NSRange range = [self.descLbl.text rangeOfString:@"去完善"]; + + // 设置部分文本的颜色 + [attributedString addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:254/255.0 green:209/255.0 blue:164/255.0 alpha:1.0] range:range]; + + self.descLbl.attributedText = attributedString; + + self.descLbl.superview.layer.cornerRadius = 5; + self.descLbl.superview.layer.borderWidth = 1; + self.descLbl.superview.layer.borderColor = [UIColor colorWithRed:254/255.0 green:209/255.0 blue:164/255.0 alpha:0.3].CGColor; + + [self.descLbl.superview addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(setInfo)]]; + +} + +- (void)setInfo { + EditProfileViewController *VC = [EditProfileViewController new]; + + [PYAppService pushViewControllerAnimated:VC]; +} +- (IBAction)settingAction:(id)sender { + [PYAppService pushViewControllerAnimated:[SettingsViewController new]]; +} + +- (IBAction)qaAction:(id)sender { + [PYAppService pushViewControllerAnimated:[FeedbackViewController new]]; +} + +@end diff --git a/xdts-ios 3/TreeHole/Code/Features/Profile/View/THMineHeaderView.xib b/xdts-ios 3/TreeHole/Code/Features/Profile/View/THMineHeaderView.xib new file mode 100644 index 0000000..9c5a326 --- /dev/null +++ b/xdts-ios 3/TreeHole/Code/Features/Profile/View/THMineHeaderView.xib @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xdts-ios 3/TreeHole/Code/Features/Profile/View/THMineTypeNavView.h b/xdts-ios 3/TreeHole/Code/Features/Profile/View/THMineTypeNavView.h new file mode 100644 index 0000000..a49869d --- /dev/null +++ b/xdts-ios 3/TreeHole/Code/Features/Profile/View/THMineTypeNavView.h @@ -0,0 +1,19 @@ +// +// THMineTypeNavView.h +// TreeHole +// +// Created by iOS on 2023/7/28. +// Copyright © 2023 CYH. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface THMineTypeNavView : UIView +@property (weak, nonatomic) IBOutlet UIView *bgView; +@property (weak, nonatomic) IBOutlet UIButton *upBtn; + +@end + +NS_ASSUME_NONNULL_END diff --git a/xdts-ios 3/TreeHole/Code/Features/Profile/View/THMineTypeNavView.m b/xdts-ios 3/TreeHole/Code/Features/Profile/View/THMineTypeNavView.m new file mode 100644 index 0000000..cf92aa8 --- /dev/null +++ b/xdts-ios 3/TreeHole/Code/Features/Profile/View/THMineTypeNavView.m @@ -0,0 +1,40 @@ +// +// THMineTypeNavView.m +// TreeHole +// +// Created by iOS on 2023/7/28. +// Copyright © 2023 CYH. All rights reserved. +// + +#import "THMineTypeNavView.h" + +@implementation THMineTypeNavView + + + +- (void)layoutSubviews { + [super layoutSubviews]; + // 创建渐变层 + CAGradientLayer *gradientLayer = [CAGradientLayer layer]; + gradientLayer.frame = self.bgView.bounds; + + + // 设置渐变色 + UIColor *startColor = [UIColor colorWithRed:255/255.0 green:186/255.0 blue:139/255.0 alpha:1.0]; + UIColor *endColor = [UIColor colorWithRed:233/255.0 green:202/255.0 blue:171/255.0 alpha:1.0]; + gradientLayer.colors = @[(__bridge id)startColor.CGColor, (__bridge id)endColor.CGColor]; + + + gradientLayer.startPoint = CGPointMake(0.59, 0.52); + gradientLayer.endPoint = CGPointMake(0.38, 0.52); + + // 在视图上显示渐变层 + + [self.bgView.layer addSublayer:gradientLayer]; + + self.bgView.layer.cornerRadius = self.bgView.size.height/2; + self.bgView.clipsToBounds = true; + +} + +@end diff --git a/xdts-ios 3/TreeHole/Code/Features/Profile/View/THMineTypeNavView.xib b/xdts-ios 3/TreeHole/Code/Features/Profile/View/THMineTypeNavView.xib new file mode 100644 index 0000000..79b5b31 --- /dev/null +++ b/xdts-ios 3/TreeHole/Code/Features/Profile/View/THMineTypeNavView.xib @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 b34b986..3b7717d 100644 --- a/xdts-ios 3/TreeHole/Code/Features/Profile/ViewController/MineViewController.m +++ b/xdts-ios 3/TreeHole/Code/Features/Profile/ViewController/MineViewController.m @@ -13,14 +13,24 @@ #import "InviteCodeViewController.h"//邀请页面 #import "SettingsViewController.h"//设置页面 #import "FeedbackViewController.h"//意见反馈 +#import "TZImagePickerController+MTImagePicker.h" +#import "THMineHeaderView.h" +#import "THMineTypeNavView.h" +#import "ProfilePhotoCell.h" +#import "MTActionSheet.h" +#import "VIPCardInfo.h" + static NSString * const DidActionScoreKey = @"DidActionScoreKey"; static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPublicAccountKey"; -@interface MineViewController () +@interface MineViewController () @property (nonatomic, strong)User* userModel;//个人信息 @property (nonatomic, strong)UIView* userView; @property (nonatomic, strong)UIView* nianVipView; @property (nonatomic, strong)UILabel* nianVipLab; +@property (nonatomic, strong) UIView *emptyTipsView; + +@property (nonatomic, strong) UICollectionView *collectionView; @property (nonatomic, strong)UIButton* openVipBtn; @property (nonatomic, strong)UILabel* openVipLab; @@ -28,6 +38,13 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli @property (nonatomic,strong) NSMutableArray *infoArray; +@property (nonatomic, strong) NSMutableArray *photosM; + + +@property (nonatomic, strong) MTActionSheet *moreSheet; +@property (nonatomic, strong) MTActionSheet *photoSheet; +@property (nonatomic, strong) ProfilePhoto *actionSheetPhoto; +@property (nonatomic, strong) KSPhotoBrowser *browser; @end @implementation MineViewController @@ -51,20 +68,82 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli }else{ _nianVipLab.text = @"VIP"; } + }else{ _nianVipView.hidden = YES; - _openVipLab.hidden = YES; + } [UserService getUserInfoWithCompletion:^(User * _Nonnull user) { [self getNoticeCount]; + [self loadPhotosData]; + [self refreshVIPInfo]; }]; + self.navigationController.navigationBar.hidden = true; + +} + +- (void)viewWillDisappear:(BOOL)animated { + [super viewWillDisappear:animated]; + self.navigationController.navigationBar.hidden = false; +} + + +- (void)refreshVIPInfo { + [PYHTTPManager postWithPath:@"myvipcard" params:nil callback:^(id _Nullable rsp, NSError * _Nullable error) { + + VIPCardInfo *info = [VIPCardInfo mj_objectWithKeyValues:rsp]; + + if (info.vipcard.vip_exp_date.length > 0) { + self.openVipLab.text = info.vipcard.vip_exp_date; + } + + }]; + +} + +- (void)loadPhotosData { + [UserService getUserPhotosWithUserID:[UserService currentUserID] completion:^(NSArray * _Nonnull photos) { + self.photosM = [photos mutableCopy]; + if (self.photosM.count == 0) { + self.emptyTipsView.hidden = false; + self.collectionView.hidden = true; + self.contentScrollView.contentSize = CGSizeMake(SCREEN_WIDTH,TAB_BAR_HEIGHT + self.emptyTipsView.qmui_bottom + 30); + } else { + self.emptyTipsView.hidden = true; + self.collectionView.hidden = false; + self.contentScrollView.contentSize = CGSizeMake(SCREEN_WIDTH,TAB_BAR_HEIGHT + self.collectionView.qmui_bottom); + [self.collectionView reloadData]; + } + + }]; +} + +- (void)upLoadAction { + if(self.photosM.count >= 9){ + [SVProgressHUD showErrorWithStatus:@"为了让形象照质量更高,目前只允许上传9张~"]; + return; + } + TZImagePickerController *picker = [TZImagePickerController mt_imagePickerWithMaxImagesCount:9 - self.photosM.count didFinishPickingPhotosHandle:^(NSArray *photos, NSArray *assets, BOOL isSelectOriginalPhoto) { + dispatch_async(dispatch_get_main_queue(), ^{ + [SVProgressHUD showWithStatus:nil]; + }); + [UserService uploadUserPhotoWithImages:photos completion:^(id _Nullable rsp, NSError * _Nullable error) { + if (error) { + [SVProgressHUD showErrorWithStatus:@"上传失败,请稍后重试"]; + } else { + [SVProgressHUD dismiss]; + [self loadPhotosData]; + } + }]; + }]; + [self.navigationController presentViewController:picker animated:YES completion:nil]; } -(void)getNoticeCount @@ -75,9 +154,18 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli [view removeFromSuperview]; } - _userView= [[UIView alloc]initWithFrame:CGRectMake(0, STATUS_BAR_HEIGHT + FIX_SIZE(12), SCREEN_WIDTH, FIX_SIZE(182))]; + _userView= [[UIView alloc]initWithFrame:CGRectMake(0, STATUS_BAR_HEIGHT + FIX_SIZE(12), SCREEN_WIDTH, FIX_SIZE(212))]; [self.contentScrollView addSubview:self.userView]; - UIImageView* userImgV = [[UIImageView alloc]initWithFrame:CGRectMake(FIX_SIZE(20), FIX_SIZE(20), FIX_SIZE(68), FIX_SIZE(68))]; + + 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))]; userImgV.contentMode = UIViewContentModeScaleToFill; userImgV.layer.cornerRadius = userImgV.width/2.0; userImgV.layer.masksToBounds = YES; @@ -253,8 +341,58 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli } [self.contentScrollView addSubview:self.openVipBtn]; - [self.contentScrollView addSubview:self.contentTableView]; - self.contentScrollView.contentSize = CGSizeMake(SCREEN_WIDTH, _contentTableView.bottom + TAB_BAR_HEIGHT + FIX_SIZE(12)); + + + 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]; + + + 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.contentSize = CGSizeMake(SCREEN_WIDTH,TAB_BAR_HEIGHT + self.collectionView.qmui_bottom); } @@ -263,7 +401,7 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli // Do any additional setup after loading the view. NSLog(@"self.infoArray==%@",self.infoArray); - + UIImageView *bgImgView = [UIImageView new]; bgImgView.frame = self.view.bounds; bgImgView.image = UIImageMake(@"TH_MineBg"); @@ -289,21 +427,22 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli -(UIButton *)openVipBtn{ if (!_openVipBtn) { - _openVipBtn = [[UIButton alloc]initWithFrame:CGRectMake(FIX_SIZE(22), _userView.bottom, SCREEN_WIDTH - FIX_SIZE(44), (SCREEN_WIDTH - FIX_SIZE(44))*0.468)]; - _openVipLab = [[UILabel alloc]initWithFrame:CGRectMake(FIX_SIZE(80), FIX_SIZE(47), FIX_SIZE(160), FIX_SIZE(17))]; - _openVipLab.text = _userModel.vip_time?[NSString stringWithFormat:@"会员到期:%@",_userModel.vip_time]:@""; + _openVipBtn = [[UIButton alloc]initWithFrame:CGRectMake(FIX_SIZE(22), _userView.bottom, SCREEN_WIDTH - FIX_SIZE(44), 339)]; + _openVipLab = [[UILabel alloc]initWithFrame:CGRectMake(FIX_SIZE(80), FIX_SIZE(40), FIX_SIZE(160), FIX_SIZE(17))]; _openVipLab.textColor = HEX_COLOR(0xFFFFFF); _openVipLab.font = FONT_SIZE(12); [_openVipBtn addSubview:_openVipLab]; - if (_userModel.isVIP) { - [_openVipBtn setBackgroundImage:[UIImage imageNamed:@"TH_pro_vip_card_content_S"] forState:UIControlStateNormal]; - _openVipLab.hidden = NO; - }else{ - [_openVipBtn setBackgroundImage:[UIImage imageNamed:@"TH_pro_vip_card_content_N"] forState:UIControlStateNormal]; - _openVipLab.hidden = YES; - } - [_openVipBtn addTarget:self action:@selector(openVipBtnClick:) forControlEvents:UIControlEventTouchUpInside]; + + _openVipLab.text = @"二十种专属特权等你领取"; } + if (_userModel.isVIP) { + [_openVipBtn setBackgroundImage:[UIImage imageNamed:@"TH_pro_vip_card_content_S"] forState:UIControlStateNormal]; + _openVipLab.hidden = NO; + }else{ + [_openVipBtn setBackgroundImage:[UIImage imageNamed:@"TH_pro_vip_card_content_N"] forState:UIControlStateNormal]; +// _openVipLab.hidden = YES; + } + [_openVipBtn addTarget:self action:@selector(openVipBtnClick:) forControlEvents:UIControlEventTouchUpInside]; return _openVipBtn; } @@ -466,4 +605,63 @@ static NSString * const DidActionFollowPublicAccountKey = @"DidActionFollowPubli [[ZcqVender theTopviewControler].view addSubview:alertView]; } + + +#pragma mark - UICollectionViewDataSource +- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { + self.emptyTipsView.hidden = self.photosM.count > 0; + return self.photosM.count; +} + +- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView { + return 1; +} + +- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { + ProfilePhotoCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:ProfilePhotoCellID forIndexPath:indexPath]; + cell.photo = self.photosM[indexPath.item]; + return cell; +} + +#pragma mark - UICollectionDelegate +- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { + ProfilePhotoCell *cell = (ProfilePhotoCell *)[collectionView cellForItemAtIndexPath:indexPath]; + NSMutableArray *items = @[].mutableCopy; + for (int i = 0; i < self.photosM.count; i++) { + KSPhotoItem *item = [KSPhotoItem itemWithSourceView:indexPath.item == i ? cell.imageView : nil imageUrl:[NSURL URLWithString:self.photosM[i].url ?: @""]]; + [items addObject:item]; + } + + KSPhotoBrowser *browser = [KSPhotoBrowser browserWithPhotoItems:items selectedIndex:indexPath.item]; + browser.delegate = self; + browser.pageindicatorStyle = KSPhotoBrowserPageIndicatorStyleText; + browser.backgroundStyle = KSPhotoBrowserBackgroundStyleBlack; + [KSPhotoBrowser setImageViewBackgroundColor:[UIColor clearColor]]; + browser.dismissalStyle = KSPhotoBrowserInteractiveDismissalStyleScale; + UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:browser]; + self.browser = browser; + nav.modalPresentationStyle = UIModalPresentationOverFullScreen; + [self.navigationController presentViewController:nav animated:NO completion:nil]; +} + +#pragma mark -KSPhotoBrowserDelegate +- (void)ks_photoBrowser:(KSPhotoBrowser *)browser didLongPressItem:(KSPhotoItem *)item atIndex:(NSUInteger)index { + + if (index < self.photosM.count) { + ProfilePhoto *photo = self.photosM[index]; + self.actionSheetPhoto = photo; + if (photo.is_top) { + self.photoSheet = [[MTActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:nil otherButtonTitles:@"取消置顶", @"删除", nil]; + } else { + self.photoSheet = [[MTActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:nil otherButtonTitles:@"置顶", @"删除", nil]; + } + [self.photoSheet showInView:browser.navigationController.view]; + } +} + +- (void)ks_photoBrowserDidDismiss:(KSPhotoBrowser *)browser { + self.browser = nil; +} + + @end 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 39e93dd..38dccf8 100644 --- a/xdts-ios 3/TreeHole/Code/Features/Settings/ViewController/SettingsViewController.m +++ b/xdts-ios 3/TreeHole/Code/Features/Settings/ViewController/SettingsViewController.m @@ -10,12 +10,13 @@ #import "ChangePhoneViewController.h" #import "BlackListViewController.h" #import "PrivacySettingsViewController.h" +#import "InviteCodeViewController.h" #import "FeedbackViewController.h" #import "AlertInputView.h" #import "MTCacheManager.h" @interface SettingsViewController () - +@property (nonatomic, copy) NSString *statusStr; @end @implementation SettingsViewController @@ -74,23 +75,171 @@ [self.view addSubview:logoutItem]; self.tableView.contentSize = CGSizeMake(0, logoutItem.bottom); + [self getUserstatData]; } + + +- (void)getUserstatData { + [PYHTTPManager postWithPath:@"userstat" params:nil callback:^(id _Nullable rsp, NSError * _Nullable error) { + if (error == nil) { + self.statusStr = [NSString stringWithFormat:@"%@",rsp]; + [self reloadData]; + } + }]; +} + +- (void)showAppUpdateAlertViewWithVersion:(NSString *)version content:(NSString *)content isForce:(BOOL)isForce andDownLoadAddress:(NSString *)app_urlStr{ + UIView *customView = [[UIView alloc] init]; + customView.width = FIX_SIZE(270); + customView.height = FIX_SIZE(494); + customView.backgroundColor = COLOR_WITH_RGB(0x222436); + customView.layer.cornerRadius = FIX_SIZE(10); + customView.clipsToBounds = YES; + + MTAlertView *alerView = [MTAlertView showWithSetupBlcok:^(MTAlertViewConfig *config) { + config.customView = customView; + }]; + + UIImageView *iconView = [[UIImageView alloc] init]; + iconView.width = customView.width; + iconView.height = FIX_SIZE(160); + iconView.image = ImageNamed(@"TH_app_update_img"); + [customView addSubview:iconView]; + UILabel *versionLabel = [[UILabel alloc] init]; + versionLabel.text = version; + versionLabel.font = MT_FONT_REGULAR_SIZE(12); + versionLabel.textColor = [UIColor whiteColor]; + [versionLabel sizeToFit]; + versionLabel.x = FIX_SIZE(25); + versionLabel.centerY = iconView.height * 0.5; + [iconView addSubview:versionLabel]; + + UIButton *nextButton = [[UIButton alloc] init]; + [nextButton setTitle:@"稍后更新" forState:UIControlStateNormal]; + [nextButton setTitleColor:CONTENT_COLOR forState:UIControlStateNormal]; + [nextButton sizeToFit]; + nextButton.width += 10; + nextButton.height = FIX_SIZE(30); + nextButton.titleLabel.font = MT_FONT_REGULAR_SIZE(13); + nextButton.centerX = customView.width * 0.5; + nextButton.bottom = customView.height - FIX_SIZE(15); + nextButton.hidden = isForce; + [customView addSubview:nextButton]; + PYThemeButton *button = [PYThemeButton buttonWithTitle:@"立即更新" action:^(UIButton * _Nonnull button) { +// [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"itms-apps://itunes.apple.com/cn/app/qq/%@?mt=8", APPSTORE_APPID]] options:@{} completionHandler:^(BOOL success) { +//// NSLog(@"to App Store"); +// }]; + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:app_urlStr] options:@{} completionHandler:^(BOOL success) { +// NSLog(@"to App Store"); + }]; + }]; + [nextButton addTouchUpInsideWithAction:^(UIButton * _Nullable button) { + [alerView dismiss]; + }]; + button.width = FIX_SIZE(180); + button.centerX = customView.width * 0.5; + button.bottom = isForce ? customView.height - FIX_SIZE(20) : nextButton.y - FIX_SIZE(8); + [customView addSubview:button]; + + UITextView *textView = [[UITextView alloc] init]; + textView.x = FIX_SIZE(20); + textView.text = content; + textView.backgroundColor = [UIColor clearColor]; + textView.width = customView.width - textView.x * 2; + textView.y = iconView.bottom + FIX_SIZE(20); + textView.height = button.y - FIX_SIZE(20) - textView.y; + textView.textColor = [UIColor whiteColor]; + textView.font = MT_FONT_REGULAR_SIZE(15); + [customView addSubview:textView]; +} + + - (MTCommonListTableConfig *)tableConfigForTableViewContorller { - MTCommonListTableConfig *config = [MTCommonListTableConfig defaultConfigWithCellStyle:MTCommonListTableCellStyleDisclosureIndicator rowsCountForSections:@[@(2), @(2), @(2)]]; - config.cellTitles = @[@"修改手机号", @"修改密码锁", @"黑名单", @"隐私设置", @"意见反馈", @"清理缓存"]; + MTCommonListTableConfig *config = [MTCommonListTableConfig defaultConfigWithCellStyle:MTCommonListTableCellStyleDisclosureIndicator rowsCountForSections:@[@(6), @(2), @(2)]]; +// 版本更新 邀请有奖 隐身 设置密码锁 修改密码锁 修改手机号 + config.cellTitles = @[@"版本更新",@"邀请有奖", @"隐身",@"设置密码锁",@"修改密码锁", @"修改手机号",@"黑名单", @"隐私设置", @"意见反馈", @"清理缓存"]; - config.cellImageNames = @[@"TH_pro_set_phone_icon", @"TH_pro_set_password_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 = @"更多"; + User *user = [UserService currentUser]; [config resetCellConfigForSection:0 row:0 config:^(MTCommonListTableCellConfig *cellConfig) { cellConfig.cellAction = ^(MTCommonListTableViewController *tableViewController, NSIndexPath *indexPath, MTCommonListTableCellConfig *cellConfig) { - [PYAppService pushViewControllerAnimated:[ChangePhoneViewController new]]; + + [PYHTTPManager postWithPath:@"checkappupdate" params:nil callback:^(id _Nullable rsp, NSError * _Nullable error) { + if (!error) { + NSString *type = rsp[@"update_type"]; + NSString *version = rsp[@"new_version"]; + NSString *content = rsp[@"update_content"]; + NSString *app_urlStr = rsp[@"app_url"]; +// NSLog(@"type:%@\napp_urlStr:%@",type,app_urlStr); +// NSString *type = @"force_update"; +// NSString *content = @"https://sourl.cn/9KSTN6"; +// NSString *app_urlStr = @"https://sourl.cn/9KSTN6"; + if ([type isEqualToString:@"update_remind"]) { // 提醒更新 + [self showAppUpdateAlertViewWithVersion:version content:content isForce:NO andDownLoadAddress:app_urlStr]; + return; + } + if ([type isEqualToString:@"force_update"]) { // 强制更新 + [self showAppUpdateAlertViewWithVersion:version content:content isForce:YES andDownLoadAddress:app_urlStr]; + return; + } else { + [SVProgressHUD showInfoWithStatus:@"当前已经是最新版本了"]; + } + } + }]; +// [PYAppService pushViewControllerAnimated:[ChangePhoneViewController new]]; + }; + }]; + + MJWeakSelf + [config resetCellConfigForSection:0 row:2 config:^(MTCommonListTableCellConfig *cellConfig) { + cellConfig.accessoryTitle = weakSelf.statusStr.intValue == 1 ? @"已开启": @"未开启"; + cellConfig.cellAction = ^(MTCommonListTableViewController *tableViewController, NSIndexPath *indexPath, MTCommonListTableCellConfig *cellConfig) { + + if ([cellConfig.accessoryTitle isEqualToString:@"未开启"]){ + if([UserService currentUser].vip_kind == 10){ + [PYHTTPManager postWithPath:@"updatesecurity" params:@{@"state":@1} callback:^(id _Nullable rsp, NSError * _Nullable error) { + if (error == nil) { + self.statusStr = @"1"; + [self reloadData]; + } + }]; + } else { + [MTAlertView showWithSetupBlcok:^(MTAlertViewConfig *config) { + config.message = @""; + config.title = @"开通年VIP才能使用隐身功能"; + + config.otherTitle = @"去开通"; + config.cancelTitle = @"取消"; + config.otherHandler = ^(MTAlertButton *button) { + [PYAppService showVipVC:@"vip_page"]; + }; + }]; + } + + } else { + + [PYHTTPManager postWithPath:@"updatesecurity" params:@{@"state":@0} callback:^(id _Nullable rsp, NSError * _Nullable error) { + if (error == nil) { + self.statusStr = @"0"; + [self reloadData]; + } + }]; + } + + }; + }]; + + [config resetCellConfigForSection:0 row:1 config:^(MTCommonListTableCellConfig *cellConfig) { + cellConfig.cellAction = ^(MTCommonListTableViewController *tableViewController, NSIndexPath *indexPath, MTCommonListTableCellConfig *cellConfig) { + [PYAppService pushViewControllerAnimated:[InviteCodeViewController new]]; }; }]; WeakSelf(self); - [config resetCellConfigForSection:0 row:1 config:^(MTCommonListTableCellConfig *cellConfig) { + [config resetCellConfigForSection:0 row:4 config:^(MTCommonListTableCellConfig *cellConfig) { cellConfig.accessoryTitle = user.security_code.length == SecurityCodeLength ? [NSString stringWithFormat:@"****%@", [user.security_code substringFromIndex:4]] : @"未设置"; cellConfig.cellAction = ^(MTCommonListTableViewController *tableViewController, NSIndexPath *indexPath, MTCommonListTableCellConfig *cellConfig) { @@ -148,6 +297,88 @@ }]; }; }]; + [config resetCellConfigForSection:0 row:3 config:^(MTCommonListTableCellConfig *cellConfig) { + BOOL canOpen = [UserService isSecurityCodeOpen]; + + cellConfig.accessoryTitle = canOpen ? @"已开启": @"未开启"; + cellConfig.cellAction = ^(MTCommonListTableViewController *tableViewController, NSIndexPath *indexPath, MTCommonListTableCellConfig *cellConfig) { + + if ([cellConfig.accessoryTitle isEqualToString:@"未开启"]) { + 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; + [self reloadData]; + } + }]; + 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; + int status2 = [UserService currentUser].is_security_on; + [self reloadData]; +// [sender setOn:YES animated:YES]; + } + }]; + } + } else { + [UserService updateUserSecurityToRemote:@{ + @"security_code" : [UserService currentUser].security_code, + @"is_security_on" : @(0), + } completion:^(id _Nullable rsp, NSError * _Nullable error) { + if (error) { +// [sender setOn:YES 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 = 0; + [self reloadData]; +// [sender setOn:NO animated:YES]; + } + }]; + } + + }; + }]; + [config resetCellConfigForSection:0 row:5 config:^(MTCommonListTableCellConfig *cellConfig) { + cellConfig.cellAction = ^(MTCommonListTableViewController *tableViewController, NSIndexPath *indexPath, MTCommonListTableCellConfig *cellConfig) { + [PYAppService pushViewControllerAnimated:[ChangePhoneViewController new]]; + }; + }]; + [config resetCellConfigForSection:1 row:0 config:^(MTCommonListTableCellConfig *cellConfig) { cellConfig.cellAction = ^(MTCommonListTableViewController *tableViewController, NSIndexPath *indexPath, MTCommonListTableCellConfig *cellConfig) { [PYAppService pushViewControllerAnimated:[BlackListViewController new]]; diff --git a/xdts-ios 3/TreeHole/Code/Features/User/User.h b/xdts-ios 3/TreeHole/Code/Features/User/User.h index ce14232..3cf9493 100644 --- a/xdts-ios 3/TreeHole/Code/Features/User/User.h +++ b/xdts-ios 3/TreeHole/Code/Features/User/User.h @@ -75,6 +75,7 @@ typedef NS_ENUM(int, VIPKind) { @property (nonatomic, copy) NSString *intro; @property (nonatomic, copy) NSString *vip_time; @property (nonatomic, copy) NSString *cover_img; +@property (nonatomic, copy) NSString *vip_exp_date; @property (nonatomic, copy) NSString *nickname; @property (nonatomic, copy) NSString *phone; @property (nonatomic, copy) NSString *province;