Compare commits
25 Commits
appstore_2
...
enterprise
Author | SHA1 | Date | |
---|---|---|---|
![]() |
cd1565b230 | ||
![]() |
1455e352b7 | ||
![]() |
628b4f0c9f | ||
![]() |
a75f291364 | ||
![]() |
470ecd99e7 | ||
![]() |
c670d7be6d | ||
![]() |
10a1e6e09e | ||
![]() |
5c057821a7 | ||
![]() |
6007611a3b | ||
![]() |
3a576925a2 | ||
![]() |
1bd2382d6a | ||
![]() |
509c47cc2a | ||
![]() |
0f47ed8ed7 | ||
![]() |
972f6d61ea | ||
![]() |
5e2c5080c5 | ||
![]() |
ce308df1b6 | ||
![]() |
6a3201135b | ||
![]() |
6e8ead27dd | ||
![]() |
a8bef5946e | ||
![]() |
3afa60587a | ||
![]() |
52e7d4ff7e | ||
![]() |
566d8a3672 | ||
![]() |
8dffff8492 | ||
![]() |
398b4e5e81 | ||
![]() |
a19adac48e |
5
Podfile
@@ -11,6 +11,7 @@ target 'YuMi' do
|
||||
pod 'FBSDKLoginKit'
|
||||
pod 'FBSDKCoreKit'
|
||||
pod 'FBSDKShareKit'
|
||||
pod 'LineSDKSwift'
|
||||
# 滑动标签栏
|
||||
pod 'JXCategoryView'
|
||||
pod 'JXPagingView/Pager'
|
||||
@@ -61,10 +62,10 @@ target 'YuMi' do
|
||||
pod 'SVGAPlayer'
|
||||
|
||||
pod 'GoogleSignIn'
|
||||
pod 'mob_linksdk_pro'
|
||||
#pod 'mob_linksdk_pro'
|
||||
pod 'mob_sharesdk'
|
||||
pod 'mob_sharesdk/ShareSDKPlatforms/Apple'
|
||||
pod 'mob_sharesdk/ShareSDKPlatforms/Line'
|
||||
#pod 'mob_sharesdk/ShareSDKPlatforms/Line'
|
||||
pod 'mob_sharesdk/ShareSDKExtension'
|
||||
|
||||
pod 'UMCommon'
|
||||
|
@@ -206,6 +206,7 @@
|
||||
234489082AC3C5DA0070E5D5 /* SudMGP.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 234489072AC3C5DA0070E5D5 /* SudMGP.framework */; };
|
||||
234489092AC3C5FF0070E5D5 /* SudMGP.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 234489072AC3C5DA0070E5D5 /* SudMGP.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
234D821E2AEC57CF0022EFEB /* YYTextAsyncLayer+PITextAsyncLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 234D821D2AEC57CF0022EFEB /* YYTextAsyncLayer+PITextAsyncLayer.m */; };
|
||||
234F44E32B3EA4F900E2B532 /* PILineManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 234F44E22B3EA4F900E2B532 /* PILineManager.swift */; };
|
||||
235A451A2B04A352009753F5 /* PIRoomActivityWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = 235A45192B04A352009753F5 /* PIRoomActivityWebView.m */; };
|
||||
235A451D2B04A452009753F5 /* PIRoomActivityWebCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 235A451C2B04A452009753F5 /* PIRoomActivityWebCell.m */; };
|
||||
235A45232B04BEB6009753F5 /* PIBaseModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 235A45222B04BEB6009753F5 /* PIBaseModel.m */; };
|
||||
@@ -300,7 +301,9 @@
|
||||
239141C92AE1358F00322CA9 /* PIInputEntireServerScrollingView.m in Sources */ = {isa = PBXBuildFile; fileRef = 239141C82AE1358F00322CA9 /* PIInputEntireServerScrollingView.m */; };
|
||||
239141CC2AE267EF00322CA9 /* PIReceiveRedPacketSuccessView.m in Sources */ = {isa = PBXBuildFile; fileRef = 239141CB2AE267EF00322CA9 /* PIReceiveRedPacketSuccessView.m */; };
|
||||
23942E912A86424500D0ECC2 /* XPLoginAuthCodeVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 23942E902A86424500D0ECC2 /* XPLoginAuthCodeVC.m */; };
|
||||
2396FCE42B22BE5D0014021D /* pi_area_info.json in Resources */ = {isa = PBXBuildFile; fileRef = 2396FCE32B22BE5D0014021D /* pi_area_info.json */; };
|
||||
239BEEDB2AA1E058005CDA94 /* PIHoemCategoryTitleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 239BEEDA2AA1E058005CDA94 /* PIHoemCategoryTitleView.m */; };
|
||||
23A03F2D2B4408CD0094227A /* pi_room_lucky_gift.svga in Resources */ = {isa = PBXBuildFile; fileRef = 23A03F2C2B4408CD0094227A /* pi_room_lucky_gift.svga */; };
|
||||
23A439742AA1CF7C002E6039 /* XPNewHomeHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23A439732AA1CF7C002E6039 /* XPNewHomeHeadView.m */; };
|
||||
23B2AEC12A64E9C200543D17 /* LoginForgetEditView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23B2AEC02A64E9C200543D17 /* LoginForgetEditView.m */; };
|
||||
23B2AEC42A6516C200543D17 /* LoginForgetPasswordViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 23B2AEC22A6516C200543D17 /* LoginForgetPasswordViewController.m */; };
|
||||
@@ -1873,6 +1876,7 @@
|
||||
234489072AC3C5DA0070E5D5 /* SudMGP.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = SudMGP.framework; sourceTree = "<group>"; };
|
||||
234D821C2AEC57CF0022EFEB /* YYTextAsyncLayer+PITextAsyncLayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "YYTextAsyncLayer+PITextAsyncLayer.h"; path = "YuMi/Appdelegate/YYTextAsyncLayer+PITextAsyncLayer.h"; sourceTree = SOURCE_ROOT; };
|
||||
234D821D2AEC57CF0022EFEB /* YYTextAsyncLayer+PITextAsyncLayer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "YYTextAsyncLayer+PITextAsyncLayer.m"; path = "YuMi/Appdelegate/YYTextAsyncLayer+PITextAsyncLayer.m"; sourceTree = SOURCE_ROOT; };
|
||||
234F44E22B3EA4F900E2B532 /* PILineManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PILineManager.swift; sourceTree = "<group>"; };
|
||||
235A45182B04A352009753F5 /* PIRoomActivityWebView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PIRoomActivityWebView.h; sourceTree = "<group>"; };
|
||||
235A45192B04A352009753F5 /* PIRoomActivityWebView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PIRoomActivityWebView.m; sourceTree = "<group>"; };
|
||||
235A451B2B04A452009753F5 /* PIRoomActivityWebCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PIRoomActivityWebCell.h; sourceTree = "<group>"; };
|
||||
@@ -2063,8 +2067,10 @@
|
||||
239141CB2AE267EF00322CA9 /* PIReceiveRedPacketSuccessView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PIReceiveRedPacketSuccessView.m; sourceTree = "<group>"; };
|
||||
23942E8F2A86424500D0ECC2 /* XPLoginAuthCodeVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPLoginAuthCodeVC.h; sourceTree = "<group>"; };
|
||||
23942E902A86424500D0ECC2 /* XPLoginAuthCodeVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPLoginAuthCodeVC.m; sourceTree = "<group>"; };
|
||||
2396FCE32B22BE5D0014021D /* pi_area_info.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = pi_area_info.json; sourceTree = "<group>"; };
|
||||
239BEED92AA1E058005CDA94 /* PIHoemCategoryTitleView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PIHoemCategoryTitleView.h; sourceTree = "<group>"; };
|
||||
239BEEDA2AA1E058005CDA94 /* PIHoemCategoryTitleView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PIHoemCategoryTitleView.m; sourceTree = "<group>"; };
|
||||
23A03F2C2B4408CD0094227A /* pi_room_lucky_gift.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = pi_room_lucky_gift.svga; sourceTree = "<group>"; };
|
||||
23A439722AA1CF7C002E6039 /* XPNewHomeHeadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNewHomeHeadView.h; sourceTree = "<group>"; };
|
||||
23A439732AA1CF7C002E6039 /* XPNewHomeHeadView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNewHomeHeadView.m; sourceTree = "<group>"; };
|
||||
23B2AEBF2A64E9C200543D17 /* LoginForgetEditView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginForgetEditView.h; sourceTree = "<group>"; };
|
||||
@@ -4593,6 +4599,7 @@
|
||||
E84A2EAC2A52F20900D6AF8A /* Launch Screen.storyboard */,
|
||||
23E9EB322A85E97B00B792F2 /* pi_login_new_logo.png */,
|
||||
23E9EB302A85E5D100B792F2 /* pi_app_logo_new_bg.png */,
|
||||
2396FCE32B22BE5D0014021D /* pi_area_info.json */,
|
||||
189DD53D26DE255600AB55B1 /* Info.plist */,
|
||||
E80E09AB2A40B70100CD2BE7 /* Localizable.strings */,
|
||||
189DD53E26DE255600AB55B1 /* main.m */,
|
||||
@@ -4787,6 +4794,7 @@
|
||||
189DD5A726DFA09700AB55B1 /* Tools */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
234F44E12B3EA4DC00E2B532 /* YMLine */,
|
||||
23CEFC082AFB8FC100576D89 /* sdkContent */,
|
||||
23FF255C2ABA8EEE0064E904 /* PIIAPTool */,
|
||||
23E9EA9B2A84C42B00B792F2 /* SGYProgressView */,
|
||||
@@ -5364,6 +5372,14 @@
|
||||
path = UILabel;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
234F44E12B3EA4DC00E2B532 /* YMLine */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
234F44E22B3EA4F900E2B532 /* PILineManager.swift */,
|
||||
);
|
||||
path = YMLine;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
236B2E1B2AA0786E003967A8 /* Library */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -5718,16 +5734,16 @@
|
||||
23CEFC0A2AFB8FC100576D89 /* Util */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
23CEFC0B2AFB8FC100576D89 /* BSXWDateUtil.h */,
|
||||
23CEFC0C2AFB8FC100576D89 /* BSNSStringUtil.m */,
|
||||
23CEFC0D2AFB8FC100576D89 /* BSUIDemoUtil.m */,
|
||||
23CEFC0E2AFB8FC100576D89 /* BSNSDictionary.h */,
|
||||
23CEFC0F2AFB8FC100576D89 /* BS_UIColor.m */,
|
||||
23CEFC102AFB8FC100576D89 /* BSXWDateUtil.m */,
|
||||
23CEFC112AFB8FC100576D89 /* BSUIDemoUtil.h */,
|
||||
23CEFC122AFB8FC100576D89 /* BSNSStringUtil.h */,
|
||||
23CEFC132AFB8FC100576D89 /* BSNSDictionary.m */,
|
||||
23CEFC142AFB8FC100576D89 /* BS_UIColor.h */,
|
||||
23CEFC0F2AFB8FC100576D89 /* BS_UIColor.m */,
|
||||
23CEFC0E2AFB8FC100576D89 /* BSNSDictionary.h */,
|
||||
23CEFC132AFB8FC100576D89 /* BSNSDictionary.m */,
|
||||
23CEFC122AFB8FC100576D89 /* BSNSStringUtil.h */,
|
||||
23CEFC0C2AFB8FC100576D89 /* BSNSStringUtil.m */,
|
||||
23CEFC112AFB8FC100576D89 /* BSUIDemoUtil.h */,
|
||||
23CEFC0D2AFB8FC100576D89 /* BSUIDemoUtil.m */,
|
||||
23CEFC0B2AFB8FC100576D89 /* BSXWDateUtil.h */,
|
||||
23CEFC102AFB8FC100576D89 /* BSXWDateUtil.m */,
|
||||
);
|
||||
path = Util;
|
||||
sourceTree = "<group>";
|
||||
@@ -5743,8 +5759,8 @@
|
||||
23CEFC162AFB8FC100576D89 /* fmdb */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
23CEFC172AFB8FC100576D89 /* BSSDLayoutUtil.m */,
|
||||
23CEFC182AFB8FC100576D89 /* BSSDLayoutUtil.h */,
|
||||
23CEFC172AFB8FC100576D89 /* BSSDLayoutUtil.m */,
|
||||
);
|
||||
path = fmdb;
|
||||
sourceTree = "<group>";
|
||||
@@ -5752,11 +5768,11 @@
|
||||
23CEFC192AFB8FC100576D89 /* system */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
23CEFC1A2AFB8FC100576D89 /* SystemUtil.h */,
|
||||
23CEFC1B2AFB8FC100576D89 /* UILabel+YBAttributeTextTapAction.h */,
|
||||
23CEFC1C2AFB8FC100576D89 /* BS_Define.h */,
|
||||
23CEFC1D2AFB8FC100576D89 /* UILabel+YBAttributeTextTapAction.m */,
|
||||
23CEFC1A2AFB8FC100576D89 /* SystemUtil.h */,
|
||||
23CEFC1E2AFB8FC100576D89 /* SystemUtil.m */,
|
||||
23CEFC1B2AFB8FC100576D89 /* UILabel+YBAttributeTextTapAction.h */,
|
||||
23CEFC1D2AFB8FC100576D89 /* UILabel+YBAttributeTextTapAction.m */,
|
||||
);
|
||||
path = system;
|
||||
sourceTree = "<group>";
|
||||
@@ -9362,6 +9378,7 @@
|
||||
E8A1E45C276220B100B294CA /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
23A03F2C2B4408CD0094227A /* pi_room_lucky_gift.svga */,
|
||||
23FF256F2ABD456C0064E904 /* pi_home_new_play.svga */,
|
||||
23FF25612ABAE6310064E904 /* pi_room_game_fine_love.svga */,
|
||||
232C444A2AB4363200D4B2ED /* pi_room_tarrow_h5_banner.svga */,
|
||||
@@ -10642,6 +10659,7 @@
|
||||
E80EC87128ACD84000D133C5 /* emoji_160@2x.png in Resources */,
|
||||
23E9EB252A84E98300B792F2 /* pi_new_mine_info_online.svga in Resources */,
|
||||
23FF42652AA5AC040055733C /* home_heat.gif in Resources */,
|
||||
23A03F2D2B4408CD0094227A /* pi_room_lucky_gift.svga in Resources */,
|
||||
E80EC86D28ACD84000D133C5 /* emoji_35@2x.png in Resources */,
|
||||
E80EC86528ACD84000D133C5 /* emoji_03@2x.png in Resources */,
|
||||
E80EC85B28ACD84000D133C5 /* emoji_69@2x.png in Resources */,
|
||||
@@ -10749,6 +10767,7 @@
|
||||
E80EC87628ACD84000D133C5 /* emoji_139@2x.png in Resources */,
|
||||
23CEFC572AFB8FC100576D89 /* pay_off@2x.png in Resources */,
|
||||
E80EC86328ACD84000D133C5 /* emoji_41@2x.png in Resources */,
|
||||
2396FCE42B22BE5D0014021D /* pi_area_info.json in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -11857,6 +11876,7 @@
|
||||
238B37D62AC55A2C00BFC9D5 /* XPTreasureFairyTrialsView.m in Sources */,
|
||||
E82109AD26F1C8A000FC3319 /* CountDownHelper.m in Sources */,
|
||||
E878B8582835F0D300E22DCF /* MonentsInteractiveModel.m in Sources */,
|
||||
234F44E32B3EA4F900E2B532 /* PILineManager.swift in Sources */,
|
||||
E87DF4E42A42CAD2009C1185 /* XPHomeSearchNavView.m in Sources */,
|
||||
9BD2ECCE288F829600F5CD9A /* XPMineFootPrintViewController.m in Sources */,
|
||||
9B4E920028E57A620033419E /* XPGiftHeadTypeView.m in Sources */,
|
||||
@@ -12197,10 +12217,11 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 20.20.2;
|
||||
MARKETING_VERSION = 20.20.7;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.peko.enterprise.ios;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
};
|
||||
@@ -12232,10 +12253,11 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 20.20.2;
|
||||
MARKETING_VERSION = 20.20.7;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.peko.enterprise.ios;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
};
|
||||
|
@@ -26,10 +26,14 @@
|
||||
|
||||
#import <Bugly/Bugly.h>
|
||||
|
||||
#import "YuMi-swift.h"
|
||||
|
||||
|
||||
UIKIT_EXTERN NSString * kYouMiNumberCountKey;
|
||||
UIKIT_EXTERN NSString * adImageName;
|
||||
|
||||
|
||||
|
||||
@implementation AppDelegate (ThirdConfig)
|
||||
|
||||
|
||||
@@ -103,9 +107,9 @@ UIKIT_EXTERN NSString * adImageName;
|
||||
[Adjust appDidLaunch:adjustConfig];
|
||||
}
|
||||
- (void)configShareSDK {
|
||||
|
||||
|
||||
|
||||
|
||||
[PILineLoginManager registerLine];
|
||||
|
||||
[ShareSDK registPlatforms:^(SSDKRegister *platformsRegister) {
|
||||
///faceBook
|
||||
// [platformsRegister setupFacebookWithAppkey:@"1266232494209868" appSecret:@"c9b170b383f8be9cdf118823b8632821" displayName:YMLocalizedString(@"AppDelegate_ThirdConfig0")];
|
||||
|
@@ -19,6 +19,7 @@
|
||||
#import <GoogleSignIn/GoogleSignIn.h>
|
||||
#import "XPLoginViewController.h"
|
||||
#import "AccountModel.h"
|
||||
#import "YuMi-swift.h"
|
||||
@import Firebase;
|
||||
UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
|
||||
@@ -106,8 +107,10 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
|
||||
///URL Scheme跳转
|
||||
-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options{
|
||||
|
||||
|
||||
NSString *bundleID = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"];
|
||||
if ([url.scheme isEqualToString:[NSString stringWithFormat:@"line3rdp.%@",bundleID]]) {
|
||||
return [PILineLoginManager applicationOpenurl:app open:url];
|
||||
}
|
||||
|
||||
NSString *text = [url query];
|
||||
if(text.length){
|
||||
|
BIN
YuMi/Assets.xcassets/AppIcon.appiconset/1024.png
Normal file
After Width: | Height: | Size: 102 KiB |
Before Width: | Height: | Size: 74 KiB |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "1024*1024.png",
|
||||
"filename" : "1024.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
|
Before Width: | Height: | Size: 639 B After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1013 B After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 647 B After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 810 B After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 557 B After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 945 B After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 4.9 KiB |
21
YuMi/Assets.xcassets/yna/AcrossRoomPK/room_across_pk_assist.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "room_across_pk_assist.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/yna/AcrossRoomPK/room_across_pk_assist.imageset/room_across_pk_assist.png
vendored
Normal file
After Width: | Height: | Size: 3.0 KiB |
21
YuMi/Assets.xcassets/yna/AcrossRoomPK/room_across_pk_onlookers.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "room_across_pk_onlookers.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/yna/AcrossRoomPK/room_across_pk_onlookers.imageset/room_across_pk_onlookers.png
vendored
Normal file
After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 9.8 KiB |
22
YuMi/Assets.xcassets/yna/CandyTree/room_candy_two_hundredth_tap_bg.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_candy_two_hundredth_tap_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_candy_two_hundredth_tap_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 9.4 KiB |
@@ -76,10 +76,10 @@
|
||||
self.numberLabel.hidden = !imageInfo.isSelect;
|
||||
self.chooseButton.selected = imageInfo.isSelect;
|
||||
if (!imageInfo.originImage) {
|
||||
[[TZImageManager manager] getPhotoWithAsset:imageInfo.assetInfo.asset photoWidth:200 completion:^(UIImage *photo, NSDictionary *info, BOOL isDegraded) {
|
||||
[[TZImageManager manager] getPhotoWithAsset:imageInfo.assetInfo.asset completion:^(UIImage *photo, NSDictionary *info, BOOL isDegraded) {
|
||||
self.logoImageView.image = photo;
|
||||
self.imageInfo.originImage = photo;
|
||||
UIImage * image = [photo compressWithMaxLength:1024 * 10];
|
||||
UIImage * image = [photo compressWithMaxLength:1024 * 30];
|
||||
self.imageInfo.compressImage = image;
|
||||
} progressHandler:nil networkAccessAllowed:NO];
|
||||
} else {
|
||||
|
@@ -161,6 +161,7 @@
|
||||
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
|
||||
[pasteboard setString:urlString];
|
||||
[XNDJTDDLoadingTool showSuccessWithMessage:YMLocalizedString(@"XPShareView0")];
|
||||
|
||||
[TTPopup dismiss];
|
||||
return;
|
||||
}
|
||||
@@ -177,8 +178,20 @@
|
||||
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"XPShareView2")];
|
||||
return;
|
||||
}
|
||||
FBtype = PlatformOfLine;
|
||||
[shareParams SSDKSetupLineParamsByText:encodedUrl image:nil type:SSDKContentTypeAuto];
|
||||
NSString*contentKey= [encodedUrl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:@"`#%^{}\"[]|\\<> "].invertedSet];
|
||||
NSString*contentType =@"text";
|
||||
NSString*urlString = [NSString stringWithFormat:@"line://msg/%@/%@",contentType, contentKey];
|
||||
|
||||
[[UIApplication sharedApplication]openURL:[NSURL URLWithString:urlString] options:@{} completionHandler:^(BOOL success) {
|
||||
|
||||
}];
|
||||
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(shareView:didSuccess:)]) {
|
||||
[self.delegate shareView:self didSuccess:self.shareInfo];
|
||||
}
|
||||
|
||||
// FBtype = PlatformOfLine;
|
||||
// [shareParams SSDKSetupLineParamsByText:encodedUrl image:nil type:SSDKContentTypeAuto];
|
||||
} else {
|
||||
title = YMLocalizedString(@"XPShareView3");
|
||||
platformType = SSDKPlatformTypeFacebook;
|
||||
|
@@ -52,4 +52,5 @@ typedef NS_ENUM(NSUInteger, GradientType) {
|
||||
|
||||
-(UIImage *)compressWithMaxLength:(NSUInteger)maxLength;
|
||||
- (UIImage *)roundedImageWithCornerRadius:(CGFloat)cornerRadius size:(CGSize)size;
|
||||
|
||||
@end
|
||||
|
@@ -65,7 +65,7 @@ NSString * const KeyWithType(Pi_KeyType type) {
|
||||
NSDictionary * dic = @{
|
||||
@(KeyType_PasswordEncode) : @"1ea53d260ecf11e7b56e00163e046a26",
|
||||
@(KeyType_NTESQuickLoginBusinessId) : @"09c1214706c34f4798d3f05d86148608",
|
||||
@(KeyType_Agora) : @"7ae1a8dabe7a44a9a67c829faa409e70",
|
||||
@(KeyType_Agora) : @"f8713b6ec98c4c01adaf34cb4fa091b1",
|
||||
@(KeyType_TRTC) : @"1400741885",
|
||||
@(KeyType_NetEase) : @"1c3b8c6bf8467d8e4c33a004dbec5c94",
|
||||
@(keyType_YiDunBussinessId) : @"yinyouApnsDebug",
|
||||
|
@@ -49,7 +49,7 @@ isPhoneXSeries = [[UIApplication sharedApplication] delegate].window.safeAreaIns
|
||||
|
||||
|
||||
///内置版本号
|
||||
#define PI_App_Version @"2.3.0"
|
||||
#define PI_App_Version @"2.5.0"
|
||||
///渠道
|
||||
#define PI_App_Source @"appstore"
|
||||
//#define PI_App_Source @"pi_tf"
|
||||
|
@@ -54,7 +54,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>9</string>
|
||||
<string>2</string>
|
||||
<key>FacebookAppID</key>
|
||||
<string>1266232494209868</string>
|
||||
<key>FacebookClientToken</key>
|
||||
|
@@ -13,13 +13,13 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,copy) NSString *codeId;
|
||||
@property (nonatomic,copy) NSString *name;
|
||||
@property (nonatomic,copy) NSString *abbr;
|
||||
@property (nonatomic,copy) NSString *phone_area_code;
|
||||
@property (nonatomic,copy) NSString *pi_phoneAreaCode;
|
||||
@property (nonatomic,copy) NSString *code;
|
||||
@property (nonatomic,copy) NSString *seq;
|
||||
@property (nonatomic,copy) NSString *status;
|
||||
@property (nonatomic,copy) NSString *region;
|
||||
@property (nonatomic,copy) NSString *create_time;
|
||||
@property (nonatomic,copy) NSString *update_time;
|
||||
@property (nonatomic,copy) NSString * mcc;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -8,7 +8,5 @@
|
||||
#import "LoginAreaModel.h"
|
||||
|
||||
@implementation LoginAreaModel
|
||||
+ (NSDictionary *)replacedKeyFromPropertyName {
|
||||
return @{@"pi_phoneAreaCode":@"phoneAreaCode"};
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -25,6 +25,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
-(void)thirdLoginByGoogleWithPresentingViewController:(UIViewController *)presentingViewController configuration:(GIDConfiguration *)configuration;
|
||||
///第三方登录,fb登录
|
||||
-(void)thirdLoginByFBWithPresentingViewController:(UIViewController *)presentingViewController;
|
||||
///第三方登录,line登录
|
||||
-(void)thirdLoginByLine:(UIViewController *)presentingViewController;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -23,7 +23,7 @@
|
||||
|
||||
#import <FBSDKCoreKit/FBSDKCoreKit.h>
|
||||
#import <FBSDKLoginKit/FBSDKLoginKit.h>
|
||||
|
||||
#import "YuMi-swift.h"
|
||||
|
||||
@implementation LoginPresenter
|
||||
- (void)dealloc{
|
||||
@@ -159,6 +159,30 @@
|
||||
} showLoading:YES] openid:openid unionid:unionid access_token:access_token type:[NSString stringWithFormat:@"%lu", (unsigned long)type]];
|
||||
|
||||
|
||||
}
|
||||
-(void)thirdLoginByLine:(UIViewController *)presentingViewController {
|
||||
PILineLoginManager *line = [PILineLoginManager getSharedInstance];
|
||||
[XNDJTDDLoadingTool showOnlyView:kWindow];
|
||||
[line loginLineFromController:presentingViewController completeWithError:^(LineLoginResultStatus loginStatus, NSString * _Nullable token, NSString * _Nullable userId, NSString * _Nullable emali, NSError * _Nullable error) {
|
||||
|
||||
if (loginStatus == LineLoginResultStatusSuccess) {
|
||||
ThirdUserInfo * userInfo = [[ThirdUserInfo alloc] init];
|
||||
NSString * openid = userId.length > 0 ? userId : @"";
|
||||
NSString * access_token = token.length > 0 ? token : @"";
|
||||
NSString * unionid = userId.length > 0 ? userId : @"";
|
||||
userInfo.openid = openid;
|
||||
userInfo.access_token = access_token;
|
||||
userInfo.unionid = unionid;
|
||||
[AccountInfoStorage instance].thirdUserInfo = userInfo;
|
||||
[self loginWithThirdPartWithType:ThirdLoginType_Line];
|
||||
} else if (loginStatus == LineLoginResultStatusCancelled) {
|
||||
[XNDJTDDLoadingTool hideOnlyView:kWindow];
|
||||
[[self getView] showErrorToast:YMLocalizedString(@"LoginPresenter0")];
|
||||
} else if (loginStatus == LineLoginResultStatusError) {
|
||||
[XNDJTDDLoadingTool hideOnlyView:kWindow];
|
||||
[[self getView] showErrorToast:YMLocalizedString(@"LoginPresenter1")];
|
||||
}
|
||||
}];
|
||||
}
|
||||
-(void)thirdLoginByFBWithPresentingViewController:(UIViewController *)presentingViewController {
|
||||
[FBSDKProfile enableUpdatesOnAccessTokenChange:YES];
|
||||
|
@@ -144,7 +144,8 @@
|
||||
if (!_codeView){
|
||||
_codeView = [UILabel new];
|
||||
_codeView.userInteractionEnabled = YES;
|
||||
_codeView.attributedText = [self getChooseCodeText:@"+852"];
|
||||
NSString *code = [NSString getCountryCode];
|
||||
_codeView.attributedText = [self getChooseCodeText: code];
|
||||
|
||||
}
|
||||
return _codeView;
|
||||
|
@@ -177,7 +177,8 @@
|
||||
if (!_countryLabel) {
|
||||
_countryLabel = [[UILabel alloc] init];
|
||||
_countryLabel.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:15];
|
||||
_countryLabel.text = @"+852";
|
||||
NSString *code = [NSString getCountryCode];
|
||||
_countryLabel.text = code;
|
||||
_countryLabel.textColor = [DJDKMIMOMColor mainTextColor];
|
||||
_countryLabel.backgroundColor = [UIColor clearColor];
|
||||
_countryLabel.textAlignment = NSTextAlignmentCenter;
|
||||
|
@@ -47,7 +47,8 @@
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.pi_phoneAreaCode = @"852";
|
||||
NSString *code = [NSString getCountryCode];
|
||||
self.pi_phoneAreaCode = [code stringByReplacingOccurrencesOfString:@"+" withString:@""];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
[self initEvents];
|
||||
|
@@ -44,7 +44,8 @@
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
self.pi_phoneAreaCode = @"852";
|
||||
NSString *code = [NSString getCountryCode];
|
||||
self.pi_phoneAreaCode = [code stringByReplacingOccurrencesOfString:@"+" withString:@""];
|
||||
|
||||
[super viewDidLoad];
|
||||
[self createUI];
|
||||
|
@@ -14,7 +14,7 @@
|
||||
#import "Api+Login.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
@interface XPLoginAraeViewController ()<UITableViewDelegate,UITableViewDataSource>
|
||||
@interface XPLoginAraeViewController ()<UITableViewDelegate,UITableViewDataSource,XPLoginAreaTableViewCellDelegate>
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
@property (nonatomic,strong) NSMutableArray *listData;
|
||||
@property (nonatomic,strong) NSMutableArray *titleList;
|
||||
@@ -26,39 +26,49 @@
|
||||
[super viewDidLoad];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
[Api getPhoneAreaCodeList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if (code == 200) {
|
||||
NSArray *list = [LoginAreaModel modelsWithArray:data.data];
|
||||
[self.titleList removeAllObjects];
|
||||
[self.listData removeAllObjects];
|
||||
[self getLocalPlistWithList:list];
|
||||
}
|
||||
}];
|
||||
[self getPhoneAreaCodeList];
|
||||
}
|
||||
#pragma mark - LoginVerifCodeProtocol
|
||||
|
||||
-(void)getPhoneAreaCodeListSuccess:(NSArray *)list{
|
||||
[self hideHUD];
|
||||
[self.titleList removeAllObjects];
|
||||
[self.listData removeAllObjects];
|
||||
[self getLocalPlistWithList:list];
|
||||
}
|
||||
-(void)getPhoneAreaCodeListFail{
|
||||
[self hideHUD];
|
||||
NSBundle *bundle = [NSBundle mainBundle];
|
||||
NSString *file = [bundle pathForResource:@"district" ofType:@"plist"];
|
||||
NSArray *dictArray = [NSArray arrayWithContentsOfFile:file];
|
||||
|
||||
NSArray *list = [LoginAreaModel modelsWithArray:dictArray];
|
||||
[self getLocalPlistWithList:list];
|
||||
-(void)getPhoneAreaCodeList{
|
||||
// 获取文件路径
|
||||
NSString *path = [[NSBundle mainBundle] pathForResource:@"pi_area_info" ofType:@"json"];
|
||||
// 将文件数据化
|
||||
NSData *data = [[NSData alloc] initWithContentsOfFile:path];
|
||||
// 对数据进行JSON格式化并返回字典形式
|
||||
NSDictionary *codeData = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:nil];
|
||||
NSArray *codeList = [LoginAreaModel modelsWithArray:codeData[@"RECORDS"]];
|
||||
[self getLocalPlistWithList:codeList];
|
||||
}
|
||||
-(void)getLocalPlistWithList:(NSArray *)list{
|
||||
|
||||
NSArray * letterList = @[@"A",@"B",@"C",@"D",@"E",@"F",@"G",@"H",@"I",@"J",@"K",@"L",@"M",@"N",@"O",@"P",@"Q",@"R",@"S",@"T",@"U",@"V",@"W",@"X",@"Y",@"Z"];
|
||||
NSArray * letterList = @[@"",@"A",@"B",@"C",@"D",@"E",@"F",@"G",@"H",@"I",@"J",@"K",@"L",@"M",@"N",@"O",@"P",@"Q",@"R",@"S",@"T",@"U",@"V",@"W",@"X",@"Y",@"Z"];
|
||||
NSMutableArray *otherList = [NSMutableArray array];
|
||||
NSMutableArray *defaultList = [NSMutableArray array];
|
||||
LoginAreaModel *TwModel;
|
||||
LoginAreaModel *HKModel ;
|
||||
LoginAreaModel *SPModel ;
|
||||
LoginAreaModel *MYModel ;
|
||||
LoginAreaModel *ChinsModel ;
|
||||
[self.titleList addObject:@""];
|
||||
for (NSString *letter in letterList) {
|
||||
NSMutableArray *modelList = [NSMutableArray array];
|
||||
for (LoginAreaModel *model in list) {
|
||||
if([model.code isEqualToString:@"886"]){
|
||||
TwModel = model;
|
||||
}
|
||||
if([model.code isEqualToString:@"852"]){
|
||||
HKModel = model;
|
||||
}
|
||||
if([model.code isEqualToString:@"65"]){
|
||||
SPModel = model;
|
||||
}
|
||||
if([model.code isEqualToString:@"60"]){
|
||||
MYModel = model;
|
||||
}
|
||||
if([model.code isEqualToString:@"86"]){
|
||||
ChinsModel = model;
|
||||
}
|
||||
NSString *fristLetter = [model.name substringWithRange:NSMakeRange(0, 1)];
|
||||
if([letter isEqualToString:fristLetter]){
|
||||
[modelList addObject:model];
|
||||
@@ -74,8 +84,26 @@
|
||||
[self.listData addObject:modelList];
|
||||
}
|
||||
}
|
||||
[self.listData addObject:otherList];
|
||||
[self.titleList addObject:@"#"];
|
||||
if(TwModel != nil){
|
||||
[defaultList addObject:TwModel];
|
||||
}
|
||||
if(HKModel != nil){
|
||||
[defaultList addObject:HKModel];
|
||||
}
|
||||
if(SPModel != nil){
|
||||
[defaultList addObject:SPModel];
|
||||
}
|
||||
if(MYModel != nil){
|
||||
[defaultList addObject:MYModel];
|
||||
}
|
||||
if(ChinsModel != nil){
|
||||
[defaultList addObject:ChinsModel];
|
||||
}
|
||||
[self.listData insertObject:defaultList atIndex:0];
|
||||
if(otherList.count > 0){
|
||||
[self.listData addObject:otherList];
|
||||
[self.titleList addObject:@"#"];
|
||||
}
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
#pragma mark - UITableViewDelegate
|
||||
@@ -96,6 +124,9 @@
|
||||
|
||||
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
XPLoginAreaTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPLoginAreaTableViewCell class]) forIndexPath:indexPath];
|
||||
if(cell.delegate == nil){
|
||||
cell.delegate = self;
|
||||
}
|
||||
if(indexPath.section < self.listData.count){
|
||||
NSArray *listModel = self.listData[indexPath.section];
|
||||
if(indexPath.row < listModel.count){
|
||||
@@ -104,13 +135,15 @@
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
LoginAreaModel *codeModel = self.listData[indexPath.section][indexPath.row];
|
||||
if(self.delegate && [self.delegate respondsToSelector:@selector(chooseAreaCodeSuccess:)]){
|
||||
|
||||
[self.delegate chooseAreaCodeSuccess:codeModel.pi_phoneAreaCode ?: codeModel.phone_area_code];
|
||||
}
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
#pragma mark - XPLoginAreaTableViewCellDelegate
|
||||
- (void)didSelectModel:(LoginAreaModel *)model{
|
||||
LoginAreaModel *codeModel = model;
|
||||
if(self.delegate && [self.delegate respondsToSelector:@selector(chooseAreaCodeSuccess:)]){
|
||||
|
||||
[self.delegate chooseAreaCodeSuccess:codeModel.code];
|
||||
}
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
|
@@ -6,13 +6,19 @@
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class LoginAreaModel;
|
||||
@interface XPLoginAreaTableViewCell : UITableViewCell
|
||||
@protocol XPLoginAreaTableViewCellDelegate <NSObject>
|
||||
|
||||
@property (nonatomic,strong) LoginAreaModel *areaModel;
|
||||
-(void)didSelectModel:(LoginAreaModel *_Nullable)model;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPLoginAreaTableViewCell : UITableViewCell
|
||||
|
||||
@property (nonatomic,strong) LoginAreaModel *areaModel;
|
||||
@property(nonatomic,weak) id<XPLoginAreaTableViewCellDelegate>delegate;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -14,6 +14,7 @@
|
||||
@interface XPLoginAreaTableViewCell()
|
||||
@property (nonatomic,strong) UILabel *areaVeiw;
|
||||
@property (nonatomic,strong) UILabel *codeView;
|
||||
@property(nonatomic,strong) UIButton *clickBtn;
|
||||
@end
|
||||
@implementation XPLoginAreaTableViewCell
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
@@ -30,6 +31,7 @@
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
[self.contentView addSubview:self.areaVeiw];
|
||||
[self.contentView addSubview:self.codeView];
|
||||
[self.contentView addSubview:self.clickBtn];
|
||||
}
|
||||
- (void)initSubViewConstraints {
|
||||
[self.areaVeiw mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -40,15 +42,21 @@
|
||||
make.right.mas_equalTo(-kGetScaleWidth(15));
|
||||
make.centerY.equalTo(self.contentView);
|
||||
}];
|
||||
[self.clickBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.left.bottom.equalTo(self.contentView);
|
||||
make.right.mas_equalTo(-kGetScaleWidth(20));
|
||||
}];
|
||||
}
|
||||
-(void)didClickBtnAction{
|
||||
if(self.delegate && [self.delegate respondsToSelector:@selector(didSelectModel:)]){
|
||||
[self.delegate didSelectModel:self.areaModel];
|
||||
}
|
||||
}
|
||||
- (void)setAreaModel:(LoginAreaModel *)areaModel{
|
||||
_areaModel = areaModel;
|
||||
_areaVeiw.text = _areaModel.name;
|
||||
if(_areaModel.pi_phoneAreaCode == nil){
|
||||
_codeView.text = _areaModel.phone_area_code;
|
||||
return;
|
||||
}
|
||||
_codeView.text = _areaModel.pi_phoneAreaCode;
|
||||
_codeView.text = _areaModel.code;
|
||||
|
||||
}
|
||||
#pragma mark - 懒加载
|
||||
|
||||
@@ -70,5 +78,11 @@
|
||||
}
|
||||
return _codeView;
|
||||
}
|
||||
|
||||
- (UIButton *)clickBtn{
|
||||
if(!_clickBtn){
|
||||
_clickBtn = [UIButton new];
|
||||
[_clickBtn addTarget:self action:@selector(didClickBtnAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _clickBtn;
|
||||
}
|
||||
@end
|
||||
|
@@ -9,6 +9,7 @@
|
||||
#import "DJDKMIMOMColor.h"
|
||||
#import <Masonry.h>
|
||||
#import <ReactiveObjC.h>
|
||||
#import "LoginAreaModel.h"
|
||||
|
||||
@interface XPLoginInputView()
|
||||
|
||||
@@ -46,12 +47,16 @@
|
||||
areaImageView.userInteractionEnabled = NO;
|
||||
|
||||
/// 区号
|
||||
NSString *code = [NSString getCountryCode];
|
||||
UIButton *areaCodeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[areaCodeBtn setTitle:@"+852" forState:UIControlStateNormal];
|
||||
[areaCodeBtn setTitle:code forState:UIControlStateNormal];
|
||||
[areaCodeBtn setTitleColor:UIColorFromRGB(0x1F1B4F) forState:UIControlStateNormal];
|
||||
areaCodeBtn.titleLabel.font = kFontMedium(16);
|
||||
_areaCodeBtn = areaCodeBtn;
|
||||
areaCodeBtn.userInteractionEnabled = NO;
|
||||
|
||||
|
||||
|
||||
|
||||
UIStackView *areaStackView = [[UIStackView alloc] init];
|
||||
areaStackView.axis = UILayoutConstraintAxisHorizontal;
|
||||
|
@@ -67,7 +67,8 @@
|
||||
|
||||
- (void)viewDidLoad {
|
||||
self.selectType = 0;
|
||||
self.pi_phoneAreaCode = @"852";
|
||||
NSString *code = [NSString getCountryCode];
|
||||
self.pi_phoneAreaCode = [code stringByReplacingOccurrencesOfString:@"+" withString:@""];
|
||||
[super viewDidLoad];
|
||||
[self createUI];
|
||||
[self racBind];
|
||||
|
@@ -260,6 +260,9 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
}else if(type == ThirdLoginType_FB){
|
||||
[self.presenter thirdLoginByFBWithPresentingViewController:self];
|
||||
return;
|
||||
}else if(type == ThirdLoginType_Line){
|
||||
[self.presenter thirdLoginByLine:self];
|
||||
return;
|
||||
}
|
||||
[self.presenter thirdLoginWithType:type];
|
||||
|
||||
|
@@ -54,7 +54,8 @@
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.pi_phoneAreaCode = @"852";
|
||||
NSString *code = [NSString getCountryCode];
|
||||
self.pi_phoneAreaCode = [code stringByReplacingOccurrencesOfString:@"+" withString:@""];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
[self setConfigs];
|
||||
|
@@ -12,7 +12,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@interface Api (Message)
|
||||
|
||||
+ (void)getChatLimit:(HttpRequestHelperCompletion)complection receiverUid:(NSString *)receiverUid ;
|
||||
|
||||
///获取私聊限制接口
|
||||
+(void)getPrivateChatCheck:(HttpRequestHelperCompletion)complection content:(NSString *)content toUid:(NSString *)toUid;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -13,5 +13,8 @@
|
||||
NSString * fang = [NSString stringFromBase64String:@"cHJpdmF0ZUNoYXQvbGltaXQ="];///privateChat/limit
|
||||
[self makeRequest:fang method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, receiverUid,nil];
|
||||
}
|
||||
|
||||
///获取私聊限制接口
|
||||
+(void)getPrivateChatCheck:(HttpRequestHelperCompletion)complection content:(NSString *)content toUid:(NSString *)toUid{
|
||||
[self makeRequest:@"privateChat/check" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, content,toUid,nil];
|
||||
}
|
||||
@end
|
||||
|
@@ -24,6 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
// 获取用户信息
|
||||
- (void)getUserInfoWithUid:(NSString *)uid;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -77,7 +77,7 @@
|
||||
///P
|
||||
#import "MessagePresenter.h"
|
||||
#import "MessageProtocol.h"
|
||||
|
||||
#import "Api+Message.h"
|
||||
|
||||
@interface SessionViewController ()<MessageProtocol, UITableViewDelegate, UITableViewDataSource, NIMChatManagerDelegate, NIMConversationManagerDelegate, NIMMediaManagerDelegate, MessageCellDelegate, TZImagePickerControllerDelegate, SessionNavViewDelegate, SessionRiskViewDelegate,QInputBarViewDelegate, QInputBarViewDataSource,InputBoardDataSource ,InputBoardDelegate , QEmotionBoardViewDelegate, QinputPhotoViewDelegate, SessionUserInfoTableViewCellDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate>
|
||||
|
||||
@@ -746,31 +746,60 @@
|
||||
}
|
||||
|
||||
- (void)didFailRetry:(NIMMessage *)message {
|
||||
if (message.isReceivedMsg) {
|
||||
[[NIMSDK sharedSDK].chatManager fetchMessageAttachment:message error:nil];
|
||||
} else {
|
||||
[[NIMSDK sharedSDK].chatManager resendMessage:message error:nil];
|
||||
}
|
||||
[Api getPrivateChatCheck:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if(code == 200){
|
||||
if (message.isReceivedMsg) {
|
||||
[[NIMSDK sharedSDK].chatManager fetchMessageAttachment:message error:nil];
|
||||
} else {
|
||||
[[NIMSDK sharedSDK].chatManager resendMessage:message error:nil];
|
||||
}
|
||||
return;
|
||||
}
|
||||
[self showErrorToast:msg];
|
||||
} content:@"" toUid:self.session.sessionId];
|
||||
|
||||
}
|
||||
|
||||
- (void)sendTextMessage:(NSString *)text {
|
||||
NIMMessage *message = [NIMMessageMaker msgWithText:text];
|
||||
[[[NIMSDK sharedSDK] chatManager] sendMessage:message toSession:self.session error:nil];
|
||||
[Api getPrivateChatCheck:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if(code == 200){
|
||||
NIMMessage *message = [NIMMessageMaker msgWithText:text];
|
||||
[[[NIMSDK sharedSDK] chatManager] sendMessage:message toSession:self.session error:nil];
|
||||
return;
|
||||
}
|
||||
[self showErrorToast:msg];
|
||||
} content:text toUid:self.session.sessionId];
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)audioRecordCompletion:(NSString *)recordPath {
|
||||
NIMMessage *message = [NIMMessageMaker msgWithAudio:recordPath];
|
||||
[[[NIMSDK sharedSDK] chatManager] sendMessage:message toSession:self.session error:nil];
|
||||
[Api getPrivateChatCheck:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if(code == 200){
|
||||
NIMMessage *message = [NIMMessageMaker msgWithAudio:recordPath];
|
||||
[[[NIMSDK sharedSDK] chatManager] sendMessage:message toSession:self.session error:nil];
|
||||
return;
|
||||
}
|
||||
[self showErrorToast:msg];
|
||||
} content:@"" toUid:self.session.sessionId];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - TZImagePickerControllerDelegate
|
||||
- (void)imagePickerController:(TZImagePickerController *)picker didFinishPickingPhotos:(NSArray<UIImage *> *)photos sourceAssets:(NSArray *)assets isSelectOriginalPhoto:(BOOL)isSelectOriginalPhoto infos:(NSArray<NSDictionary *> *)infos {
|
||||
[photos enumerateObjectsUsingBlock:^(UIImage * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
if (obj) {
|
||||
// 构造出具体会话
|
||||
NIMMessage * message = [NIMMessageMaker msgWithImage:obj];
|
||||
// 发送消息
|
||||
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil];
|
||||
[Api getPrivateChatCheck:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if(code == 200){
|
||||
// 构造出具体会话
|
||||
NIMMessage * message = [NIMMessageMaker msgWithImage:obj];
|
||||
// 发送消息
|
||||
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil];
|
||||
return;
|
||||
}
|
||||
[self showErrorToast:msg];
|
||||
} content:@"" toUid:self.session.sessionId];
|
||||
|
||||
}
|
||||
}];
|
||||
}
|
||||
@@ -1024,11 +1053,18 @@
|
||||
if (image == nil){
|
||||
continue;
|
||||
}
|
||||
|
||||
// 发送消息
|
||||
NIMMessage * message = [NIMMessageMaker msgWithImage:image];
|
||||
// 发送消息
|
||||
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil];
|
||||
[view resetChoosePhotos];
|
||||
[Api getPrivateChatCheck:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if(code == 200){
|
||||
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil];
|
||||
[view resetChoosePhotos];
|
||||
return;
|
||||
}
|
||||
[self showErrorToast:msg];
|
||||
} content:@"" toUid:self.session.sessionId];
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1051,10 +1087,17 @@
|
||||
if (picker.sourceType == UIImagePickerControllerSourceTypeCamera) {
|
||||
UIImageWriteToSavedPhotosAlbum(selectedPhoto, nil, nil, nil);
|
||||
}
|
||||
// 构造出具体会话
|
||||
NIMMessage * message = [NIMMessageMaker msgWithImage:selectedPhoto];
|
||||
// 发送消息
|
||||
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil];
|
||||
[Api getPrivateChatCheck:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if(code == 200){
|
||||
// 构造出具体会话
|
||||
NIMMessage * message = [NIMMessageMaker msgWithImage:selectedPhoto];
|
||||
// 发送消息
|
||||
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil];
|
||||
return;
|
||||
}
|
||||
[self showErrorToast:msg];
|
||||
} content:@"" toUid:self.session.sessionId];
|
||||
|
||||
}
|
||||
[picker dismissViewControllerAnimated:YES completion:^{}];
|
||||
}
|
||||
|
@@ -57,6 +57,8 @@
|
||||
@property (nonatomic,strong) XPClanSectionView *sectionView;
|
||||
///是否请求了数据
|
||||
@property (nonatomic,assign) BOOL isRequest;
|
||||
///公会成员
|
||||
@property(nonatomic,assign) NSInteger memberNum;
|
||||
@end
|
||||
|
||||
@implementation XPMineClanViewController
|
||||
@@ -161,7 +163,7 @@
|
||||
if (cell == nil) {
|
||||
cell = [[XPClanMemberTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPClanMemberTableViewCell class])];
|
||||
}
|
||||
self.sectionView.title = [NSString stringWithFormat:YMLocalizedString(@"XPMineClanViewController1"), self.datasource.count];
|
||||
self.sectionView.title = [NSString stringWithFormat:YMLocalizedString(@"XPMineClanViewController1"), self.memberNum];
|
||||
cell.cellType = ClanMemberTableViewCellType_Normal;
|
||||
ClanMemberInfoModel * memberInfo = [self.datasource safeObjectAtIndex1:indexPath.row-1];
|
||||
cell.isLast = (self.datasource.count -1) == indexPath.row-1;
|
||||
@@ -241,6 +243,7 @@
|
||||
} else {
|
||||
self.hasNoMoreData = YES;
|
||||
}
|
||||
self.memberNum = memberInfo.count;
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
|
@@ -38,8 +38,7 @@ UIKIT_EXTERN NSString * kUpdateSoundInfo;
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
///数据源
|
||||
@property (nonatomic,strong) NSArray *datasouce;
|
||||
/// 日期选择器
|
||||
@property (nonatomic,strong) XPMineUserInfoDateView *dateView;
|
||||
|
||||
///用户信息
|
||||
@property (nonatomic,strong) UserInfoModel *userInfo;
|
||||
///地区列表
|
||||
@@ -145,15 +144,24 @@ UIKIT_EXTERN NSString * kUpdateSoundInfo;
|
||||
[TTPopup alertWithConfig:config confirmHandler:^{
|
||||
NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
|
||||
if ([[UIApplication sharedApplication] canOpenURL:url]) {
|
||||
[[UIApplication sharedApplication] openURL:url];
|
||||
[[UIApplication sharedApplication] openURL:url options:@{} completionHandler:^(BOOL success) {
|
||||
|
||||
}];
|
||||
}
|
||||
} cancelHandler:^{
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)showDatePickerView {
|
||||
self.dateView.time = self.userInfo.birth/1000;
|
||||
[TTPopup popupView:self.dateView style:TTPopupStyleActionSheet];
|
||||
XPMineUserInfoDateView *dateView = [[XPMineUserInfoDateView alloc] initWithFrame:CGRectMake(0, KScreenHeight, KScreenWidth,KScreenHeight)];
|
||||
dateView.delegate = self;
|
||||
dateView.time = self.userInfo.birth/1000;
|
||||
[kWindow addSubview:dateView];
|
||||
[UIView animateWithDuration:0.5 animations:^{
|
||||
dateView.frame = CGRectMake(0, 0, KScreenWidth, KScreenHeight);
|
||||
}completion:^(BOOL finished) {
|
||||
dateView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
|
||||
}];
|
||||
}
|
||||
#pragma mark - XPMineUserInfoTagVCDelegate
|
||||
- (void)xPMineUserInfoTagVC:(XPMineUserInfoTagVC *)vc didClickComplete:(NSArray *)meLabels{
|
||||
@@ -305,15 +313,13 @@ UIKIT_EXTERN NSString * kUpdateSoundInfo;
|
||||
|
||||
#pragma mark - XPMineUserInfoDateViewDelegate
|
||||
- (void)xPMineUserInfoDateView:(XPMineUserInfoDateView *)view didClickSureButton:(NSString *)dateStr{
|
||||
[TTPopup dismiss];
|
||||
|
||||
if (dateStr.length > 0) {
|
||||
[self.presenter complectionInfoWithAvatar:nil nick:nil birth:dateStr userDesc:nil];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)xPMineUserInfoDateView:(XPMineUserInfoDateView *)view didClickCancleButton:(UIButton *)sender {
|
||||
[TTPopup dismiss];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - XPMineUserInfoNickViewControllerDelegate
|
||||
- (void)xPMineUserInfoNickViewController:(XPMineUserInfoNickViewController *)viewController updateNick:(NSString *)nick {
|
||||
@@ -413,12 +419,6 @@ UIKIT_EXTERN NSString * kUpdateSoundInfo;
|
||||
return _tableView;
|
||||
}
|
||||
|
||||
- (XPMineUserInfoDateView *)dateView {
|
||||
if (!_dateView) {
|
||||
_dateView = [[XPMineUserInfoDateView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, 216+kSafeAreaBottomHeight+54)];
|
||||
_dateView.delegate = self;
|
||||
}
|
||||
return _dateView;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
@@ -201,6 +201,7 @@
|
||||
[TTPopup alertWithConfig:config showBorder:NO confirmHandler:^{
|
||||
|
||||
XPIAPRechargeViewController * webVC =[[XPIAPRechargeViewController alloc] init];
|
||||
webVC.type = @"4";
|
||||
[self.navigationController pushViewController:webVC animated:YES];
|
||||
} cancelHandler:^{
|
||||
|
||||
|
@@ -364,16 +364,18 @@
|
||||
///当前充值的状态
|
||||
- (void)rechargeNewProcessStatus:(StoreConditionResult)status {
|
||||
|
||||
|
||||
if (status == StoreConditionResultPay || status == StoreConditionResultStart || status == StoreConditionResultVerifiedServer) {
|
||||
|
||||
}else if (status == StoreConditionResultUnowned) {
|
||||
[XNDJTDDLoadingTool hideHUDInView:kWindow];
|
||||
[self showErrorToast:YMLocalizedString(@"XPIAPRechargeViewController1")];
|
||||
}else{
|
||||
[XNDJTDDLoadingTool hideHUDInView:kWindow];
|
||||
[self showErrorToast:YMLocalizedString(@"XPIAPRechargeViewController0")];
|
||||
}
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
if (status == StoreConditionResultPay || status == StoreConditionResultStart || status == StoreConditionResultVerifiedServer) {
|
||||
|
||||
}else if (status == StoreConditionResultUnowned) {
|
||||
[XNDJTDDLoadingTool hideHUDInView:kWindow];
|
||||
[self showErrorToast:YMLocalizedString(@"XPIAPRechargeViewController1")];
|
||||
}else{
|
||||
[XNDJTDDLoadingTool hideHUDInView:kWindow];
|
||||
[self showErrorToast:YMLocalizedString(@"XPIAPRechargeViewController0")];
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
///充值成功回调id
|
||||
|
@@ -10,8 +10,7 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class XPMineUserInfoDateView;
|
||||
@protocol XPMineUserInfoDateViewDelegate <NSObject>
|
||||
///取消
|
||||
- (void)xPMineUserInfoDateView:(XPMineUserInfoDateView *)view didClickCancleButton:(UIButton *)sender;
|
||||
|
||||
///确定
|
||||
- (void)xPMineUserInfoDateView:(XPMineUserInfoDateView *)view didClickSureButton:(NSString *)dateStr;
|
||||
@end
|
||||
|
@@ -11,15 +11,24 @@
|
||||
///Tool
|
||||
#import "DJDKMIMOMColor.h"
|
||||
|
||||
@interface XPMineUserInfoDateView ()
|
||||
@interface XPMineUserInfoDateView ()<UIPickerViewDelegate,UIPickerViewDataSource>
|
||||
@property (nonatomic,strong)NSMutableArray * selDateArray;
|
||||
|
||||
@property (nonatomic,strong)NSDateComponents * components;//时间结构体、可计算时间间隔、获取年月日时分、
|
||||
@property(nonatomic,strong) UIView *bgView;
|
||||
///
|
||||
@property (nonatomic,strong) UIButton *cancleButton;
|
||||
///
|
||||
@property (nonatomic,strong) UIButton *sureButton;
|
||||
///
|
||||
@property (nonatomic, strong) UIDatePicker *datePicker;
|
||||
@property (nonatomic, strong) UIPickerView *pickerView;
|
||||
///样式
|
||||
@property (nonatomic, strong) NSDateFormatter *dateFormatter;
|
||||
///年龄
|
||||
@property(nonatomic,strong) UILabel *ageView;
|
||||
///星座
|
||||
@property(nonatomic,strong) UILabel *starView;
|
||||
@property(nonatomic,strong) NSMutableArray *dataSourceArray;
|
||||
@end
|
||||
|
||||
@implementation XPMineUserInfoDateView
|
||||
@@ -35,60 +44,260 @@
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor whiteColor];
|
||||
[self addSubview:self.cancleButton];
|
||||
[self addSubview:self.sureButton];
|
||||
[self addSubview:self.datePicker];
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
[self addSubview:self.cancleButton];
|
||||
[self addSubview:self.bgView];
|
||||
[self.bgView addSubview:self.ageView];
|
||||
[self.bgView addSubview:self.starView];
|
||||
[self.bgView addSubview:self.sureButton];
|
||||
[self.bgView addSubview:self.pickerView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.datePicker mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self);
|
||||
make.bottom.mas_equalTo(self);
|
||||
make.top.mas_equalTo(self.cancleButton.mas_bottom);
|
||||
}];
|
||||
|
||||
[self.cancleButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.top.mas_equalTo(self);
|
||||
make.height.mas_equalTo(30);
|
||||
make.width.mas_equalTo(50);
|
||||
make.edges.equalTo(self);
|
||||
}];
|
||||
[self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.bottom.trailing.equalTo(self).inset(kGetScaleWidth(0));
|
||||
make.height.mas_equalTo(kGetScaleWidth(383));
|
||||
}];
|
||||
[self.ageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(kGetScaleWidth(16));
|
||||
make.width.mas_equalTo(kGetScaleWidth(98));
|
||||
make.height.mas_equalTo(kGetScaleWidth(36));
|
||||
make.leading.mas_equalTo(kGetScaleWidth(80));
|
||||
}];
|
||||
[self.starView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(80));
|
||||
make.top.mas_equalTo(kGetScaleWidth(16));
|
||||
make.width.mas_equalTo(kGetScaleWidth(98));
|
||||
make.height.mas_equalTo(kGetScaleWidth(36));
|
||||
}];
|
||||
[self.sureButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(self);
|
||||
make.width.height.centerY.mas_equalTo(self.cancleButton);
|
||||
make.bottom.mas_equalTo(-kGetScaleWidth(42));
|
||||
make.centerX.equalTo(self.bgView);
|
||||
make.width.mas_equalTo(kGetScaleWidth(303));
|
||||
make.height.mas_equalTo(kGetScaleWidth(48));
|
||||
}];
|
||||
[self.pickerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self);
|
||||
make.bottom.equalTo(self.sureButton.mas_top);
|
||||
make.top.equalTo(self.starView.mas_bottom).mas_offset(kGetScaleWidth(10));
|
||||
|
||||
}];
|
||||
}
|
||||
#pragma mark- UIPickerViewDelegate,UIPickerViewDataSource
|
||||
-(NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{
|
||||
|
||||
return 3;
|
||||
}
|
||||
|
||||
-(NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component{
|
||||
|
||||
return [_dataSourceArray[component] count];
|
||||
}
|
||||
|
||||
-(CGFloat)pickerView:(UIPickerView *)pickerView widthForComponent:(NSInteger)component{
|
||||
|
||||
return KScreenWidth/3;
|
||||
}
|
||||
-(CGFloat)pickerView:(UIPickerView *)pickerView rowHeightForComponent:(NSInteger)component{
|
||||
return kGetScaleWidth(40);
|
||||
}
|
||||
|
||||
-(UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view{
|
||||
[self changeSpearatorLineColor];
|
||||
UIView *bgView = (UIView *)view;
|
||||
UILabel *lab = [view viewWithTag:100];
|
||||
if (!bgView) {
|
||||
bgView = [UIView new];
|
||||
bgView.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
if(!lab){
|
||||
lab = [UILabel labelInitWithText:@"" font:kFontRegular(20) textColor:UIColorFromRGB(0x1E1E1F)];
|
||||
[bgView addSubview:lab];
|
||||
CGFloat x ;
|
||||
if(component == 0){
|
||||
x = kGetScaleWidth(20) ;
|
||||
}else if(component == 1){
|
||||
x = kGetScaleWidth(10) ;
|
||||
}else{
|
||||
x = 0 ;
|
||||
}
|
||||
[lab mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(bgView);
|
||||
make.leading.mas_equalTo(kGetScaleWidth(x));
|
||||
make.width.mas_equalTo(kGetScaleWidth(98));
|
||||
make.height.mas_equalTo(kGetScaleWidth(40));
|
||||
}];
|
||||
lab.layer.cornerRadius = kGetScaleWidth(8);
|
||||
lab.layer.masksToBounds = YES;
|
||||
lab.textAlignment = NSTextAlignmentCenter;
|
||||
lab.tag = 100;
|
||||
}else{
|
||||
CGFloat x ;
|
||||
if(component == 0){
|
||||
x = kGetScaleWidth(20) ;
|
||||
}else if(component == 1){
|
||||
x = kGetScaleWidth(10) ;
|
||||
}else{
|
||||
x = 0 ;
|
||||
}
|
||||
[lab mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(bgView);
|
||||
make.leading.mas_equalTo(kGetScaleWidth(x));
|
||||
make.width.mas_equalTo(kGetScaleWidth(98));
|
||||
make.height.mas_equalTo(kGetScaleWidth(40));
|
||||
}];
|
||||
}
|
||||
|
||||
NSArray *yearArr = @[YMLocalizedString(@"XPIncomeRecordGoldDetailsPickViewView3") ,YMLocalizedString(@"XPIncomeRecordGoldDetailsPickViewView4"),YMLocalizedString(@"XPIncomeRecordGoldDetailsPickViewView5")];
|
||||
if ([self.selDateArray[component]isEqualToString:self.dataSourceArray[component][row]] ) {
|
||||
lab.backgroundColor = UIColorFromRGB(0xF7F7F7);
|
||||
lab.font = kFontRegular(20);
|
||||
lab.text = [NSString stringWithFormat:@"%@%@",self.selDateArray[component],yearArr[component]];
|
||||
lab.textColor = UIColorFromRGB(0x1E1E1F);
|
||||
}else{
|
||||
lab.backgroundColor = [UIColor clearColor];
|
||||
lab.font = kFontRegular(18);
|
||||
lab.text = [NSString stringWithFormat:@"%@%@",self.dataSourceArray[component][row],yearArr[component]];
|
||||
lab.textColor = UIColorRGBAlpha(0x1E1E1F, 0.6);
|
||||
}
|
||||
return bgView;
|
||||
}
|
||||
#pragma mark - 改变分割线的颜色
|
||||
- (void)changeSpearatorLineColor {
|
||||
for(UIView *speartorView in _pickerView.subviews) {
|
||||
if (speartorView.frame.size.height < 80) {//找出当前的 View
|
||||
speartorView.backgroundColor = [UIColor clearColor];
|
||||
}else{
|
||||
speartorView.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
}
|
||||
}
|
||||
-(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{
|
||||
[self.selDateArray replaceObjectAtIndex:component withObject:self.dataSourceArray[component][row]];
|
||||
[pickerView reloadAllComponents];
|
||||
NSString *time = [NSString stringWithFormat:@"%@-%@-%@",self.selDateArray[0],self.selDateArray[1],self.selDateArray[2]];
|
||||
NSDate *date = [NSDate at_dateFromString:time];
|
||||
NSTimeInterval interval = [date timeIntervalSince1970] * 1000;
|
||||
self.ageView.text = [NSString stringWithFormat:@"%ld%@",[PLTimeUtil ageWithDateFromBirth:interval],YMLocalizedString(@"XPMineUserInfoDateView3")];
|
||||
self.starView.text = [NSString stringWithFormat:@"%@%@",[NSString getCalculateConstellationTextWithMonth:interval],YMLocalizedString(@"XPMineUserInfoDateView4")] ;
|
||||
}
|
||||
//数据源
|
||||
-(NSMutableArray *)dataSourceArray{
|
||||
if(!_dataSourceArray){
|
||||
NSMutableArray * yearArr = [@[]mutableCopy];
|
||||
for (int i = 1900; i < 2050; i++) {
|
||||
[yearArr addObject:@(i).stringValue];
|
||||
}
|
||||
NSArray * monthArr = @[@"01",@"02",@"03",@"04",@"05",@"06",@"07",@"08",@"09",@"10",@"11",@"12"];
|
||||
NSArray * dayArr = [self dayArrayMonth:self.components.month year:self.components.year];
|
||||
|
||||
NSArray * array = @[yearArr,monthArr,dayArr];
|
||||
_dataSourceArray = [array mutableCopy];
|
||||
}
|
||||
|
||||
return _dataSourceArray;
|
||||
}
|
||||
|
||||
//根据月份返回日期
|
||||
-(NSArray *)dayArrayMonth:(NSInteger)month year:(NSInteger)year{
|
||||
NSArray * dayArr = [[NSArray alloc]init];
|
||||
|
||||
switch (month) {
|
||||
case 1: case 3: case 5: case 7: case 8: case 10: case 12:
|
||||
dayArr = @[@"01",@"02",@"03",@"04",@"05",@"06",@"07",@"08",@"09",@"10",@"11",@"12",@"13",@"14",@"15",@"16",@"17",@"18",@"19",@"20",@"21",@"22",@"23",@"24",@"25",@"26",@"27",@"28",@"29",@"30",@"31"];
|
||||
|
||||
break;
|
||||
case 4: case 6: case 9: case 11:
|
||||
dayArr = @[@"01",@"02",@"03",@"04",@"05",@"06",@"07",@"08",@"09",@"10",@"11",@"12",@"13",@"14",@"15",@"16",@"17",@"18",@"19",@"20",@"21",@"22",@"23",@"24",@"25",@"26",@"27",@"28",@"29",@"30"];
|
||||
break;
|
||||
case 2:
|
||||
if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {///是润年
|
||||
dayArr = @[@"01",@"02",@"03",@"04",@"05",@"06",@"07",@"08",@"09",@"10",@"11",@"12",@"13",@"14",@"15",@"16",@"17",@"18",@"19",@"20",@"21",@"22",@"23",@"24",@"25",@"26",@"27",@"28",@"29"];
|
||||
}else{
|
||||
dayArr = @[@"01",@"02",@"03",@"04",@"05",@"06",@"07",@"08",@"09",@"10",@"11",@"12",@"13",@"14",@"15",@"16",@"17",@"18",@"19",@"20",@"21",@"22",@"23",@"24",@"25",@"26",@"27",@"28"];
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return dayArr;
|
||||
|
||||
}
|
||||
#pragma mark - Event
|
||||
- (void)onClickCancelButton:(UIButton *)sender {
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPMineUserInfoDateView:didClickCancleButton:)]) {
|
||||
[self.delegate xPMineUserInfoDateView:self didClickCancleButton:sender];
|
||||
}
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
[UIView animateWithDuration:0.5 animations:^{
|
||||
self.frame = CGRectMake(0, KScreenHeight, KScreenWidth, KScreenHeight);
|
||||
}completion:^(BOOL finished) {
|
||||
[self removeFromSuperview];
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
- (void)onClickSureButton:(UIButton *)sender {
|
||||
NSDate * date = self.datePicker.date;
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPMineUserInfoDateView:didClickSureButton:)]) {
|
||||
NSTimeZone *timeZone= [NSTimeZone systemTimeZone];
|
||||
NSInteger seconds= [timeZone secondsFromGMTForDate:date];
|
||||
NSDate *newDate= [date dateByAddingTimeInterval:seconds];
|
||||
NSString *dateStr = [self.dateFormatter stringFromDate:newDate];
|
||||
[self.delegate xPMineUserInfoDateView:self didClickSureButton:dateStr];
|
||||
}
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPMineUserInfoDateView:didClickSureButton:)]) {
|
||||
NSString *time = [NSString stringWithFormat:@"%@-%@-%@",self.selDateArray[0],self.selDateArray[1],self.selDateArray[2]];
|
||||
[self.delegate xPMineUserInfoDateView:self didClickSureButton:time];
|
||||
}
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
[UIView animateWithDuration:0.5 animations:^{
|
||||
self.frame = CGRectMake(0, KScreenHeight, KScreenWidth, KScreenHeight);
|
||||
}completion:^(BOOL finished) {
|
||||
[self removeFromSuperview];
|
||||
}];
|
||||
|
||||
}
|
||||
//分解传来需要显示的时间
|
||||
-(NSArray *)receiveTime:(NSString *)timeStr{
|
||||
|
||||
NSArray * timeArray = [timeStr componentsSeparatedByString:@"-"];
|
||||
NSMutableArray * timeArr = [[NSMutableArray alloc]init];
|
||||
for (int i = 0; i<timeArray.count; i++) {
|
||||
NSString * str = [timeArray objectAtIndex:i];
|
||||
if (str.length == 1) {
|
||||
[timeArr addObject:[NSString stringWithFormat:@"0%@",str]];
|
||||
}else if(str.length == 0){
|
||||
[timeArr addObject:@"00"];
|
||||
}else{
|
||||
[timeArr addObject:str];
|
||||
}
|
||||
}
|
||||
|
||||
return timeArr;
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setTime:(NSTimeInterval)time {
|
||||
_time = time;
|
||||
NSDate *date = [NSDate dateWithTimeIntervalSince1970:time];
|
||||
self.datePicker.date = date;
|
||||
NSTimeZone *timeZone= [NSTimeZone systemTimeZone];
|
||||
NSInteger seconds= [timeZone secondsFromGMTForDate:date];
|
||||
NSDate *newDate= [date dateByAddingTimeInterval:seconds];
|
||||
NSString *dateStr = [self.dateFormatter stringFromDate:newDate];
|
||||
NSArray * timeArr = [[NSArray alloc]init];
|
||||
if (dateStr) {
|
||||
timeArr = [self receiveTime:dateStr];
|
||||
}
|
||||
if (timeArr.count == 3) {//需要显示传入的时间
|
||||
self.selDateArray = [timeArr mutableCopy];
|
||||
for (int i = 0; i < 3; i++) {
|
||||
[self.pickerView selectRow: [self.dataSourceArray[i] indexOfObject:self.selDateArray[i]] inComponent:i animated:YES];
|
||||
}
|
||||
|
||||
}
|
||||
self.ageView.text = [NSString stringWithFormat:@"%ld%@",[PLTimeUtil ageWithDateFromBirth:time*1000],YMLocalizedString(@"XPMineUserInfoDateView3")];
|
||||
self.starView.text = [NSString stringWithFormat:@"%@%@",[NSString getCalculateConstellationTextWithMonth:time*1000],YMLocalizedString(@"XPMineUserInfoDateView4")] ;
|
||||
}
|
||||
- (UIButton *)cancleButton {
|
||||
if (!_cancleButton) {
|
||||
_cancleButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_cancleButton setTitle:YMLocalizedString(@"XPMineUserInfoDateView0") forState:UIControlStateNormal];
|
||||
[_cancleButton addTarget:self action:@selector(onClickCancelButton:) forControlEvents:UIControlEventTouchUpInside];
|
||||
_cancleButton.titleLabel.font = [UIFont systemFontOfSize:14];
|
||||
[_cancleButton setTitleColor:[DJDKMIMOMColor secondTextColor] forState:UIControlStateNormal];
|
||||
|
||||
}
|
||||
return _cancleButton;
|
||||
}
|
||||
@@ -96,10 +305,14 @@
|
||||
- (UIButton *)sureButton {
|
||||
if (!_sureButton) {
|
||||
_sureButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_sureButton setTitle:YMLocalizedString(@"XPMineUserInfoDateView1") forState:UIControlStateNormal];
|
||||
[_sureButton setTitle:YMLocalizedString(@"XPMineUserInfoDateView2") forState:UIControlStateNormal];
|
||||
[_sureButton addTarget:self action:@selector(onClickSureButton:) forControlEvents:UIControlEventTouchUpInside];
|
||||
_sureButton.titleLabel.font = [UIFont systemFontOfSize:14];
|
||||
[_sureButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
|
||||
_sureButton.titleLabel.font = kFontMedium(16);
|
||||
[_sureButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
UIImage *image = [UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor confirmButtonGradientStartColor],[DJDKMIMOMColor confirmButtonGradientMiddleColor],[DJDKMIMOMColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(303), kGetScaleWidth(48))];
|
||||
[_sureButton setBackgroundImage:image forState:UIControlStateNormal];
|
||||
_sureButton.layer.cornerRadius = kGetScaleWidth(48)/2;
|
||||
_sureButton.layer.masksToBounds = YES;
|
||||
}
|
||||
return _sureButton;
|
||||
}
|
||||
@@ -112,22 +325,45 @@
|
||||
return _dateFormatter;
|
||||
}
|
||||
|
||||
- (UIDatePicker *)datePicker {
|
||||
if (!_datePicker){
|
||||
_datePicker = [[UIDatePicker alloc] init];
|
||||
_datePicker.datePickerMode = UIDatePickerModeDate;
|
||||
NSLocale *locale = [[NSLocale alloc] initWithLocaleIdentifier:@"zh_CN"];
|
||||
_datePicker.locale = locale;
|
||||
_datePicker.layer.cornerRadius = 5;
|
||||
_datePicker.layer.masksToBounds = YES;
|
||||
if (@available(iOS 13.4, *)) {
|
||||
_datePicker.preferredDatePickerStyle = UIDatePickerStyleWheels;
|
||||
}
|
||||
NSDate *date = [self.dateFormatter dateFromString:@"2000-07-01"];
|
||||
_datePicker.date = date;
|
||||
_datePicker.backgroundColor = [UIColor whiteColor];
|
||||
}
|
||||
return _datePicker;
|
||||
- (UIPickerView *)pickerView{
|
||||
if (!_pickerView){
|
||||
_pickerView = [[UIPickerView alloc]initWithFrame:CGRectZero];
|
||||
_pickerView.delegate = self;
|
||||
_pickerView.dataSource = self;
|
||||
}
|
||||
return _pickerView;
|
||||
}
|
||||
- (UIView *)bgView{
|
||||
if(!_bgView){
|
||||
_bgView = [UIView new];
|
||||
_bgView.backgroundColor = [UIColor whiteColor];
|
||||
[_bgView setCornerWithLeftTopCorner:kGetScaleWidth(20) rightTopCorner:kGetScaleWidth(20) bottomLeftCorner:0 bottomRightCorner:0 size:CGSizeMake(KScreenWidth, kGetScaleWidth(383))];
|
||||
}
|
||||
return _bgView;
|
||||
}
|
||||
- (UILabel *)ageView{
|
||||
if(!_ageView){
|
||||
_ageView = [UILabel labelInitWithText:@"" font:kFontMedium(16) textColor:UIColorFromRGB(0x1E1E1F)];
|
||||
[_ageView setCornerWithLeftTopCorner:kGetScaleWidth(7) rightTopCorner:kGetScaleWidth(7) bottomLeftCorner:kGetScaleWidth(7) bottomRightCorner:kGetScaleWidth(7) size:CGSizeMake(kGetScaleWidth(98), kGetScaleWidth(36))];
|
||||
_ageView.backgroundColor = UIColorFromRGB(0xF7F7F7);
|
||||
_ageView.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
return _ageView;
|
||||
}
|
||||
- (UILabel *)starView{
|
||||
if(!_starView){
|
||||
_starView = [UILabel labelInitWithText:@"" font:kFontMedium(16) textColor:UIColorFromRGB(0x1E1E1F)];
|
||||
[_starView setCornerWithLeftTopCorner:kGetScaleWidth(7) rightTopCorner:kGetScaleWidth(7) bottomLeftCorner:kGetScaleWidth(7) bottomRightCorner:kGetScaleWidth(7) size:CGSizeMake(kGetScaleWidth(98), kGetScaleWidth(36))];
|
||||
_starView.backgroundColor = UIColorFromRGB(0xF7F7F7);
|
||||
_starView.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
return _starView;
|
||||
}
|
||||
- (NSDateComponents *)components{
|
||||
if(!_components){
|
||||
NSCalendar * calender = [NSCalendar currentCalendar];
|
||||
_components = [calender components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay|NSCalendarUnitHour|NSCalendarUnitMinute fromDate:[NSDate date]];
|
||||
}
|
||||
return _components;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -605,14 +605,23 @@
|
||||
}] ;
|
||||
}
|
||||
self.charmImageView.hidden = userInfo.userLevelVo.charmUrl.length <= 0;
|
||||
|
||||
if (userInfo.nameplateWord.length>0 && userInfo.nameplatePic.length>0) {
|
||||
self.nameplateImageView.imageUrl = userInfo.nameplatePic;
|
||||
self.nameplateLabel.text = userInfo.nameplateWord;
|
||||
self.namePlateView.hidden = NO;
|
||||
} else {
|
||||
self.namePlateView.hidden = YES;
|
||||
if(userInfo.isCustomWord == YES){
|
||||
if (userInfo.nameplateWord.length>0) {
|
||||
self.nameplateImageView.imageUrl = userInfo.nameplatePic;
|
||||
self.namePlateView.hidden = NO;
|
||||
} else {
|
||||
self.namePlateView.hidden = YES;
|
||||
}
|
||||
}else{
|
||||
if (userInfo.nameplateWord.length>0 && userInfo.nameplatePic.length>0) {
|
||||
self.nameplateImageView.imageUrl = userInfo.nameplatePic;
|
||||
self.nameplateLabel.text = userInfo.nameplateWord;
|
||||
self.namePlateView.hidden = NO;
|
||||
} else {
|
||||
self.namePlateView.hidden = YES;
|
||||
}
|
||||
}
|
||||
|
||||
self.rechargeImageView.hidden = !_userInfo.isRechargeUser;
|
||||
[self.userPhtotArray removeAllObjects];
|
||||
// 轮播图
|
||||
|
@@ -258,6 +258,29 @@
|
||||
|
||||
|
||||
///铭牌
|
||||
- (NSMutableAttributedString *)createNameplateAttibuteWithImage:(NSString *)imageName{
|
||||
NetImageConfig *config = [[NetImageConfig alloc]init];
|
||||
///先这样吧
|
||||
config.autoLoad = YES;
|
||||
NetImageView *imageView = [[NetImageView alloc]initWithUrl:imageName config:config];
|
||||
UIImage* image = imageView.image;
|
||||
if (image) {
|
||||
CGFloat scale = image.size.width / (image.size.height > 0 ? image.size.height : 1);
|
||||
imageView.bounds = CGRectMake(0, 0, 20 * scale, 20);
|
||||
} else {
|
||||
NSURL *imgUrl = [NSURL URLWithString:imageName];
|
||||
UIImage *myImage = [UIImage imageWithData:[NSData dataWithContentsOfURL:imgUrl]];
|
||||
CGFloat scale = myImage.size.width / (myImage.size.height > 0 ? myImage.size.height : 1);
|
||||
if (scale == 0) {
|
||||
imageView.bounds = CGRectMake(0, 0, 60, 20);
|
||||
}else {
|
||||
imageView.bounds = CGRectMake(0, 0, 20 * scale, 20);
|
||||
}
|
||||
}
|
||||
imageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
NSMutableAttributedString *string = [NSMutableAttributedString yy_attachmentStringWithContent:imageView contentMode:UIViewContentModeScaleAspectFit attachmentSize:imageView.bounds.size alignToFont:[UIFont boldSystemFontOfSize:12] alignment:YYTextVerticalAlignmentCenter];
|
||||
return string;
|
||||
}
|
||||
- (NSMutableAttributedString *)createNameplateAttibute:(NSString *)tagName image:(NSString *)imageName textFont:(UIFont *)textFont {
|
||||
NetImageConfig *config = [[NetImageConfig alloc]init];
|
||||
///先这样吧
|
||||
@@ -325,12 +348,20 @@
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//主播认证
|
||||
if (userInfo.nameplateWord.length > 0 && userInfo.nameplatePic.length>0) {
|
||||
[self createNameplateAttibute:userInfo.nameplateWord image:userInfo.nameplatePic textFont:[UIFont systemFontOfSize:9]];
|
||||
[attributedString appendAttributedString:[self createSapceAttribute:2]];
|
||||
}
|
||||
if(userInfo.isCertified == YES){
|
||||
//主播认证
|
||||
if (userInfo.nameplatePic.length > 0) {
|
||||
[self createNameplateAttibuteWithImage:userInfo.nameplatePic];
|
||||
[attributedString appendAttributedString:[self createSapceAttribute:2]];
|
||||
}
|
||||
}else{
|
||||
//主播认证
|
||||
if (userInfo.nameplateWord.length > 0 && userInfo.nameplatePic.length>0) {
|
||||
[self createNameplateAttibute:userInfo.nameplateWord image:userInfo.nameplatePic textFont:[UIFont systemFontOfSize:9]];
|
||||
[attributedString appendAttributedString:[self createSapceAttribute:2]];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// userRank 用户级别
|
||||
if (userInfo.userLevelVo.experUrl) {
|
||||
|
@@ -67,6 +67,8 @@ typedef NS_ENUM(NSInteger, MonentsContentType) {
|
||||
@property (nonatomic, copy) NSString *nameplateWord;
|
||||
///铭牌图片
|
||||
@property (nonatomic, copy) NSString *nameplatePic;
|
||||
///是否自定义铭牌,
|
||||
@property(nonatomic,assign) BOOL isCustomWord;
|
||||
///话题id
|
||||
@property (nonatomic, assign) long worldId;
|
||||
///话题名字
|
||||
|
@@ -255,14 +255,23 @@
|
||||
}
|
||||
|
||||
self.charmImageView.hidden = _monentsInfo.charmLevelPic.length <= 0;
|
||||
|
||||
if (_monentsInfo.nameplateWord.length>0 && _monentsInfo.nameplatePic.length>0) {
|
||||
self.nameplateImageView.imageUrl = _monentsInfo.nameplatePic;
|
||||
self.nameplateLabel.text = _monentsInfo.nameplateWord;
|
||||
self.namePlateView.hidden = NO;
|
||||
} else {
|
||||
self.namePlateView.hidden = YES;
|
||||
if(_monentsInfo.isCustomWord == YES){
|
||||
if (_monentsInfo.nameplateWord.length>0) {
|
||||
self.nameplateImageView.imageUrl = _monentsInfo.nameplatePic;
|
||||
self.namePlateView.hidden = NO;
|
||||
} else {
|
||||
self.namePlateView.hidden = YES;
|
||||
}
|
||||
}else{
|
||||
if (_monentsInfo.nameplateWord.length>0 && _monentsInfo.nameplatePic.length>0) {
|
||||
self.nameplateImageView.imageUrl = _monentsInfo.nameplatePic;
|
||||
self.nameplateLabel.text = _monentsInfo.nameplateWord;
|
||||
self.namePlateView.hidden = NO;
|
||||
} else {
|
||||
self.namePlateView.hidden = YES;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
NSString * headwearUrl= _monentsInfo.headwearEffect.length > 0 ? _monentsInfo.headwearEffect : _monentsInfo.headwearPic;
|
||||
|
@@ -324,9 +324,11 @@
|
||||
self.isEdited = NO;
|
||||
}
|
||||
NSArray * array;
|
||||
if (self.datasource.count < 9 && self.datasource.count > 1) {
|
||||
array = [self.datasource subarrayWithRange:NSMakeRange(0, self.datasource.count - 1)];
|
||||
}
|
||||
if([self.datasource containsObject:self.addPicImage] && self.datasource.count > 1){
|
||||
array = [self.datasource subarrayWithRange:NSMakeRange(0, self.datasource.count - 1)];
|
||||
}else if(![self.datasource containsObject:self.addPicImage] && self.datasource.count == 9){
|
||||
array = self.datasource;
|
||||
}
|
||||
self.uploadImageList = array;
|
||||
}
|
||||
|
||||
|
@@ -7,10 +7,12 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "YUMINNNN.h"
|
||||
#import "UserLevelVo.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface HomeSearchResultModel : PIBaseModel
|
||||
|
||||
@interface HomeSearchResultModel : PIBaseModel
|
||||
@property(nonatomic,strong) UserLevelVo *userLevelVo;
|
||||
///头像
|
||||
@property (nonatomic,copy) NSString *avatar;
|
||||
///在线人数
|
||||
|
@@ -24,8 +24,6 @@
|
||||
@property (nonatomic,strong) UIStackView *nameStackView;
|
||||
///昵称
|
||||
@property (nonatomic,strong) UILabel *nickLabel;
|
||||
///性别
|
||||
@property (nonatomic,strong) UIButton *sexImageView;
|
||||
///显示id
|
||||
@property (nonatomic,strong) UILabel *idLabel;
|
||||
///分割线
|
||||
@@ -36,6 +34,10 @@
|
||||
@property (nonatomic,strong) UIImageView *noteImageView;
|
||||
///数量
|
||||
@property (nonatomic,strong) UILabel *numberLabel;
|
||||
///等级
|
||||
@property (nonatomic,strong) NetImageView *experImageView;
|
||||
///魅力等级
|
||||
@property (nonatomic,strong) NetImageView *charmImageView;
|
||||
@end
|
||||
|
||||
@implementation XPSearchListTableViewCell
|
||||
@@ -51,12 +53,11 @@
|
||||
- (void)configData:(HomeSearchResultModel *)resultModel type:(SearchType)type {
|
||||
if (resultModel) {
|
||||
self.avatarImageView.imageUrl = resultModel.avatar;
|
||||
self.nickLabel.text = type == SearchType_Room ? resultModel.title : resultModel.nick;
|
||||
NSString *name = type == SearchType_Room ? resultModel.title : resultModel.nick;
|
||||
self.nickLabel.text = name.length > 8 ? [NSString stringWithFormat:@"%@...",[name substringToIndex:8]]:name;
|
||||
self.idLabel.text = [NSString stringWithFormat:YMLocalizedString(@"XPMineUserInfoTableViewCell3"),AppName, resultModel.erbanNo];
|
||||
[self.sexImageView setTitle:[NSString getAgeWithBirth:resultModel.birth] forState:UIControlStateNormal];
|
||||
self.sexImageView.backgroundColor = resultModel.gender == GenderType_Male ? UIColorFromRGB(0x6BB3FF) :UIColorFromRGB(0xFF80CC);
|
||||
self.sexImageView.titleEdgeInsets = resultModel.gender != GenderType_Male ? UIEdgeInsetsMake(0, 2, 0, 0):UIEdgeInsetsMake(0, -1, 0, 0);
|
||||
self.sexImageView.selected = resultModel.gender != GenderType_Male;
|
||||
self.charmImageView.imageUrl = resultModel.userLevelVo.charmUrl;
|
||||
self.experImageView.imageUrl = resultModel.userLevelVo.experUrl;
|
||||
if (type == SearchType_Users) {
|
||||
self.numberLabel.text = YMLocalizedString(@"XPSearchListTableViewCell1");
|
||||
self.numberView.hidden = resultModel.roomUid.length <= 0;
|
||||
@@ -76,11 +77,7 @@
|
||||
self.avatarImageView.imageUrl = resultModel.avatar;
|
||||
self.nickLabel.text = resultModel.title ;
|
||||
self.idLabel.text = [NSString stringWithFormat:YMLocalizedString(@"XPMineUserInfoTableViewCell3"),AppName, resultModel.erbanNo];
|
||||
|
||||
[self.sexImageView setTitle:[NSString getAgeWithBirth:resultModel.birth] forState:UIControlStateNormal];
|
||||
self.sexImageView.backgroundColor = resultModel.gender == GenderType_Male ? UIColorFromRGB(0x6BB3FF) :UIColorFromRGB(0xFF80CC);
|
||||
self.sexImageView.titleEdgeInsets = resultModel.gender != GenderType_Male ? UIEdgeInsetsMake(0, 2, 0, 0):UIEdgeInsetsMake(0, -1, 0, 0);
|
||||
self.sexImageView.selected = resultModel.gender != GenderType_Male;
|
||||
|
||||
if (resultModel.onlineNum > 100) {
|
||||
self.numberLabel.text = [NSString stringWithFormat:@"%ld", resultModel.onlineNum];
|
||||
} else {
|
||||
@@ -103,7 +100,8 @@
|
||||
[self.numberView addSubview:self.noteImageView];
|
||||
|
||||
[self.nameStackView addArrangedSubview:self.nickLabel];
|
||||
[self.nameStackView addArrangedSubview:self.sexImageView];
|
||||
[self.nameStackView addArrangedSubview:self.experImageView];
|
||||
[self.nameStackView addArrangedSubview:self.charmImageView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
@@ -119,10 +117,7 @@
|
||||
make.bottom.mas_equalTo(self.avatarImageView.mas_centerY).offset(-1.5);
|
||||
}];
|
||||
|
||||
[self.sexImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(28);
|
||||
make.height.mas_equalTo(14);
|
||||
}];
|
||||
|
||||
|
||||
[self.idLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.nameStackView);
|
||||
@@ -153,6 +148,17 @@
|
||||
make.size.mas_equalTo(CGSizeMake(10, 9));
|
||||
make.right.mas_equalTo(self.numberLabel.mas_left).offset(-3);
|
||||
}];
|
||||
|
||||
[self.experImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(36));
|
||||
make.height.mas_equalTo(kGetScaleWidth(18));
|
||||
|
||||
}];
|
||||
[self.charmImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(36));
|
||||
make.height.mas_equalTo(kGetScaleWidth(18));
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
@@ -190,19 +196,7 @@
|
||||
return _nickLabel;
|
||||
}
|
||||
|
||||
- (UIButton *)sexImageView {
|
||||
if (!_sexImageView) {
|
||||
_sexImageView = [[UIButton alloc] init];
|
||||
[_sexImageView setImage:kImage(@"home_age_boy_icon") forState:UIControlStateNormal];
|
||||
[_sexImageView setImage:kImage(@"home_age_girl_icon") forState:UIControlStateSelected];
|
||||
_sexImageView.titleLabel.font = [UIFont systemFontOfSize:10 weight:UIFontWeightMedium];
|
||||
[_sexImageView setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
_sexImageView.imageEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 0);
|
||||
_sexImageView.layer.cornerRadius = 14/2;
|
||||
_sexImageView.layer.masksToBounds = YES;
|
||||
}
|
||||
return _sexImageView;
|
||||
}
|
||||
|
||||
|
||||
- (UILabel *)idLabel {
|
||||
if (!_idLabel) {
|
||||
@@ -251,5 +245,22 @@
|
||||
}
|
||||
return _numberLabel;
|
||||
}
|
||||
- (NetImageView *)experImageView {
|
||||
if (!_experImageView) {
|
||||
NetImageConfig * config = [[NetImageConfig alloc]init];
|
||||
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
|
||||
_experImageView = [[NetImageView alloc] initWithConfig:config];
|
||||
}
|
||||
return _experImageView;
|
||||
}
|
||||
|
||||
- (NetImageView *)charmImageView {
|
||||
if (!_charmImageView) {
|
||||
NetImageConfig * config = [[NetImageConfig alloc]init];
|
||||
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
|
||||
_charmImageView = [[NetImageView alloc] initWithConfig:config];
|
||||
}
|
||||
return _charmImageView;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -53,6 +53,11 @@
|
||||
}];
|
||||
return code == 0;
|
||||
}
|
||||
/// 静音某个人
|
||||
/// @param userId 用户id
|
||||
- (BOOL)muteRemote:(BOOL)mute userId:(NSString *)userId {
|
||||
return [self.engine muteRemoteAudioStream:[userId integerValue] mute:mute];
|
||||
}
|
||||
|
||||
- (BOOL)muteRemote:(BOOL)mute {
|
||||
return [self.engine muteAllRemoteAudioStreams:mute] == 0;
|
||||
@@ -73,6 +78,20 @@
|
||||
}
|
||||
}];
|
||||
}
|
||||
///发起跨房通话
|
||||
- (void)connectOtherRoom:(NSString *)roomUid userId:(NSString *)uid {
|
||||
AgoraChannelMediaRelayConfiguration *config = [[AgoraChannelMediaRelayConfiguration alloc]init];
|
||||
config.sourceInfo = [[AgoraChannelMediaRelayInfo alloc]initWithToken:nil];
|
||||
AgoraChannelMediaRelayInfo *destinationInfo = [[AgoraChannelMediaRelayInfo alloc]initWithToken:nil];
|
||||
[config setDestinationInfo:destinationInfo forChannelName:roomUid];
|
||||
[self.engine startOrUpdateChannelMediaRelay:config];
|
||||
}
|
||||
|
||||
///退出跨房通话
|
||||
- (void)disconnectOtherRoom {
|
||||
[self.engine stopChannelMediaRelay];
|
||||
}
|
||||
|
||||
|
||||
- (void)destory {
|
||||
[AgoraRtcEngineKit destroy];
|
||||
@@ -131,6 +150,23 @@
|
||||
}
|
||||
|
||||
#pragma mark - AgoraRtcEngineDelegate
|
||||
///监听跨房语音
|
||||
- (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine
|
||||
channelMediaRelayStateDidChange:(AgoraChannelMediaRelayState)state
|
||||
error:(AgoraChannelMediaRelayError)error NS_SWIFT_NAME(rtcEngine(_:channelMediaRelayStateDidChange:error:)){
|
||||
switch (state) {
|
||||
case AgoraChannelMediaRelayStateRunning:
|
||||
|
||||
break;
|
||||
case AgoraChannelMediaRelayStateFailure:
|
||||
|
||||
break;
|
||||
case AgoraChannelMediaRelayStateIdle:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
- (void)rtcEngine:(AgoraRtcEngineKit *)engine reportAudioVolumeIndicationOfSpeakers:(NSArray *)speakers totalVolume:(NSInteger)totalVolume {
|
||||
NSMutableArray *uids = [NSMutableArray array];
|
||||
for (AgoraRtcAudioVolumeInfo *userInfo in speakers) {
|
||||
|
@@ -39,6 +39,14 @@
|
||||
|
||||
- (void)destory {
|
||||
|
||||
}
|
||||
///发起跨房PK
|
||||
- (void)connectOtherRoom:(NSString *)roomUid userId:(NSString *)uid{
|
||||
|
||||
}
|
||||
|
||||
///退出跨房通话
|
||||
- (void)disconnectOtherRoom{
|
||||
|
||||
}
|
||||
@end
|
||||
|
@@ -223,6 +223,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// @param completion 完成
|
||||
/// @param roomUid 房间id
|
||||
+(void)getUnlockRoomAlbumPhotoList:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid;
|
||||
///获取踢人列表
|
||||
/// @param completion 完成
|
||||
/// @param roomUid 房间id
|
||||
+(void)getKickUserList:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -127,7 +127,7 @@
|
||||
/// @param roomUserId 房主的uid
|
||||
/// @param roundId 相亲进行到哪一步
|
||||
+ (void)changeRoomDatingState:(HttpRequestHelperCompletion)completion roomUserId:(NSString *)roomUserId roundId:(NSString *)roundId {
|
||||
NSString * fang = [NSString stringFromBase64String:@"dXNlcnJvb20vaW5WMg=="];///
|
||||
NSString * fang = @"blind-date/state";///
|
||||
[self makeRequest:fang method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, roomUserId, roundId, nil];
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
/// @param completion 完成
|
||||
/// @param teamUid 房间uid
|
||||
+ (void)requestFansTeamTask:(HttpRequestHelperCompletion)completion teamUid:(NSString *)teamUid {
|
||||
NSString * fang = [NSString stringFromBase64String:@"Y3Jvc3Nyb29tcGtyb3VuZC9nZXRTaW5nbGVSb29tUGtSdWxl"];///crossroompkround/getSingleRoomPkRule
|
||||
NSString * fang = @"anchorFansTeam/getFansTaskInfo";
|
||||
[self makeRequest:fang method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, teamUid, nil];
|
||||
}
|
||||
|
||||
@@ -310,4 +310,11 @@
|
||||
+(void)getUnlockRoomAlbumPhotoList:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid{
|
||||
[self makeRequest:@"roomAlbum/listUnlockPhoto" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__,roomUid,nil];
|
||||
}
|
||||
|
||||
///获取踢人列表
|
||||
/// @param completion 完成
|
||||
/// @param roomUid 房间id
|
||||
+(void)getKickUserList:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid{
|
||||
[self makeRequest:@"room/kick/" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__,roomUid,nil];
|
||||
}
|
||||
@end
|
||||
|
@@ -26,11 +26,11 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// @param backPic 房间背景
|
||||
/// @param mgId 小游戏的id
|
||||
- (void)openRoom:(NSString *)title
|
||||
type:(RoomType)type
|
||||
roomPwd:(NSString *)roomPwd
|
||||
roomDesc:(NSString *)roomDesc
|
||||
backPic:(NSString *)backPic
|
||||
mgId:(NSString *)mgId;
|
||||
type:(RoomType)type
|
||||
roomPwd:(NSString *)roomPwd
|
||||
roomDesc:(NSString *)roomDesc
|
||||
backPic:(NSString *)backPic
|
||||
mgId:(NSString *)mgId;
|
||||
|
||||
///福袋礼物爆出的礼物的bug
|
||||
///进入房间的时候需要获取一次礼物信息 因为如果有人送礼物的话 如果是福袋礼物的话 爆出的礼物需要从礼物列表中获取 会导致公屏不显示那个礼物
|
||||
@@ -73,6 +73,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// 获取已解锁照片id列表
|
||||
/// @param roomUid 房间id
|
||||
-(void)getUnlockRoomAlbumPhotoListWithRoomUid:(NSString *)roomUid;
|
||||
///得到踢人名单
|
||||
/// @param roomUid 房间id
|
||||
-(void)getKickUserListWithRoomUid:(NSString *)roomUid;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -82,6 +82,7 @@
|
||||
extModel.carName = userInfo.carName;
|
||||
extModel.inRoomNameplatePic = userInfo.nameplatePic;
|
||||
extModel.inRoomNameplateWord = userInfo.nameplateWord;
|
||||
extModel.isCustomWord = userInfo.isCustomWord;
|
||||
extModel.charmUrl = userInfo.userLevelVo.charmUrl;
|
||||
extModel.experLevelSeq = userInfo.userLevelVo.experLevelSeq;
|
||||
extModel.experUrl = userInfo.userLevelVo.experUrl;
|
||||
@@ -297,4 +298,13 @@
|
||||
[[self getView]getUnlockRoomAlbumPhotoListSuccessWithList:data.data];
|
||||
} showLoading:NO errorToast:NO] roomUid:roomUid];
|
||||
}
|
||||
///得到踢人名单
|
||||
/// @param roomUid 房间id
|
||||
-(void)getKickUserListWithRoomUid:(NSString *)roomUid{
|
||||
|
||||
[Api getKickUserList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
[[self getView]getKickUserListSuccessWithList:data.data];
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
} showLoading:NO errorToast:NO] roomUid:roomUid];
|
||||
}
|
||||
@end
|
||||
|
@@ -39,6 +39,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
-(void)getFreeGiftDataSuccess:(XPFreeGiftModel *)freeModel;
|
||||
///获取已解锁照片id列表
|
||||
-(void)getUnlockRoomAlbumPhotoListSuccessWithList:(NSArray *)list;
|
||||
///获取踢人房间列表
|
||||
-(void)getKickUserListSuccessWithList:(NSArray *)list;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -18,7 +18,10 @@
|
||||
@"csRank" : [AcrossRoomPkRankModel class]
|
||||
};
|
||||
}
|
||||
|
||||
///如果一个模型中需要字段映射的话 比如id -> ID name -> other.name
|
||||
+ (NSDictionary *)replacedKeyFromPropertyName {
|
||||
return @{@"aMicStatus":@"amicStatus"};
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
|
@@ -820,7 +820,7 @@
|
||||
- (UIButton *)assistButton {
|
||||
if (!_assistButton) {
|
||||
_assistButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_assistButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor confirmButtonGradientStartColor], [DJDKMIMOMColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
|
||||
[_assistButton setBackgroundImage:kImage(@"room_across_pk_assist") forState:UIControlStateNormal];
|
||||
[_assistButton setTitle:YMLocalizedString(@"XPAcrpssRoomPKPanelView2") forState:UIControlStateNormal];
|
||||
_assistButton.titleLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
|
||||
[_assistButton setTitleColor:[DJDKMIMOMColor confirmButtonTextColor] forState:UIControlStateNormal];
|
||||
@@ -836,7 +836,7 @@
|
||||
- (UIButton *)onlookButton {
|
||||
if (!_onlookButton) {
|
||||
_onlookButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_onlookButton setBackgroundImage:[UIImage imageWithColor:[DJDKMIMOMColor disableButtonColor]] forState:UIControlStateNormal];
|
||||
[_onlookButton setBackgroundImage:kImage(@"room_across_pk_onlookers") forState:UIControlStateNormal];
|
||||
[_onlookButton setTitle:YMLocalizedString(@"XPAcrpssRoomPKPanelView3") forState:UIControlStateNormal];
|
||||
_onlookButton.titleLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
|
||||
[_onlookButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
|
@@ -61,13 +61,13 @@
|
||||
|
||||
[self.scrollView addSubview:self.ruleLabel];
|
||||
|
||||
[self.scrollView addSubview:self.randomImageView];
|
||||
[self.scrollView addSubview:self.randomLabel];
|
||||
[self.scrollView addSubview:self.randomContentLb];
|
||||
|
||||
[self.scrollView addSubview:self.inviteImageView];
|
||||
[self.scrollView addSubview:self.inviteLabel];
|
||||
[self.scrollView addSubview:self.inviteContentLb];
|
||||
// [self.scrollView addSubview:self.randomImageView];
|
||||
// [self.scrollView addSubview:self.randomLabel];
|
||||
// [self.scrollView addSubview:self.randomContentLb];
|
||||
//
|
||||
// [self.scrollView addSubview:self.inviteImageView];
|
||||
// [self.scrollView addSubview:self.inviteLabel];
|
||||
// [self.scrollView addSubview:self.inviteContentLb];
|
||||
|
||||
|
||||
}
|
||||
@@ -99,37 +99,37 @@
|
||||
make.left.right.mas_equalTo(self.backgroundImageView).inset(18);
|
||||
}];
|
||||
|
||||
[self.randomLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.ruleLabel.mas_bottom).offset(16);
|
||||
make.centerX.mas_equalTo(self.scrollView);
|
||||
}];
|
||||
|
||||
[self.randomImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(88, 8));
|
||||
make.top.mas_equalTo(self.randomLabel.mas_bottom).offset(-6);
|
||||
make.centerX.mas_equalTo(self.randomLabel);
|
||||
}];
|
||||
|
||||
[self.randomContentLb mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.backgroundImageView).inset(18);
|
||||
make.top.mas_equalTo(self.randomImageView.mas_bottom).offset(8);
|
||||
}];
|
||||
|
||||
[self.inviteLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.randomContentLb.mas_bottom).offset(16);
|
||||
make.centerX.mas_equalTo(self.scrollView);
|
||||
}];
|
||||
|
||||
[self.inviteImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(88, 8));
|
||||
make.top.mas_equalTo(self.inviteLabel.mas_bottom).offset(-6);
|
||||
make.centerX.mas_equalTo(self.inviteLabel);
|
||||
}];
|
||||
|
||||
[self.inviteContentLb mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.backgroundImageView).inset(18);
|
||||
make.top.mas_equalTo(self.inviteImageView.mas_bottom).offset(8);
|
||||
}];
|
||||
// [self.randomLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.top.mas_equalTo(self.ruleLabel.mas_bottom).offset(16);
|
||||
// make.centerX.mas_equalTo(self.scrollView);
|
||||
// }];
|
||||
//
|
||||
// [self.randomImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.size.mas_equalTo(CGSizeMake(88, 8));
|
||||
// make.top.mas_equalTo(self.randomLabel.mas_bottom).offset(-6);
|
||||
// make.centerX.mas_equalTo(self.randomLabel);
|
||||
// }];
|
||||
//
|
||||
// [self.randomContentLb mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.left.right.mas_equalTo(self.backgroundImageView).inset(18);
|
||||
// make.top.mas_equalTo(self.randomImageView.mas_bottom).offset(8);
|
||||
// }];
|
||||
//
|
||||
// [self.inviteLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.top.mas_equalTo(self.randomContentLb.mas_bottom).offset(16);
|
||||
// make.centerX.mas_equalTo(self.scrollView);
|
||||
// }];
|
||||
//
|
||||
// [self.inviteImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.size.mas_equalTo(CGSizeMake(88, 8));
|
||||
// make.top.mas_equalTo(self.inviteLabel.mas_bottom).offset(-6);
|
||||
// make.centerX.mas_equalTo(self.inviteLabel);
|
||||
// }];
|
||||
//
|
||||
// [self.inviteContentLb mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.left.right.mas_equalTo(self.backgroundImageView).inset(18);
|
||||
// make.top.mas_equalTo(self.inviteImageView.mas_bottom).offset(8);
|
||||
// }];
|
||||
|
||||
[self.closeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.top.mas_equalTo(self.backgroundImageView);
|
||||
@@ -264,6 +264,7 @@ CGSize size = [self.ruleLabel sizeThatFits:CGSizeMake(300 -36, CGFLOAT_MAX)];
|
||||
[attribute addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, title.length)];
|
||||
_inviteContentLb.attributedText = attribute;
|
||||
_inviteContentLb.numberOfLines = 0;
|
||||
|
||||
}
|
||||
return _inviteContentLb;
|
||||
}
|
||||
|
@@ -273,18 +273,24 @@
|
||||
self.nameLabel.text = self.model.anchorNick;
|
||||
self.countLabel.text = [NSString stringWithFormat:YMLocalizedString(@"XPAnchorFansTeamViewController0"), self.model.teamNum];
|
||||
|
||||
XPAnchorFansPrivilegeModel *nameplateModel = self.model.privilegeConfigVos[0];
|
||||
self.nameplateImageView.imageUrl = nameplateModel.icon;
|
||||
self.nameplateLabel.text = nameplateModel.name;
|
||||
self.nameplateDescLabel.text = nameplateModel.desc;
|
||||
XPAnchorFansPrivilegeModel *giftModel = self.model.privilegeConfigVos[1];
|
||||
self.giftImageView.imageUrl = giftModel.icon;
|
||||
self.giftLabel.text = giftModel.name;
|
||||
self.giftDescLabel.text = giftModel.desc;
|
||||
for (XPAnchorFansPrivilegeModel *obj in self.model.privilegeConfigVos) {
|
||||
if(obj.type == 1){
|
||||
XPAnchorFansPrivilegeModel *nameplateModel = obj;
|
||||
self.nameplateImageView.imageUrl = nameplateModel.icon;
|
||||
self.nameplateLabel.text = nameplateModel.name;
|
||||
self.nameplateDescLabel.text = nameplateModel.desc;
|
||||
}else if(obj.type == 2){
|
||||
XPAnchorFansPrivilegeModel *giftModel = obj;
|
||||
self.giftImageView.imageUrl = giftModel.icon;
|
||||
self.giftLabel.text = giftModel.name;
|
||||
self.giftDescLabel.text = giftModel.desc;
|
||||
}else if(obj.type == 3){
|
||||
XPAnchorFansPrivilegeModel *joinModel = obj;
|
||||
self.joinLabel.text = joinModel.name;
|
||||
self.iconImageView.imageUrl = joinModel.icon;
|
||||
}
|
||||
}
|
||||
|
||||
XPAnchorFansPrivilegeModel *joinModel = self.model.privilegeConfigVos[2];
|
||||
self.joinLabel.text = joinModel.name;
|
||||
self.iconImageView.imageUrl = joinModel.icon;
|
||||
|
||||
CGFloat margin = 8;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
@@ -323,7 +329,14 @@
|
||||
|
||||
- (void)joinButtonAction:(UIButton *)button {
|
||||
button.userInteractionEnabled = NO;
|
||||
XPAnchorFansPrivilegeModel *joinModel = self.model.privilegeConfigVos[2];
|
||||
XPAnchorFansPrivilegeModel *joinModel;
|
||||
for (XPAnchorFansPrivilegeModel *obj in self.model.privilegeConfigVos) {
|
||||
if(obj.type == 3){
|
||||
joinModel = obj;
|
||||
}
|
||||
}
|
||||
if(joinModel == nil)return;
|
||||
|
||||
[Api requestSendAnchorFansGift:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if (code == 200) {
|
||||
[self showSuccessToast:YMLocalizedString(@"XPAnchorFansTeamViewController1")];
|
||||
|
@@ -16,6 +16,7 @@ typedef enum : NSUInteger {
|
||||
GiftBannerType_Fairy,///夺宝精灵
|
||||
GiftBannerType_Tarrow,//塔罗
|
||||
GiftBannerType_Common_H5,//通用h5
|
||||
GiftBannerType_Magic_House,//魔法屋
|
||||
} GiftBannerType;
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@@ -25,6 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@property(nonatomic, copy)NSString *nick;
|
||||
@property(nonatomic, copy)NSString *giftName;
|
||||
@property(nonatomic, copy) NSString *giftNum;
|
||||
@property (nonatomic,copy) NSString *luckyBagName;
|
||||
@property (nonatomic,copy) NSString *roomTitle;
|
||||
@property (nonatomic,assign) NSInteger uid;
|
||||
@@ -41,6 +43,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,copy) NSString * bannerId;
|
||||
@property(nonatomic,copy) NSString *drawGoldNum;
|
||||
@property(nonatomic,copy) NSString *content;
|
||||
///福袋图片
|
||||
@property(nonatomic,copy) NSString *luckyBagGiftPic;
|
||||
///礼物图片
|
||||
@property(nonatomic,copy) NSString *giftPic;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -16,6 +16,7 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface PIRoomGiftBroadcastWindow : UIView
|
||||
@property(nonatomic,assign) BOOL isLuck;///是否是福袋
|
||||
@property(nonatomic,copy) NSString *roomName;
|
||||
@property(nonatomic,copy) NSString *roodUid;
|
||||
@property(nonatomic,weak) id<PIRoomGiftBroadcastWindowDelegate>delegate;
|
||||
|
@@ -96,6 +96,16 @@
|
||||
}
|
||||
-(void)selectAction:(UIButton *)sender{
|
||||
sender.selected = !sender.selected;
|
||||
|
||||
if(self.isLuck == YES){
|
||||
if(sender.selected == YES){
|
||||
[[NSUserDefaults standardUserDefaults]setValue:@(YES) forKey:@"kSaveLuckSelectState"];
|
||||
[[NSUserDefaults standardUserDefaults]synchronize];
|
||||
}else{
|
||||
[[NSUserDefaults standardUserDefaults]removeObjectForKey:@"kSaveLuckSelectState"];
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(sender.selected == YES){
|
||||
[[NSUserDefaults standardUserDefaults]setValue:@(YES) forKey:@"kSaveBrooadcastSelectState"];
|
||||
[[NSUserDefaults standardUserDefaults]synchronize];
|
||||
|
@@ -111,8 +111,7 @@
|
||||
@property (nonatomic,strong) NSMutableSet<NetImageView *> * giftVisibleArray;
|
||||
|
||||
|
||||
///魔法小屋合成礼物的队列
|
||||
@property (nonatomic,strong) NSMutableArray *compoundGiftQueue;
|
||||
|
||||
|
||||
///大礼物是否正在播放
|
||||
@property (nonatomic,assign) BOOL isLargeGiftAnimating;
|
||||
@@ -183,8 +182,7 @@
|
||||
self.delegate = delegate;
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
return self;
|
||||
@@ -1181,13 +1179,18 @@
|
||||
#pragma mark - 魔法小屋礼物合成
|
||||
- (void)receiveGiftCompound:(AttachmentModel *)attachment {
|
||||
if ([self isInSudGame]) {return;}
|
||||
if (self.compoundGiftQueue.count == 0) {
|
||||
[self createGiftCompoundBannerAnimation:attachment];
|
||||
PIBaseAnimationViewModel *magicModel =[PIBaseAnimationViewModel new];
|
||||
magicModel.data = attachment.data;
|
||||
magicModel.type = GiftBannerType_Magic_House;
|
||||
if(self.animationListB.count == 0 && self.isPlayOfB == NO){
|
||||
[self createGiftCompoundBannerAnimation:magicModel];
|
||||
}
|
||||
[self.compoundGiftQueue addObject:attachment];
|
||||
[self.animationListB addObject:magicModel];
|
||||
|
||||
}
|
||||
|
||||
- (void)createGiftCompoundBannerAnimation:(AttachmentModel *)attachment {
|
||||
- (void)createGiftCompoundBannerAnimation:(PIBaseAnimationViewModel *)attachment {
|
||||
self.isPlayOfB = YES;
|
||||
XPRoomGiftCompoundView *compoundGiftView = [[XPRoomGiftCompoundView alloc] initWithFrame:CGRectMake(KScreenWidth, kNavigationHeight + 15, KScreenWidth, 45)];
|
||||
compoundGiftView.compoundGiftInfo = attachment.data;
|
||||
[self.middleLevelView addSubview:compoundGiftView];
|
||||
@@ -1210,13 +1213,16 @@
|
||||
@kStrongify(self);
|
||||
if (finished) {
|
||||
[compoundGiftView removeFromSuperview];
|
||||
if (self.compoundGiftQueue.count > 0) {
|
||||
[self.compoundGiftQueue removeObjectAtIndex:0];
|
||||
}
|
||||
|
||||
if (self.compoundGiftQueue.count > 0) {
|
||||
[self createGiftCompoundBannerAnimation:self.compoundGiftQueue.firstObject];
|
||||
self.isPlayOfB = NO;
|
||||
if(self.animationListB.count > 0){
|
||||
[self.animationListB removeObjectAtIndex:0];
|
||||
}
|
||||
// if(self.isAnimationListAFinish == YES){
|
||||
// self.isAnimationListAFinish = NO;
|
||||
// [self playAnimationWithModel];
|
||||
// return;
|
||||
// }
|
||||
[self playAnimationWithModel];
|
||||
}
|
||||
}];
|
||||
[compoundGiftView pop_addAnimation:moveAnimation forKey:@"moveOutAnimation"];
|
||||
@@ -1619,7 +1625,7 @@
|
||||
|
||||
|
||||
self.isLuckyGiftAnimation = YES;
|
||||
XPRoomLuckyBigPrizeView * luckyGiftEffectView = [[XPRoomLuckyBigPrizeView alloc] initWithFrame:CGRectMake(KScreenWidth, top, 375, 60)];
|
||||
XPRoomLuckyBigPrizeView * luckyGiftEffectView = [[XPRoomLuckyBigPrizeView alloc] initWithFrame:CGRectMake(KScreenWidth, top, 375, 71)];
|
||||
luckyGiftEffectView.delegate = self;
|
||||
[self.highLevleView addSubview:luckyGiftEffectView];
|
||||
luckyGiftEffectView.giftInfo = prizeModel;
|
||||
@@ -1629,19 +1635,35 @@
|
||||
springAnimation.springBounciness = 10.f;
|
||||
springAnimation.fromValue = [NSValue valueWithCGPoint:luckyGiftEffectView.center];
|
||||
springAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(KScreenWidth / 2, luckyGiftEffectView.center.y)];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 6 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
|
||||
[luckyGiftEffectView removeFromSuperview];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 7 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
|
||||
POPBasicAnimation *moveAnimation = [POPBasicAnimation animationWithPropertyNamed:kPOPViewCenter];
|
||||
moveAnimation.fromValue = [NSValue valueWithCGPoint:CGPointMake(0, luckyGiftEffectView.center.y)];
|
||||
moveAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(-KScreenWidth/2, luckyGiftEffectView.center.y)];
|
||||
moveAnimation.beginTime = CACurrentMediaTime();
|
||||
moveAnimation.duration = 0.5;
|
||||
moveAnimation.repeatCount = 1;
|
||||
moveAnimation.removedOnCompletion = YES;
|
||||
@kWeakify(self);
|
||||
[moveAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) {
|
||||
@kStrongify(self);
|
||||
if (finished) {
|
||||
[luckyGiftEffectView removeFromSuperview];
|
||||
|
||||
if (self.animationListB.count > 0) {
|
||||
[self.animationListB removeObjectAtIndex:0];
|
||||
}
|
||||
self.isPlayOfB = NO;
|
||||
// if(self.isAnimationListAFinish == YES){
|
||||
// self.isAnimationListAFinish = NO;
|
||||
// [self playAnimationWithModel];
|
||||
// return;
|
||||
// }
|
||||
[self playAnimationWithModel];
|
||||
}
|
||||
}];
|
||||
[luckyGiftEffectView pop_addAnimation:moveAnimation forKey:@"moveOutAnimation"];
|
||||
|
||||
|
||||
if (self.animationListB.count > 0) {
|
||||
[self.animationListB removeObjectAtIndex:0];
|
||||
}
|
||||
self.isPlayOfB = NO;
|
||||
// if(self.isAnimationListAFinish == YES){
|
||||
// self.isAnimationListAFinish = NO;
|
||||
// [self playAnimationWithModel];
|
||||
// return;
|
||||
// }
|
||||
[self playAnimationWithModel];
|
||||
});
|
||||
[luckyGiftEffectView pop_addAnimation:springAnimation forKey:@"nobleLevelUpspingOutAnimation"];
|
||||
}
|
||||
@@ -1665,6 +1687,8 @@
|
||||
[self createTarotBannerAnimation:model];
|
||||
}else if(model.type == GiftBannerType_Common_H5){
|
||||
[self createCommonH5BannerAnimation:model];
|
||||
}else if(model.type == GiftBannerType_Magic_House){
|
||||
[self createGiftCompoundBannerAnimation:model];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1699,18 +1723,35 @@
|
||||
[self createTarotBannerAnimation:model];
|
||||
}else if(model.type == GiftBannerType_Common_H5){
|
||||
[self createCommonH5BannerAnimation:model];
|
||||
}else if(model.type == GiftBannerType_Magic_House){
|
||||
[self createGiftCompoundBannerAnimation:model];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - XPRoomLuckyBigPrizeViewDelegate
|
||||
- (void)xPRoomLuckyBigPrizeView:(XPRoomLuckyBigPrizeView *)view luckyGiftInfo:(PIBaseAnimationViewModel *)giftInfo {
|
||||
if (!giftInfo.isInRoomVisiable && giftInfo.roomUid.length > 0 && giftInfo.roomUid.integerValue != self.delegate.getRoomInfo.uid) {
|
||||
[self.delegate exitRoom];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[XPRoomViewController openRoom:giftInfo.roomUid viewController:[XCCurrentVCStackManager shareManager].getCurrentVC];
|
||||
});
|
||||
}
|
||||
id isShowBroadcastView = [[NSUserDefaults standardUserDefaults]valueForKey:@"kSaveLuckSelectState"];
|
||||
if(isShowBroadcastView == nil){
|
||||
PIRoomGiftBroadcastWindow *broadcastView = [[PIRoomGiftBroadcastWindow alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
|
||||
broadcastView.isLuck = YES;
|
||||
broadcastView.roodUid = giftInfo.roomUid;
|
||||
broadcastView.roomName = giftInfo.roomTitle;
|
||||
broadcastView.delegate = self;
|
||||
[kWindow addSubview:broadcastView];
|
||||
return;
|
||||
}
|
||||
if (!giftInfo.isInRoomVisiable && giftInfo.roomUid.length > 0 && giftInfo.roomUid.integerValue != self.delegate.getRoomInfo.uid) {
|
||||
[self.delegate exitRoom];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[XPRoomViewController openRoom:giftInfo.roomUid viewController:[XCCurrentVCStackManager shareManager].getCurrentVC];
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - 普通礼物
|
||||
@@ -2590,13 +2631,6 @@
|
||||
|
||||
|
||||
|
||||
- (NSMutableArray *)compoundGiftQueue {
|
||||
if (!_compoundGiftQueue) {
|
||||
_compoundGiftQueue = [NSMutableArray array];
|
||||
}
|
||||
return _compoundGiftQueue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (NSMutableArray<NSDictionary *> *)carEffectQueue {
|
||||
|
@@ -277,7 +277,8 @@
|
||||
[leftAttribut addAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:28], NSForegroundColorAttributeName:[UIColor whiteColor]} range:NSMakeRange(0, leftTitle.length)];
|
||||
[self.datingSvgaImageView setAttributedText:leftAttribut forKey:@"y_yhname"];
|
||||
@kWeakify(self);
|
||||
[self.parser parseWithURL:[NSURL URLWithString:model.svgaUrl] completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
|
||||
NSString *url = [model.svgaUrl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
|
||||
[self.parser parseWithURL:[NSURL URLWithString:url] completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
|
||||
@kStrongify(self);
|
||||
self.datingSvgaImageView.hidden = NO;
|
||||
self.datingSvgaImageView.videoItem = videoItem;
|
||||
|
@@ -22,7 +22,10 @@
|
||||
@interface XPRoomLuckyBigPrizeView ()<SVGAPlayerDelegate>
|
||||
///动画管理类
|
||||
@property (strong, nonatomic) SVGAParser *parser;
|
||||
@property (nonatomic, strong) XPSVGAPlayer *giftImageView;
|
||||
@property (nonatomic, strong) XPSVGAPlayer *giftSvgaView;
|
||||
@property(nonatomic,strong) NetImageView *chestImageView;
|
||||
@property(nonatomic,strong) NetImageView *giftImageView;
|
||||
@property(nonatomic,strong) UILabel *contentView;
|
||||
@end
|
||||
|
||||
@implementation XPRoomLuckyBigPrizeView
|
||||
@@ -38,15 +41,31 @@
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.giftImageView];
|
||||
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapRecognizer:)];
|
||||
[self addGestureRecognizer:tap];
|
||||
[self addSubview:self.giftSvgaView];
|
||||
[self addSubview:self.chestImageView];
|
||||
[self addSubview:self.giftImageView];
|
||||
[self addSubview:self.contentView];
|
||||
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.giftImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
[self.giftSvgaView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self);
|
||||
}];
|
||||
[self.chestImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(9);
|
||||
make.centerY.equalTo(self);
|
||||
make.height.width.mas_equalTo(60);
|
||||
}];
|
||||
[self.giftImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.mas_equalTo(-9);
|
||||
make.centerY.equalTo(self);
|
||||
make.height.width.mas_equalTo(60);
|
||||
}];
|
||||
[self.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.equalTo(self).inset(69);
|
||||
make.centerY.equalTo(self);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Event Response
|
||||
@@ -55,72 +74,71 @@
|
||||
[self.delegate xPRoomLuckyBigPrizeView:self luckyGiftInfo:self.giftInfo];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)chestImageViewTapRecognizer:(UITapGestureRecognizer *)tap{
|
||||
[self tapRecognizer:tap];
|
||||
}
|
||||
- (void)giftImageViewTapRecognizer:(UITapGestureRecognizer *)tap{
|
||||
[self tapRecognizer:tap];
|
||||
}
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setGiftInfo:(PIBaseAnimationViewModel*)giftInfo {
|
||||
_giftInfo = giftInfo;
|
||||
if (_giftInfo) {
|
||||
if (_giftInfo) {
|
||||
NSString * nick = _giftInfo.nick ?: @"";
|
||||
if (nick.length > 6) {
|
||||
nick = [nick substringToIndex:6];
|
||||
}
|
||||
NSString *goldPrice = _giftInfo.goldPrice ?: @"";
|
||||
if (nick.length > 5) {
|
||||
nick = [nick substringToIndex:5];
|
||||
}
|
||||
NSString *goldPrice = _giftInfo.goldPrice ?: @"0";
|
||||
NSString *giftName = _giftInfo.giftName ?: @"";
|
||||
NSString *luckyBagName = _giftInfo.luckyBagName ?: @"";
|
||||
CGFloat fontSize = 22;
|
||||
NSDictionary * dic = @{NSFontAttributeName:[UIFont systemFontOfSize:fontSize], NSForegroundColorAttributeName:[UIColor whiteColor]};
|
||||
NSDictionary * mainDic = @{NSFontAttributeName:[UIFont systemFontOfSize:fontSize], NSForegroundColorAttributeName:[DJDKMIMOMColor appMainColor]};
|
||||
NSString *giftNum = _giftInfo.giftNum ?: @"0";
|
||||
NSString *mainText = [NSString stringWithFormat:YMLocalizedString(@"XPRoomLuckyBigPrizeView0"),nick,luckyBagName,goldPrice,giftName];
|
||||
if([giftNum integerValue] > 1){
|
||||
mainText = [NSString stringWithFormat:@"%@ X%@",mainText,giftNum];
|
||||
}
|
||||
CGFloat fontSize = 12;
|
||||
NSDictionary * dic = @{NSFontAttributeName:[UIFont systemFontOfSize:fontSize weight:UIFontWeightMedium], NSForegroundColorAttributeName:UIColorFromRGB(0xFFF45E)};
|
||||
NSDictionary * mainDic = @{NSFontAttributeName:[UIFont systemFontOfSize:fontSize weight:UIFontWeightMedium], NSForegroundColorAttributeName:[UIColor whiteColor]};
|
||||
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] init];
|
||||
[attributedString appendAttributedString:[[NSMutableAttributedString alloc] initWithString:YMLocalizedString(@"XPGiftLuckyGiftBroadcastCell0") attributes:dic]];
|
||||
[attributedString appendAttributedString:[[NSMutableAttributedString alloc] initWithString:mainText attributes:mainDic]];
|
||||
|
||||
[attributedString appendAttributedString:[[NSMutableAttributedString alloc] initWithString:nick attributes:mainDic]];
|
||||
|
||||
|
||||
[attributedString appendAttributedString:[[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:YMLocalizedString(@"XPRoomLuckyBigPrizeView1"),luckyBagName] attributes:dic]];
|
||||
|
||||
[attributedString appendAttributedString:[[NSMutableAttributedString alloc] initWithString:goldPrice attributes:mainDic]];
|
||||
|
||||
[attributedString appendAttributedString:[[NSMutableAttributedString alloc] initWithString:giftName attributes:mainDic]];
|
||||
NSMutableParagraphStyle *paragraphStyle = [NSMutableParagraphStyle new];
|
||||
paragraphStyle.lineBreakMode = NSLineBreakByCharWrapping;
|
||||
paragraphStyle.alignment = NSTextAlignmentLeft;
|
||||
paragraphStyle.lineSpacing = 4.0f;//行间距
|
||||
// 强制排版(从左到右)
|
||||
paragraphStyle.alignment = NSTextAlignmentLeft;
|
||||
paragraphStyle.baseWritingDirection = NSWritingDirectionLeftToRight;
|
||||
[attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, attributedString.length)];
|
||||
if (_giftInfo.isInRoomVisiable) {
|
||||
[self.giftImageView setHidden:YES forKey:@"img_206"];
|
||||
} else {
|
||||
[self.giftImageView setHidden:NO forKey:@"img_206"];
|
||||
}
|
||||
[attributedString addAttributes:dic range:[mainText rangeOfString:nick]];
|
||||
[attributedString addAttributes:dic range:[mainText rangeOfString:luckyBagName]];
|
||||
[attributedString addAttributes:dic range:[mainText rangeOfString:goldPrice]];
|
||||
[attributedString addAttributes:dic range:[mainText rangeOfString:giftName]];
|
||||
if([giftNum integerValue] > 1){
|
||||
[attributedString addAttributes:dic range:[mainText rangeOfString:giftNum]];
|
||||
}
|
||||
_contentView.attributedText = attributedString;
|
||||
_chestImageView.imageUrl = _giftInfo.luckyBagGiftPic;
|
||||
_giftImageView.imageUrl = _giftInfo.giftPic;
|
||||
@kWeakify(self);
|
||||
[self.giftImageView setAttributedText:attributedString forKey:@"fdpp_copywriting"];
|
||||
NSString * anatomiser1Name = [NSString stringWithFormat:@"%@/lucky_gift_streamer.svga", API_Image_URL];
|
||||
[self.parser parseWithURL:[NSURL URLWithString:anatomiser1Name] completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
|
||||
@kStrongify(self);
|
||||
self.hidden = NO;
|
||||
self.giftImageView.hidden = NO;
|
||||
self.giftImageView.videoItem = videoItem;
|
||||
self.giftImageView.loops = 1;
|
||||
self.giftImageView.clearsAfterStop = YES;
|
||||
[self.giftImageView startAnimation];
|
||||
} failureBlock:^(NSError * _Nonnull error) {
|
||||
|
||||
}];
|
||||
|
||||
[self.parser parseWithNamed:@"pi_room_lucky_gift" inBundle:nil completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
|
||||
@kStrongify(self);
|
||||
self.hidden = NO;
|
||||
self.giftSvgaView.hidden = NO;
|
||||
self.giftSvgaView.videoItem = videoItem;
|
||||
self.giftSvgaView.loops = 10000;
|
||||
self.giftSvgaView.clearsAfterStop = YES;
|
||||
[self.giftSvgaView startAnimation];
|
||||
} failureBlock:^(NSError * _Nullable error) {
|
||||
}];
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
- (void)svgaPlayerDidFinishedAnimation:(SVGAPlayer *)player{
|
||||
NSLog(@"11111");
|
||||
}
|
||||
- (XPSVGAPlayer *)giftImageView {
|
||||
if (!_giftImageView) {
|
||||
_giftImageView = [[XPSVGAPlayer alloc]init];
|
||||
_giftImageView.backgroundColor = [UIColor clearColor];
|
||||
_giftImageView.userInteractionEnabled = NO;
|
||||
_giftImageView.delegate = self;
|
||||
- (XPSVGAPlayer *)giftSvgaView {
|
||||
if (!_giftSvgaView) {
|
||||
_giftSvgaView = [[XPSVGAPlayer alloc]init];
|
||||
_giftSvgaView.backgroundColor = [UIColor clearColor];
|
||||
_giftSvgaView.userInteractionEnabled = NO;
|
||||
_giftSvgaView.delegate = self;
|
||||
}
|
||||
return _giftImageView;
|
||||
return _giftSvgaView;
|
||||
}
|
||||
|
||||
- (SVGAParser *)parser {
|
||||
@@ -129,4 +147,30 @@
|
||||
}
|
||||
return _parser;
|
||||
}
|
||||
- (NetImageView *)chestImageView{
|
||||
if(!_chestImageView){
|
||||
_chestImageView = [NetImageView new];
|
||||
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(chestImageViewTapRecognizer:)];
|
||||
_chestImageView.userInteractionEnabled = YES;
|
||||
[_chestImageView addGestureRecognizer:tap];
|
||||
}
|
||||
return _chestImageView;
|
||||
}
|
||||
- (NetImageView *)giftImageView{
|
||||
if(!_giftImageView){
|
||||
_giftImageView = [NetImageView new];
|
||||
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(giftImageViewTapRecognizer:)];
|
||||
_giftImageView.userInteractionEnabled = YES;
|
||||
[_giftImageView addGestureRecognizer:tap];
|
||||
}
|
||||
return _giftImageView;
|
||||
}
|
||||
- (UILabel *)contentView{
|
||||
if(!_contentView){
|
||||
_contentView = [UILabel labelInitWithText:@"" font:kFontMedium(10) textColor:[UIColor whiteColor]];
|
||||
_contentView.textAlignment = NSTextAlignmentCenter;
|
||||
_contentView.numberOfLines = 2;
|
||||
}
|
||||
return _contentView;
|
||||
}
|
||||
@end
|
||||
|
@@ -28,7 +28,7 @@
|
||||
[[self getView] getRoomArrangeMicListSuccess:model state:state];
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
[[self getView] getRoomArrangeMicListFail:msg state:state];
|
||||
} showLoading:YES] roomUid:roomUid operUid:uid page:pageStr pageSize:pageSizeStr];
|
||||
} showLoading:NO] roomUid:roomUid operUid:uid page:pageStr pageSize:pageSizeStr];
|
||||
}
|
||||
|
||||
/// 申请排麦
|
||||
@@ -67,7 +67,7 @@
|
||||
[[self getView] getRoomPKMemberListSuccess:model state:state];
|
||||
}fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
[[self getView] getRoomPKMemberListFail:msg state:state];
|
||||
} showLoading:YES] roomUid:roomUid operUid:uid page:pageStr pageSize:pageSizeStr];
|
||||
} showLoading:NO] roomUid:roomUid operUid:uid page:pageStr pageSize:pageSizeStr];
|
||||
}
|
||||
|
||||
/// 申请房间内PK排麦
|
||||
|
@@ -501,6 +501,7 @@
|
||||
}
|
||||
|
||||
- (void)getRoomPKMemberListSuccess:(ArrangeMicModel *)listModel state:(int)state {
|
||||
|
||||
self.arrangeMicInfo = listModel;
|
||||
if (state == 0) {
|
||||
[self.datasource removeAllObjects];
|
||||
|
@@ -108,7 +108,7 @@
|
||||
self.svgDisplayView.hidden = NO;
|
||||
@weakify(self);
|
||||
NSString * bgString = [NSString stringWithFormat:@"%@/anchor_room_bg.svga", API_Image_URL];
|
||||
NSURL *bgUrl = [NSURL fileURLWithPath:bgString];
|
||||
NSURL *bgUrl = [NSURL URLWithString:bgString];
|
||||
[self.parserManager loadSvgaWithURL:bgUrl completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
|
||||
@strongify(self);
|
||||
if (videoItem != nil) {
|
||||
|
@@ -997,30 +997,10 @@
|
||||
if (currentUserModel) {
|
||||
if (!self.musicEnterButton.superview) {
|
||||
[self addSubview:self.musicEnterButton];
|
||||
CGFloat topOffY = self.delegate.getRoomInfo.type == RoomType_Anchor || self.delegate.getRoomInfo.isPermitRoom == PermitRoomType_Licnese ? (kNavigationHeight+ 4 + 22 + 18) : (kNavigationHeight+ 4);
|
||||
if (self.delegate.getRoomInfo.roomModeType == RoomModeType_Open_Blind) {//相亲厅播放音乐
|
||||
[self.musicEnterButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(16);
|
||||
make.centerY.mas_equalTo(self.contributeEnterView);
|
||||
make.width.mas_equalTo(22);
|
||||
make.height.mas_equalTo(22);
|
||||
}];
|
||||
[self setViewConstraints];
|
||||
} else {
|
||||
if (self.hourRankEntranceView.superview) {
|
||||
[self.musicEnterButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.hourRankEntranceView.mas_right).mas_offset(4);
|
||||
make.centerY.mas_equalTo(self.contributeEnterView);
|
||||
make.width.mas_equalTo(22);
|
||||
make.height.mas_equalTo(22);
|
||||
}];
|
||||
} else {
|
||||
[self.musicEnterButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(16);
|
||||
make.centerY.mas_equalTo(self.contributeEnterView);
|
||||
make.width.mas_equalTo(22);
|
||||
make.height.mas_equalTo(22);
|
||||
}];
|
||||
}
|
||||
[self setViewConstraints];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -1689,36 +1669,32 @@
|
||||
if (currentUserModel) {
|
||||
if (!self.musicEnterButton.superview) {
|
||||
[self addSubview:self.musicEnterButton];
|
||||
CGFloat topOffY = (self.delegate.getRoomInfo.type == RoomType_Anchor || self.delegate.getRoomInfo.isPermitRoom == PermitRoomType_Licnese) ? (kNavigationHeight+ 4 + 22 + 18) : (kNavigationHeight+ 4);
|
||||
if (self.delegate.getRoomInfo.roomModeType == RoomModeType_Open_Blind) {//相亲厅播放音乐
|
||||
[self.musicEnterButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(16);
|
||||
make.centerY.mas_equalTo(self.contributeEnterView);
|
||||
make.width.mas_equalTo(22);
|
||||
make.height.mas_equalTo(22);
|
||||
}];
|
||||
[self setViewConstraints];
|
||||
} else {
|
||||
if (self.hourRankEntranceView.superview) {
|
||||
[self.musicEnterButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.hourRankEntranceView.mas_right).mas_offset(4);
|
||||
make.centerY.mas_equalTo(self.contributeEnterView);
|
||||
make.width.mas_equalTo(22);
|
||||
make.height.mas_equalTo(22);
|
||||
}];
|
||||
} else {
|
||||
[self.musicEnterButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(16);
|
||||
make.centerY.mas_equalTo(self.contributeEnterView);
|
||||
make.width.mas_equalTo(22);
|
||||
make.height.mas_equalTo(22);
|
||||
}];
|
||||
}
|
||||
[self setViewConstraints];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-(void)setViewConstraints{
|
||||
if (self.hourRankEntranceView.superview) {
|
||||
[self.musicEnterButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.hourRankEntranceView.mas_right).mas_offset(4);
|
||||
make.centerY.mas_equalTo(self.contributeEnterView);
|
||||
make.width.mas_equalTo(22);
|
||||
make.height.mas_equalTo(22);
|
||||
}];
|
||||
} else {
|
||||
[self.musicEnterButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(16);
|
||||
make.centerY.mas_equalTo(self.contributeEnterView);
|
||||
make.width.mas_equalTo(22);
|
||||
make.height.mas_equalTo(22);
|
||||
}];
|
||||
}
|
||||
}
|
||||
///跨房PK预约倒计时
|
||||
- (void)showAcrossPkCountDownViewWithTime:(long long)time {
|
||||
if (self.acrossPKCountView.superview) {
|
||||
|
@@ -69,6 +69,8 @@ UIKIT_EXTERN NSString * const kRoomReceivedCandyNotificationKey;
|
||||
@property(nonatomic,strong) UIButton *tenthLoveBtn;
|
||||
///寻爱百次
|
||||
@property(nonatomic,strong) UIButton *hundredthLoveBtn;
|
||||
///寻爱两百次
|
||||
@property(nonatomic,strong) UIButton *twoHundredhLoveBtn;
|
||||
///动画的容器
|
||||
@property (nonatomic,strong) UIView * animationView;
|
||||
|
||||
@@ -324,6 +326,7 @@ UIKIT_EXTERN NSString * const kRoomReceivedCandyNotificationKey;
|
||||
[self.bgImageView addSubview:self.fristLoveBtn];
|
||||
[self.bgImageView addSubview:self.tenthLoveBtn];
|
||||
[self.bgImageView addSubview:self.hundredthLoveBtn];
|
||||
[self.bgImageView addSubview:self.twoHundredhLoveBtn];
|
||||
[self.bgImageView addSubview:self.candyTreeLightView];
|
||||
[self.bgImageView addSubview:self.candyTreeOpenView];
|
||||
[self.bgImageView addSubview:self.candyTreeTransView];
|
||||
@@ -388,25 +391,30 @@ UIKIT_EXTERN NSString * const kRoomReceivedCandyNotificationKey;
|
||||
}];
|
||||
|
||||
[self.fristLoveBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.equalTo(self.candyTreeView.mas_bottom).mas_offset(-kGetScaleWidth(7));
|
||||
make.leading.mas_equalTo(kGetScaleWidth(15));
|
||||
make.width.mas_equalTo(kGetScaleWidth(94));
|
||||
make.height.mas_equalTo(kGetScaleWidth(55));
|
||||
make.bottom.equalTo(self.candyTreeView.mas_bottom).mas_offset(-kGetScaleWidth(8));
|
||||
make.leading.mas_equalTo(kGetScaleWidth(14));
|
||||
make.width.mas_equalTo(kGetScaleWidth(72));
|
||||
make.height.mas_equalTo(kGetScaleWidth(53));
|
||||
}];
|
||||
[self.tenthLoveBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.equalTo(self.candyTreeView.mas_bottom).mas_offset(-kGetScaleWidth(7));
|
||||
make.leading.mas_equalTo(kGetScaleWidth(109));
|
||||
make.width.mas_equalTo(kGetScaleWidth(94));
|
||||
make.height.mas_equalTo(kGetScaleWidth(55));
|
||||
make.bottom.equalTo(self.candyTreeView.mas_bottom).mas_offset(-kGetScaleWidth(8));
|
||||
make.leading.mas_equalTo(kGetScaleWidth(84));
|
||||
make.width.mas_equalTo(kGetScaleWidth(72));
|
||||
make.height.mas_equalTo(kGetScaleWidth(53));
|
||||
}];
|
||||
[self.hundredthLoveBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.equalTo(self.candyTreeView.mas_bottom).mas_offset(-kGetScaleWidth(7));
|
||||
make.leading.mas_equalTo(kGetScaleWidth(201));
|
||||
make.width.mas_equalTo(kGetScaleWidth(94));
|
||||
make.height.mas_equalTo(kGetScaleWidth(55));
|
||||
make.bottom.equalTo(self.candyTreeView.mas_bottom).mas_offset(-kGetScaleWidth(8));
|
||||
make.leading.mas_equalTo(kGetScaleWidth(154));
|
||||
make.width.mas_equalTo(kGetScaleWidth(72));
|
||||
make.height.mas_equalTo(kGetScaleWidth(53));
|
||||
}];
|
||||
|
||||
|
||||
[self.twoHundredhLoveBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.equalTo(self.candyTreeView.mas_bottom).mas_offset(-kGetScaleWidth(8));
|
||||
make.leading.mas_equalTo(kGetScaleWidth(224));
|
||||
make.width.mas_equalTo(kGetScaleWidth(72));
|
||||
make.height.mas_equalTo(kGetScaleWidth(53));
|
||||
}];
|
||||
CGFloat kscale = (CGFloat)350 / (CGFloat)755;
|
||||
[self.candyTreeTransView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.candyTreeView);
|
||||
@@ -531,8 +539,10 @@ UIKIT_EXTERN NSString * const kRoomReceivedCandyNotificationKey;
|
||||
num = 1;
|
||||
}else if(sender == self.tenthLoveBtn){
|
||||
num = 10;
|
||||
}else{
|
||||
}else if(sender == self.hundredthLoveBtn){
|
||||
num = 100;
|
||||
}else{
|
||||
num = 200;
|
||||
}
|
||||
if(self.setModel.ticketNum.integerValue >= num){
|
||||
[self pickButtonActionWithNum:num];
|
||||
@@ -679,6 +689,15 @@ UIKIT_EXTERN NSString * const kRoomReceivedCandyNotificationKey;
|
||||
}
|
||||
return _hundredthLoveBtn;
|
||||
}
|
||||
- (UIButton *)twoHundredhLoveBtn{
|
||||
if(!_twoHundredhLoveBtn){
|
||||
_twoHundredhLoveBtn = [UIButton new];
|
||||
_twoHundredhLoveBtn.yn_acceptEventInterval = 1;
|
||||
[_twoHundredhLoveBtn setBackgroundImage:kImage(@"room_candy_two_hundredth_tap_bg") forState:UIControlStateNormal];
|
||||
[_twoHundredhLoveBtn addTarget:self action:@selector(fineLoveAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _twoHundredhLoveBtn;
|
||||
}
|
||||
- (XPCandyTreeBuyView *)buyView{
|
||||
if(!_buyView){
|
||||
_buyView = [[XPCandyTreeBuyView alloc]initWithFrame:CGRectZero];
|
||||
|
@@ -594,6 +594,7 @@
|
||||
|
||||
/// 命中 关键词状态 (你画我猜)
|
||||
- (void)notifyChangeTextHitState:(NSString *)keyWord {
|
||||
if([keyWord isKindOfClass:[NSNull class]])return;
|
||||
if (keyWord.length && [keyWord containsString:self.DrawSomethingKeyWord]) {
|
||||
NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:@(true), @"isHit", self.DrawSomethingKeyWord, @"keyWord", self.DrawSomethingKeyWord, @"text", nil];
|
||||
[self notifyStateChange:APP_COMMON_SELF_TEXT_HIT dataJson:[SudCommon dictionaryToJson:dic]];
|
||||
|
@@ -68,6 +68,7 @@
|
||||
extModel.carName = userInfo.carName;
|
||||
extModel.inRoomNameplatePic = userInfo.nameplatePic;
|
||||
extModel.inRoomNameplateWord = userInfo.nameplateWord;
|
||||
extModel.isCustomWord = userInfo.isCustomWord;
|
||||
extModel.charmUrl = userInfo.userLevelVo.charmUrl;
|
||||
extModel.experLevelSeq = userInfo.userLevelVo.experLevelSeq;
|
||||
extModel.experUrl = userInfo.userLevelVo.experUrl;
|
||||
|
@@ -8,10 +8,13 @@
|
||||
#import "NSObject+MJExtension.h"
|
||||
#import "UserLevelVo.h"
|
||||
#import "YUMINNNN.h"
|
||||
#import "UserVipInfoVo.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMessageRemoteExtModel : PIBaseModel
|
||||
|
||||
@property (nonatomic , strong) UserLevelVo * userLevelVo;
|
||||
///贵族信息
|
||||
@property (nonatomic, strong) UserVipInfoVo *userVipInfoVO;
|
||||
///魅力等级
|
||||
@property (nonatomic,copy) NSString *charmUrl;
|
||||
@property (nonatomic,assign) NSInteger erbanNo;
|
||||
@@ -33,6 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,copy) NSString *fromNick;
|
||||
@property (nonatomic,assign) UserEnterRoomFromType fromType;
|
||||
@property (nonatomic,copy) NSString *fromUid;
|
||||
@property(nonatomic,copy) NSString *uid;
|
||||
///名牌的
|
||||
@property (nonatomic,copy) NSString *inRoomNameplatePic;
|
||||
///铭牌的字
|
||||
@@ -55,6 +59,15 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,assign) BOOL fromSayHelloChannel;
|
||||
/// 0 普通 1超管
|
||||
@property (nonatomic,assign) NSInteger platformRole;
|
||||
@property(nonatomic,copy) NSString *avatar;
|
||||
@property(nonatomic,copy) NSString *nick;
|
||||
@property(nonatomic,assign) BOOL inMic;
|
||||
@property(nonatomic,copy) NSString *memberType;
|
||||
///铭牌,
|
||||
@property(nonatomic,copy) NSString *nameplatePic;
|
||||
@property(nonatomic,copy) NSString *nameplateWord;
|
||||
///是否自定义铭牌,
|
||||
@property(nonatomic,assign) BOOL isCustomWord;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -210,14 +210,22 @@
|
||||
[attribute appendAttributedString:[self createUrlImageAttribute:model.experUrl]];
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
}
|
||||
|
||||
if (model.inRoomNameplatePic.length > 0 && model.inRoomNameplateWord.length > 0) { //铭牌有图片加文字
|
||||
[attribute appendAttributedString:[self createNameplateAttibute:model.inRoomNameplateWord image:model.inRoomNameplatePic textFont:[UIFont systemFontOfSize:9]]];
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
} else if (model.inRoomNameplatePic.length > 0) {//铭牌只有图片
|
||||
[attribute appendAttributedString:[self createUrlImageAttribute:model.inRoomNameplatePic]];
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
}
|
||||
if(model.isCustomWord == YES){
|
||||
if (model.inRoomNameplatePic.length > 0){
|
||||
[attribute appendAttributedString:[self createUrlImageAttribute:model.inRoomNameplatePic]];
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
}
|
||||
|
||||
}else{
|
||||
if (model.inRoomNameplatePic.length > 0 && model.inRoomNameplateWord.length > 0) { //铭牌有图片加文字
|
||||
[attribute appendAttributedString:[self createNameplateAttibute:model.inRoomNameplateWord image:model.inRoomNameplatePic textFont:[UIFont systemFontOfSize:9]]];
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
} else if (model.inRoomNameplatePic.length > 0) {//铭牌只有图片
|
||||
[attribute appendAttributedString:[self createUrlImageAttribute:model.inRoomNameplatePic]];
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[attribute appendAttributedString:[self createTextAttribute:nick color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
@@ -303,10 +311,18 @@
|
||||
[attribute appendAttributedString:[self createUrlImageAttribute:extModel.experUrl]];
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
}
|
||||
if (extModel.inRoomNameplatePic.length > 0 && extModel.inRoomNameplateWord.length > 0) {
|
||||
[attribute appendAttributedString:[self createNameplateAttibute:extModel.inRoomNameplateWord image:extModel.inRoomNameplatePic textFont:[UIFont systemFontOfSize:9]]];
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
}
|
||||
if(extModel.isCustomWord == YES){
|
||||
if (extModel.inRoomNameplatePic.length > 0) {
|
||||
[attribute appendAttributedString:[self createUrlImageAttribute:extModel.inRoomNameplatePic]];
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
}
|
||||
}else{
|
||||
if (extModel.inRoomNameplatePic.length > 0 && extModel.inRoomNameplateWord.length > 0) {
|
||||
[attribute appendAttributedString:[self createNameplateAttibute:extModel.inRoomNameplateWord image:extModel.inRoomNameplatePic textFont:[UIFont systemFontOfSize:9]]];
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
}
|
||||
}
|
||||
|
||||
[attribute appendAttributedString:[self createNickAtrribute:nick uid:message.from.integerValue]];
|
||||
if (extModel.carName.length > 0) {
|
||||
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser1") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
@@ -780,7 +796,7 @@
|
||||
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser62") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
NSString * targetNick = datingModel.targetNickname ? datingModel.targetNickname : @"";
|
||||
[attribute appendAttributedString:[self createNickAtrribute:targetNick uid:datingModel.targetUid]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser63") color:UIColorFromRGB(0xF84C95) font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser63") color:[UIColor whiteColor] font:kRoomMessageDefalutFont]];
|
||||
} else if (attachment.second == Custom_Message_Sub_Room_Play_Dating_Result_Not_Mutual) {///不是互选
|
||||
DatingInfoModel * datingModel = [DatingInfoModel modelWithDictionary:attachment.data];
|
||||
NSString * nick = datingModel.nickname ? datingModel.nickname : @"";
|
||||
|