Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a79bf667cc | ||
![]() |
bc02ca29fc | ||
![]() |
93c3304601 | ||
![]() |
d9e8d6639b | ||
![]() |
893c1ab647 | ||
![]() |
ed25b30a35 | ||
![]() |
54cc9ebde3 | ||
![]() |
81a0094dbf | ||
![]() |
4abb686790 | ||
![]() |
2c5d72846d | ||
![]() |
ab544a2d84 |
@@ -497,6 +497,9 @@
|
||||
23FF42792AA6E19C0055733C /* HomeMenuSourceModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 23FF42782AA6E19C0055733C /* HomeMenuSourceModel.m */; };
|
||||
23FF428E2AAB2D3A0055733C /* XPCandyTreeBuyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23FF428D2AAB2D3A0055733C /* XPCandyTreeBuyView.m */; };
|
||||
4C1892992CF84349004D4426 /* RoomCahtCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C1892982CF84349004D4426 /* RoomCahtCell.m */; };
|
||||
4C44BD5D2D151B5C00F321FA /* RoomSideMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C44BD5C2D151B5C00F321FA /* RoomSideMenu.m */; };
|
||||
4C5527BC2D1BDCDE00833FFD /* RoomLevelInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C5527BB2D1BDCDE00833FFD /* RoomLevelInfoModel.m */; };
|
||||
4C5527BF2D1C099500833FFD /* RoomResourceManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C5527BE2D1C099500833FFD /* RoomResourceManager.m */; };
|
||||
4C5C37232D0C1C7900BA9AB8 /* RegionListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C5C37222D0C1C7900BA9AB8 /* RegionListViewController.m */; };
|
||||
4C6C92C02D1172D9000A4693 /* RegionListInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C6C92BF2D1172D9000A4693 /* RegionListInfo.m */; };
|
||||
4C6E1F752CEAEC3C0073D0A3 /* ShoppingMallTagView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C6E1F742CEAEC3C0073D0A3 /* ShoppingMallTagView.m */; };
|
||||
@@ -504,9 +507,13 @@
|
||||
4C6E1F7C2CEB25B10073D0A3 /* ShoppingMallItemPreview.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C6E1F7B2CEB25B10073D0A3 /* ShoppingMallItemPreview.m */; };
|
||||
4C71C69F2D069D2B00ECCA24 /* GiftAnimationHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C71C69E2D069D2B00ECCA24 /* GiftAnimationHelper.m */; };
|
||||
4C71C6A22D06DB3D00ECCA24 /* GiftAnimationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C71C6A12D06DB3D00ECCA24 /* GiftAnimationManager.m */; };
|
||||
4C7989EC2D19392E006AE07B /* EmptyDataView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C7989EB2D19392E006AE07B /* EmptyDataView.m */; };
|
||||
4C7989EF2D195277006AE07B /* RoomModeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C7989EE2D195277006AE07B /* RoomModeViewController.m */; };
|
||||
4C7989F32D1952DA006AE07B /* RoomModePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C7989F22D1952DA006AE07B /* RoomModePresenter.m */; };
|
||||
4C815A172CFEB758002A46A6 /* SuperBlockViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C815A162CFEB758002A46A6 /* SuperBlockViewController.m */; };
|
||||
4CC6195A2CEC7770008C1EE8 /* MyDressingDataPresent.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC619592CEC7770008C1EE8 /* MyDressingDataPresent.m */; };
|
||||
4CC6195D2CEC996E008C1EE8 /* MyDressingDataModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC6195C2CEC996E008C1EE8 /* MyDressingDataModel.m */; };
|
||||
4CE3A9462D22754C003F0796 /* RechargeUserModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE3A9452D22754C003F0796 /* RechargeUserModel.m */; };
|
||||
4CEB9EA72D09643E00443480 /* UserRoomCardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CEB9EA62D09643E00443480 /* UserRoomCardViewController.m */; };
|
||||
4CEB9EAA2D097E8400443480 /* MoliAvatar.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CEB9EA92D097E8400443480 /* MoliAvatar.m */; };
|
||||
4CEB9EAD2D09AA0400443480 /* SexAgeLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CEB9EAC2D09AA0400443480 /* SexAgeLabel.m */; };
|
||||
@@ -2591,6 +2598,12 @@
|
||||
23FF428D2AAB2D3A0055733C /* XPCandyTreeBuyView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPCandyTreeBuyView.m; sourceTree = "<group>"; };
|
||||
4C1892972CF84349004D4426 /* RoomCahtCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomCahtCell.h; sourceTree = "<group>"; };
|
||||
4C1892982CF84349004D4426 /* RoomCahtCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomCahtCell.m; sourceTree = "<group>"; };
|
||||
4C44BD5B2D151B5C00F321FA /* RoomSideMenu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomSideMenu.h; sourceTree = "<group>"; };
|
||||
4C44BD5C2D151B5C00F321FA /* RoomSideMenu.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomSideMenu.m; sourceTree = "<group>"; };
|
||||
4C5527BA2D1BDCDE00833FFD /* RoomLevelInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomLevelInfoModel.h; sourceTree = "<group>"; };
|
||||
4C5527BB2D1BDCDE00833FFD /* RoomLevelInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomLevelInfoModel.m; sourceTree = "<group>"; };
|
||||
4C5527BD2D1C099500833FFD /* RoomResourceManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomResourceManager.h; sourceTree = "<group>"; };
|
||||
4C5527BE2D1C099500833FFD /* RoomResourceManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomResourceManager.m; sourceTree = "<group>"; };
|
||||
4C5C37212D0C1C7900BA9AB8 /* RegionListViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RegionListViewController.h; sourceTree = "<group>"; };
|
||||
4C5C37222D0C1C7900BA9AB8 /* RegionListViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RegionListViewController.m; sourceTree = "<group>"; };
|
||||
4C6C92BE2D1172D9000A4693 /* RegionListInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RegionListInfo.h; sourceTree = "<group>"; };
|
||||
@@ -2605,12 +2618,20 @@
|
||||
4C71C69E2D069D2B00ECCA24 /* GiftAnimationHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiftAnimationHelper.m; sourceTree = "<group>"; };
|
||||
4C71C6A02D06DB3D00ECCA24 /* GiftAnimationManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiftAnimationManager.h; sourceTree = "<group>"; };
|
||||
4C71C6A12D06DB3D00ECCA24 /* GiftAnimationManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiftAnimationManager.m; sourceTree = "<group>"; };
|
||||
4C7989EA2D19392E006AE07B /* EmptyDataView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EmptyDataView.h; sourceTree = "<group>"; };
|
||||
4C7989EB2D19392E006AE07B /* EmptyDataView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EmptyDataView.m; sourceTree = "<group>"; };
|
||||
4C7989ED2D195277006AE07B /* RoomModeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomModeViewController.h; sourceTree = "<group>"; };
|
||||
4C7989EE2D195277006AE07B /* RoomModeViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomModeViewController.m; sourceTree = "<group>"; };
|
||||
4C7989F12D1952DA006AE07B /* RoomModePresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomModePresenter.h; sourceTree = "<group>"; };
|
||||
4C7989F22D1952DA006AE07B /* RoomModePresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomModePresenter.m; sourceTree = "<group>"; };
|
||||
4C815A152CFEB758002A46A6 /* SuperBlockViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SuperBlockViewController.h; sourceTree = "<group>"; };
|
||||
4C815A162CFEB758002A46A6 /* SuperBlockViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SuperBlockViewController.m; sourceTree = "<group>"; };
|
||||
4CC619582CEC7770008C1EE8 /* MyDressingDataPresent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyDressingDataPresent.h; sourceTree = "<group>"; };
|
||||
4CC619592CEC7770008C1EE8 /* MyDressingDataPresent.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyDressingDataPresent.m; sourceTree = "<group>"; };
|
||||
4CC6195B2CEC996E008C1EE8 /* MyDressingDataModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyDressingDataModel.h; sourceTree = "<group>"; };
|
||||
4CC6195C2CEC996E008C1EE8 /* MyDressingDataModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyDressingDataModel.m; sourceTree = "<group>"; };
|
||||
4CE3A9442D22754C003F0796 /* RechargeUserModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RechargeUserModel.h; sourceTree = "<group>"; };
|
||||
4CE3A9452D22754C003F0796 /* RechargeUserModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RechargeUserModel.m; sourceTree = "<group>"; };
|
||||
4CEB9EA52D09643E00443480 /* UserRoomCardViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UserRoomCardViewController.h; sourceTree = "<group>"; };
|
||||
4CEB9EA62D09643E00443480 /* UserRoomCardViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UserRoomCardViewController.m; sourceTree = "<group>"; };
|
||||
4CEB9EA82D097E8400443480 /* MoliAvatar.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MoliAvatar.h; sourceTree = "<group>"; };
|
||||
@@ -5222,6 +5243,8 @@
|
||||
4CEB9EA92D097E8400443480 /* MoliAvatar.m */,
|
||||
4CEB9EAB2D09AA0400443480 /* SexAgeLabel.h */,
|
||||
4CEB9EAC2D09AA0400443480 /* SexAgeLabel.m */,
|
||||
4C7989EA2D19392E006AE07B /* EmptyDataView.h */,
|
||||
4C7989EB2D19392E006AE07B /* EmptyDataView.m */,
|
||||
);
|
||||
path = CustomUI;
|
||||
sourceTree = "<group>";
|
||||
@@ -6636,6 +6659,17 @@
|
||||
path = UIViewGradientLayer;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4C7989F02D195293006AE07B /* RoomMode */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4C7989ED2D195277006AE07B /* RoomModeViewController.h */,
|
||||
4C7989EE2D195277006AE07B /* RoomModeViewController.m */,
|
||||
4C7989F12D1952DA006AE07B /* RoomModePresenter.h */,
|
||||
4C7989F22D1952DA006AE07B /* RoomModePresenter.m */,
|
||||
);
|
||||
path = RoomMode;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
54283CE22CE48884009729B5 /* ShoppingMall */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -7524,6 +7558,8 @@
|
||||
54E82EAD2CA9293C00C931D9 /* BoomInfoModel.m */,
|
||||
544879EE2CD22D4B00D58DC1 /* CustomRoomBGItemModel.h */,
|
||||
544879EF2CD22D4B00D58DC1 /* CustomRoomBGItemModel.m */,
|
||||
4C5527BA2D1BDCDE00833FFD /* RoomLevelInfoModel.h */,
|
||||
4C5527BB2D1BDCDE00833FFD /* RoomLevelInfoModel.m */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
@@ -10459,6 +10495,8 @@
|
||||
E8AEAED8271413530017FCE0 /* View */,
|
||||
E80487612717DD92008595F2 /* Presenter */,
|
||||
E80487622717DDAE008595F2 /* Protocol */,
|
||||
4C5527BD2D1C099500833FFD /* RoomResourceManager.h */,
|
||||
4C5527BE2D1C099500833FFD /* RoomResourceManager.m */,
|
||||
);
|
||||
path = YMRoom;
|
||||
sourceTree = "<group>";
|
||||
@@ -10518,6 +10556,7 @@
|
||||
E8AEAED5271412EC0017FCE0 /* XPRoomViewController.m */,
|
||||
5458319B2C2AE09300364026 /* XPRoomTypeSelectionViewController.h */,
|
||||
5458319C2C2AE09300364026 /* XPRoomTypeSelectionViewController.m */,
|
||||
4C7989F02D195293006AE07B /* RoomMode */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
@@ -10537,6 +10576,8 @@
|
||||
235A45192B04A352009753F5 /* PIRoomActivityWebView.m */,
|
||||
235A451B2B04A452009753F5 /* PIRoomActivityWebCell.h */,
|
||||
235A451C2B04A452009753F5 /* PIRoomActivityWebCell.m */,
|
||||
4C44BD5B2D151B5C00F321FA /* RoomSideMenu.h */,
|
||||
4C44BD5C2D151B5C00F321FA /* RoomSideMenu.m */,
|
||||
);
|
||||
path = ActivityContainerView;
|
||||
sourceTree = "<group>";
|
||||
@@ -11051,6 +11092,8 @@
|
||||
54C9A11E2C3DA08000C6D970 /* XPMineGamePartnerInfoModel.m */,
|
||||
54CE5EF72CCA4A2600A67898 /* LocationModel.h */,
|
||||
54CE5EF82CCA4A2600A67898 /* LocationModel.m */,
|
||||
4CE3A9442D22754C003F0796 /* RechargeUserModel.h */,
|
||||
4CE3A9452D22754C003F0796 /* RechargeUserModel.m */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
@@ -11774,6 +11817,7 @@
|
||||
E8EEB90326FC31DC007C6EBA /* XPMineUserInfoProtocol.h in Sources */,
|
||||
E8232603274E4AA0003A3332 /* ThemeColor+UserCard.m in Sources */,
|
||||
E87A24F1272935920086A794 /* XPMessageRemoteExtModel.m in Sources */,
|
||||
4C5527BC2D1BDCDE00833FFD /* RoomLevelInfoModel.m in Sources */,
|
||||
E8D34D5028080362009C4835 /* XPMineDataGiftTableViewCell.m in Sources */,
|
||||
E87C54BE2823CC5B0051AA11 /* XPMineResetLoginPwdPresenter.m in Sources */,
|
||||
237852A42C082A9800E360AC /* MSRoomGameSendTextView.m in Sources */,
|
||||
@@ -11849,6 +11893,7 @@
|
||||
2305EEF62AD67E5500AD403C /* PIRoomPhotoAlbumItemCell.m in Sources */,
|
||||
E85E7B3C2A4EB0D300B6D00A /* XPGuildSuperAdminRoomCollectionViewCell.m in Sources */,
|
||||
237700EC2BC914B400D661F1 /* UISwipeGestureRecognizer+MSRTL.m in Sources */,
|
||||
4C5527BF2D1C099500833FFD /* RoomResourceManager.m in Sources */,
|
||||
23D321E82ADFED10006B259C /* PIRoomSendRedPacketItemVC.m in Sources */,
|
||||
E85E7B2A2A4EB0D300B6D00A /* XPGuildTimeMonthPickerView.m in Sources */,
|
||||
E87E62782A3F5907002F68C9 /* XPNewHomePartyTableViewCell.m in Sources */,
|
||||
@@ -11915,6 +11960,7 @@
|
||||
239D0FAB2BFCB88D002977CE /* XPRoomFunctionContainerView.m in Sources */,
|
||||
E82109B026F1D83500FC3319 /* LoginBindPhonePresent.m in Sources */,
|
||||
E81C1B1F27705F7A0020D1E4 /* XPArrangeMicViewController.m in Sources */,
|
||||
4C7989F32D1952DA006AE07B /* RoomModePresenter.m in Sources */,
|
||||
E8B825C726EA0D9A009E8E9F /* LoginVerifCodeProtocol.h in Sources */,
|
||||
23E9EAAE2A84C9B800B792F2 /* XPMineUserInfoTagView.m in Sources */,
|
||||
236B2E4E2AA07D06003967A8 /* Api+LittleGame.m in Sources */,
|
||||
@@ -12062,6 +12108,7 @@
|
||||
189DD53426DE255300AB55B1 /* TabbarViewController.m in Sources */,
|
||||
23C9DFC92B84917B00B51558 /* PIRoomActivityChoosePlayCell.m in Sources */,
|
||||
9BA3B40B293DCDFD0071DF1C /* XPVersionUpdateModel.m in Sources */,
|
||||
4C7989EC2D19392E006AE07B /* EmptyDataView.m in Sources */,
|
||||
23C9DFCF2B85E21E00B51558 /* PIGuildSingleRoomIncomeCell.m in Sources */,
|
||||
18EE401A2754BA9F00A452BF /* NIMMessageMaker.m in Sources */,
|
||||
E8EEB91D26FC9D58007C6EBA /* XPMineUserInfoDateView.m in Sources */,
|
||||
@@ -12158,6 +12205,7 @@
|
||||
E8A3540A28FEC0510014A784 /* XPWishGiftListView.m in Sources */,
|
||||
238B37BF2AC55A2C00BFC9D5 /* XPTreasureFairyStoreResultView.m in Sources */,
|
||||
E88863CF278EC393004BCFAB /* XPAcrossRoomPKPrizeView.m in Sources */,
|
||||
4CE3A9462D22754C003F0796 /* RechargeUserModel.m in Sources */,
|
||||
239D0FFD2C05D086002977CE /* MSRoomGameQuitGameView.m in Sources */,
|
||||
23E9EA8E2A84BC9000B792F2 /* XPMineUserInfoHeaderTagCell.m in Sources */,
|
||||
E87DF5082A42CE79009C1185 /* XPInRoomRecordPresenter.m in Sources */,
|
||||
@@ -12218,6 +12266,7 @@
|
||||
18AAF3F0279EA59300CD7DAD /* MessageContentTextClickable.m in Sources */,
|
||||
E8C6FFCC27548120004DC9F0 /* Api+Home.m in Sources */,
|
||||
E8778AF52988EF2B00CF139B /* XPSessionSayHelloTableViewCell.m in Sources */,
|
||||
4C7989EF2D195277006AE07B /* RoomModeViewController.m in Sources */,
|
||||
23FF257C2ABD68020064E904 /* XPGiftFreeItemCell.m in Sources */,
|
||||
236B2E532AA08757003967A8 /* LittleGameStageView.m in Sources */,
|
||||
186A534E26FC6ED900D67B2C /* TTPopupService.m in Sources */,
|
||||
@@ -12643,6 +12692,7 @@
|
||||
E8AC723A26F49AAE007D6E91 /* XPMineNotifyStatus.m in Sources */,
|
||||
E87DF50E2A42CF15009C1185 /* HomeLiveRoomModel.m in Sources */,
|
||||
E8F6135F291E274E00E12650 /* NSArray+Safe.m in Sources */,
|
||||
4C44BD5D2D151B5C00F321FA /* RoomSideMenu.m in Sources */,
|
||||
E87E62622A3F568A002F68C9 /* XPNewHomeNavView.m in Sources */,
|
||||
54E82E9F2CA6876300C931D9 /* RoomBoomManager.m in Sources */,
|
||||
18E7B33226F317A20064BC9B /* XPWebViewController.m in Sources */,
|
||||
|
@@ -50,6 +50,13 @@
|
||||
ReferencedContainer = "container:YuMi.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<EnvironmentVariables>
|
||||
<EnvironmentVariable
|
||||
key = "OS_ACTIVITY_MODE"
|
||||
value = "disable"
|
||||
isEnabled = "NO">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
@@ -171,18 +171,20 @@ UIKIT_EXTERN NSString * adImageName;
|
||||
NSString *filePath = [XPAdImageTool.shareImageTool getFilePathWithImageName:adName];
|
||||
BOOL isExist = [XPAdImageTool.shareImageTool isFileExistWithFilePath:filePath];
|
||||
|
||||
if ([kUserDefaults integerForKey:@"adShow"]) {
|
||||
[kUserDefaults setInteger:[kUserDefaults integerForKey:@"adShow"]+1
|
||||
forKey:@"adShow"];
|
||||
} else {
|
||||
[kUserDefaults setInteger:1 forKey:@"adShow"];
|
||||
}
|
||||
// if ([kUserDefaults integerForKey:@"adShow"]) {
|
||||
// [kUserDefaults setInteger:[kUserDefaults integerForKey:@"adShow"]+1
|
||||
// forKey:@"adShow"];
|
||||
// } else {
|
||||
// [kUserDefaults setInteger:1 forKey:@"adShow"];
|
||||
// }
|
||||
|
||||
if (isExist) {// 图片存在
|
||||
if ([kUserDefaults integerForKey:@"adShow"] > 4) {
|
||||
// if ([kUserDefaults integerForKey:@"adShow"] > 4) {
|
||||
@kWeakify(self);
|
||||
AdvertiseModel *info = [XPAdImageTool.shareImageTool getAdInfoFromCacheInMainWith:adName];
|
||||
XPAdvertiseView *advertiseView = [[XPAdvertiseView alloc] initWithFrame:self.window.bounds];
|
||||
advertiseView.type = info.type;
|
||||
advertiseView.fileModel = info.fillVo;
|
||||
advertiseView.filePath = filePath;
|
||||
advertiseView.dismissHandler = ^(BOOL shouldJump) {
|
||||
@kStrongify(self)
|
||||
@@ -194,7 +196,7 @@ UIKIT_EXTERN NSString * adImageName;
|
||||
});
|
||||
};
|
||||
[advertiseView show];
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,7 +219,10 @@ UIKIT_EXTERN NSString * adImageName;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SplashInfoSkipTypeWeb: {
|
||||
case SplashInfoSkipTypeWeb:
|
||||
case SplashInfoSkipTypeWeb_CP:
|
||||
case SplashInfoSkipTypeWeb_Custom:
|
||||
case SplashInfoSkipTypeWeb_WeekStar: {
|
||||
// 跳转 H5
|
||||
if (info.link.length > 0) {
|
||||
XPWebViewController *webView = [[XPWebViewController alloc] initWithRoomUID:nil];
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#import "YuMi-swift.h"
|
||||
#import "SessionViewController.h"
|
||||
#import "LoginFullInfoViewController.h"
|
||||
#import "UIView+VAP.h"
|
||||
@import Firebase;
|
||||
UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
|
||||
@@ -34,6 +35,26 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
//日志接口
|
||||
void qg_VAP_Logger_handler(VAPLogLevel level, const char* file, int line, const char* func, NSString *module, NSString *format, ...) {
|
||||
|
||||
// 屏蔽 MP4 播放 log
|
||||
return;
|
||||
|
||||
// if (format.UTF8String == nil) {
|
||||
// NSLog(@"log包含非utf-8字符");
|
||||
// return;
|
||||
// }
|
||||
// if (level > VAPLogLevelDebug) {
|
||||
// va_list argList;
|
||||
// va_start(argList, format);
|
||||
// NSString* message = [[NSString alloc] initWithFormat:format arguments:argList];
|
||||
// file = [NSString stringWithUTF8String:file].lastPathComponent.UTF8String;
|
||||
// NSLog(@"<%@> %s(%@):%s [%@] - %@",@(level), file, @(line), func, module, message);
|
||||
// va_end(argList);
|
||||
// }
|
||||
}
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
|
||||
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
||||
@@ -43,7 +64,8 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
self.window.rootViewController = launchScreenVC;
|
||||
[self.window makeKeyAndVisible];
|
||||
|
||||
|
||||
[VAPView registerHWDLog:qg_VAP_Logger_handler];
|
||||
|
||||
///初始化一些 sdk配置
|
||||
[self initThirdConfig];
|
||||
[self initUM:application launchOptions:launchOptions];
|
||||
@@ -83,6 +105,8 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
}else{
|
||||
[self toHomeTabbarPage];
|
||||
}
|
||||
|
||||
[[ClientConfig shareConfig] clientInit];
|
||||
}
|
||||
|
||||
- (void)toLoginPage {
|
||||
|
6
YuMi/Assets.xcassets/1.0.34/Contents.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
21
YuMi/Assets.xcassets/1.0.34/diamond_help.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "切图 31@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.34/diamond_help.imageset/切图 31@3x.png
vendored
Normal file
After Width: | Height: | Size: 2.2 KiB |
21
YuMi/Assets.xcassets/1.0.34/grey_right_arrow.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "切图 30@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.34/grey_right_arrow.imageset/切图 30@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
21
YuMi/Assets.xcassets/1.0.34/luck_gift_flag_ball_BIG.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "椭圆 6@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.34/luck_gift_flag_ball_BIG.imageset/椭圆 6@3x.png
vendored
Normal file
After Width: | Height: | Size: 85 KiB |
21
YuMi/Assets.xcassets/1.0.34/room_boss_mic.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "组 8319@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.34/room_boss_mic.imageset/组 8319@3x.png
vendored
Normal file
After Width: | Height: | Size: 15 KiB |
21
YuMi/Assets.xcassets/1.0.34/room_manager_limit.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "from@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.34/room_manager_limit.imageset/from@3x.png
vendored
Normal file
After Width: | Height: | Size: 43 KiB |
21
YuMi/Assets.xcassets/1.0.34/room_mic_normal.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "切图 63@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.34/room_mic_normal.imageset/切图 63@3x.png
vendored
Normal file
After Width: | Height: | Size: 6.1 KiB |
21
YuMi/Assets.xcassets/1.0.34/room_mode_card_bg.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "矩形 2979@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.34/room_mode_card_bg.imageset/矩形 2979@3x.png
vendored
Normal file
After Width: | Height: | Size: 188 KiB |
21
YuMi/Assets.xcassets/1.0.34/room_mode_default_skin.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "头像@2x@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.34/room_mode_default_skin.imageset/头像@2x@3x.png
vendored
Normal file
After Width: | Height: | Size: 5.0 KiB |
21
YuMi/Assets.xcassets/1.0.34/room_mode_help.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "返回 1@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.34/room_mode_help.imageset/返回 1@3x.png
vendored
Normal file
After Width: | Height: | Size: 2.8 KiB |
21
YuMi/Assets.xcassets/1.0.34/room_mode_mic_10_off.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "切图 62@3x(1).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.34/room_mode_mic_10_off.imageset/切图 62@3x(1).png
vendored
Normal file
After Width: | Height: | Size: 4.0 KiB |
21
YuMi/Assets.xcassets/1.0.34/room_mode_mic_10_on.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "切图 62@3x(5).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.34/room_mode_mic_10_on.imageset/切图 62@3x(5).png
vendored
Normal file
After Width: | Height: | Size: 3.8 KiB |
21
YuMi/Assets.xcassets/1.0.34/room_mode_mic_15_off.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "切图 62@3x(2).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.34/room_mode_mic_15_off.imageset/切图 62@3x(2).png
vendored
Normal file
After Width: | Height: | Size: 4.9 KiB |
21
YuMi/Assets.xcassets/1.0.34/room_mode_mic_15_on.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "切图 62@3x(6).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.34/room_mode_mic_15_on.imageset/切图 62@3x(6).png
vendored
Normal file
After Width: | Height: | Size: 4.6 KiB |
21
YuMi/Assets.xcassets/1.0.34/room_mode_mic_19_off.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "切图 61@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.34/room_mode_mic_19_off.imageset/切图 61@3x.png
vendored
Normal file
After Width: | Height: | Size: 6.7 KiB |
21
YuMi/Assets.xcassets/1.0.34/room_mode_mic_19_on.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "切图 62@3x(8).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.34/room_mode_mic_19_on.imageset/切图 62@3x(8).png
vendored
Normal file
After Width: | Height: | Size: 6.4 KiB |
21
YuMi/Assets.xcassets/1.0.34/room_mode_mic_20_off.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "切图 62@3x(3).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.34/room_mode_mic_20_off.imageset/切图 62@3x(3).png
vendored
Normal file
After Width: | Height: | Size: 5.7 KiB |
21
YuMi/Assets.xcassets/1.0.34/room_mode_mic_20_on.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "切图 62@3x(7).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.34/room_mode_mic_20_on.imageset/切图 62@3x(7).png
vendored
Normal file
After Width: | Height: | Size: 5.4 KiB |
21
YuMi/Assets.xcassets/1.0.34/room_mode_mic_9_off.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "切图 62@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.34/room_mode_mic_9_off.imageset/切图 62@3x.png
vendored
Normal file
After Width: | Height: | Size: 4.7 KiB |
21
YuMi/Assets.xcassets/1.0.34/room_mode_mic_9_on.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "切图 62@3x(4).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.34/room_mode_mic_9_on.imageset/切图 62@3x(4).png
vendored
Normal file
After Width: | Height: | Size: 4.4 KiB |
21
YuMi/Assets.xcassets/1.0.34/side_menu_close.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "展开.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.34/side_menu_close.imageset/展开.png
vendored
Normal file
After Width: | Height: | Size: 2.5 KiB |
21
YuMi/Assets.xcassets/1.0.34/side_menu_open.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "展开 (1).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.34/side_menu_open.imageset/展开 (1).png
vendored
Normal file
After Width: | Height: | Size: 2.5 KiB |
21
YuMi/Assets.xcassets/1.0.34/star_white.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "星形 12@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.34/star_white.imageset/星形 12@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.2 KiB |
21
YuMi/Assets.xcassets/1.0.34/star_yellow.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "星形 4@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.34/star_yellow.imageset/星形 4@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_position_lock@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_position_lock@3x.png",
|
||||
"filename" : "组 8307@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.6 KiB |
BIN
YuMi/Assets.xcassets/yna/Position/room_position_lock.imageset/组 8307@3x.png
vendored
Normal file
After Width: | Height: | Size: 5.3 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_position_normal@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_position_normal@3x.png",
|
||||
"filename" : "组 8307@3x (1).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 877 B |
Before Width: | Height: | Size: 1.3 KiB |
BIN
YuMi/Assets.xcassets/yna/Position/room_position_normal.imageset/组 8307@3x (1).png
vendored
Normal file
After Width: | Height: | Size: 4.5 KiB |
@@ -13,12 +13,32 @@ typedef NS_ENUM(NSInteger, SplashInfoSkipType) {
|
||||
SplashInfoSkipTypePage = 1,
|
||||
SplashInfoSkipTypeRoom = 2,
|
||||
SplashInfoSkipTypeWeb = 3,
|
||||
SplashInfoSkipTypeWeb_CP = 4,
|
||||
SplashInfoSkipTypeWeb_WeekStar = 5,
|
||||
SplashInfoSkipTypeWeb_Custom = 6,
|
||||
};
|
||||
|
||||
@interface AdvertiseFillModel : PIBaseModel<NSCoding>
|
||||
|
||||
@property(nonatomic, copy) NSString *loverNick;
|
||||
@property(nonatomic, copy) NSString *loverErbanNo;
|
||||
@property(nonatomic, copy) NSString *loverAvatar;
|
||||
@property(nonatomic, copy) NSString *nick;
|
||||
@property(nonatomic, copy) NSString *erbanNo;
|
||||
@property(nonatomic, copy) NSString *avatar;
|
||||
@property(nonatomic, copy) NSString *picUrl;
|
||||
@property(nonatomic, copy) NSString *giftName;
|
||||
@property(nonatomic, copy) NSString *giftId;
|
||||
|
||||
@end
|
||||
|
||||
@interface AdvertiseModel : PIBaseModel<NSCopying>
|
||||
@property (nonatomic, strong) NSString *link;
|
||||
@property (nonatomic, assign) SplashInfoSkipType type;// 1跳app页面,2跳聊天室,3跳h5页面
|
||||
@property (nonatomic, assign) SplashInfoSkipType type;// 1跳app页面,2跳聊天室,3跳h5页面,
|
||||
@property (nonatomic, copy) NSString *pict;
|
||||
@property(nonatomic, strong) AdvertiseFillModel *fillVo;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -7,6 +7,17 @@
|
||||
|
||||
#import "AdvertiseModel.h"
|
||||
|
||||
@implementation AdvertiseModel
|
||||
@implementation AdvertiseFillModel
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation AdvertiseModel
|
||||
|
||||
+ (NSDictionary *)objectClassInArray {
|
||||
return @{
|
||||
@"fillVo": [AdvertiseFillModel class],
|
||||
};
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -7,6 +7,7 @@
|
||||
|
||||
#import "XPAdImageTool.h"
|
||||
#import <YYCache/YYCache.h>
|
||||
#import "UploadFile.h"
|
||||
|
||||
#define CACHENAME @"XPUserCache"
|
||||
|
||||
@@ -100,20 +101,32 @@ static XPAdImageTool* tool;
|
||||
*/
|
||||
- (void)downloadAdImageWithUrl:(NSString *)imageUrl imageName:(NSString *)imageName {
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
||||
NSString *filePath = [self getFilePathWithImageName:imageName]; // 保存文件的名称
|
||||
|
||||
if ([imageUrl.lowercaseString hasSuffix:@"svga"]) {
|
||||
@kWeakify(self);
|
||||
[[UploadFile share] download:imageUrl path:filePath complete:^{
|
||||
@kStrongify(self);
|
||||
[self deleteOldImage];
|
||||
[[NSUserDefaults standardUserDefaults] setValue:imageName forKey:adImageName];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
} failure:^{
|
||||
@kStrongify(self);
|
||||
[self deleteOldImage];
|
||||
}];
|
||||
} else {
|
||||
NSString *encode = [imageUrl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
|
||||
NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:encode]];
|
||||
UIImage *image = [UIImage imageWithData:data];
|
||||
|
||||
NSString *encode = [imageUrl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
|
||||
NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:encode]];
|
||||
UIImage *image = [UIImage imageWithData:data];
|
||||
|
||||
NSString *filePath = [self getFilePathWithImageName:imageName]; // 保存文件的名称
|
||||
if ([UIImagePNGRepresentation(image) writeToFile:filePath atomically:YES]) {// 保存成功
|
||||
[self deleteOldImage];
|
||||
[[NSUserDefaults standardUserDefaults] setValue:imageName forKey:adImageName];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
}else{
|
||||
[self deleteOldImage];
|
||||
}
|
||||
|
||||
if ([UIImagePNGRepresentation(image) writeToFile:filePath atomically:YES]) {// 保存成功
|
||||
[self deleteOldImage];
|
||||
[[NSUserDefaults standardUserDefaults] setValue:imageName forKey:adImageName];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
}else{
|
||||
[self deleteOldImage];
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "AdvertiseModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPAdvertiseView : UIView
|
||||
@@ -16,7 +16,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/** 图片路径*/
|
||||
@property (nonatomic, copy) NSString *filePath;
|
||||
|
||||
@property(nonatomic, assign) SplashInfoSkipType type;
|
||||
@property(nonatomic, strong) AdvertiseFillModel *fileModel;
|
||||
@property (nonatomic, strong) UIImage *adImage;
|
||||
|
||||
@property (nonatomic, copy) void(^dismissHandler)(BOOL shouldJump); //闪屏消失回调
|
||||
|
@@ -8,6 +8,7 @@
|
||||
#import "XPAdvertiseView.h"
|
||||
#import "AppDelegate.h"
|
||||
//tool
|
||||
#import <SVGA.h>
|
||||
#import <sys/sysctl.h>
|
||||
#import <sys/utsname.h>
|
||||
#import "YUMIMacroUitls.h"
|
||||
@@ -18,7 +19,9 @@ NSString *const adUrl = @"adUrl";
|
||||
// 广告显示的时间
|
||||
static int const showtime = 3;
|
||||
|
||||
@interface XPAdvertiseView()
|
||||
@interface XPAdvertiseView() <SVGAPlayerDelegate>
|
||||
|
||||
@property(nonatomic, strong) SVGAImageView *svgaView;
|
||||
|
||||
@property (nonatomic, strong) UIImageView *adView;//广告图片
|
||||
|
||||
@@ -32,7 +35,6 @@ static int const showtime = 3;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation XPAdvertiseView
|
||||
|
||||
#pragma mark - Initialize Methods
|
||||
@@ -94,6 +96,7 @@ static int const showtime = 3;
|
||||
// GCD倒计时方法
|
||||
- (void)gcdCoundownHander {
|
||||
__block int timeout = showtime;
|
||||
|
||||
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
|
||||
dispatch_source_t _timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, queue);
|
||||
dispatch_source_set_timer(_timer, DISPATCH_TIME_NOW, 1.0 * NSEC_PER_SEC, 0); //每秒执行
|
||||
@@ -170,8 +173,63 @@ static int const showtime = 3;
|
||||
#pragma mark - Setter
|
||||
- (void)setFilePath:(NSString *)filePath {
|
||||
_filePath = filePath;
|
||||
UIImage *image = [UIImage imageWithContentsOfFile:filePath];
|
||||
_adView.image = [image cutImage:[UIScreen mainScreen].bounds.size];
|
||||
|
||||
if (self.type == SplashInfoSkipTypeWeb_CP || self.type == SplashInfoSkipTypeWeb_Custom || self.type == SplashInfoSkipTypeWeb_WeekStar) {
|
||||
_svgaView = [[SVGAImageView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
|
||||
_svgaView.delegate = self;
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onTapAdViewAction)];
|
||||
[_svgaView addGestureRecognizer:tap];
|
||||
// [self addSubview:_svgaView];
|
||||
[self insertSubview:_svgaView belowSubview:self.countdownButton];
|
||||
SVGAParser *p = [[SVGAParser alloc] init];
|
||||
@kWeakify(self);
|
||||
[p parseWithURL:[[NSURL alloc] initFileURLWithPath:filePath] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
|
||||
@kStrongify(self);
|
||||
if (videoItem) {
|
||||
self.svgaView.autoPlay = YES;
|
||||
self.svgaView.clearsAfterStop = YES;
|
||||
self.svgaView.videoItem = videoItem;
|
||||
|
||||
if (self.fileModel) {
|
||||
[self updateSvgaImage:self.fileModel.avatar key:@"avatar"];
|
||||
[self updateSvgaImage:self.fileModel.picUrl key:@"gift"];
|
||||
[self updateSvgaImage:self.fileModel.avatar key:@"avatar_1"];
|
||||
[self updateSvgaImage:self.fileModel.loverAvatar key:@"avatar_2"];
|
||||
|
||||
[self updateSvgaText:[NSString stringWithFormat:@"ID: %@", self.fileModel.erbanNo] key:@"id"];
|
||||
[self updateSvgaText:self.fileModel.giftName key:@"name"];
|
||||
[self updateSvgaText:[NSString stringWithFormat:@"ID: %@", self.fileModel.erbanNo] key:@"id_1"];
|
||||
[self updateSvgaText:[NSString stringWithFormat:@"ID: %@", self.fileModel.loverErbanNo] key:@"id_2"];
|
||||
}
|
||||
[self.svgaView startAnimation];
|
||||
}
|
||||
} failureBlock:^(NSError * _Nullable error) {
|
||||
@kStrongify(self);
|
||||
UIImage *image = [UIImage imageWithContentsOfFile:filePath];
|
||||
self.adView.image = [image cutImage:[UIScreen mainScreen].bounds.size];
|
||||
}];
|
||||
} else {
|
||||
UIImage *image = [UIImage imageWithContentsOfFile:filePath];
|
||||
self.adView.image = [image cutImage:[UIScreen mainScreen].bounds.size];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)updateSvgaImage:(NSString *)imagePath key:(NSString *)key {
|
||||
if (self.svgaView && ![NSString isEmpty:imagePath] && ![NSString isEmpty:key]) {
|
||||
[self.svgaView setImageWithURL:[NSURL URLWithString:imagePath] forKey:key];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)updateSvgaText:(NSString *)content key:(NSString *)key {
|
||||
if (self.svgaView && ![NSString isEmpty:content] && ![NSString isEmpty:key]) {
|
||||
NSAttributedString *string = [[NSAttributedString alloc] initWithString:content
|
||||
attributes:@{
|
||||
NSFontAttributeName: kFontMedium(kGetScaleWidth(24)),
|
||||
NSForegroundColorAttributeName: UIColorFromRGB(0xFDF565)
|
||||
}];
|
||||
[self.svgaView setAttributedText:string
|
||||
forKey:key];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setAdImage:(UIImage *)adImage {
|
||||
@@ -180,6 +238,9 @@ static int const showtime = 3;
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - SVGAPlayerDelegate
|
||||
|
||||
|
||||
#pragma mark - Getter
|
||||
|
||||
- (UIWindow *)window {
|
||||
|
16
YuMi/CustomUI/EmptyDataView.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// EmptyDataView.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/12/23.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface EmptyDataView : UIView
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
20
YuMi/CustomUI/EmptyDataView.m
Normal file
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// EmptyDataView.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/12/23.
|
||||
//
|
||||
|
||||
#import "EmptyDataView.h"
|
||||
|
||||
@implementation EmptyDataView
|
||||
|
||||
/*
|
||||
// Only override drawRect: if you perform custom drawing.
|
||||
// An empty implementation adversely affects performance during animation.
|
||||
- (void)drawRect:(CGRect)rect {
|
||||
// Drawing code
|
||||
}
|
||||
*/
|
||||
|
||||
@end
|
@@ -105,6 +105,8 @@ typedef NS_ENUM(NSUInteger, URLType) {
|
||||
kCPRule,
|
||||
/// 火箭规则
|
||||
KBoomRule,
|
||||
/// 房间等级说明
|
||||
KRoomLevelRule,
|
||||
};
|
||||
|
||||
NSString * const URLWithType(URLType type);
|
||||
|
@@ -24,7 +24,8 @@ NSString * const URLWithType(URLType type) {
|
||||
@(kChannelUrl) : @"modules/%@/index.html?channelType=%@&deviceId=%@",
|
||||
@(kLUDOUrl) : @"modules/gameRank/index.html",///LUDO排行榜路径
|
||||
@(kCPRule) : @"modules/rule/cpRule.html",
|
||||
@(KBoomRule) : @"modules/rule/boom.html?partitionId=",///收益记录
|
||||
@(KBoomRule) : @"modules/rule/boom.html?partitionId=",///收益记录,
|
||||
@(KRoomLevelRule) : @"modules/roomLevel/index.html",///收益记录,
|
||||
};
|
||||
NSString * newUrl = [newDic objectForKey:@(type)];
|
||||
if(newUrl != nil){
|
||||
|
@@ -151,6 +151,7 @@
|
||||
myDressingNameplate.pic = model.nameplateImage;
|
||||
myDressingNameplate.name = model.nameplateName;
|
||||
myDressingNameplate.used = model.isUsing;
|
||||
myDressingNameplate.expireDays = model.expireDays;
|
||||
myDressingNameplate.expireTime = model.expireTime;
|
||||
myDressingNameplate.hasExpired = model.isExpired;
|
||||
myDressingNameplate.id = model.nId.integerValue;
|
||||
|
@@ -21,7 +21,7 @@
|
||||
}
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
if (failure) {
|
||||
failure([NSError errorWithDomain:msg code:code userInfo:nil]);
|
||||
failure([NSError errorWithDomain:[NSString isEmpty:msg] ? @"" : msg code:code userInfo:nil]);
|
||||
}
|
||||
} showLoading:NO errorToast:YES] ticket:ticket uid:uid];
|
||||
}
|
||||
@@ -37,7 +37,7 @@
|
||||
}
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
if (failure) {
|
||||
failure([NSError errorWithDomain:msg code:code userInfo:nil]);
|
||||
failure([NSError errorWithDomain:[NSString isEmpty:msg] ? @"" : msg code:code userInfo:nil]);
|
||||
}
|
||||
} showLoading:NO errorToast:YES] ticket:ticket uid:uid];
|
||||
}
|
||||
@@ -131,7 +131,7 @@
|
||||
}
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
if (failure) {
|
||||
failure([NSError errorWithDomain:msg code:code userInfo:nil]);
|
||||
failure([NSError errorWithDomain:[NSString isEmpty:msg] ? @"" : msg code:code userInfo:nil]);
|
||||
}
|
||||
} showLoading:YES errorToast:YES]
|
||||
dressType:@(type).stringValue
|
||||
@@ -161,7 +161,7 @@
|
||||
}
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
if (failure) {
|
||||
failure([NSError errorWithDomain:msg code:code userInfo:nil]);
|
||||
failure([NSError errorWithDomain:[NSString isEmpty:msg] ? @"" : msg code:code userInfo:nil]);
|
||||
}
|
||||
} showLoading:YES errorToast:YES]
|
||||
id:itemID];
|
||||
|
@@ -40,6 +40,11 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)prepareForReuse {
|
||||
[super prepareForReuse];
|
||||
self.selected = NO;
|
||||
}
|
||||
|
||||
- (UILabel *)defaultLabel {
|
||||
if (!_defaultLabel) {
|
||||
_defaultLabel = [UILabel labelInitWithText:YMLocalizedString(@"XPMomentsRecommendViewController0")
|
||||
@@ -174,6 +179,7 @@
|
||||
|
||||
- (void)prepareForReuse {
|
||||
[super prepareForReuse];
|
||||
self.selected = NO;
|
||||
[self.mp4View stopHWDMP4];
|
||||
}
|
||||
|
||||
@@ -883,6 +889,7 @@
|
||||
collectionView.backgroundColor = [UIColor clearColor];
|
||||
collectionView.tag = i;
|
||||
collectionView.contentInset = UIEdgeInsetsMake(16, 0, 0, 0);
|
||||
collectionView.allowsMultipleSelection = NO;
|
||||
[collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:@"cell"];
|
||||
[collectionView registerClass:[ShoppingMallItemCard class] forCellWithReuseIdentifier:@"ShoppingMallItemCard"];
|
||||
[collectionView registerClass:[ShoppingMallEmptyCard class] forCellWithReuseIdentifier:@"ShoppingMallEmptyCard"];
|
||||
@@ -957,7 +964,14 @@
|
||||
}
|
||||
for (UICollectionView *itemView in self.itemCollectionViewArray) {
|
||||
[itemView reloadData];
|
||||
[itemView selectItemAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] animated:NO scrollPosition:UICollectionViewScrollPositionNone];
|
||||
NSInteger selectedIndex = 0;
|
||||
for (MyDressingDataModel *model in [self.myDressingDataCache objectForKey:@(index)]) {
|
||||
if (model.used) {
|
||||
selectedIndex = [[self.myDressingDataCache objectForKey:@(index)] indexOfObject:model]+1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
[itemView selectItemAtIndexPath:[NSIndexPath indexPathForRow:selectedIndex inSection:0] animated:NO scrollPosition:UICollectionViewScrollPositionNone];
|
||||
if (self.returnSelectedModel) {
|
||||
NSArray *data = self.dataCache[@(itemView.tag)];
|
||||
self.returnSelectedModel(data.firstObject);
|
||||
@@ -1033,6 +1047,11 @@
|
||||
}
|
||||
|
||||
- (void)updateSelectedItem:(NSIndexPath *)indexPath {
|
||||
UICollectionView *itemView = [self.itemCollectionViewArray xpSafeObjectAtIndex:self.currengCategoryIndex];
|
||||
if (itemView) {
|
||||
[itemView selectItemAtIndexPath:indexPath animated:NO scrollPosition:UICollectionViewScrollPositionNone];
|
||||
}
|
||||
|
||||
[self refreshCurrentPageData];
|
||||
}
|
||||
|
||||
|
@@ -21,7 +21,7 @@
|
||||
}
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
if (failure) {
|
||||
failure([NSError errorWithDomain:msg code:code userInfo:nil]);
|
||||
failure([NSError errorWithDomain:[NSString isEmpty:msg] ? @"" : msg code:code userInfo:nil]);
|
||||
}
|
||||
} showLoading:YES errorToast:YES]
|
||||
dressType:@(type).stringValue];
|
||||
@@ -36,7 +36,7 @@
|
||||
}
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
if (failure) {
|
||||
failure([NSError errorWithDomain:msg code:code userInfo:nil]);
|
||||
failure([NSError errorWithDomain:[NSString isEmpty:msg] ? @"" : msg code:code userInfo:nil]);
|
||||
}
|
||||
} showLoading:YES errorToast:YES]
|
||||
id:itemID];
|
||||
|
@@ -98,7 +98,7 @@
|
||||
}
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
if (failure) {
|
||||
failure([NSError errorWithDomain:msg code:code userInfo:nil]);
|
||||
failure([NSError errorWithDomain:[NSString isEmpty:msg] ? @"" : msg code:code userInfo:nil]);
|
||||
}
|
||||
} showLoading:YES errorToast:YES]];
|
||||
}
|
||||
|
@@ -16,10 +16,9 @@
|
||||
///输入框的占位符
|
||||
@property (nonatomic,strong) MSBaseTextField *textField;
|
||||
///显示label的数组
|
||||
@property (nonatomic,strong) NSMutableArray<UILabel *> *lableArray;
|
||||
@property (nonatomic,strong) NSMutableArray<UILabel *> *labelArray;
|
||||
@end
|
||||
|
||||
|
||||
@implementation LoginVerifCodeView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
@@ -53,8 +52,8 @@
|
||||
}
|
||||
|
||||
- (void)updateLablesWithText:(UITextField *)textField {
|
||||
if (textField.text.length > self.lableArray.count) {
|
||||
textField.text = [textField.text substringToIndex:self.lableArray.count];
|
||||
if (textField.text.length > self.labelArray.count) {
|
||||
textField.text = [textField.text substringToIndex:self.labelArray.count];
|
||||
}
|
||||
if (textField.text.length >= self.number) {
|
||||
[textField resignFirstResponder];
|
||||
@@ -63,10 +62,19 @@
|
||||
}
|
||||
}
|
||||
|
||||
for (UILabel *pwLab in self.lableArray) {
|
||||
if (self.type == 1) {
|
||||
@kWeakify(self);
|
||||
[self.labelArray enumerateObjectsUsingBlock:^(UILabel *obj, NSUInteger idx, BOOL *stop) {
|
||||
@kStrongify(self);
|
||||
[self normalStyle:obj];
|
||||
}];
|
||||
}
|
||||
NSInteger index = -1;
|
||||
for (UILabel *pwLab in self.labelArray) {
|
||||
if (pwLab.tag < (100 + textField.text.length)) {
|
||||
if (self.shouldBeSecurity) {
|
||||
pwLab.text = @"●";
|
||||
index += 1;
|
||||
} else {
|
||||
NSRange range = NSMakeRange(pwLab.tag-100, 1);
|
||||
pwLab.text = [textField.text substringWithRange:range];
|
||||
@@ -75,6 +83,13 @@
|
||||
pwLab.text = @"";
|
||||
}
|
||||
}
|
||||
|
||||
if (self.type == 1) {
|
||||
UILabel *label = [self.labelArray xpSafeObjectAtIndex:index];
|
||||
if (label) {
|
||||
[self lastInputStyle:label];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)configLabelArray {
|
||||
@@ -86,9 +101,8 @@
|
||||
label.textColor = [DJDKMIMOMColor mainTextColor];
|
||||
label.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:18];
|
||||
label.textAlignment = NSTextAlignmentCenter;
|
||||
label.backgroundColor = [DJDKMIMOMColor appCellBackgroundColor];
|
||||
label.layer.masksToBounds = YES;
|
||||
label.layer.cornerRadius = 10;
|
||||
label.backgroundColor = UIColorFromRGB(0xf4f4f4);
|
||||
[label setCornerRadius:10];
|
||||
label.tag = 100 + i;
|
||||
[self addSubview:label];
|
||||
[label mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -96,10 +110,10 @@
|
||||
make.centerY.mas_equalTo(self);
|
||||
make.leading.mas_equalTo(self).offset((itemWidth + itemSpace)* i);
|
||||
}];
|
||||
[self.lableArray addObject:label];
|
||||
[self.labelArray addObject:label];
|
||||
}
|
||||
|
||||
UILabel * label = [self.lableArray lastObject];
|
||||
UILabel * label = [self.labelArray lastObject];
|
||||
if (label) {
|
||||
[self mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.mas_equalTo(label.mas_trailing);
|
||||
@@ -127,10 +141,26 @@
|
||||
make.centerY.mas_equalTo(self);
|
||||
make.leading.mas_equalTo(self).offset((itemWidth + itemSpace)* i);
|
||||
}];
|
||||
[self.lableArray addObject:label];
|
||||
[self.labelArray addObject:label];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)normalStyle:(UILabel *)label {
|
||||
label.backgroundColor = UIColorFromRGB(0xF0F5F6);
|
||||
[label setCornerRadius:10
|
||||
corners:kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner | kCALayerMinXMaxYCorner | kCALayerMaxXMaxYCorner
|
||||
borderWidth:1
|
||||
borderColor:UIColorFromRGB(0xF0F5F6)];
|
||||
}
|
||||
|
||||
- (void)lastInputStyle:(UILabel *)label {
|
||||
label.backgroundColor = UIColorFromRGB(0xFFF6EB);
|
||||
[label setCornerRadius:10
|
||||
corners:kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner | kCALayerMinXMaxYCorner | kCALayerMaxXMaxYCorner
|
||||
borderWidth:1
|
||||
borderColor:UIColorFromRGB(0xFF8C03)];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setNumber:(int)number {
|
||||
_number = number;
|
||||
@@ -155,11 +185,11 @@
|
||||
return _textField;
|
||||
}
|
||||
|
||||
- (NSMutableArray<UILabel *> *)lableArray {
|
||||
if (!_lableArray) {
|
||||
_lableArray = [NSMutableArray array];
|
||||
- (NSMutableArray<UILabel *> *)labelArray {
|
||||
if (!_labelArray) {
|
||||
_labelArray = [NSMutableArray array];
|
||||
}
|
||||
return _lableArray;
|
||||
return _labelArray;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -106,6 +106,12 @@
|
||||
_tagModel = tagModel;
|
||||
self.flagImageView.imageUrl = tagModel.icon;
|
||||
self.titleLabel.text = tagModel.name;
|
||||
|
||||
[self.flagImageView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(14);
|
||||
make.centerY.mas_equalTo(self.contentView);
|
||||
make.size.mas_equalTo(CGSizeMake(40, 30));
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)setRegionModel:(RegionListInfo *)regionModel {
|
||||
@@ -421,13 +427,13 @@
|
||||
if (!_collectionView) {
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
// if (self.type == 1) {
|
||||
layout.itemSize = CGSizeMake(KScreenWidth - 30, 38);
|
||||
layout.itemSize = CGSizeMake(KScreenWidth - 30, 48);
|
||||
// } else if (self.type == 2) {
|
||||
// layout.itemSize = CGSizeMake(kGetScaleWidth(166), 38);
|
||||
// }
|
||||
|
||||
layout.sectionInset = UIEdgeInsetsMake(0, 16, kSafeAreaBottomHeight, 16);
|
||||
layout.minimumLineSpacing = 10;
|
||||
layout.minimumLineSpacing = 0;
|
||||
layout.minimumInteritemSpacing = 10;
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 44, KScreenWidth, KScreenHeight-44)
|
||||
collectionViewLayout:layout];
|
||||
|
@@ -139,6 +139,9 @@ typedef NS_ENUM(NSUInteger, CustomMessageType) {
|
||||
|
||||
///房間背景更新
|
||||
CustomMessageType_Custom_Room_Background = 113,
|
||||
|
||||
///房间等级更新
|
||||
CustomMessageType_RoomLevel_Update = 114,
|
||||
};
|
||||
|
||||
|
||||
@@ -739,6 +742,12 @@ typedef NS_ENUM(NSUInteger, CustomMessageTypeCustomRoomBackground) {
|
||||
Custom_Message_Sub_Custom_Room_Background = 1131
|
||||
};
|
||||
|
||||
///房间等级更新
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageTypeRoomLevelUpdate) {
|
||||
///所有房间
|
||||
Custom_Message_Sub_RoomLevel_Update = 1141
|
||||
};
|
||||
|
||||
@interface AttachmentModel : PIBaseModel<NIMCustomAttachment>
|
||||
|
||||
@property (nonatomic, strong) id data; // Must be NSMutable Type
|
||||
|
@@ -11,7 +11,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NIMTimeUtils : NSObject
|
||||
|
||||
+ (NSString *)showTime:(NSTimeInterval)msglastTime showDetail:(BOOL)showDetail;
|
||||
+ (NSString *)formattedTimeFromInterval:(NSTimeInterval)timeInterval;
|
||||
|
||||
//+ (NSString *)showTime:(NSTimeInterval)msglastTime showDetail:(BOOL)showDetail;
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -9,7 +9,29 @@
|
||||
|
||||
@implementation NIMTimeUtils
|
||||
|
||||
+ (NSString*)showTime:(NSTimeInterval) msglastTime showDetail:(BOOL)showDetail
|
||||
+ (NSString *)formattedTimeFromInterval:(NSTimeInterval)timeInterval {
|
||||
// 获取当前日历
|
||||
NSCalendar *calendar = [NSCalendar currentCalendar];
|
||||
|
||||
// 获取当前日期
|
||||
NSDate *currentDate = [NSDate date];
|
||||
NSDate *inputDate = [NSDate dateWithTimeIntervalSince1970:timeInterval];
|
||||
|
||||
// 检查输入日期是否是今天
|
||||
if ([calendar isDate:inputDate inSameDayAsDate:currentDate]) {
|
||||
// 如果是今天,返回 hour:min 格式
|
||||
NSDateFormatter *timeFormatter = [[NSDateFormatter alloc] init];
|
||||
timeFormatter.dateFormat = @"HH:mm"; // 小时和分钟格式
|
||||
return [timeFormatter stringFromDate:inputDate];
|
||||
} else {
|
||||
// 如果不是今天,返回 year/month/day 格式
|
||||
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
|
||||
dateFormatter.dateFormat = @"yyyy/MM/dd"; // 年/月/日格式
|
||||
return [dateFormatter stringFromDate:inputDate];
|
||||
}
|
||||
}
|
||||
|
||||
+ (NSString*)showTime:(NSTimeInterval)msglastTime showDetail:(BOOL)showDetail
|
||||
{
|
||||
//今天的时间
|
||||
NSDate * nowDate = [NSDate date];
|
||||
|
@@ -89,8 +89,7 @@
|
||||
@property (nonatomic,strong) UIStackView *tagStackView;
|
||||
///性别
|
||||
@property (nonatomic,strong) UIButton *sexButton;
|
||||
///星座
|
||||
@property (nonatomic,strong) UIImageView *constellationButton;
|
||||
|
||||
///签名
|
||||
@property (nonatomic,strong) UILabel *signLabel;
|
||||
///列表
|
||||
@@ -117,7 +116,7 @@
|
||||
[self.contentView addSubview:self.stackView];
|
||||
|
||||
[self.stackView addArrangedSubview:self.userView];
|
||||
[self.stackView addArrangedSubview:self.collectionView];
|
||||
// [self.stackView addArrangedSubview:self.collectionView];
|
||||
|
||||
[self.userView addSubview:self.avatarImageView];
|
||||
[self.userView addSubview:self.headWearImageView];
|
||||
@@ -126,10 +125,9 @@
|
||||
[self.userView addSubview:self.tagStackView];
|
||||
[self.userView addSubview:self.signLabel];
|
||||
|
||||
[self.tagStackView addArrangedSubview:self.nobleImageView];
|
||||
[self.tagStackView addArrangedSubview:self.nickLabel];
|
||||
[self.tagStackView addArrangedSubview:self.sexButton];
|
||||
[self.tagStackView addArrangedSubview:self.constellationButton];
|
||||
[self.tagStackView addArrangedSubview:self.nobleImageView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
@@ -175,11 +173,6 @@
|
||||
[self.sexButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(32, 14));
|
||||
}];
|
||||
CGFloat starWidth = 14 * 46 / 18;
|
||||
[self.constellationButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(starWidth,14));
|
||||
}];
|
||||
|
||||
[self.signLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(self.tagStackView);
|
||||
make.trailing.mas_lessThanOrEqualTo(self.userView).offset(-5);
|
||||
@@ -190,9 +183,9 @@
|
||||
make.height.mas_equalTo(76);
|
||||
}];
|
||||
|
||||
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(72);
|
||||
}];
|
||||
// [self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.height.mas_equalTo(72);
|
||||
// }];
|
||||
}
|
||||
|
||||
-(NSInteger) getMonth:(long )time
|
||||
@@ -272,8 +265,24 @@
|
||||
}
|
||||
self.nickLabel.text = nick;
|
||||
self.signLabel.text = _userInfo.userDesc.length > 0 ? _userInfo.userDesc : YMLocalizedString(@"XPTreasureFairyFriendCell0");
|
||||
self.nobleImageView.imageUrl = _userInfo.userVipInfoVO.vipIcon;
|
||||
self.nobleImageView.hidden = _userInfo.userVipInfoVO.vipIcon.length > 0 ? NO : YES;
|
||||
|
||||
self.nobleImageView.hidden = _userInfo.userVipInfoVO.nameplateUrl.length > 0 ? NO : YES;
|
||||
@kWeakify(self);
|
||||
[self.nobleImageView loadImageWithUrl:_userInfo.userVipInfoVO.nameplateUrl completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
|
||||
@kStrongify(self);
|
||||
if (image) {
|
||||
self.nobleImageView.image = image;
|
||||
CGFloat scale = image.size.width / image.size.height;
|
||||
[self.nobleImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(20* scale, 20));
|
||||
}];
|
||||
} else {
|
||||
[self.nobleImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(0, 20));
|
||||
}];
|
||||
}
|
||||
}];
|
||||
|
||||
NSString * headurl = userInfo.headwearEffect.length > 0 ? userInfo.headwearEffect : userInfo.headwearPic;
|
||||
if (headurl.length == 0) {
|
||||
self.headWearImageView.hidden = YES;
|
||||
@@ -448,12 +457,5 @@
|
||||
return _sexButton;
|
||||
}
|
||||
|
||||
- (UIImageView *)constellationButton {
|
||||
if (!_constellationButton) {
|
||||
_constellationButton = [UIImageView new];
|
||||
_constellationButton.hidden = YES;
|
||||
}
|
||||
return _constellationButton;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -454,7 +454,7 @@
|
||||
|
||||
///获取用户信息成功
|
||||
- (void)onGetSessionUserInfoSuccess:(UserInfoModel *)userInfo {
|
||||
_userInfo = userInfo;
|
||||
// _userInfo = userInfo;
|
||||
self.sessionNavView.userInfo = userInfo;
|
||||
if (userInfo.roomUid && self.openType == SessionListOpenTypeDefault) {
|
||||
if ([self showChatRiskView:userInfo]) {
|
||||
@@ -676,7 +676,7 @@
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (indexPath.section == 0) {
|
||||
return self.userInfo.privatePhoto.count > 0 ? 182 : 100;
|
||||
return 100;//self.userInfo.privatePhoto.count > 0 ? 182 : 100;
|
||||
}
|
||||
MessageBaseModel *msg = [self.messages xpSafeObjectAtIndex:indexPath.row];
|
||||
return msg.height;
|
||||
|
@@ -6,7 +6,6 @@
|
||||
//
|
||||
|
||||
#import "SessionListCell.h"
|
||||
#import "NIMBadgeView.h"
|
||||
#import "NetImageView.h"
|
||||
#import "NIMMessageUtils.h"
|
||||
#import "NIMTimeUtils.h"
|
||||
@@ -26,7 +25,7 @@
|
||||
|
||||
@property (nonatomic,strong) UILabel *timeLabel;
|
||||
|
||||
@property (nonatomic,strong) NIMBadgeView *badgeView;
|
||||
@property(nonatomic, strong) UILabel *badgeView;
|
||||
|
||||
@property (nonatomic,strong) UIView *divider;
|
||||
|
||||
@@ -51,7 +50,7 @@
|
||||
NIMUser *user = [[NIMSDK sharedSDK].userManager userInfo:recent.session.sessionId];
|
||||
self.avatarImageView.image = nil;
|
||||
self.nameLabel.text = @"";
|
||||
if (user.userInfo == nil) {
|
||||
if (user.userInfo == nil){//} || [user.userInfo.nickName.lowercaseString isEqualToString:@"Platform New User".lowercaseString]) {
|
||||
NSString * uid = recent.session.sessionId;
|
||||
if (uid > 0) {
|
||||
NSArray * uids = @[uid];
|
||||
@@ -69,7 +68,7 @@
|
||||
}
|
||||
} else {
|
||||
NSString *avatarUrl = user.userInfo.avatarUrl;
|
||||
self.nameLabel.text = user.userInfo.nickName;
|
||||
self.nameLabel.text = user.userInfo.nickName;
|
||||
[self.avatarImageView loadImageWithUrl:avatarUrl completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
|
||||
self.avatarImageView.image = image;
|
||||
}];
|
||||
@@ -80,21 +79,24 @@
|
||||
[messageAtt addAttributes:@{NSForegroundColorAttributeName: UIColorFromRGB(0x7b7b7d)} range:NSMakeRange(0, messageAtt.length)];
|
||||
self.messageLabel.attributedText = messageAtt;
|
||||
|
||||
|
||||
if (recent.lastMessage) {
|
||||
self.timeLabel.text = [NIMTimeUtils showTime:recent.lastMessage.timestamp showDetail:NO];
|
||||
self.timeLabel.text = [NIMTimeUtils formattedTimeFromInterval:recent.lastMessage.timestamp];
|
||||
} else {
|
||||
NSTimeInterval timeSecond = recent.updateTime / 1000.0;
|
||||
self.timeLabel.text = [NIMTimeUtils showTime:timeSecond showDetail:NO];
|
||||
self.timeLabel.text = [NIMTimeUtils formattedTimeFromInterval:timeSecond];
|
||||
}
|
||||
[self.timeLabel sizeToFit];
|
||||
if (recent.unreadCount) {
|
||||
self.badgeView.hidden = NO;
|
||||
self.badgeView.badgeValue = @(recent.unreadCount).stringValue;
|
||||
if (recent.unreadCount > 100) {
|
||||
self.badgeView.text = @" 99+ ";
|
||||
} else {
|
||||
self.badgeView.text = [NSString stringWithFormat:@" %@ ", @(recent.unreadCount)];
|
||||
}
|
||||
} else {
|
||||
self.badgeView.hidden = YES;
|
||||
}
|
||||
|
||||
|
||||
NIMStickTopSessionInfo * topInfo = [self.stickTopMessages objectForKey:recent.session];
|
||||
if (topInfo && topInfo.session.sessionId.integerValue == recent.session.sessionId.integerValue) {
|
||||
self.backgroundColor = [DJDKMIMOMColor colorWithHexString:@"#E5EFFC"];
|
||||
@@ -136,7 +138,7 @@
|
||||
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self.container);
|
||||
make.leading.mas_equalTo(15);
|
||||
make.height.width.mas_equalTo(45);
|
||||
make.height.width.mas_equalTo(47);
|
||||
}];
|
||||
|
||||
[self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -147,7 +149,7 @@
|
||||
[self.messageLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(self.nameLabel);
|
||||
make.top.mas_equalTo(self.avatarImageView.mas_centerY).offset(2);
|
||||
make.trailing.mas_equalTo(self.container).offset(-15);
|
||||
make.trailing.mas_equalTo(self.badgeView.mas_leading).offset(-15);
|
||||
}];
|
||||
|
||||
[self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -161,12 +163,17 @@
|
||||
make.bottom.mas_equalTo(self.container);
|
||||
make.height.mas_equalTo(0.5f);
|
||||
}];
|
||||
|
||||
[self.badgeView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self.messageLabel);
|
||||
make.trailing.mas_equalTo(self.timeLabel);
|
||||
make.height.mas_equalTo(16);
|
||||
make.width.mas_lessThanOrEqualTo(30);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)layoutSubviews {
|
||||
[super layoutSubviews];
|
||||
self.badgeView.nim_right = isMSRTL() ? 35 + self.badgeView.mj_w : self.nim_width - 35;
|
||||
self.badgeView.nim_top = 4;
|
||||
}
|
||||
|
||||
- (NetImageView *)avatarImageView {
|
||||
@@ -177,7 +184,7 @@
|
||||
config.imageType = ImageTypeUserIcon;
|
||||
_avatarImageView = [[NetImageView alloc] initWithConfig:config];
|
||||
_avatarImageView.layer.masksToBounds = YES;
|
||||
_avatarImageView.layer.cornerRadius = 45.f / 2;
|
||||
_avatarImageView.layer.cornerRadius = 47.f / 2;
|
||||
}
|
||||
return _avatarImageView;
|
||||
}
|
||||
@@ -212,9 +219,12 @@
|
||||
return _timeLabel;
|
||||
}
|
||||
|
||||
- (NIMBadgeView *)badgeView {
|
||||
- (UILabel *)badgeView {
|
||||
if (!_badgeView) {
|
||||
_badgeView = [NIMBadgeView viewWithBadgeTip:@""];
|
||||
_badgeView = [UILabel labelInitWithText:@"" font:kFontMedium(10) textColor:[UIColor whiteColor]];
|
||||
_badgeView.backgroundColor = UIColorFromRGB(0xFF4E5C) ;
|
||||
_badgeView.textAlignment = NSTextAlignmentCenter;
|
||||
[_badgeView setCornerRadius:8];
|
||||
}
|
||||
return _badgeView;
|
||||
}
|
||||
|
29
YuMi/Modules/YMMine/Model/RechargeUserModel.h
Normal file
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// RechargeUserModel.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/12/30.
|
||||
//
|
||||
|
||||
#import "PIBaseModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface RechargeUserModel : PIBaseModel
|
||||
|
||||
@property(nonatomic, copy) NSString *avatar;
|
||||
@property(nonatomic, copy) NSString *erbanNo;
|
||||
@property(nonatomic, assign) NSInteger giveGold;
|
||||
@property(nonatomic, copy) NSString *id;
|
||||
@property(nonatomic, assign) BOOL isOnline;
|
||||
@property(nonatomic, copy) NSString *nick;
|
||||
@property(nonatomic, assign) NSInteger roomId;
|
||||
@property(nonatomic, assign) NSInteger starLevel;
|
||||
@property(nonatomic, assign) NSInteger type;
|
||||
@property(nonatomic, assign) NSInteger uid;
|
||||
|
||||
+ (RechargeUserModel *)testModel;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
19
YuMi/Modules/YMMine/Model/RechargeUserModel.m
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// RechargeUserModel.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/12/30.
|
||||
//
|
||||
|
||||
#import "RechargeUserModel.h"
|
||||
|
||||
@implementation RechargeUserModel
|
||||
|
||||
+ (RechargeUserModel *)testModel {
|
||||
RechargeUserModel *model = [[RechargeUserModel alloc] init];
|
||||
model.starLevel = 3;
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
@end
|
@@ -132,7 +132,7 @@
|
||||
}
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
if (failure) {
|
||||
failure([NSError errorWithDomain:msg code:code userInfo:nil]);
|
||||
failure([NSError errorWithDomain:[NSString isEmpty:msg] ? @"" : msg code:code userInfo:nil]);
|
||||
}
|
||||
} showLoading:YES errorToast:YES]];
|
||||
}
|
||||
@@ -148,7 +148,7 @@
|
||||
}
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
if (failure) {
|
||||
failure([NSError errorWithDomain:msg code:code userInfo:nil]);
|
||||
failure([NSError errorWithDomain:[NSString isEmpty:msg] ? @"" : msg code:code userInfo:nil]);
|
||||
}
|
||||
} showLoading:YES errorToast:YES] uid:@(uid) hours:@(hours) blockReason:reason];
|
||||
}
|
||||
|
@@ -76,12 +76,12 @@
|
||||
[container addSubview:self.signLabel];
|
||||
[container addSubview:self.findButton];
|
||||
|
||||
[self.stackView addArrangedSubview:self.nobleImageView];
|
||||
[self.stackView addArrangedSubview:self.nickLabel];
|
||||
[self.stackView addArrangedSubview:self.sexImageView];
|
||||
[self.stackView addArrangedSubview:self.experImageView];
|
||||
[self.stackView addArrangedSubview:self.charmImageView];
|
||||
|
||||
[self.stackView addArrangedSubview:self.nobleImageView];
|
||||
|
||||
_container = container;
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
if (_fansInfo.useingType != ContactUseingType_In_Room && _fansInfo.useingType != ContactUseingType_Share) {
|
||||
self.experImageView.hidden = NO;
|
||||
self.charmImageView.hidden = NO;
|
||||
if (_fansInfo.userVipInfoVO.vipIcon != nil) {
|
||||
if (_fansInfo.userVipInfoVO.nameplateUrl != nil) {
|
||||
self.nobleImageView.hidden = NO;
|
||||
}else{
|
||||
self.nobleImageView.hidden = YES;
|
||||
@@ -155,7 +155,7 @@
|
||||
self.sexImageView.hidden = NO;
|
||||
self.experImageView.imageUrl = _fansInfo.experUrl;
|
||||
self.charmImageView.imageUrl = _fansInfo.charmUrl;
|
||||
self.nobleImageView.imageUrl = _fansInfo.userVipInfoVO.vipIcon;
|
||||
self.nobleImageView.imageUrl = _fansInfo.userVipInfoVO.nameplateUrl;
|
||||
[self.sexImageView setTitle:[NSString getAgeWithBirth:_fansInfo.birth] forState:UIControlStateNormal];
|
||||
self.sexImageView.backgroundColor = _fansInfo.gender == GenderType_Male ? UIColorFromRGB(0x6BB3FF) :UIColorFromRGB(0xFF80CC);
|
||||
self.sexImageView.titleEdgeInsets = _fansInfo.gender != GenderType_Male ? UIEdgeInsetsMake(0, 2, 0, 0):UIEdgeInsetsMake(0, -1, 0, 0);
|
||||
|
@@ -23,7 +23,7 @@
|
||||
///昵称
|
||||
@property (nonatomic,strong) UILabel *nickLabel;
|
||||
///性别
|
||||
@property (nonatomic,strong) UIButton *sexImageView;
|
||||
//@property (nonatomic,strong) UIButton *sexImageView;
|
||||
///等级
|
||||
@property (nonatomic,strong) NetImageView *experImageView;
|
||||
///魅力等级
|
||||
@@ -77,12 +77,11 @@
|
||||
[container addSubview:self.signLabel];
|
||||
[container addSubview:self.attentionButton];
|
||||
|
||||
[self.stackView addArrangedSubview:self.nobleImageView];
|
||||
|
||||
[self.stackView addArrangedSubview:self.nickLabel];
|
||||
[self.stackView addArrangedSubview:self.sexImageView];
|
||||
[self.stackView addArrangedSubview:self.experImageView];
|
||||
[self.stackView addArrangedSubview:self.charmImageView];
|
||||
|
||||
[self.stackView addArrangedSubview:self.nobleImageView];
|
||||
_container = container;
|
||||
}
|
||||
|
||||
@@ -99,10 +98,6 @@
|
||||
make.height.mas_equalTo(20);
|
||||
make.top.equalTo(self.avatarImageView.mas_top).mas_offset((3));
|
||||
}];
|
||||
[self.sexImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(28);
|
||||
make.height.mas_equalTo(14);
|
||||
}];
|
||||
|
||||
[self.signLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(self.stackView);
|
||||
@@ -140,35 +135,26 @@
|
||||
_fansInfo = fansInfo;
|
||||
if (_fansInfo) {
|
||||
self.avatarImageView.imageUrl = _fansInfo.avatar;
|
||||
// if(_fansInfo.nick.length > 5){
|
||||
// _fansInfo.nick = [NSString stringWithFormat:@"%@...",[_fansInfo.nick substringToIndex:5]];
|
||||
// }
|
||||
|
||||
self.nickLabel.text = _fansInfo.nick;
|
||||
self.signLabel.text = _fansInfo.userDesc && _fansInfo.userDesc.length > 0? _fansInfo.userDesc : YMLocalizedString(@"XPMineFansTableViewCell0");
|
||||
if (_fansInfo.useingType != ContactUseingType_In_Room && _fansInfo.useingType != ContactUseingType_Share) {
|
||||
self.experImageView.hidden = NO;
|
||||
self.charmImageView.hidden = NO;
|
||||
if (_fansInfo.userVipInfoVO.vipIcon != nil) {
|
||||
if (_fansInfo.userVipInfoVO.nameplateUrl != nil) {
|
||||
self.nobleImageView.hidden = NO;
|
||||
}else{
|
||||
self.nobleImageView.hidden = YES;
|
||||
}
|
||||
self.sexImageView.hidden = NO;
|
||||
self.attentionButton.hidden = NO;
|
||||
|
||||
self.experImageView.imageUrl = _fansInfo.experUrl;
|
||||
self.charmImageView.imageUrl = _fansInfo.charmUrl;
|
||||
self.nobleImageView.imageUrl = _fansInfo.userVipInfoVO.vipIcon;
|
||||
|
||||
[self.sexImageView setTitle:[NSString getAgeWithBirth:_fansInfo.birth] forState:UIControlStateNormal];
|
||||
self.sexImageView.backgroundColor = _fansInfo.gender == GenderType_Male ? UIColorFromRGB(0x6BB3FF) :UIColorFromRGB(0xFF80CC);
|
||||
self.sexImageView.selected = _fansInfo.gender != GenderType_Male;
|
||||
self.sexImageView.titleEdgeInsets = _fansInfo.gender != GenderType_Male ? UIEdgeInsetsMake(0, 2, 0, 0):UIEdgeInsetsMake(0, 0, 0, 0);
|
||||
self.nobleImageView.imageUrl = _fansInfo.userVipInfoVO.nameplateUrl;
|
||||
|
||||
BOOL isMyFriend = [[NIMSDK sharedSDK].userManager isMyFriend:_fansInfo.uid];
|
||||
self.attentionButton.enabled = !isMyFriend;
|
||||
self.attentionButton.hidden = NO;
|
||||
|
||||
|
||||
UIImage *nobleImage = self.nobleImageView.image;
|
||||
if (nobleImage) {
|
||||
CGFloat scale = nobleImage.size.width / nobleImage.size.height;
|
||||
@@ -180,7 +166,6 @@
|
||||
make.size.mas_equalTo(CGSizeMake(0, 20));
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
if (fansInfo.userVipInfoVO && fansInfo.userVipInfoVO.friendNickColour) {
|
||||
self.nickLabel.textColor = [self colorWithHexString:fansInfo.userVipInfoVO.friendNickColour];
|
||||
@@ -191,7 +176,6 @@
|
||||
self.experImageView.hidden = YES;
|
||||
self.charmImageView.hidden = YES;
|
||||
self.nobleImageView.hidden = YES;
|
||||
self.sexImageView.hidden = YES;
|
||||
self.attentionButton.hidden = YES;
|
||||
self.nickLabel.textColor = UIColorFromRGB(0x333333);
|
||||
}
|
||||
@@ -248,20 +232,6 @@
|
||||
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;
|
||||
}
|
||||
|
||||
- (NetImageView *)experImageView {
|
||||
if (!_experImageView) {
|
||||
NetImageConfig * config = [[NetImageConfig alloc]init];
|
||||
@@ -299,17 +269,22 @@
|
||||
- (UIButton *)attentionButton {
|
||||
if (!_attentionButton) {
|
||||
_attentionButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_attentionButton setTitle:YMLocalizedString(@"XPMineFansTableViewCell1") forState:UIControlStateNormal];
|
||||
[_attentionButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
_attentionButton.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightMedium];
|
||||
[_attentionButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor confirmButtonGradientStartColor],[DJDKMIMOMColor confirmButtonGradientMiddleColor],[DJDKMIMOMColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake((68), (30))] forState:UIControlStateNormal];
|
||||
[_attentionButton setTitle:YMLocalizedString(@"XPMineFansTableViewCell2") forState:UIControlStateDisabled];
|
||||
_attentionButton.titleLabel.font = kFontMedium(14);
|
||||
_attentionButton.titleLabel.numberOfLines = 2;
|
||||
_attentionButton.titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
[_attentionButton setBackgroundImage:[UIImage imageWithColor:[DJDKMIMOMColor disableButtonColor]] forState:UIControlStateDisabled];
|
||||
_attentionButton.layer.masksToBounds = YES;
|
||||
_attentionButton.layer.cornerRadius = 15;
|
||||
|
||||
[_attentionButton setTitle:YMLocalizedString(@"XPMineFansTableViewCell1") forState:UIControlStateNormal];
|
||||
[_attentionButton setTitleColor:UIColorFromRGB(0xFF8C03) forState:UIControlStateNormal];
|
||||
[_attentionButton setBackgroundImage:[UIImage imageWithColor:[UIColor whiteColor]] forState:UIControlStateNormal];
|
||||
|
||||
[_attentionButton setTitle:YMLocalizedString(@"XPMineFansTableViewCell2") forState:UIControlStateDisabled];
|
||||
|
||||
[_attentionButton addTarget:self action:@selector(attentionButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[_attentionButton setCornerRadius:15
|
||||
corners:kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner | kCALayerMinXMaxYCorner | kCALayerMaxXMaxYCorner
|
||||
borderWidth:1
|
||||
borderColor:UIColorFromRGB(0xFF8C03)];
|
||||
[_attentionButton setCornerRadius:15];
|
||||
}
|
||||
return _attentionButton;
|
||||
}
|
||||
|
@@ -23,11 +23,13 @@
|
||||
///昵称
|
||||
@property (nonatomic,strong) UILabel *nickLabel;
|
||||
///性别
|
||||
@property (nonatomic,strong) UIButton *sexImageView;
|
||||
//@property (nonatomic,strong) UIButton *sexImageView;
|
||||
///等级
|
||||
@property (nonatomic,strong) NetImageView *experImageView;
|
||||
///魅力等级
|
||||
@property (nonatomic,strong) NetImageView *charmImageView;
|
||||
@property(nonatomic, strong) NetImageView *VIPImageView;
|
||||
|
||||
///签名
|
||||
@property (nonatomic,strong) UILabel *signLabel;
|
||||
|
||||
@@ -73,9 +75,10 @@
|
||||
[container addSubview:self.signLabel];
|
||||
|
||||
[self.stackView addArrangedSubview:self.nickLabel];
|
||||
[self.stackView addArrangedSubview:self.sexImageView];
|
||||
// [self.stackView addArrangedSubview:self.sexImageView];
|
||||
[self.stackView addArrangedSubview:self.experImageView];
|
||||
[self.stackView addArrangedSubview:self.charmImageView];
|
||||
[self.stackView addArrangedSubview:self.VIPImageView];
|
||||
|
||||
_container = container;
|
||||
}
|
||||
@@ -89,12 +92,19 @@
|
||||
|
||||
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(self.avatarImageView.mas_trailing).offset(10);
|
||||
make.trailing.mas_lessThanOrEqualTo(self.container).offset(-10);
|
||||
make.bottom.mas_equalTo(self.avatarImageView.mas_centerY).offset(-2);
|
||||
|
||||
|
||||
// make.leading.mas_equalTo(self.avatarImageView.mas_trailing).offset((10));
|
||||
// make.trailing.mas_lessThanOrEqualTo(self.container).mas_offset(-0);
|
||||
// make.height.mas_equalTo(((20)));
|
||||
// make.top.equalTo(self.avatarImageView.mas_top).mas_offset((3));
|
||||
}];
|
||||
[self.sexImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(28);
|
||||
make.height.mas_equalTo(14);
|
||||
}];
|
||||
// [self.sexImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.width.mas_equalTo(28);
|
||||
// make.height.mas_equalTo(14);
|
||||
// }];
|
||||
[self.signLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(self.stackView);
|
||||
make.top.mas_equalTo(self.stackView.mas_bottom).offset(7);
|
||||
@@ -108,6 +118,11 @@
|
||||
make.height.mas_equalTo(20);
|
||||
make.width.mas_equalTo(width);
|
||||
}];
|
||||
|
||||
[self.VIPImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(20);
|
||||
make.width.mas_equalTo(width);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
@@ -122,10 +137,28 @@
|
||||
self.charmImageView.hidden = NO;
|
||||
self.experImageView.imageUrl = _userInfo.userLevelVo.experUrl;
|
||||
self.charmImageView.imageUrl = _userInfo.userLevelVo.charmUrl;
|
||||
[self.sexImageView setTitle:[NSString getAgeWithBirth:_userInfo.birth] forState:UIControlStateNormal];
|
||||
self.sexImageView.backgroundColor = _userInfo.gender == GenderType_Male ? UIColorFromRGB(0x6BB3FF) :UIColorFromRGB(0xFF80CC);
|
||||
self.sexImageView.titleEdgeInsets = _userInfo.gender != GenderType_Male ? UIEdgeInsetsMake(0, 2, 0, 0):UIEdgeInsetsMake(0, -1, 0, 0);
|
||||
self.sexImageView.selected = _userInfo.gender != GenderType_Male;
|
||||
// [self.sexImageView setTitle:[NSString getAgeWithBirth:_userInfo.birth] forState:UIControlStateNormal];
|
||||
// self.sexImageView.backgroundColor = _userInfo.gender == GenderType_Male ? UIColorFromRGB(0x6BB3FF) :UIColorFromRGB(0xFF80CC);
|
||||
// self.sexImageView.titleEdgeInsets = _userInfo.gender != GenderType_Male ? UIEdgeInsetsMake(0, 2, 0, 0):UIEdgeInsetsMake(0, -1, 0, 0);
|
||||
// self.sexImageView.selected = _userInfo.gender != GenderType_Male;
|
||||
|
||||
if (userInfo.userVipInfoVO) {
|
||||
self.VIPImageView.hidden = userInfo.userVipInfoVO.vipLevel == 0;
|
||||
self.VIPImageView.imageUrl = userInfo.userVipInfoVO.nameplateUrl;
|
||||
@kWeakify(self);
|
||||
[self.VIPImageView loadImageWithUrl:userInfo.userVipInfoVO.nameplateUrl completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
|
||||
if (image) {
|
||||
@kStrongify(self);
|
||||
CGFloat scale = image.size.width / image.size.height;
|
||||
[self.VIPImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(20* scale, 20));
|
||||
}];
|
||||
[self.stackView layoutIfNeeded];
|
||||
}
|
||||
}];
|
||||
} else {
|
||||
self.VIPImageView.hidden = YES;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,7 +180,7 @@
|
||||
_stackView.axis = UILayoutConstraintAxisHorizontal;
|
||||
_stackView.distribution = UIStackViewDistributionFill;
|
||||
_stackView.alignment = UIStackViewAlignmentCenter;
|
||||
_stackView.spacing = 10;
|
||||
_stackView.spacing = 4;
|
||||
}
|
||||
return _stackView;
|
||||
}
|
||||
@@ -161,19 +194,19 @@
|
||||
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;
|
||||
}
|
||||
//- (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;
|
||||
//}
|
||||
|
||||
- (NetImageView *)experImageView {
|
||||
if (!_experImageView) {
|
||||
@@ -193,6 +226,15 @@
|
||||
return _charmImageView;
|
||||
}
|
||||
|
||||
- (NetImageView *)VIPImageView {
|
||||
if (!_VIPImageView) {
|
||||
NetImageConfig * config = [[NetImageConfig alloc]init];
|
||||
|
||||
_VIPImageView = [[NetImageView alloc] initWithConfig:config];
|
||||
}
|
||||
return _VIPImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)signLabel{
|
||||
if (!_signLabel) {
|
||||
_signLabel = [[UILabel alloc] init];
|
||||
|
@@ -43,6 +43,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// @param giftId 礼物id
|
||||
/// @param giftNum 礼物数量
|
||||
+(void)giveGift:(HttpRequestHelperCompletion)completion toUid:(NSString *)toUid giftId:(NSString *)giftId giftNum:(NSString *)giftNum;
|
||||
|
||||
+(void)rechargeUserInfo:(HttpRequestHelperCompletion)completion;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -25,4 +25,7 @@
|
||||
+(void)giveGift:(HttpRequestHelperCompletion)completion toUid:(NSString *)toUid giftId:(NSString *)giftId giftNum:(NSString *)giftNum{
|
||||
[self makeRequest:@"user/diamond/giveGift" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, toUid,giftId,giftNum, nil];
|
||||
}
|
||||
+(void)rechargeUserInfo:(HttpRequestHelperCompletion)completion {
|
||||
[self makeRequest:@"recharge/user/info" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, nil];
|
||||
}
|
||||
@end
|
||||
|
@@ -25,6 +25,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
-(void)getPackGiftList;
|
||||
///转赠礼物
|
||||
-(void)giveGiftWithToUid:(NSString *)toUid giftId:(NSString *)giftId giftNum:(NSString *)giftNum;
|
||||
|
||||
///充值代理信息
|
||||
- (void)rechargeUserInfo;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -15,7 +15,7 @@
|
||||
#import "XPMineGiveDiamondDetailsModel.h"
|
||||
#import "UserGiftWallInfoModel.h"
|
||||
#import "GiftInfoModel.h"
|
||||
|
||||
#import "RechargeUserModel.h"
|
||||
#import "XPMineGiveDiamondProtocol.h"
|
||||
#import "XPHomeSearchProtocol.h"
|
||||
|
||||
@@ -56,7 +56,9 @@
|
||||
-(void)searchGivePeopleWith:(NSString *)erbanNo{
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSString * ticket = [AccountInfoStorage instance].getTicket;
|
||||
@kWeakify(self);
|
||||
[Api searchGivePeople:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
@kStrongify(self);
|
||||
XPMineGiveDiamondSearchModel *model = [XPMineGiveDiamondSearchModel modelWithDictionary:data.data];
|
||||
[[self getView] searchGivePeopleWihtModel:model];
|
||||
}] ticket:ticket uid:uid erbanNo:erbanNo];
|
||||
@@ -72,18 +74,33 @@
|
||||
-(void)getPackGiftList{
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSString * ticket = [AccountInfoStorage instance].getTicket;
|
||||
@kWeakify(self);
|
||||
[Api requestPackGiftList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
@kStrongify(self);
|
||||
NSArray * info = [GiftInfoModel modelsWithArray:data.data];
|
||||
[[self getView] getPacketGiftListSuccess:info];
|
||||
}fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
@kStrongify(self);
|
||||
[[self getView] getPacketGiftListFail:msg];
|
||||
}] uid:uid ticket:ticket];
|
||||
}
|
||||
-(void)giveGiftWithToUid:(NSString *)toUid giftId:(NSString *)giftId giftNum:(NSString *)giftNum{
|
||||
@kWeakify(self);
|
||||
[Api giveGift:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
@kStrongify(self);
|
||||
[[self getView] giveGiftSuccess];
|
||||
}] toUid:toUid giftId:giftId giftNum:giftNum];
|
||||
}
|
||||
|
||||
- (void)rechargeUserInfo {
|
||||
@kWeakify(self);
|
||||
[Api rechargeUserInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
@kStrongify(self);
|
||||
[[self getView] loadRechargeUserSuccess:[RechargeUserModel modelWithJSON:data.data]];
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
|
||||
} showLoading:YES errorToast:YES]];
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
@class WalletInfoModel,XPMineGiveDiamondSearchModel,XPMineGiveDiamondDetailsModel,GiftInfoModel;
|
||||
@class WalletInfoModel,XPMineGiveDiamondSearchModel,XPMineGiveDiamondDetailsModel,GiftInfoModel, RechargeUserModel;
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol XPMineGiveDiamondProtocol <NSObject>
|
||||
@@ -37,6 +37,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (void)getPacketGiftListFail:(NSString *)message;
|
||||
///转赠礼物
|
||||
-(void)giveGiftSuccess;
|
||||
|
||||
- (void)loadRechargeUserSuccess:(RechargeUserModel *)userModel;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -27,6 +27,9 @@
|
||||
@property (nonatomic,strong) UIButton *diamondBtn;
|
||||
///选择礼物
|
||||
@property (nonatomic,strong) UIButton *giftBtn;
|
||||
|
||||
@property(nonatomic, strong) UIView *indexImageView;
|
||||
|
||||
///数量钻石图标
|
||||
@property (nonatomic,strong) UIImageView *numIcon;
|
||||
/// 钻石数量
|
||||
@@ -37,8 +40,6 @@
|
||||
@property (nonatomic,strong) UIImageView *myDiamondIcon;
|
||||
///确认
|
||||
@property (nonatomic,strong) UIButton *confirmBtn;
|
||||
///分割线
|
||||
@property (nonatomic,strong) UIView *lineView;
|
||||
///转赠礼物view
|
||||
@property (nonatomic,strong) XPMineChooseGiveGiftView *giveGiftView;
|
||||
|
||||
@@ -76,24 +77,30 @@
|
||||
[self.typeStackView addArrangedSubview:self.diamondBtn];
|
||||
[self.typeStackView addArrangedSubview:self.giftBtn];
|
||||
|
||||
|
||||
|
||||
[self addSubview:self.numIcon];
|
||||
[self addSubview:self.diamondNumView];
|
||||
[self addSubview:self.lineView];
|
||||
[self addSubview:self.indexImageView];
|
||||
[self addSubview:self.myDiamondIcon];
|
||||
[self addSubview:self.myDiamondNumView];
|
||||
[self addSubview:self.confirmBtn];
|
||||
[self addSubview:self.giveGiftView];
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
- (void)initSubViewConstraints {
|
||||
UIView *bgView = [[UIView alloc] init];
|
||||
[bgView setCornerRadius:10];
|
||||
bgView.backgroundColor = UIColorFromRGB(0xf7f7f7);
|
||||
[self insertSubview:bgView belowSubview:self.headView];
|
||||
[bgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self).offset(6);
|
||||
make.leading.trailing.mas_equalTo(self).inset(15);
|
||||
make.height.mas_equalTo(82);
|
||||
}];
|
||||
|
||||
[self.headView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(50));
|
||||
make.top.mas_equalTo(kGetScaleWidth(16));
|
||||
make.leading.mas_equalTo(kGetScaleWidth(15));
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(59));
|
||||
make.centerY.mas_equalTo(bgView);
|
||||
make.leading.mas_equalTo(27);
|
||||
}];
|
||||
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.equalTo(self.headView.mas_trailing).mas_offset(kGetScaleWidth(10));
|
||||
@@ -106,8 +113,7 @@
|
||||
make.height.mas_equalTo(kGetScaleWidth(14));
|
||||
make.top.equalTo(self.titleView.mas_bottom).mas_offset(kGetScaleWidth(4));
|
||||
}];
|
||||
|
||||
|
||||
|
||||
if(self.isHaveGiveGift == YES && self.isHaveGiveDiamond == YES){
|
||||
[self.typeStackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(kGetScaleWidth(15));
|
||||
@@ -141,65 +147,74 @@
|
||||
self.giftBtn.hidden = NO;
|
||||
self.diamondBtn.hidden = YES;
|
||||
self.typeStackView.spacing = kGetScaleWidth(0);
|
||||
|
||||
}
|
||||
|
||||
UIView *bgView_2 = [[UIView alloc] init];
|
||||
[bgView_2 setCornerRadius:10];
|
||||
bgView_2.backgroundColor = UIColorFromRGB(0xFFF7D6);
|
||||
[self insertSubview:bgView_2 belowSubview:self.numIcon];
|
||||
[bgView_2 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.indexImageView.mas_bottom).offset(10);
|
||||
make.leading.trailing.mas_equalTo(self).inset(16);
|
||||
make.height.mas_equalTo(kGetScaleWidth(52));
|
||||
}];
|
||||
|
||||
[self.numIcon mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.equalTo(self.headView);
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(20));
|
||||
make.top.equalTo(self.typeStackView.mas_bottom).mas_offset(kGetScaleWidth(35));
|
||||
make.leading.mas_equalTo(self.headView).offset(2);
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(32));
|
||||
make.centerY.mas_equalTo(bgView_2);
|
||||
// make.top.equalTo(self.typeStackView.mas_bottom).mas_offset(kGetScaleWidth(35));
|
||||
|
||||
}];
|
||||
[self.diamondBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(kGetScaleWidth(80));
|
||||
make.height.mas_equalTo(kGetScaleWidth(31));
|
||||
}];
|
||||
[self.giftBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.equalTo(self.diamondBtn);
|
||||
}];
|
||||
|
||||
[self.diamondNumView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.equalTo(self.titleView);
|
||||
make.height.mas_equalTo(kGetScaleWidth(24));
|
||||
make.leading.equalTo(self.numIcon.mas_trailing).mas_offset(kGetScaleWidth(10));
|
||||
make.height.mas_equalTo(28);
|
||||
make.leading.equalTo(self.numIcon.mas_trailing).mas_offset(12);
|
||||
make.centerY.equalTo(self.numIcon);
|
||||
}];
|
||||
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(1);
|
||||
make.leading.equalTo(self.headView);
|
||||
make.trailing.equalTo(self.titleView);
|
||||
make.top.equalTo(self.numIcon.mas_bottom).mas_offset(kGetScaleWidth(6));
|
||||
|
||||
[self.diamondBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(kGetScaleWidth(80));
|
||||
make.height.mas_equalTo(kGetScaleWidth(31));
|
||||
}];
|
||||
[self.giftBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.equalTo(self.diamondBtn);
|
||||
}];
|
||||
[self.indexImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(4);
|
||||
make.centerX.mas_equalTo(self.diamondBtn);
|
||||
make.width.mas_equalTo(14);
|
||||
make.top.mas_equalTo(self.diamondBtn.mas_bottom).mas_offset(2);
|
||||
}];
|
||||
|
||||
[self.myDiamondNumView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.trailing.equalTo(self.myDiamondIcon.mas_leading).mas_offset(-kGetScaleWidth(8));
|
||||
make.height.mas_equalTo(20);
|
||||
make.leading.mas_equalTo(bgView_2);
|
||||
make.top.mas_equalTo(bgView_2.mas_bottom).offset(12);
|
||||
}];
|
||||
[self.myDiamondIcon mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.equalTo(self.titleView);
|
||||
make.width.height.equalTo(self.numIcon);
|
||||
make.top.equalTo(self.numIcon.mas_bottom).mas_offset(kGetScaleWidth(9));
|
||||
}];
|
||||
[self.myDiamondNumView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.equalTo(self.myDiamondIcon.mas_leading).mas_offset(-kGetScaleWidth(8));
|
||||
make.height.equalTo(self.titleView);
|
||||
make.leading.equalTo(self.headView);
|
||||
make.centerY.equalTo(self.myDiamondIcon);
|
||||
make.leading.mas_equalTo(self.myDiamondNumView.mas_trailing);
|
||||
make.width.height.mas_equalTo(20);
|
||||
make.centerY.mas_equalTo(self.myDiamondNumView);
|
||||
}];
|
||||
|
||||
[self.confirmBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.equalTo(self.headView);
|
||||
make.trailing.equalTo(self.titleView);
|
||||
make.top.equalTo(self.typeStackView.mas_bottom).mas_offset(kGetScaleWidth(162));
|
||||
make.height.mas_equalTo(kGetScaleWidth(46));
|
||||
make.leading.trailing.mas_equalTo(self).inset(15);
|
||||
make.top.equalTo(self.indexImageView.mas_bottom).mas_offset(kGetScaleWidth(110));
|
||||
make.height.mas_equalTo(kGetScaleWidth(40));
|
||||
}];
|
||||
|
||||
[self.giveGiftView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(0);
|
||||
make.trailing.mas_equalTo(0);
|
||||
make.top.equalTo(self.typeStackView.mas_bottom).mas_offset(kGetScaleWidth(20));
|
||||
make.top.equalTo(self.indexImageView.mas_bottom).mas_offset(9);
|
||||
make.height.mas_equalTo(kGetScaleWidth(370));
|
||||
}];
|
||||
|
||||
|
||||
}
|
||||
- (void)keyboardWillShow:(NSNotification *)notification
|
||||
|
||||
{ if(!self.giveGiftView.textField.isFirstResponder){return;}
|
||||
- (void)keyboardWillShow:(NSNotification *)notification {
|
||||
if(!self.giveGiftView.textField.isFirstResponder){return;}
|
||||
|
||||
NSDictionary *userInfo = [notification userInfo];
|
||||
CGFloat curkeyBoardHeight = [[[notification userInfo]objectForKey:@"UIKeyboardBoundsUserInfoKey"]CGRectValue].size.height;
|
||||
CGRect begin = [[[notification userInfo]objectForKey:@"UIKeyboardFrameBeginUserInfoKey"]CGRectValue];
|
||||
@@ -216,16 +231,13 @@
|
||||
}];
|
||||
[self.superview layoutIfNeeded];
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
- (void)keyboardWillHide:(NSNotification *)notification{
|
||||
if(!self.giveGiftView.textField.isFirstResponder){return;}
|
||||
//获取键盘的高度
|
||||
NSDictionary *userInfo = [notification userInfo];
|
||||
NSValue *keyboardValue = [userInfo objectForKey:UIKeyboardFrameEndUserInfoKey];
|
||||
CGRect keyboardRect = [keyboardValue CGRectValue];
|
||||
// NSValue *keyboardValue = [userInfo objectForKey:UIKeyboardFrameEndUserInfoKey];
|
||||
CGFloat animationDuration = [userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue];
|
||||
//做自定义事件
|
||||
[self.superview layoutIfNeeded];
|
||||
@@ -250,12 +262,13 @@
|
||||
#pragma mark- UITextFieldDelegate
|
||||
-(void)textFieldDidChange:(UITextField *)textField{
|
||||
self.confirmBtn.selected = textField.text.length > 0;
|
||||
self.confirmBtn.alpha = self.confirmBtn.isSelected ? 1: 0.3;
|
||||
}
|
||||
-(void)textFieldDidChangeWithText:(NSString *)text{
|
||||
if(self.giveGiftView.chooseGiftModel != nil){
|
||||
self.confirmBtn.selected = text.length > 0;
|
||||
}
|
||||
|
||||
self.confirmBtn.alpha = self.confirmBtn.isSelected ? 1: 0.3;
|
||||
}
|
||||
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{
|
||||
ClientConfig *config = [ClientConfig shareConfig];
|
||||
@@ -307,9 +320,19 @@
|
||||
self.giveGiftView.hidden = YES;
|
||||
self.type = 0;
|
||||
self.confirmBtn.selected = self.diamondNumView.text.length > 0;
|
||||
|
||||
self.confirmBtn.alpha = self.confirmBtn.isSelected ? 1: 0.3;
|
||||
|
||||
[self.giveGiftView resignFirstResponder];
|
||||
|
||||
[self.confirmBtn mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.typeStackView.mas_bottom).mas_offset(kGetScaleWidth(162));
|
||||
make.top.equalTo(self.indexImageView.mas_bottom).mas_offset(kGetScaleWidth(110));
|
||||
}];
|
||||
|
||||
[self.indexImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(4);
|
||||
make.centerX.mas_equalTo(self.diamondBtn);
|
||||
make.width.mas_equalTo(14);
|
||||
make.top.mas_equalTo(self.diamondBtn.mas_bottom).mas_offset(2);
|
||||
}];
|
||||
}
|
||||
///选择礼物
|
||||
@@ -323,8 +346,19 @@
|
||||
}else{
|
||||
self.confirmBtn.selected = NO;
|
||||
}
|
||||
|
||||
[self.diamondNumView resignFirstResponder];
|
||||
|
||||
self.confirmBtn.alpha = self.confirmBtn.isSelected ? 1: 0.3;
|
||||
[self.confirmBtn mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.typeStackView.mas_bottom).mas_offset(kGetScaleWidth(440));
|
||||
make.top.equalTo(self.indexImageView.mas_bottom).mas_offset(kGetScaleWidth(354));
|
||||
}];
|
||||
|
||||
[self.indexImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(4);
|
||||
make.centerX.mas_equalTo(self.giftBtn);
|
||||
make.width.mas_equalTo(14);
|
||||
make.top.mas_equalTo(self.giftBtn.mas_bottom).mas_offset(2);
|
||||
}];
|
||||
}
|
||||
-(void)setGiveDiamondModel:(XPMineGiveDiamondModel *)giveDiamondModel{
|
||||
@@ -379,21 +413,25 @@
|
||||
if (!_diamondNumView){
|
||||
_diamondNumView = [MSBaseTextField new];
|
||||
_diamondNumView.keyboardType = UIKeyboardTypeNumberPad;
|
||||
_diamondNumView.font = [UIFont systemFontOfSize:kGetScaleWidth(30) weight:UIFontWeightMedium];
|
||||
_diamondNumView.textColor = [DJDKMIMOMColor inputTextColor];
|
||||
_diamondNumView.attributedPlaceholder = [[NSMutableAttributedString alloc]initWithString:@"0" attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:kGetScaleWidth(30) weight:UIFontWeightRegular],NSForegroundColorAttributeName:[DJDKMIMOMColor disableButtonTextColor]}];
|
||||
_diamondNumView.textAlignment = NSTextAlignmentRight;
|
||||
_diamondNumView.font = kFontSemibold(20);
|
||||
_diamondNumView.textColor = UIColorFromRGB(0x313131);
|
||||
_diamondNumView.attributedPlaceholder = [[NSMutableAttributedString alloc] initWithString:@"0" attributes:@{NSFontAttributeName:kFontSemibold(20),NSForegroundColorAttributeName:UIColorFromRGB(0x313131)}];
|
||||
// _diamondNumView.textAlignment = NSTextAlignmentRight;
|
||||
[_diamondNumView addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];
|
||||
_diamondNumView.delegate = self;
|
||||
}
|
||||
return _diamondNumView;
|
||||
}
|
||||
-(UIView *)lineView{
|
||||
if (!_lineView){
|
||||
_lineView = [UIView new];
|
||||
_lineView.backgroundColor = UIColorFromRGB(0xF7F7F7);
|
||||
-(UIView *)indexImageView{
|
||||
if (!_indexImageView){
|
||||
_indexImageView = [UIImageView new];
|
||||
[_indexImageView setCornerRadius:2];
|
||||
[_indexImageView addGradientBackgroundWithColors:@[
|
||||
UIColorFromRGB(0xE29030),
|
||||
UIColorFromRGB(0xfcc074),
|
||||
] startPoint:CGPointMake(0, 0.5) endPoint:CGPointMake(1.0, 0.5) cornerRadius:2];
|
||||
}
|
||||
return _lineView;
|
||||
return _indexImageView;
|
||||
}
|
||||
-(UILabel *)myDiamondNumView{
|
||||
if (!_myDiamondNumView){
|
||||
@@ -416,12 +454,15 @@
|
||||
if (!_confirmBtn){
|
||||
_confirmBtn = [UIButton new];
|
||||
[_confirmBtn setTitle:YMLocalizedString(@"TTAlertConfig0") forState:UIControlStateNormal];
|
||||
[_confirmBtn setTitleColor:[DJDKMIMOMColor disableButtonTextColor] forState:UIControlStateNormal];
|
||||
[_confirmBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
[_confirmBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateSelected];
|
||||
[_confirmBtn setBackgroundImage:[UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xE6E6F0),UIColorFromRGB(0xE6E6F0)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(KScreenWidth - kGetScaleWidth(30), kGetScaleWidth(46))] forState:UIControlStateNormal];
|
||||
[_confirmBtn setBackgroundImage:[UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor confirmButtonGradientStartColor],[DJDKMIMOMColor confirmButtonGradientMiddleColor],[DJDKMIMOMColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(KScreenWidth - kGetScaleWidth(30), kGetScaleWidth(46))] forState:UIControlStateSelected];
|
||||
_confirmBtn.layer.cornerRadius = kGetScaleWidth(46) / 2;
|
||||
[_confirmBtn setBackgroundImage:[UIImage gradientColorImageFromColors:@[UIColorRGBAlpha(0xE29030, 1.0), UIColorRGBAlpha(0xFCC074, 1.0)]
|
||||
gradientType:GradientTypeLeftToRight
|
||||
imgSize:CGSizeMake(KScreenWidth - kGetScaleWidth(30), kGetScaleWidth(40))]
|
||||
forState:UIControlStateNormal];
|
||||
_confirmBtn.layer.cornerRadius = kGetScaleWidth(20);
|
||||
_confirmBtn.layer.masksToBounds = YES;
|
||||
_confirmBtn.alpha = 0.3;
|
||||
[_confirmBtn addTarget:self action:@selector(confirmAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _confirmBtn;
|
||||
@@ -449,17 +490,11 @@
|
||||
- (UIButton *)diamondBtn{
|
||||
if (!_diamondBtn){
|
||||
_diamondBtn = [UIButton new];
|
||||
UIImage *noChooseImage = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xE6E6F0),UIColorFromRGB(0xE6E6F0),UIColorFromRGB(0xE6E6F0)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(80), kGetScaleWidth(31))];
|
||||
UIImage *chooseImage = [UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor confirmButtonGradientStartColor],[DJDKMIMOMColor confirmButtonGradientMiddleColor],[DJDKMIMOMColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(80), kGetScaleWidth(31))];
|
||||
[_diamondBtn setBackgroundImage:noChooseImage forState:UIControlStateNormal];
|
||||
[_diamondBtn setBackgroundImage:chooseImage forState:UIControlStateSelected];
|
||||
_diamondBtn.titleLabel.font = [UIFont systemFontOfSize:14];
|
||||
_diamondBtn.titleLabel.font = kFontMedium(15);
|
||||
[_diamondBtn setTitle:YMLocalizedString(@"XPMineChooseGiveDiamondView2") forState:UIControlStateNormal];
|
||||
[_diamondBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateSelected];
|
||||
[_diamondBtn setTitleColor:UIColorFromRGB(0x6D6B89) forState:UIControlStateNormal];
|
||||
[_diamondBtn setTitleColor:UIColorFromRGB(0x313131) forState:UIControlStateSelected];
|
||||
[_diamondBtn setTitleColor:UIColorFromRGB(0x7b7b7d) forState:UIControlStateNormal];
|
||||
_diamondBtn.selected = YES;
|
||||
_diamondBtn.layer.cornerRadius = kGetScaleWidth((31))/2;
|
||||
_diamondBtn.layer.masksToBounds = YES;
|
||||
[_diamondBtn addTarget:self action:@selector(chooseDiamondAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
}
|
||||
@@ -468,19 +503,12 @@
|
||||
-(UIButton *)giftBtn{
|
||||
if (!_giftBtn){
|
||||
_giftBtn = [UIButton new];
|
||||
UIImage *noChooseImage = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xE6E6F0),UIColorFromRGB(0xE6E6F0),UIColorFromRGB(0xE6E6F0)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(80), kGetScaleWidth(31))];
|
||||
UIImage *chooseImage = [UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor confirmButtonGradientStartColor],[DJDKMIMOMColor confirmButtonGradientMiddleColor],[DJDKMIMOMColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(80), kGetScaleWidth(31))];
|
||||
[_giftBtn setBackgroundImage:noChooseImage forState:UIControlStateNormal];
|
||||
[_giftBtn setBackgroundImage:chooseImage forState:UIControlStateSelected];
|
||||
_giftBtn.titleLabel.font = [UIFont systemFontOfSize:14];
|
||||
_giftBtn.titleLabel.font = kFontMedium(15);
|
||||
[_giftBtn setTitle:YMLocalizedString(@"XPMineChooseGiveDiamondView3") forState:UIControlStateNormal];
|
||||
[_giftBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateSelected];
|
||||
[_giftBtn setTitleColor:UIColorFromRGB(0x6D6B89) forState:UIControlStateNormal];
|
||||
[_giftBtn setTitleColor:UIColorFromRGB(0x313131) forState:UIControlStateSelected];
|
||||
[_giftBtn setTitleColor:UIColorFromRGB(0x7b7b7d) forState:UIControlStateNormal];
|
||||
_giftBtn.selected = NO;
|
||||
_giftBtn.layer.cornerRadius = kGetScaleWidth((31))/2;
|
||||
_giftBtn.layer.masksToBounds = YES;
|
||||
[_giftBtn addTarget:self action:@selector(chooseGiftAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
}
|
||||
return _giftBtn;
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@
|
||||
//
|
||||
// Created by YuMi on 2022/11/2.
|
||||
//
|
||||
#import "XPPageControl.h"
|
||||
//#import "XPPageControl.h"
|
||||
#import "XPMineChooseGiveGiftView.h"
|
||||
#import "XPMineChooseGiveGiftViewCell.h"
|
||||
#import "XPGuildEmptyCollectionViewCell.h"
|
||||
@@ -12,13 +12,13 @@
|
||||
@interface XPMineChooseGiveGiftView()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout>
|
||||
@property (nonatomic,strong) UICollectionView *collectionView;
|
||||
@property (nonatomic,strong) UIView *bgView;
|
||||
@property (nonatomic,strong) XPPageControl *pageControl;
|
||||
//@property (nonatomic,strong) XPPageControl *pageControl;
|
||||
@property(nonatomic, strong) UIPageControl *pageControl;
|
||||
@property (nonatomic,strong) NSMutableArray *listData;
|
||||
@property (nonatomic,strong) NSIndexPath *indexPath;
|
||||
|
||||
@property (nonatomic,strong) UILabel *numView;
|
||||
@property (nonatomic,strong) UILabel *numTitleLabel;
|
||||
|
||||
@property (nonatomic,strong) UIView *lineView;
|
||||
@property (nonatomic,strong) UIButton *allBtn;
|
||||
@end
|
||||
@implementation XPMineChooseGiveGiftView
|
||||
@@ -37,52 +37,58 @@
|
||||
[self addSubview:self.bgView];
|
||||
[self addSubview:self.collectionView];
|
||||
[self addSubview:self.pageControl];
|
||||
[self addSubview:self.numView];
|
||||
[self addSubview:self.numTitleLabel];
|
||||
[self addSubview:self.textField];
|
||||
[self addSubview:self.lineView];
|
||||
[self addSubview:self.allBtn];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(kGetScaleWidth(15));
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(15));
|
||||
make.leading.mas_equalTo(15);
|
||||
make.trailing.mas_equalTo(-15);
|
||||
make.top.equalTo(self);
|
||||
make.height.mas_equalTo(kGetScaleWidth(290));
|
||||
make.height.mas_equalTo(kGetScaleWidth(268));
|
||||
}];
|
||||
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(kGetScaleWidth(15));
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(15));
|
||||
make.leading.mas_equalTo(15);
|
||||
make.trailing.mas_equalTo(-15);
|
||||
make.top.equalTo(self);
|
||||
make.height.mas_equalTo(kGetScaleWidth(248));
|
||||
}];
|
||||
[self.pageControl mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.equalTo(self);
|
||||
make.top.mas_equalTo(kGetScaleWidth(269));
|
||||
make.height.mas_equalTo(kGetScaleWidth(3));
|
||||
make.width.mas_equalTo(0);
|
||||
make.centerX.equalTo(self);
|
||||
make.bottom.mas_equalTo(self.bgView).offset(-4);
|
||||
make.height.mas_equalTo(8);
|
||||
make.width.mas_equalTo(KScreenWidth);
|
||||
}];
|
||||
|
||||
UIView *bgView = [[UIView alloc] init];
|
||||
[bgView setCornerRadius:12];
|
||||
bgView.backgroundColor = UIColorFromRGB(0xf7f7f7);
|
||||
[self insertSubview:bgView belowSubview:self.numTitleLabel];
|
||||
[bgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.bgView.mas_bottom).offset(14);
|
||||
make.leading.trailing.mas_equalTo(self).inset(15);
|
||||
make.height.mas_equalTo(52);
|
||||
}];
|
||||
|
||||
[self.numTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.equalTo(bgView);
|
||||
make.leading.mas_equalTo(bgView).offset(10);
|
||||
}];
|
||||
|
||||
[self.textField mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(15));
|
||||
make.height.mas_equalTo(kGetScaleWidth(17));
|
||||
make.leading.mas_equalTo(self.numTitleLabel.mas_trailing).offset(8);
|
||||
make.height.mas_equalTo(28);
|
||||
make.width.mas_equalTo(kGetScaleWidth(156));
|
||||
make.top.equalTo(self.bgView.mas_bottom).mas_offset(kGetScaleWidth(23));
|
||||
}];
|
||||
[self.numView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.equalTo(self.textField);
|
||||
make.trailing.equalTo(self.textField.mas_leading).mas_offset(-kGetScaleWidth(10));
|
||||
}];
|
||||
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.equalTo(self.textField);
|
||||
make.leading.equalTo(self.numView);
|
||||
make.height.mas_equalTo(1);
|
||||
make.top.equalTo(self.textField.mas_bottom).mas_offset(kGetScaleWidth(11));
|
||||
make.centerY.mas_equalTo(bgView);
|
||||
}];
|
||||
|
||||
[self.allBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(kGetScaleWidth(36));
|
||||
make.height.mas_equalTo(kGetScaleWidth(19));
|
||||
make.trailing.equalTo(self.textField);
|
||||
make.top.equalTo(self.lineView.mas_bottom).mas_offset(kGetScaleWidth(10));
|
||||
make.width.mas_greaterThanOrEqualTo(38);
|
||||
make.height.mas_equalTo(24);
|
||||
make.centerY.mas_equalTo(bgView);
|
||||
make.trailing.mas_equalTo(bgView).offset(-10);
|
||||
}];
|
||||
}
|
||||
-(void)setListData:(NSMutableArray *)listData count:(NSInteger)count{
|
||||
@@ -90,9 +96,12 @@
|
||||
if(listData.count == 0)return;
|
||||
[self.collectionView reloadData];
|
||||
|
||||
self.pageControl.count = count;
|
||||
self.pageControl.curPage = 1;
|
||||
self.pageControl.numberOfPages = count;
|
||||
self.pageControl.currentPage = 0;
|
||||
self.pageControl.hidden = count == 1;
|
||||
self.pageControl.currentPageIndicatorTintColor = [UIColor colorWithRed:1.0 green:0.55 blue:0.01 alpha:1.0]; // 当前点颜色 #FF8C03
|
||||
self.pageControl.pageIndicatorTintColor = [UIColor colorWithRed:0.81 green:0.81 blue:0.81 alpha:1.0]; // 其他点颜色 #CECECE
|
||||
|
||||
}
|
||||
-(void)resignFirstResponder{
|
||||
[self.textField resignFirstResponder];
|
||||
@@ -131,8 +140,9 @@
|
||||
|
||||
}
|
||||
-(void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView{
|
||||
NSInteger page = scrollView.contentOffset.x / (KScreenWidth - kGetScaleWidth(30));
|
||||
self.pageControl.curPage = ceil(page+1);
|
||||
// NSInteger page = scrollView.contentOffset.x / (KScreenWidth - 30);
|
||||
NSInteger currentPage = round(scrollView.contentOffset.x / scrollView.frame.size.width);
|
||||
self.pageControl.currentPage = currentPage;
|
||||
}
|
||||
-(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{
|
||||
|
||||
@@ -155,7 +165,7 @@
|
||||
}
|
||||
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
id cell = [collectionView cellForItemAtIndexPath:indexPath];
|
||||
id cell = [collectionView cellForItemAtIndexPath:indexPath];
|
||||
if([cell isKindOfClass:[XPMineChooseGiveGiftViewCell class]]){
|
||||
XPMineChooseGiveGiftViewCell *getCell = (XPMineChooseGiveGiftViewCell *)cell;
|
||||
self.indexPath = indexPath;
|
||||
@@ -164,9 +174,9 @@
|
||||
if(self.delegate && [self.delegate respondsToSelector:@selector(textFieldDidChangeWithText:)]){
|
||||
[self.delegate textFieldDidChangeWithText:self.textField.text];
|
||||
}
|
||||
|
||||
self.textField.text = @"1";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section{
|
||||
return kGetScaleWidth(10);
|
||||
@@ -207,28 +217,26 @@
|
||||
-(UIView *)bgView{
|
||||
if (!_bgView){
|
||||
_bgView = [UIView new];
|
||||
_bgView.backgroundColor = UIColorFromRGB(0xF3F5FA);
|
||||
[_bgView setCornerWithLeftTopCorner:8 rightTopCorner:8 bottomLeftCorner:8 bottomRightCorner:8 size:CGSizeMake(kGetScaleWidth(345), kGetScaleWidth(290))];
|
||||
_bgView.backgroundColor = UIColorFromRGB(0xF7F7F7);
|
||||
[_bgView setCornerRadius:12];
|
||||
}
|
||||
return _bgView;
|
||||
}
|
||||
- (XPPageControl *)pageControl{
|
||||
- (UIPageControl *)pageControl{
|
||||
if (!_pageControl){
|
||||
_pageControl = [[XPPageControl alloc]init];
|
||||
_pageControl.backgroundColor = [UIColor clearColor];
|
||||
|
||||
_pageControl = [[UIPageControl alloc]init];
|
||||
}
|
||||
return _pageControl;
|
||||
}
|
||||
|
||||
- (UILabel *)numView {
|
||||
if (!_numView) {
|
||||
_numView = [[UILabel alloc] init];
|
||||
_numView.font = [UIFont systemFontOfSize:11];
|
||||
_numView.textColor = [DJDKMIMOMColor disableButtonTextColor];
|
||||
_numView.text = YMLocalizedString(@"XPMineChooseGiveGiftView0");
|
||||
- (UILabel *)numTitleLabel {
|
||||
if (!_numTitleLabel) {
|
||||
_numTitleLabel = [[UILabel alloc] init];
|
||||
_numTitleLabel.font = [UIFont systemFontOfSize:11];
|
||||
_numTitleLabel.textColor = UIColorFromRGB(0x7b7b7d);
|
||||
_numTitleLabel.text = YMLocalizedString(@"XPMineChooseGiveGiftView0");
|
||||
}
|
||||
return _numView;
|
||||
return _numTitleLabel;
|
||||
}
|
||||
|
||||
-(MSBaseTextField *)textField{
|
||||
@@ -238,27 +246,23 @@
|
||||
_textField.font = [UIFont systemFontOfSize:kGetScaleWidth(20) weight:UIFontWeightMedium];
|
||||
_textField.textColor = [DJDKMIMOMColor inputTextColor];
|
||||
_textField.attributedPlaceholder = [[NSMutableAttributedString alloc]initWithString:@"0" attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:kGetScaleWidth(20) weight:UIFontWeightRegular],NSForegroundColorAttributeName:[DJDKMIMOMColor disableButtonTextColor]}];
|
||||
_textField.textAlignment = NSTextAlignmentRight;
|
||||
_textField.text = @"1";
|
||||
[_textField addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];
|
||||
}
|
||||
return _textField;
|
||||
}
|
||||
-(UIView *)lineView{
|
||||
if (!_lineView){
|
||||
_lineView = [UIView new];
|
||||
_lineView.backgroundColor = UIColorFromRGB(0xF7F7F7);
|
||||
}
|
||||
return _lineView;
|
||||
}
|
||||
|
||||
-(UIButton *)allBtn{
|
||||
if (!_allBtn){
|
||||
_allBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_allBtn setTitle:YMLocalizedString(@"XPMineChooseGiveGiftView1") forState:UIControlStateNormal];
|
||||
_allBtn.titleLabel.font = [UIFont systemFontOfSize:12];
|
||||
[_allBtn setTitleColor:[DJDKMIMOMColor disableButtonTextColor] forState:UIControlStateNormal];
|
||||
_allBtn.backgroundColor = UIColorFromRGB(0xF3F5FA);
|
||||
[_allBtn setCornerWithLeftTopCorner:4 rightTopCorner:4 bottomLeftCorner:4 bottomRightCorner:4 size:CGSizeMake(kGetScaleWidth(36), kGetScaleWidth(19))];
|
||||
_allBtn.titleLabel.font = kFontMedium(12);
|
||||
[_allBtn setTitleColor:UIColorFromRGB(0xFF8C03) forState:UIControlStateNormal];
|
||||
_allBtn.backgroundColor = [UIColor whiteColor];
|
||||
[_allBtn setCornerRadius:12
|
||||
corners:kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner | kCALayerMinXMaxYCorner | kCALayerMaxXMaxYCorner
|
||||
borderWidth:1
|
||||
borderColor:UIColorFromRGB(0xFF8C03)];
|
||||
[_allBtn addTarget:self action:@selector(allChooseAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _allBtn;
|
||||
|
@@ -53,8 +53,7 @@
|
||||
}
|
||||
-(void)setIsChoose:(BOOL)isChoose{
|
||||
_isChoose = isChoose;
|
||||
UIImage *image = [UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor confirmButtonGradientStartColor],[DJDKMIMOMColor confirmButtonGradientMiddleColor],[DJDKMIMOMColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(72), kGetScaleWidth(72))];
|
||||
UIColor *lineColor = [UIColor colorWithPatternImage:image];
|
||||
UIColor *lineColor = UIColorFromRGB(0xFF8C03);
|
||||
_giftImageView.layer.borderColor = _isChoose ? lineColor.CGColor : [UIColor clearColor].CGColor;
|
||||
}
|
||||
-(void)setGiftModel:(GiftInfoModel *)giftModel{
|
||||
@@ -86,8 +85,8 @@
|
||||
- (UILabel *)giftNameView {
|
||||
if (!_giftNameView) {
|
||||
_giftNameView = [[UILabel alloc] init];
|
||||
_giftNameView.font = [UIFont systemFontOfSize:12];
|
||||
_giftNameView.textColor = UIColorFromRGB(0x6D6B89);
|
||||
_giftNameView.font = [UIFont systemFontOfSize:13];
|
||||
_giftNameView.textColor = UIColorFromRGB(0x313131);
|
||||
_giftNameView.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
return _giftNameView;
|
||||
@@ -97,7 +96,8 @@
|
||||
if (!_giftNumView) {
|
||||
_giftNumView = [[UILabel alloc] init];
|
||||
_giftNumView.font = [UIFont systemFontOfSize:12];
|
||||
_giftNumView.textColor = UIColorFromRGB(0x6D6B89);
|
||||
_giftNumView.textColor = UIColorFromRGB(0x7b7b7d);
|
||||
_giftNumView.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
return _giftNumView;
|
||||
}
|
||||
|
@@ -70,7 +70,7 @@
|
||||
|
||||
[self.numView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.equalTo(self.titleView);
|
||||
make.height.mas_equalTo(kGetScaleWidth(24));
|
||||
make.height.mas_equalTo(42);
|
||||
make.top.mas_equalTo(kGetScaleWidth(78));
|
||||
}];
|
||||
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -91,8 +91,8 @@
|
||||
make.top.mas_equalTo(kGetScaleWidth(150));
|
||||
}];
|
||||
[self.confirmBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(kGetScaleWidth(37));
|
||||
make.width.mas_equalTo(kGetScaleWidth(135));
|
||||
make.height.mas_equalTo(kGetScaleWidth(36));
|
||||
make.width.mas_equalTo(kGetScaleWidth(244));
|
||||
make.top.mas_equalTo(kGetScaleWidth(189));
|
||||
make.centerX.equalTo(self);
|
||||
}];
|
||||
@@ -107,7 +107,6 @@
|
||||
_poundageView.title = YMLocalizedString(@"XPMineConfirmGiveDiamondView7");
|
||||
_titleView.text = YMLocalizedString(@"XPMineConfirmGiveDiamondView5");
|
||||
[_confirmBtn setTitle:YMLocalizedString(@"XPMineConfirmGiveDiamondView8") forState:UIControlStateNormal];
|
||||
|
||||
}
|
||||
}
|
||||
- (void)setGoldNum:(NSInteger)goldNum{
|
||||
@@ -133,13 +132,14 @@
|
||||
_giveDiamondModel = giveDiamondModel;
|
||||
_titleView.text = [NSString stringWithFormat:YMLocalizedString(@"XPMineConfirmGiveDiamondView1"),_giveDiamondModel.targetNick];
|
||||
NSTextAttachment * attachment = [[NSTextAttachment alloc] init];
|
||||
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc]initWithString:@(self.inputDiamonds).stringValue attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:kGetScaleWidth(30) weight:UIFontWeightMedium],NSForegroundColorAttributeName:[DJDKMIMOMColor inputTextColor]}];
|
||||
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@" %@ ", @(self.inputDiamonds)]
|
||||
attributes:@{NSFontAttributeName:kFontSemibold(30),
|
||||
NSForegroundColorAttributeName:UIColorFromRGB(0x313131)}];
|
||||
UIImage *iconImage = [UIImage imageNamed:@"moli_money_icon"];;
|
||||
attachment.bounds = CGRectMake(0, roundf(self.numView.font.capHeight - 24)/2.f, 24, 24);
|
||||
|
||||
attachment.bounds = CGRectMake(0, roundf(self.numView.font.capHeight - 36)/2.f, 36, 36);
|
||||
attachment.image =iconImage;
|
||||
NSAttributedString * starAttribute = [NSMutableAttributedString attributedStringWithAttachment:(NSTextAttachment *)attachment];
|
||||
[attributedString insertAttributedString:starAttribute atIndex:attributedString.length];
|
||||
[attributedString insertAttributedString:starAttribute atIndex:0];
|
||||
self.numView.attributedText = attributedString;
|
||||
self.poundageView.hidden = NO;
|
||||
self.totalNumView.hidden = NO;
|
||||
@@ -229,7 +229,7 @@
|
||||
-(UILabel *)numView{
|
||||
if (!_numView){
|
||||
_numView = [UILabel new];
|
||||
_numView.font = [UIFont systemFontOfSize:kGetScaleWidth(30) weight:UIFontWeightMedium];
|
||||
_numView.font = kFontSemibold(30);
|
||||
_numView.textColor = [DJDKMIMOMColor inputTextColor];
|
||||
_numView.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
@@ -262,13 +262,16 @@
|
||||
- (UIButton *)confirmBtn{
|
||||
if (!_confirmBtn){
|
||||
_confirmBtn = [UIButton new];
|
||||
UIImage *image = [UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor confirmButtonGradientStartColor],[DJDKMIMOMColor confirmButtonGradientMiddleColor],[DJDKMIMOMColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(135), kGetScaleWidth(37))];
|
||||
UIImage *image = [UIImage gradientColorImageFromColors:@[ UIColorFromRGB(0xE29030),
|
||||
UIColorFromRGB(0xfcc074)]
|
||||
gradientType:GradientTypeLeftToRight
|
||||
imgSize:CGSizeMake(kGetScaleWidth(244), kGetScaleWidth(36))];
|
||||
[_confirmBtn setBackgroundImage:image forState:UIControlStateNormal];
|
||||
[_confirmBtn setTitle:YMLocalizedString(@"XPMineConfirmGiveDiamondView0") forState:UIControlStateNormal];
|
||||
_confirmBtn.titleLabel.font = [UIFont systemFontOfSize:kGetScaleWidth(14) weight:UIFontWeightRegular];
|
||||
_confirmBtn.titleLabel.font = kFontMedium(14);
|
||||
[_confirmBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
[_confirmBtn addTarget:self action:@selector(confirmAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
_confirmBtn.layer.cornerRadius = kGetScaleWidth(37)/2;
|
||||
_confirmBtn.layer.cornerRadius = kGetScaleWidth(36)/2;
|
||||
_confirmBtn.layer.masksToBounds = YES;
|
||||
}
|
||||
return _confirmBtn;
|
||||
|
@@ -52,6 +52,7 @@
|
||||
make.centerY.equalTo(self);
|
||||
make.leading.mas_equalTo(kGetScaleWidth(15));
|
||||
}];
|
||||
|
||||
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.equalTo(self.headView.mas_trailing).mas_offset( kGetScaleWidth(10));
|
||||
make.height.mas_equalTo(kGetScaleWidth(17));
|
||||
@@ -64,10 +65,21 @@
|
||||
make.height.mas_equalTo(kGetScaleWidth(14));
|
||||
make.top.equalTo(self.titleView.mas_bottom).mas_offset(kGetScaleWidth(4));
|
||||
}];
|
||||
|
||||
[self.arrowView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(20));
|
||||
make.centerY.equalTo(self);
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(15));
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(20));
|
||||
make.centerY.equalTo(self);
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(15));
|
||||
}];
|
||||
|
||||
UIView *line = [[UIView alloc] init];
|
||||
line.backgroundColor = UIColorFromRGB(0xe4e4e4);
|
||||
[self addSubview: line];
|
||||
[line mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self);
|
||||
make.leading.mas_equalTo(self.headView);
|
||||
make.trailing.mas_equalTo(self.arrowView);
|
||||
make.height.mas_equalTo(0.5);
|
||||
}];
|
||||
}
|
||||
#pragma mark - 懒加载
|
||||
@@ -100,7 +112,7 @@
|
||||
- (UIImageView *)arrowView{
|
||||
if (!_arrowView){
|
||||
_arrowView = [UIImageView new];
|
||||
_arrowView.image = [UIImage imageNamed:@"mine_item_new_arrow"];
|
||||
_arrowView.image = [[UIImage imageNamed:@"grey_right_arrow"] ms_SetImageForRTL];
|
||||
}
|
||||
return _arrowView;
|
||||
}
|
||||
|
@@ -10,13 +10,13 @@
|
||||
#import "NSDate+DateUtils.h"
|
||||
@interface XPMineGiveDiamondDetailsCell()
|
||||
///礼物/钻石图标
|
||||
@property (nonatomic,strong) NetImageView * pi_iconView;
|
||||
@property (nonatomic,strong) NetImageView * avatarImageView;
|
||||
///礼物标题
|
||||
@property (nonatomic,strong) UILabel *giftTitleView;
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
///时间
|
||||
@property (nonatomic,strong) UILabel *timeView;
|
||||
@property (nonatomic,strong) UILabel *timeLabel;
|
||||
///转赠钻石数量
|
||||
@property (nonatomic,strong) UILabel *numView;
|
||||
@property (nonatomic,strong) UILabel *contentLabel;
|
||||
///转赠钻石支出
|
||||
@property (nonatomic,strong) UILabel *spendingView;
|
||||
|
||||
@@ -36,39 +36,52 @@
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor whiteColor];
|
||||
self.selectionStyle = 0;
|
||||
[self.contentView addSubview:self.pi_iconView];
|
||||
[self.contentView addSubview:self.giftTitleView];
|
||||
[self.contentView addSubview:self.timeView];
|
||||
[self.contentView addSubview:self.numView];
|
||||
[self.contentView addSubview:self.avatarImageView];
|
||||
[self.contentView addSubview:self.titleLabel];
|
||||
[self.contentView addSubview:self.timeLabel];
|
||||
[self.contentView addSubview:self.contentLabel];
|
||||
[self.contentView addSubview:self.spendingView];
|
||||
}
|
||||
- (void)initSubViewConstraints {
|
||||
[self.pi_iconView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(40));
|
||||
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(49));
|
||||
make.centerY.equalTo(self.contentView);
|
||||
make.leading.mas_equalTo(kGetScaleWidth(15));
|
||||
}];
|
||||
[self.timeView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(kGetScaleWidth(65));
|
||||
make.top.mas_equalTo(self.avatarImageView).offset(3);
|
||||
make.trailing.equalTo(self.timeLabel.mas_leading).mas_offset(-kGetScaleWidth(10));
|
||||
}];
|
||||
|
||||
[self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(15));
|
||||
make.centerY.equalTo(self.contentView);
|
||||
make.centerY.equalTo(self.contentLabel);
|
||||
}];
|
||||
[self.giftTitleView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(kGetScaleWidth(65));
|
||||
make.centerY.equalTo(self.contentView);
|
||||
make.trailing.equalTo(self.timeView.mas_leading).mas_offset(-kGetScaleWidth(10));
|
||||
}];
|
||||
[self.numView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.pi_iconView.mas_top).mas_offset(kGetScaleWidth(3));
|
||||
make.leading.mas_equalTo(kGetScaleWidth(65));
|
||||
make.height.mas_equalTo(kGetScaleWidth(17));
|
||||
make.trailing.equalTo(self.timeView.mas_leading).mas_offset(-kGetScaleWidth(10));
|
||||
|
||||
[self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.avatarImageView.mas_top).mas_offset(3);
|
||||
make.leading.mas_equalTo(self.avatarImageView.mas_trailing).offset(10);
|
||||
make.height.mas_equalTo(kGetScaleWidth(21));
|
||||
make.trailing.equalTo(self.timeLabel.mas_leading).mas_offset(-kGetScaleWidth(10));
|
||||
}];
|
||||
[self.spendingView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.equalTo(self.numView);
|
||||
make.top.equalTo(self.numView.mas_bottom).mas_offset(kGetScaleWidth(4));
|
||||
make.leading.equalTo(self.contentLabel);
|
||||
make.trailing.equalTo(self.timeLabel);
|
||||
make.top.equalTo(self.contentLabel.mas_bottom).mas_offset(kGetScaleWidth(4));
|
||||
make.height.mas_equalTo(kGetScaleWidth(14));
|
||||
}];
|
||||
|
||||
UIView *line = [[UIView alloc] init];
|
||||
line.backgroundColor = UIColorFromRGB(0xe4e4e4);
|
||||
[self addSubview: line];
|
||||
[line mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self);
|
||||
make.leading.mas_equalTo(self.avatarImageView);
|
||||
make.trailing.mas_equalTo(self.timeLabel);
|
||||
make.height.mas_equalTo(0.5);
|
||||
}];
|
||||
}
|
||||
#pragma mark - 赋值
|
||||
- (void)setModel:(XPMineGiveDiamondDetailsModel *)model{
|
||||
@@ -77,77 +90,80 @@
|
||||
}
|
||||
|
||||
-(void)setValue{
|
||||
self.giftTitleView.hidden = YES;
|
||||
self.numView.hidden = YES;
|
||||
self.titleLabel.hidden = YES;
|
||||
self.contentLabel.hidden = YES;
|
||||
self.spendingView.hidden = YES;
|
||||
self.pi_iconView.image = nil;
|
||||
self.avatarImageView.image = nil;
|
||||
|
||||
if(self.model.type.intValue == 0){
|
||||
self.giftTitleView.hidden = YES;
|
||||
self.numView.hidden = NO;
|
||||
// 转赠钻石
|
||||
self.titleLabel.hidden = YES;
|
||||
self.contentLabel.hidden = NO;
|
||||
self.spendingView.hidden = NO;
|
||||
self.pi_iconView.image = [UIImage imageNamed:@"mine_examples_record"];
|
||||
self.numView.text = self.model.diamondNum;
|
||||
self.timeView.text = [NSDate timestampSwitchTime:self.model.createTime/1000 andFormatter:@"yyyy-MM-dd HH:mm:ss"];
|
||||
self.avatarImageView.image = [UIImage imageNamed:@"moli_money_icon"];
|
||||
self.avatarImageView.imageUrl = self.model.targetAvatar;
|
||||
self.contentLabel.text = self.model.targetNick;
|
||||
self.timeLabel.text = [NSDate timestampSwitchTime:self.model.createTime/1000 andFormatter:@"yyyy-MM-dd HH:mm:ss"];
|
||||
NSString *realDiamondNum = [NSString stringWithFormat:@"%.2f",self.model.realDiamondNum];
|
||||
self.spendingView.text = [NSString stringWithFormat:YMLocalizedString(@"XPMineGiveDiamondDetailsCell0"),realDiamondNum];
|
||||
return;
|
||||
} else {
|
||||
// 转赠礼物
|
||||
self.avatarImageView.image = [UIImageConstant defaultAvatarPlaceholder];
|
||||
self.avatarImageView.imageUrl = self.model.giftUrl;
|
||||
self.titleLabel.text = [NSString stringWithFormat:@"%@ x%@",self.model.giftName,self.model.giftNum];
|
||||
self.timeLabel.text = [NSDate timestampSwitchTime:self.model.createTime/1000 andFormatter:@"yyyy-MM-dd HH:mm:ss"];
|
||||
self.titleLabel.hidden = NO;
|
||||
self.contentLabel.hidden = YES;
|
||||
self.spendingView.hidden = YES;
|
||||
}
|
||||
self.pi_iconView.image = [UIImageConstant defaultAvatarPlaceholder];
|
||||
self.pi_iconView.imageUrl = self.model.giftUrl;
|
||||
self.giftTitleView.text = [NSString stringWithFormat:@"%@ x%@",self.model.giftName,self.model.giftNum];
|
||||
self.timeView.text = [NSDate timestampSwitchTime:self.model.createTime/1000 andFormatter:@"yyyy-MM-dd HH:mm:ss"];
|
||||
self.giftTitleView.hidden = NO;
|
||||
self.numView.hidden = YES;
|
||||
self.spendingView.hidden = YES;
|
||||
}
|
||||
|
||||
#pragma mark - 懒加载
|
||||
|
||||
- (NetImageView *)pi_iconView{
|
||||
if (!_pi_iconView){
|
||||
_pi_iconView = [[NetImageView alloc]init];
|
||||
_pi_iconView.backgroundColor = UIColorFromRGB(0xF3F5FA);
|
||||
_pi_iconView.layer.cornerRadius = kGetScaleWidth(40)/2;
|
||||
_pi_iconView.clipsToBounds = YES;
|
||||
_pi_iconView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
- (NetImageView *)avatarImageView{
|
||||
if (!_avatarImageView){
|
||||
_avatarImageView = [[NetImageView alloc]init];
|
||||
_avatarImageView.backgroundColor = UIColorFromRGB(0xF3F5FA);
|
||||
_avatarImageView.layer.cornerRadius = kGetScaleWidth(49)/2;
|
||||
_avatarImageView.clipsToBounds = YES;
|
||||
_avatarImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
}
|
||||
return _pi_iconView;
|
||||
return _avatarImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)giftTitleView {
|
||||
if (!_giftTitleView) {
|
||||
_giftTitleView = [[UILabel alloc] init];
|
||||
_giftTitleView.font = [UIFont systemFontOfSize:15 weight:UIFontWeightMedium];
|
||||
_giftTitleView.textColor = [DJDKMIMOMColor inputTextColor];
|
||||
_giftTitleView.hidden = YES;
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = kFontSemibold(15);
|
||||
_titleLabel.textColor = [DJDKMIMOMColor inputTextColor];
|
||||
_titleLabel.hidden = YES;
|
||||
}
|
||||
return _giftTitleView;
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)timeView {
|
||||
if (!_timeView) {
|
||||
_timeView = [[UILabel alloc] init];
|
||||
_timeView.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
|
||||
_timeView.textColor = [DJDKMIMOMColor disableButtonTextColor];
|
||||
_timeView.textAlignment = NSTextAlignmentRight;
|
||||
- (UILabel *)timeLabel {
|
||||
if (!_timeLabel) {
|
||||
_timeLabel = [[UILabel alloc] init];
|
||||
_timeLabel.font = kFontRegular(13);
|
||||
_timeLabel.textColor = [DJDKMIMOMColor disableButtonTextColor];
|
||||
_timeLabel.textAlignment = NSTextAlignmentRight;
|
||||
}
|
||||
return _timeView;
|
||||
return _timeLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)numView {
|
||||
if (!_numView) {
|
||||
_numView = [[UILabel alloc] init];
|
||||
_numView.font = [UIFont systemFontOfSize:15 weight:UIFontWeightMedium];
|
||||
_numView.textColor = [DJDKMIMOMColor inputTextColor];
|
||||
_numView.text = @"0";
|
||||
- (UILabel *)contentLabel {
|
||||
if (!_contentLabel) {
|
||||
_contentLabel = [[UILabel alloc] init];
|
||||
_contentLabel.font = [UIFont systemFontOfSize:15 weight:UIFontWeightMedium];
|
||||
_contentLabel.textColor = [DJDKMIMOMColor inputTextColor];
|
||||
_contentLabel.text = @"0";
|
||||
}
|
||||
return _numView;
|
||||
return _contentLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)spendingView {
|
||||
if (!_spendingView) {
|
||||
_spendingView = [[UILabel alloc] init];
|
||||
_spendingView.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
|
||||
_spendingView.font = kFontRegular(13);
|
||||
_spendingView.textColor = [DJDKMIMOMColor disableButtonTextColor];
|
||||
_spendingView.text = [NSString stringWithFormat:YMLocalizedString(@"XPMineGiveDiamondDetailsCell0"),@"0"];
|
||||
}
|
||||
|
@@ -52,7 +52,7 @@
|
||||
}
|
||||
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
return self.listData.count > 0 ? kGetScaleWidth(55) : self.tableView.frame.size.height;;
|
||||
return self.listData.count > 0 ? kGetScaleWidth(72) : self.tableView.frame.size.height;
|
||||
}
|
||||
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if(self.listData.count > 0){
|
||||
|
@@ -42,9 +42,7 @@
|
||||
[self.bgView addSubview:self.codeView];
|
||||
|
||||
}
|
||||
- (void)keyboardWillShow:(NSNotification *)notification
|
||||
|
||||
{
|
||||
- (void)keyboardWillShow:(NSNotification *)notification {
|
||||
NSDictionary *userInfo = [notification userInfo];
|
||||
CGFloat curkeyBoardHeight = [[[notification userInfo]objectForKey:@"UIKeyboardBoundsUserInfoKey"]CGRectValue].size.height;
|
||||
CGRect begin = [[[notification userInfo]objectForKey:@"UIKeyboardFrameBeginUserInfoKey"]CGRectValue];
|
||||
@@ -54,13 +52,10 @@
|
||||
if( begin.size.height > 0 && (begin.origin.y - end.origin.y > 0)){
|
||||
CGFloat keyBoardHeight = curkeyBoardHeight;
|
||||
CGFloat animationDuration = [userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue];
|
||||
|
||||
[UIView animateWithDuration:animationDuration animations:^{
|
||||
self.bgView.frame = CGRectMake(0, KScreenHeight - keyBoardHeight - kGetScaleWidth(162), KScreenWidth, kGetScaleWidth(162));
|
||||
self.bgView.frame = CGRectMake(0, KScreenHeight - keyBoardHeight - kGetScaleWidth(162), KScreenWidth, kGetScaleWidth(162));
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
- (void)keyboardWillHide:(NSNotification *)notification{
|
||||
|
||||
@@ -143,6 +138,7 @@
|
||||
if (!_bgView){
|
||||
_bgView = [UIView new];
|
||||
_bgView.backgroundColor = [UIColor whiteColor];
|
||||
[_bgView setCornerRadius:16 cornerMask:kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner];
|
||||
}
|
||||
return _bgView;
|
||||
}
|
||||
|