修改2.4.0功能
This commit is contained in:
parent
f7464db466
commit
b08ef84ab1
@ -9,6 +9,8 @@
|
||||
/* Begin PBXBuildFile section */
|
||||
57232BB7F95997E2D46B9CF8 /* Pods_TreeHole.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A36C0BF581F207BA348D1A2 /* Pods_TreeHole.framework */; };
|
||||
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 */; };
|
||||
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 */; };
|
||||
@ -462,6 +464,9 @@
|
||||
49AB12FA477E4D65042A4720 /* Pods-TreeHole.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TreeHole.debug.xcconfig"; path = "Target Support Files/Pods-TreeHole/Pods-TreeHole.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
6A3613F5F0C387980F724DC6 /* Pods-HoleNotification.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HoleNotification.release.xcconfig"; path = "Target Support Files/Pods-HoleNotification/Pods-HoleNotification.release.xcconfig"; sourceTree = "<group>"; };
|
||||
74C6371F8879CD5C14B77D4D /* Pods_HoleNotification.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_HoleNotification.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
8110E0092A724EEC0050F3E0 /* THLVTipView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = THLVTipView.h; sourceTree = "<group>"; };
|
||||
8110E00A2A724EEC0050F3E0 /* THLVTipView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = THLVTipView.m; sourceTree = "<group>"; };
|
||||
8110E00C2A724EF80050F3E0 /* THLVTipView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = THLVTipView.xib; sourceTree = "<group>"; };
|
||||
8117255729D67CAA00259C1B /* THLanternAnimationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = THLanternAnimationController.m; sourceTree = "<group>"; };
|
||||
8117255829D67CAA00259C1B /* THHomeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = THHomeViewController.h; sourceTree = "<group>"; };
|
||||
8117255929D67CAA00259C1B /* THLanternAnimationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = THLanternAnimationController.h; sourceTree = "<group>"; };
|
||||
@ -3302,6 +3307,9 @@
|
||||
D9AC772128F05B45004C54BF /* BottleUserNearbyShaiXuanAlertView.m */,
|
||||
D9AC772728F0640F004C54BF /* BottleShaiXuanCellView.h */,
|
||||
D9AC772828F0640F004C54BF /* BottleShaiXuanCellView.m */,
|
||||
8110E0092A724EEC0050F3E0 /* THLVTipView.h */,
|
||||
8110E00A2A724EEC0050F3E0 /* THLVTipView.m */,
|
||||
8110E00C2A724EF80050F3E0 /* THLVTipView.xib */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
@ -3515,6 +3523,7 @@
|
||||
8117271429D67CAB00259C1B /* ProvinceCityArea.geojson in Resources */,
|
||||
B0DB7A8D28293A15002A5170 /* TH_login_enter.png in Resources */,
|
||||
B012AA6D282CF37500BBACA2 /* LaunchScreen.storyboard in Resources */,
|
||||
8110E00D2A724EF80050F3E0 /* THLVTipView.xib in Resources */,
|
||||
B07834BA284A41DC0031FB16 /* README.md in Resources */,
|
||||
8117271B29D67CAB00259C1B /* Images.xcassets in Resources */,
|
||||
B038497E28141AD200F47C18 /* province.json in Resources */,
|
||||
@ -3905,6 +3914,7 @@
|
||||
B03849A528141AD200F47C18 /* UIBarButtonItem+PYExtension.m in Sources */,
|
||||
B038494828141AD200F47C18 /* UIImage+JHUD.m in Sources */,
|
||||
B038493C28141AD200F47C18 /* PYInputView.m in Sources */,
|
||||
8110E00B2A724EEC0050F3E0 /* THLVTipView.m in Sources */,
|
||||
8117272829D67CAB00259C1B /* QMUICellHeightCache.m in Sources */,
|
||||
B09AB3CD281D64B80007C5EB /* MessageNotificationCell.m in Sources */,
|
||||
D9AC772928F0640F004C54BF /* BottleShaiXuanCellView.m in Sources */,
|
||||
@ -4258,7 +4268,7 @@
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 15;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = Y797QLF5AW;
|
||||
@ -4291,7 +4301,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 2.3.4;
|
||||
MARKETING_VERSION = 2.4.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.zncdts.app;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
@ -4318,7 +4328,7 @@
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 15;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = Y797QLF5AW;
|
||||
@ -4352,7 +4362,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 2.3.4;
|
||||
MARKETING_VERSION = 2.4.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.zncdts.app;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
|
||||
@ -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
|
||||
|
||||
@ -1207,8 +1207,13 @@
|
||||
[readView.alertView dismiss];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[MTAlertView showWithSetupBlcok:^(MTAlertViewConfig *config) {
|
||||
config.message = @"您关注的朋友最近发布的瓶子已经被您看完啦,\n过段时间再来看吧~";
|
||||
config.otherTitle = @"OK";
|
||||
config.message = @"您关注的人最近发布的瓶子被看完了,您可以多关注一些同好哦~";
|
||||
config.otherTitle = @"前往关注附近同好";
|
||||
|
||||
config.otherHandler = ^(MTAlertButton *button) {
|
||||
[readView.alertView dismiss];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"changeToNearPage" object:nil];
|
||||
};
|
||||
}];
|
||||
});
|
||||
|
||||
@ -1324,8 +1329,13 @@
|
||||
[readView.alertView dismiss];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[MTAlertView showWithSetupBlcok:^(MTAlertViewConfig *config) {
|
||||
config.message = @"您关注的朋友最近发布的瓶子已经被您看完啦,\n过段时间再来看吧~";
|
||||
config.otherTitle = @"OK";
|
||||
config.message = @"您关注的人最近发布的瓶子被看完了,您可以多关注一些同好哦~";
|
||||
config.otherTitle = @"前往关注附近同好";
|
||||
|
||||
config.otherHandler = ^(MTAlertButton *button) {
|
||||
[readView.alertView dismiss];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"changeToNearPage" object:nil];
|
||||
};
|
||||
}];
|
||||
});
|
||||
|
||||
@ -1441,8 +1451,13 @@
|
||||
[readView.alertView dismiss];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[MTAlertView showWithSetupBlcok:^(MTAlertViewConfig *config) {
|
||||
config.message = @"您关注的朋友最近发布的瓶子已经被您看完啦,\n过段时间再来看吧~";
|
||||
config.otherTitle = @"OK";
|
||||
config.message = @"您关注的人最近发布的瓶子被看完了,您可以多关注一些同好哦~";
|
||||
config.otherTitle = @"前往关注附近同好";
|
||||
|
||||
config.otherHandler = ^(MTAlertButton *button) {
|
||||
[readView.alertView dismiss];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"changeToNearPage" object:nil];
|
||||
};
|
||||
}];
|
||||
});
|
||||
|
||||
@ -1633,6 +1648,7 @@
|
||||
if ([weakreadView isExchangeBottle]) { // 聊天
|
||||
// 还有个有点麻烦的问题:交换声音和照片成功后,进入1对1页面
|
||||
// 偶尔不显示交换的声音和照片(或者漏了),服务器发了消息是成功的。 延迟0.5秒观察下
|
||||
[weakreadView.alertView dismiss];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[SVProgressHUD dismiss];
|
||||
User *user = [[User alloc] init];
|
||||
@ -1642,6 +1658,8 @@
|
||||
[PYAppService chatWithUser:user];
|
||||
[ToastUtil showToast:@"彼此交换成功,请查收"];
|
||||
[weakreadView removeFromSuperview];
|
||||
|
||||
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
19
xdts-ios 3/TreeHole/Code/Features/Bottle/View/THLVTipView.h
Normal file
19
xdts-ios 3/TreeHole/Code/Features/Bottle/View/THLVTipView.h
Normal file
@ -0,0 +1,19 @@
|
||||
//
|
||||
// THLVTipView.h
|
||||
// TreeHole
|
||||
//
|
||||
// Created by iOS on 2023/7/27.
|
||||
// Copyright © 2023 CYH. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface THLVTipView : UIView
|
||||
@property (weak, nonatomic) IBOutlet UILabel *descLbl;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *tipBtn;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
35
xdts-ios 3/TreeHole/Code/Features/Bottle/View/THLVTipView.m
Normal file
35
xdts-ios 3/TreeHole/Code/Features/Bottle/View/THLVTipView.m
Normal file
@ -0,0 +1,35 @@
|
||||
//
|
||||
// THLVTipView.m
|
||||
// TreeHole
|
||||
//
|
||||
// Created by iOS on 2023/7/27.
|
||||
// Copyright © 2023 CYH. All rights reserved.
|
||||
//
|
||||
|
||||
#import "THLVTipView.h"
|
||||
#import "ProfileCardViewController.h"
|
||||
#import "BottleDetialController.h"
|
||||
#import "UserService.h"
|
||||
|
||||
|
||||
@implementation THLVTipView
|
||||
|
||||
- (void)layoutSubviews {
|
||||
[super layoutSubviews];
|
||||
self.tipBtn.layer.cornerRadius = self.tipBtn.size.height/2;
|
||||
self.tipBtn.superview.layer.cornerRadius = 10;
|
||||
[self.tipBtn addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
|
||||
- (void)btnClick:(UIButton *)btn {
|
||||
if ([btn.titleLabel.text isEqualToString:@"更新形象照"]) {
|
||||
[PYAppService pushViewControllerAnimated:[[ProfileCardViewController alloc] initWithUserID:[UserService currentUserID]]];
|
||||
} else if ([btn.titleLabel.text isEqualToString:@"查看瓶子"]) {
|
||||
BottleDetialController *deDetial = [[BottleDetialController alloc]init];
|
||||
[PYAppService pushViewControllerAnimated:deDetial];
|
||||
} else {
|
||||
[PYAppService showVipVC:@"vip_page"];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="THLVTipView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="60"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HHh-z4-8Mv">
|
||||
<rect key="frame" x="15" y="0.0" width="345" height="50"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="如何继续提升在全国的排名?" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Jv2-Eb-DWe">
|
||||
<rect key="frame" x="15" y="10" width="173" height="16"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="开通年VIP提升您的账号权重进而提升排名哦~" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eca-lk-Bb4">
|
||||
<rect key="frame" x="15" y="31" width="211" height="12"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="s2O-5e-DLR">
|
||||
<rect key="frame" x="260" y="10" width="70" height="28"/>
|
||||
<color key="backgroundColor" red="1" green="0.74509803921568629" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="70" id="TlA-ZH-6K0"/>
|
||||
<constraint firstAttribute="height" constant="28" id="uFJ-87-YUT"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="10"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="开年VIP">
|
||||
<color key="titleColor" red="0.08235294118" green="0.08235294118" blue="0.08235294118" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</state>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.082352941176470587" green="0.082352941176470587" blue="0.082352941176470587" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="Jv2-Eb-DWe" firstAttribute="leading" secondItem="HHh-z4-8Mv" secondAttribute="leading" constant="15" id="HW7-y7-Tpm"/>
|
||||
<constraint firstAttribute="trailing" secondItem="s2O-5e-DLR" secondAttribute="trailing" constant="15" id="KcP-MQ-8bN"/>
|
||||
<constraint firstItem="eca-lk-Bb4" firstAttribute="top" secondItem="Jv2-Eb-DWe" secondAttribute="bottom" constant="5" id="M2Q-8l-k6c"/>
|
||||
<constraint firstItem="s2O-5e-DLR" firstAttribute="top" secondItem="HHh-z4-8Mv" secondAttribute="top" constant="10" id="bVZ-Z8-lDu"/>
|
||||
<constraint firstItem="eca-lk-Bb4" firstAttribute="leading" secondItem="HHh-z4-8Mv" secondAttribute="leading" constant="15" id="bm9-p1-v0E"/>
|
||||
<constraint firstItem="Jv2-Eb-DWe" firstAttribute="top" secondItem="HHh-z4-8Mv" secondAttribute="top" constant="10" id="evR-M0-qnt"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="HHh-z4-8Mv" secondAttribute="trailing" constant="15" id="K2V-aW-c9P"/>
|
||||
<constraint firstItem="HHh-z4-8Mv" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="hzH-Hv-uLw"/>
|
||||
<constraint firstAttribute="bottom" secondItem="HHh-z4-8Mv" secondAttribute="bottom" constant="10" id="lG7-7s-HOP"/>
|
||||
<constraint firstItem="HHh-z4-8Mv" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="15" id="qb6-wQ-AKr"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="descLbl" destination="eca-lk-Bb4" id="jQu-oA-fD5"/>
|
||||
<outlet property="tipBtn" destination="s2O-5e-DLR" id="NiX-EM-EcE"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="53" y="-11"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
||||
@ -29,6 +29,8 @@
|
||||
|
||||
@property (nonatomic, strong) UIButton *getBottleButton;
|
||||
@property (nonatomic, assign) NSTimeInterval disappearTime;
|
||||
@property (nonatomic, strong) UIButton *navBottleBtn;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@ -68,7 +70,7 @@
|
||||
navBottleBtn.frame = CGRectMake(0, 0, FIX_SIZE(24), FIX_SIZE(24));
|
||||
[navBottleBtn setImage:ImageNamed(@"TH_bottle_refresh_icon") forState:UIControlStateNormal];
|
||||
[navBottleBtn addTarget:self action:@selector(refreshHomeBottleData) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
self.navBottleBtn = navBottleBtn;
|
||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:navBottleBtn];
|
||||
|
||||
#pragma mark -- 为啥这里也要请求?viewwillapper已经有了
|
||||
@ -379,6 +381,14 @@
|
||||
}
|
||||
|
||||
- (void)refreshHomeBottleData {
|
||||
CABasicAnimation *rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
|
||||
rotationAnimation.toValue = [NSNumber numberWithFloat:M_PI * 2.0];
|
||||
rotationAnimation.duration = 1.0;
|
||||
rotationAnimation.cumulative = YES;
|
||||
rotationAnimation.repeatCount = 1;
|
||||
|
||||
[self.navBottleBtn.imageView.layer addAnimation:rotationAnimation forKey:@"rotationAnimation"];
|
||||
|
||||
[SVProgressHUD showWithStatus:nil];
|
||||
[BottleService getHomeBottleInfoWithCompletion:^(HomeBottleInfo * _Nullable info) {
|
||||
[self endLoading:nil];
|
||||
|
||||
@ -15,14 +15,17 @@
|
||||
#import <CoreLocation/CoreLocation.h>
|
||||
#import <MJRefresh.h>
|
||||
#import "MTPickerView.h"
|
||||
#import "THLVTipView.h"
|
||||
#import "BRPickerView.h"
|
||||
|
||||
@interface BottleNerbyViewController ()<UITableViewDelegate,UITableViewDataSource,CLLocationManagerDelegate,SDCycleScrollViewDelegate,UITextFieldDelegate>
|
||||
@property (nonatomic, assign) NSInteger nextPage;
|
||||
@property (nonatomic, strong) UIView* topHeaderView;
|
||||
@property (nonatomic, strong) NSMutableArray* tableMDataArray;
|
||||
@property (nonatomic, strong) NSMutableArray* photosM;
|
||||
@property (nonatomic, strong) SDCycleScrollView* cycleScrollView;
|
||||
@property (nonatomic, strong) UIView* openVipAlertView;
|
||||
@property (nonatomic, strong) THLVTipView* lvTipView;
|
||||
@property (nonatomic, strong) NSMutableDictionary* nearbyParamDict;
|
||||
@property (nonatomic, strong) CLLocationManager *cLLocationManager;
|
||||
@property (nonatomic, strong) NSDictionary* shaiXuanDict;
|
||||
@ -44,20 +47,16 @@
|
||||
- (void)viewWillAppear:(BOOL)animated{
|
||||
[super viewWillAppear:animated];
|
||||
if ([UserService currentUser].isVIP) {
|
||||
_contentTableView.scrollEnabled = YES;
|
||||
_openVipAlertView.hidden = YES;
|
||||
_contentTableView.mj_footer.hidden = NO;
|
||||
[self loadPhotosData];
|
||||
|
||||
}else{
|
||||
_contentTableView.scrollEnabled = NO;
|
||||
_openVipAlertView.hidden = NO;
|
||||
|
||||
_contentTableView.mj_footer.hidden = YES;
|
||||
self.lvTipView.descLbl.text = @"开通年VIP提升您的账号权重进而提升排名哦~";
|
||||
[self.lvTipView.tipBtn setTitle:@"开年VIP" forState:UIControlStateNormal];
|
||||
}
|
||||
[self loadBannerData];
|
||||
// self.nextPage = 1;
|
||||
|
||||
// [[NSUserDefaults standardUserDefaults] setObject:@"" forKey:@"nearCity"];
|
||||
//
|
||||
// [[NSUserDefaults standardUserDefaults] synchronize];
|
||||
|
||||
// [self reloadDataTableViewNT:self.nextPage withCity:@"" isRecommend:@""];
|
||||
|
||||
}
|
||||
|
||||
@ -76,6 +75,22 @@
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)loadPhotosData {
|
||||
|
||||
[UserService getUserPhotosWithUserID:[UserService currentUserID] completion:^(NSArray<ProfilePhoto *> * _Nonnull photos) {
|
||||
self.photosM = [photos mutableCopy];
|
||||
[self endLoading:nil];
|
||||
if (self.photosM.count < 3) {
|
||||
[self.lvTipView.tipBtn setTitle:@"更新形象照" forState:UIControlStateNormal];
|
||||
self.lvTipView.descLbl.text = @"更新形象照完善您的个人形象进而提升排名哦~";
|
||||
} else {
|
||||
[self.lvTipView.tipBtn setTitle:@"查看瓶子" forState:UIControlStateNormal];
|
||||
self.lvTipView.descLbl.text = @"多查看瓶子并回应增加互动值进而提升排名哦~";
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
@ -181,7 +196,7 @@
|
||||
// [[NSUserDefaults standardUserDefaults]setObject:weakself.nearbyParamDict forKey:@"UserNearbyShaiXuanParamDict"];
|
||||
WeakSelf(self);
|
||||
[self.view addSubview:self.contentTableView];
|
||||
[self.contentTableView addSubview:self.openVipAlertView];
|
||||
// [self.contentTableView addSubview:self.openVipAlertView];
|
||||
//因为原图的TabBar是圆角要设置VC颜色就要超过原有高度.
|
||||
// _contentTableView.sd_layout.leftSpaceToView(self.view, 0).bottomSpaceToView(self.view, 0).rightSpaceToView(self.view, 0).topSpaceToView(self.view, 0);
|
||||
_contentTableView.tableHeaderView = self.topHeaderView;
|
||||
@ -213,12 +228,18 @@
|
||||
|
||||
NSString *ud = [[NSUserDefaults standardUserDefaults] objectForKey:@"isRecommend"];
|
||||
|
||||
MJWeakSelf
|
||||
_contentTableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
if ([UserService currentUser].isVIP) {
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
|
||||
#pragma mark -- 之前这个地方city传空
|
||||
[self reloadDataTableViewNT:weakself.nextPage withCity:self.city isRecommend:ud];
|
||||
});
|
||||
} else {
|
||||
// [weakself.contentTableView.mj_footer endRefreshing];
|
||||
}
|
||||
|
||||
#pragma mark -- 之前这个地方city传空
|
||||
[self reloadDataTableViewNT:weakself.nextPage withCity:self.city isRecommend:ud];
|
||||
});
|
||||
}];
|
||||
[_contentTableView.mj_header beginRefreshing];
|
||||
|
||||
@ -414,6 +435,7 @@
|
||||
_nearbyParamDict[@"city"] = city ?: @"全国";
|
||||
}
|
||||
_nearbyParamDict[@"page"] = [NSNumber numberWithInteger:nextPage];
|
||||
_nearbyParamDict[@"perpage"] = @(10);
|
||||
NSLog(@"_nearbyParamDict : %@",_nearbyParamDict);
|
||||
// NSData *data = [NSJSONSerialization dataWithJSONObject:_nearbyParamDict options:NSJSONWritingPrettyPrinted error:nil];
|
||||
// [SVProgressHUD showSuccessWithStatus:[NSString stringWithFormat:@"_nearbyParamDict : %@ \n data.length : %lu",_nearbyParamDict,(unsigned long)data.length]];
|
||||
@ -553,7 +575,7 @@
|
||||
_contentTableView.showsHorizontalScrollIndicator = NO;
|
||||
_contentTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
_contentTableView.contentInset = UIEdgeInsetsZero;
|
||||
_contentTableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
// _contentTableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
if (@available(iOS 11.0, *)) {
|
||||
|
||||
} else {
|
||||
@ -569,7 +591,7 @@
|
||||
if (!_cycleScrollView) {
|
||||
_cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(17, 10, SCREEN_WIDTH - 34, (SCREEN_WIDTH - 34)*0.45-5) imageNamesGroup:@[@"TH_nearbyBanner00", @"TH_nearbyBanner01", @"TH_nearbyBanner02", @"TH_nearbyBanner03"]];
|
||||
_cycleScrollView.pageControlAliment = SDCycleScrollViewPageContolAlimentCenter;
|
||||
_cycleScrollView.autoScrollTimeInterval = 3;
|
||||
_cycleScrollView.autoScrollTimeInterval = 6;
|
||||
_cycleScrollView.currentPageDotColor = COLOR_WITH_RGB(0xFFFFFF);
|
||||
_cycleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
|
||||
_cycleScrollView.pageDotColor =COLOR_WITH_RGB_A(0x000000, 0.7);
|
||||
@ -597,8 +619,8 @@
|
||||
|
||||
-(UIView *)openVipAlertView{
|
||||
if (!_openVipAlertView) {
|
||||
float tabBarHeight = isIphoneX?83:48 + 44 - 44;
|
||||
_openVipAlertView = [[UIView alloc]initWithFrame:CGRectMake(0, _contentTableView.height - tabBarHeight - 200, SCREEN_WIDTH, 200)];
|
||||
// float tabBarHeight = isIphoneX?83:48 + 44 - 44;
|
||||
_openVipAlertView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 200)];
|
||||
_openVipAlertView.backgroundColor = COLOR_WITH_RGB_A(0x000000, 0.8);
|
||||
UILabel* titleLab = [[UILabel alloc]initWithFrame:CGRectMake(0, 20, SCREEN_WIDTH, 28)];
|
||||
titleLab.text = @"数十万同好等您查看";
|
||||
@ -627,6 +649,16 @@
|
||||
return _openVipAlertView;
|
||||
}
|
||||
|
||||
- (THLVTipView *)lvTipView {
|
||||
if (_lvTipView == nil) {
|
||||
NSArray * xibArray = [[NSBundle mainBundle]loadNibNamed:NSStringFromClass(THLVTipView.class) owner:nil options:nil] ;
|
||||
_lvTipView = xibArray[0];
|
||||
_lvTipView.frame = CGRectMake(0, 0, SCREEN_WIDTH, 60);
|
||||
|
||||
}
|
||||
return _lvTipView;
|
||||
}
|
||||
|
||||
-(void)openVipBtnClick:(UIButton*)sender{
|
||||
[PYAppService showVipVC:@"vip_page"];
|
||||
}
|
||||
@ -642,19 +674,31 @@
|
||||
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
|
||||
if (section == 0) {
|
||||
return 60;
|
||||
}
|
||||
return 5;
|
||||
}
|
||||
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
|
||||
if (section == 0) {
|
||||
return self.lvTipView;
|
||||
}
|
||||
return [UIView new];
|
||||
}
|
||||
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
|
||||
return 0.01;
|
||||
if ([UserService currentUser].isVIP) {
|
||||
return 0.01;
|
||||
}
|
||||
return 200;
|
||||
}
|
||||
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
|
||||
if (![UserService currentUser].isVIP) {
|
||||
return self.openVipAlertView;
|
||||
}
|
||||
return [[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 20)];
|
||||
}
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
@ -63,7 +63,12 @@
|
||||
}else if (error >= 120100 && error <= 120199) {
|
||||
[MTAlertView showWithSetupBlcok:^(MTAlertViewConfig *config) {
|
||||
config.title = @"聊天提示";
|
||||
config.message = msg;
|
||||
if ([msg containsString:@"需要互关/VIP才能聊天才能发送图片和语音"]) {
|
||||
config.message = [msg stringByReplacingOccurrencesOfString:@"互关/" withString:@""];
|
||||
} else {
|
||||
config.message = msg;
|
||||
}
|
||||
|
||||
config.otherTitle = @"OK";
|
||||
}];
|
||||
}else{
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
|
||||
#import "MsgListViewController.h"
|
||||
#import "TUIConversationListController.h"
|
||||
#import "EditProfileViewController.h"
|
||||
#import "AvatarView.h"
|
||||
#import "ChatViewController.h"
|
||||
#import "BottleReadView.h"
|
||||
@ -174,18 +175,30 @@
|
||||
receiveNewMsgButton.right = self.view.width - FIX_SIZE(15);
|
||||
receiveNewMsgButton.bottom = self.view.height - TabBar_Height - FIX_SIZE(60);
|
||||
[receiveNewMsgButton addTouchUpInsideWithAction:^(UIButton * _Nullable button) {
|
||||
[SVProgressHUD showWithStatus:nil];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[PYHTTPManager postWithPath:@"getnewchatmessage" params:nil callback:^(id _Nullable rsp, NSError * _Nullable error) {
|
||||
if (!error) {
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[SVProgressHUD dismiss];
|
||||
});
|
||||
return;
|
||||
}
|
||||
int userid = [UserService currentUserID];
|
||||
NSString *userIdStr = [NSString stringWithFormat:@"%@",@(userid)];
|
||||
NSUserDefaults *udf = [NSUserDefaults standardUserDefaults];
|
||||
if ([udf objectForKey:userIdStr]) {
|
||||
[SVProgressHUD showWithStatus:nil];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[PYHTTPManager postWithPath:@"getnewchatmessage" params:nil callback:^(id _Nullable rsp, NSError * _Nullable error) {
|
||||
if (!error) {
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[SVProgressHUD dismiss];
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
}];
|
||||
});
|
||||
} else {
|
||||
[udf setValue:userIdStr forKey:userIdStr];
|
||||
[udf synchronize];
|
||||
[self showTip];
|
||||
}
|
||||
|
||||
|
||||
|
||||
}];
|
||||
});
|
||||
}];
|
||||
self.receiveNewMsgButton = receiveNewMsgButton;
|
||||
receiveNewMsgButton.hidden = YES;
|
||||
@ -208,6 +221,21 @@
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)showTip {
|
||||
MJWeakSelf
|
||||
[MTAlertView showWithSetupBlcok:^(MTAlertViewConfig *config) {
|
||||
config.message = @"准确选择想认识的人,才能相应匹配哦。";
|
||||
config.otherTitle = @"前往选择想认识的人";
|
||||
|
||||
config.otherHandler = ^(MTAlertButton *button) {
|
||||
EditProfileViewController *VC = [EditProfileViewController new];
|
||||
VC.isShowSexTip = true;
|
||||
[weakSelf.navigationController pushViewController:VC animated:true];
|
||||
|
||||
};
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)reloadMsgBadge {
|
||||
WeakSelf(self);
|
||||
[LoginService launchAppToHomeWithCompletion:^(id _Nullable rsp, NSError * _Nullable error) {
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
@property (nonatomic, strong)THLanternAnimationController *THLanternAnimationVC;
|
||||
@property (nonatomic, strong)UIScrollView* scrollView;
|
||||
@property (nonatomic, strong)UIView* titleView;
|
||||
@property (nonatomic, strong)NSMutableArray *photosM;
|
||||
@end
|
||||
|
||||
@implementation THNearAndLanternViewController
|
||||
@ -29,10 +30,13 @@
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
||||
- (void)delloc {
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeToNearPage) name:@"changeToNearPage" object:nil];
|
||||
// Do any additional setup after loading the view.
|
||||
self.navigationItem.titleView = self.titleView;
|
||||
UIImageView *bgImgView = [UIImageView new];
|
||||
@ -54,6 +58,11 @@
|
||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightItemBtn];
|
||||
}
|
||||
|
||||
- (void)changeToNearPage {
|
||||
[self titleBtnClick:self.titleView.subviews.lastObject];
|
||||
}
|
||||
|
||||
|
||||
-(UIView *)titleView{
|
||||
if(!_titleView){
|
||||
_titleView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 110, 44)];
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface EditProfileViewController : MTCommonListTableViewController
|
||||
|
||||
@property (nonatomic, assign) bool isShowSexTip;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
@property (nonatomic, strong) PYImageView *bgView;
|
||||
|
||||
@property (nonatomic, strong) GenderPickerView *genderPickerView;
|
||||
|
||||
@property (nonatomic, strong) UITextField *wantGenderTextField;
|
||||
@end
|
||||
|
||||
@implementation EditProfileViewController
|
||||
@ -129,6 +129,25 @@
|
||||
[self reloadData];
|
||||
}
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated {
|
||||
[super viewDidAppear:animated];
|
||||
if (self.isShowSexTip) {
|
||||
User *user = [UserService currentUser];
|
||||
[self.wantGenderTextField becomeFirstResponder];
|
||||
|
||||
NSMutableArray *defaultIndexs = [NSMutableArray array];
|
||||
for (NSString *gender in user.want_genders) {
|
||||
NSInteger index = [self.genderPickerView.originalModels indexOfObject:gender];
|
||||
if (index >= 0 && index < self.genderPickerView.originalModels.count) {
|
||||
[defaultIndexs addObject:@(index)];
|
||||
}
|
||||
}
|
||||
[self.genderPickerView selectItemAtIndexs:defaultIndexs];
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
- (MTCommonListTableConfig *)tableConfigForTableViewContorller
|
||||
{
|
||||
WeakSelf(self);
|
||||
@ -183,6 +202,7 @@
|
||||
}];
|
||||
UITextField *wantGenderTextField = [[UITextField alloc] init];
|
||||
[self.view addSubview:wantGenderTextField];
|
||||
self.wantGenderTextField = wantGenderTextField;
|
||||
wantGenderTextField.delegate = self;
|
||||
GenderPickerView *genderPickerView = [GenderPickerView pickerViewWithMultiple:YES];
|
||||
self.genderPickerView = genderPickerView;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user