删除无用代码

This commit is contained in:
liyuhua
2024-01-20 11:02:21 +08:00
parent 9586fd5135
commit aadb7da5c8
58 changed files with 324 additions and 597 deletions

View File

@@ -86,11 +86,9 @@
237053A12B1F3AA100F5DE14 /* MewUserIntroductionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 237053792B1F3AA100F5DE14 /* MewUserIntroductionView.m */; };
237053A22B1F3AA100F5DE14 /* MewHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2370537A2B1F3AA100F5DE14 /* MewHeaderView.m */; };
237053A32B1F3AA100F5DE14 /* MewRightFollowVoiceCollectionCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 2370537D2B1F3AA100F5DE14 /* MewRightFollowVoiceCollectionCell.m */; };
237053F22B1F3B1700F5DE14 /* MewConstant.m in Sources */ = {isa = PBXBuildFile; fileRef = 237053EF2B1F3B1600F5DE14 /* MewConstant.m */; };
2370547F2B1F3B3200F5DE14 /* UIView+MewFilletCorner.m in Sources */ = {isa = PBXBuildFile; fileRef = 237053F72B1F3B3200F5DE14 /* UIView+MewFilletCorner.m */; };
237054802B1F3B3200F5DE14 /* UIImage+MewUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 237053F82B1F3B3200F5DE14 /* UIImage+MewUtils.m */; };
237054812B1F3B3200F5DE14 /* MewStackManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 237053F92B1F3B3200F5DE14 /* MewStackManager.m */; };
237054822B1F3B3200F5DE14 /* MewBaseNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 237053FA2B1F3B3200F5DE14 /* MewBaseNavigationController.m */; };
237054832B1F3B3200F5DE14 /* MewBaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 237053FB2B1F3B3200F5DE14 /* MewBaseViewController.m */; };
237054882B1F3B3200F5DE14 /* MewEmptyTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 237054082B1F3B3200F5DE14 /* MewEmptyTableViewCell.m */; };
2370549F2B1F3B3200F5DE14 /* UIImage+RW.m in Sources */ = {isa = PBXBuildFile; fileRef = 2370544B2B1F3B3200F5DE14 /* UIImage+RW.m */; };
@@ -100,7 +98,6 @@
237054A62B1F3B3200F5DE14 /* MEWBase64.m in Sources */ = {isa = PBXBuildFile; fileRef = 2370545E2B1F3B3200F5DE14 /* MEWBase64.m */; };
237054A72B1F3B3200F5DE14 /* MewHUDTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 2370545F2B1F3B3200F5DE14 /* MewHUDTool.m */; };
237054AD2B1F3B3200F5DE14 /* YYReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 237054722B1F3B3200F5DE14 /* YYReachability.m */; };
237054AE2B1F3B3200F5DE14 /* NSObject+MEWExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 237054742B1F3B3200F5DE14 /* NSObject+MEWExtension.m */; };
237054AF2B1F3B3200F5DE14 /* MewPaymentAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 237054772B1F3B3200F5DE14 /* MewPaymentAction.swift */; };
237054BB2B1F3BF600F5DE14 /* MewTabBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = 237054B82B1F3BF600F5DE14 /* MewTabBarController.m */; };
23F1E6912B5A872F004777A2 /* MewUtility+MewDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 23F1E68B2B5A872E004777A2 /* MewUtility+MewDevice.m */; };
@@ -119,6 +116,8 @@
23F1E6B22B5ACAE8004777A2 /* MewAppleInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23F1E6B12B5ACAE8004777A2 /* MewAppleInfoModel.swift */; };
23F1E6B42B5AD383004777A2 /* MewAppColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23F1E6B32B5AD383004777A2 /* MewAppColor.swift */; };
23F1E6BB2B5B5F28004777A2 /* MewGetColorTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 23F1E6BA2B5B5F28004777A2 /* MewGetColorTool.m */; };
23F1E6C12B5B6387004777A2 /* MewGetPointList.m in Sources */ = {isa = PBXBuildFile; fileRef = 23F1E6C02B5B6387004777A2 /* MewGetPointList.m */; };
23F1E6C42B5B6E97004777A2 /* MewNavigationVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 23F1E6C32B5B6E97004777A2 /* MewNavigationVC.m */; };
8C4D535C2AFD4CF700238AE6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8C4D535B2AFD4CF700238AE6 /* Assets.xcassets */; };
8C4D535F2AFD4CF700238AE6 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8C4D535D2AFD4CF700238AE6 /* LaunchScreen.storyboard */; };
8C4D53622AFD4CF700238AE6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C4D53612AFD4CF700238AE6 /* main.m */; };
@@ -283,18 +282,14 @@
2370537D2B1F3AA100F5DE14 /* MewRightFollowVoiceCollectionCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MewRightFollowVoiceCollectionCell.m; sourceTree = "<group>"; };
2370537E2B1F3AA100F5DE14 /* MewPlayVoiceView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MewPlayVoiceView.h; sourceTree = "<group>"; };
237053EB2B1F3B1600F5DE14 /* MewMacro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MewMacro.h; sourceTree = "<group>"; };
237053EF2B1F3B1600F5DE14 /* MewConstant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MewConstant.m; sourceTree = "<group>"; };
237053F02B1F3B1700F5DE14 /* MewConstant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MewConstant.h; sourceTree = "<group>"; };
237053F52B1F3B3200F5DE14 /* UIView+MewFilletCorner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+MewFilletCorner.h"; sourceTree = "<group>"; };
237053F62B1F3B3200F5DE14 /* UIImage+MewUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+MewUtils.h"; sourceTree = "<group>"; };
237053F72B1F3B3200F5DE14 /* UIView+MewFilletCorner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+MewFilletCorner.m"; sourceTree = "<group>"; };
237053F82B1F3B3200F5DE14 /* UIImage+MewUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+MewUtils.m"; sourceTree = "<group>"; };
237053F92B1F3B3200F5DE14 /* MewStackManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MewStackManager.m; sourceTree = "<group>"; };
237053FA2B1F3B3200F5DE14 /* MewBaseNavigationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MewBaseNavigationController.m; sourceTree = "<group>"; };
237053FB2B1F3B3200F5DE14 /* MewBaseViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MewBaseViewController.m; sourceTree = "<group>"; };
237054072B1F3B3200F5DE14 /* MewEmptyTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MewEmptyTableViewCell.h; sourceTree = "<group>"; };
237054082B1F3B3200F5DE14 /* MewEmptyTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MewEmptyTableViewCell.m; sourceTree = "<group>"; };
237054092B1F3B3200F5DE14 /* MewBaseNavigationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MewBaseNavigationController.h; sourceTree = "<group>"; };
237054252B1F3B3200F5DE14 /* MewStackManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MewStackManager.h; sourceTree = "<group>"; };
237054262B1F3B3200F5DE14 /* MewBaseViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MewBaseViewController.h; sourceTree = "<group>"; };
2370544A2B1F3B3200F5DE14 /* UIImage+RW.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+RW.h"; sourceTree = "<group>"; };
@@ -308,11 +303,9 @@
2370545D2B1F3B3200F5DE14 /* DESEncrypt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DESEncrypt.m; sourceTree = "<group>"; };
2370545E2B1F3B3200F5DE14 /* MEWBase64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MEWBase64.m; sourceTree = "<group>"; };
2370545F2B1F3B3200F5DE14 /* MewHUDTool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MewHUDTool.m; sourceTree = "<group>"; };
237054662B1F3B3200F5DE14 /* NSObject+MEWExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+MEWExtension.h"; sourceTree = "<group>"; };
237054712B1F3B3200F5DE14 /* YYReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YYReachability.h; sourceTree = "<group>"; };
237054722B1F3B3200F5DE14 /* YYReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YYReachability.m; sourceTree = "<group>"; };
237054732B1F3B3200F5DE14 /* MewHUDTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MewHUDTool.h; sourceTree = "<group>"; };
237054742B1F3B3200F5DE14 /* NSObject+MEWExtension.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+MEWExtension.m"; sourceTree = "<group>"; };
237054762B1F3B3200F5DE14 /* yinmeng-ios-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "yinmeng-ios-Bridging-Header.h"; sourceTree = "<group>"; };
237054772B1F3B3200F5DE14 /* MewPaymentAction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MewPaymentAction.swift; sourceTree = "<group>"; };
237054B82B1F3BF600F5DE14 /* MewTabBarController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MewTabBarController.m; sourceTree = "<group>"; };
@@ -339,6 +332,10 @@
23F1E6B62B5B5DCD004777A2 /* MewBaseEnumType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewBaseEnumType.h; sourceTree = "<group>"; };
23F1E6B92B5B5F28004777A2 /* MewGetColorTool.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewGetColorTool.h; sourceTree = "<group>"; };
23F1E6BA2B5B5F28004777A2 /* MewGetColorTool.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewGetColorTool.m; sourceTree = "<group>"; };
23F1E6BF2B5B6387004777A2 /* MewGetPointList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewGetPointList.h; sourceTree = "<group>"; };
23F1E6C02B5B6387004777A2 /* MewGetPointList.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewGetPointList.m; sourceTree = "<group>"; };
23F1E6C22B5B6E97004777A2 /* MewNavigationVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewNavigationVC.h; sourceTree = "<group>"; };
23F1E6C32B5B6E97004777A2 /* MewNavigationVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewNavigationVC.m; sourceTree = "<group>"; };
8C4D534C2AFD4CF600238AE6 /* yinmeng-ios.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "yinmeng-ios.app"; sourceTree = BUILT_PRODUCTS_DIR; };
8C4D535B2AFD4CF700238AE6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
8C4D535E2AFD4CF700238AE6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
@@ -404,6 +401,8 @@
230D63162B557DBD00DADC14 /* MewApi */ = {
isa = PBXGroup;
children = (
23F1E6BF2B5B6387004777A2 /* MewGetPointList.h */,
23F1E6C02B5B6387004777A2 /* MewGetPointList.m */,
230D63172B557DE700DADC14 /* MewServerApi.swift */,
230D63262B55989400DADC14 /* MewProvideManager.swift */,
230D63C92B5A0A5B00DADC14 /* MewOCServerManager.h */,
@@ -698,8 +697,8 @@
isa = PBXGroup;
children = (
237054062B1F3B3200F5DE14 /* EmptyView */,
237054092B1F3B3200F5DE14 /* MewBaseNavigationController.h */,
237053FA2B1F3B3200F5DE14 /* MewBaseNavigationController.m */,
23F1E6C22B5B6E97004777A2 /* MewNavigationVC.h */,
23F1E6C32B5B6E97004777A2 /* MewNavigationVC.m */,
237054262B1F3B3200F5DE14 /* MewBaseViewController.h */,
237053FB2B1F3B3200F5DE14 /* MewBaseViewController.m */,
237054252B1F3B3200F5DE14 /* MewStackManager.h */,
@@ -758,8 +757,6 @@
230D631A2B5581E400DADC14 /* MewEncryptManager */,
237054732B1F3B3200F5DE14 /* MewHUDTool.h */,
2370545F2B1F3B3200F5DE14 /* MewHUDTool.m */,
237054662B1F3B3200F5DE14 /* NSObject+MEWExtension.h */,
237054742B1F3B3200F5DE14 /* NSObject+MEWExtension.m */,
237054702B1F3B3200F5DE14 /* Reachability */,
2370545A2B1F3B3200F5DE14 /* Security */,
23F1E68A2B5A872E004777A2 /* YYUtility */,
@@ -943,8 +940,6 @@
8C9C82D72B0C696900A601BC /* Global */ = {
isa = PBXGroup;
children = (
237053F02B1F3B1700F5DE14 /* MewConstant.h */,
237053EF2B1F3B1600F5DE14 /* MewConstant.m */,
23F1E6B62B5B5DCD004777A2 /* MewBaseEnumType.h */,
237053EB2B1F3B1600F5DE14 /* MewMacro.h */,
);
@@ -1370,8 +1365,8 @@
237053902B1F3AA100F5DE14 /* MewSessionListViewController.m in Sources */,
23F1E6912B5A872F004777A2 /* MewUtility+MewDevice.m in Sources */,
230D62F12B55463500DADC14 /* R.generated.swift in Sources */,
23F1E6C12B5B6387004777A2 /* MewGetPointList.m in Sources */,
237054A72B1F3B3200F5DE14 /* MewHUDTool.m in Sources */,
237053F22B1F3B1700F5DE14 /* MewConstant.m in Sources */,
23F1E6B22B5ACAE8004777A2 /* MewAppleInfoModel.swift in Sources */,
237054AD2B1F3B3200F5DE14 /* YYReachability.m in Sources */,
230D63CB2B5A0A5B00DADC14 /* MewOCServerManager.m in Sources */,
@@ -1393,6 +1388,7 @@
8CAB97012B1FE16000ED8639 /* UITableView+NIMScrollToBottom.m in Sources */,
233757592B0CB577001D0B7F /* MewNIMBadgeView.m in Sources */,
237054A42B1F3B3200F5DE14 /* MewTimeIntervalUtils.m in Sources */,
23F1E6C42B5B6E97004777A2 /* MewNavigationVC.m in Sources */,
230D639E2B5926D800DADC14 /* MewMainHomeEmptyCell.m in Sources */,
230D637A2B58FB8F00DADC14 /* MewRoomMsgView.swift in Sources */,
23F1E6B42B5AD383004777A2 /* MewAppColor.swift in Sources */,
@@ -1401,7 +1397,6 @@
23270C2C2B0E041300B9303B /* MewMessageAudioCenter.m in Sources */,
8C9C84442B0C697A00A601BC /* MewMineCollectRoomCell.m in Sources */,
237053A32B1F3AA100F5DE14 /* MewRightFollowVoiceCollectionCell.m in Sources */,
237054AE2B1F3B3200F5DE14 /* NSObject+MEWExtension.m in Sources */,
2370538C2B1F3AA100F5DE14 /* MewLoginPasswordView.m in Sources */,
237053992B1F3AA100F5DE14 /* MewHomeViewController.m in Sources */,
23F1E6922B5A872F004777A2 /* MewUtility.m in Sources */,
@@ -1463,7 +1458,6 @@
23F1E69C2B5A93FB004777A2 /* MewNetworkDataModel.m in Sources */,
237053A02B1F3AA100F5DE14 /* MewShowVoiceView.m in Sources */,
237053A12B1F3AA100F5DE14 /* MewUserIntroductionView.m in Sources */,
237054822B1F3B3200F5DE14 /* MewBaseNavigationController.m in Sources */,
23F1E6AC2B5AC7D3004777A2 /* MewPayItemModel.swift in Sources */,
8C9C84562B0C697A00A601BC /* MewLoginFullInfoViewController.m in Sources */,
2370539B2B1F3AA100F5DE14 /* MewPushExclusiveVoiceView.m in Sources */,

View File

@@ -9,7 +9,7 @@
#import <NIMSDK/NIMSDK.h>
#import <QYSDK_NIM/QYSDK.h>
#import "MewCustomAttachmentDecoder.h"
#import "MewConstant.h"
@implementation AppDelegate (ThirdConfig)
@@ -19,9 +19,9 @@
- (void)configNIMSDK {
// NIMSDK
NSString *appKey = KeyWithType(KeyType_NetEase);
NSString *appKey = [MewEncryptManager mewAESDecryptText:@"7NBaCDlqfBflZ1RQ3KafcH6Nx0XMQ2gifSf2VGRR3fQIHUWnuBoteXTPoxHUD9Oo"];
NIMSDKOption *option = [NIMSDKOption optionWithAppKey:appKey];
option.apnsCername = KeyWithType(KeyType_APNSCer);
option.apnsCername = [MewEncryptManager mewAESDecryptText:@"GtuBUKu9v+g/K9TKH7rVbh/9KXhCFsGFbj6YwErCZAM="];
[[NIMSDK sharedSDK] registerWithOption:option];
// NIM SDK

View File

@@ -8,7 +8,7 @@
#import "AppDelegate.h"
#import "AppDelegate+ThirdConfig.h"
#import "MewTabBarController.h"
#import "MewBaseNavigationController.h"
#import "MewNavigationVC.h"
/// Third
#import <IQKeyboardManager/IQKeyboardManager.h>
#import <NIMSDK/NIMSDK.h>
@@ -39,7 +39,7 @@
#pragma mark - Init Tabbar
- (void)createTabbarController {
MewTabBarController *tab = [[MewTabBarController alloc] init];
MewBaseNavigationController *nav = [[MewBaseNavigationController alloc] initWithRootViewController:tab];
MewNavigationVC *nav = [[MewNavigationVC alloc] initWithRootViewController:tab];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
if (@available(iOS 13.0, *)) {
self.window.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;

View File

@@ -0,0 +1,16 @@
//
// MewGetPointList.h
// yinmeng-ios
//
// Created by duoban on 2024/1/20.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface MewGetPointList : NSObject
+ (CAAnimationGroup *)mewGEtPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,49 +1,13 @@
//
// MewConstant.m
// MewGetPointList.m
// yinmeng-ios
//
// Created by duoban on 2023/12/5.
// Created by duoban on 2024/1/20.
//
#import "MewConstant.h"
@implementation MewConstant
NSString * const KeyWithType(KeyType type) {
BOOL isRelase = NO;
#ifdef DEBUG
isRelase = NO;
#else
isRelase = YES;
#endif
NSDictionary * dic = @{
///
@(YES):@{
@(KeyType_PasswordEncode) : @"BeKYtw9W3zMhFjuzb+vcnjdojaAyH9EGzCdIxstGcrq4NT2kD4vUPpFe9VZwRGHb",///1ea53d260ecf11e7b56e00163e046a26
@(KeyType_NTESQuickLoginBusinessId) : @"AQyemQ+/HZ+nQRQ4DPatTW2tUk6GEe6JzMXlMYj7DJZNIy7OWwQtq9Gvf9SSiXHE",///3a94ceb70b144963a03bf98cb55b812a
@(KeyType_TRTC) : @"KuvNPAVFOJuCIn4wjVeOMw==",///1400798783
@(KeyType_NetEase) : @"7NBaCDlqfBflZ1RQ3KafcH6Nx0XMQ2gifSf2VGRR3fQIHUWnuBoteXTPoxHUD9Oo",///5e76ec47632d86c30ce18eabfa332b6a
@(keyType_YiDunBussinessId) : @"EhdbQun+WXkne5z3pctmR/3144MiHQbb+Dw1kIia3a+TcSiMNCCZgxUwTjE3XVDH",///601545055434f31dc44a7a33b33a8cdf
@(KeyType_APNSCer) : @"GtuBUKu9v+g/K9TKH7rVbh/9KXhCFsGFbj6YwErCZAM=",///yinyouApnsRelease
},
///
@(NO):@{
@(KeyType_PasswordEncode) : @"BeKYtw9W3zMhFjuzb+vcnjdojaAyH9EGzCdIxstGcrq4NT2kD4vUPpFe9VZwRGHb",///1ea53d260ecf11e7b56e00163e046a26
@(KeyType_NTESQuickLoginBusinessId) : @"AQyemQ+/HZ+nQRQ4DPatTW2tUk6GEe6JzMXlMYj7DJZNIy7OWwQtq9Gvf9SSiXHE",///3a94ceb70b144963a03bf98cb55b812a
@(KeyType_TRTC) : @"KuvNPAVFOJuCIn4wjVeOMw==",///1400798783
@(KeyType_NetEase) : @"KF52dJ9ygkGloO4ICIAY401jc/d9YgjLKdVkJuK1jr1Oh4YSOHttbqdgg/6a884U",///5d5a833a2d0ff1304a5d8bed53d2af5b
@(keyType_YiDunBussinessId) : @"I1MpTgirOUjWzALwDanBHDBvHWv4p3Qx68cskj6NLP0m/2OChV+K/G1jPOZRlfDz",///49478ae7a5491a13ce32e9b3e8127382
@(KeyType_APNSCer) : @"WHMG2VqGBdhzSbLQVaTD5w==",///yinyouApnsDebug
}
};
NSDictionary *enviroDic = [dic objectForKey:@(isRelase)];
return [MewEncryptManager mewAESDecryptText:[enviroDic objectForKey:@(type)]];
}
#import "MewGetPointList.h"
@implementation MewGetPointList
+ (CAAnimationGroup *)mewGEtPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint {
CGPoint centerPoint = CGPointMake(KMewGetScreenWidth / 2, KMewGetScreenHeight / 2);
CAKeyframeAnimation *animation0 = [CAKeyframeAnimation animation];

View File

@@ -52,7 +52,7 @@
[[MewOCServerManager share] GET:path parameters:dic headers:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
MewNetworkDataModel *obj = [MewNetworkDataModel mewModelWithDictionary:responseObject];
MewNetworkDataModel *obj = [MewNetworkDataModel mj_objectWithKeyValues:responseObject];
successBlock(obj);
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
@@ -68,7 +68,7 @@
failBlock:(void (^)(NSInteger num, NSString *text))failBlock {
dic = [self mewSetParmars:dic];
[[MewOCServerManager share] POST:path parameters:dic headers:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
MewNetworkDataModel *obj = [MewNetworkDataModel mewModelWithDictionary:responseObject];
MewNetworkDataModel *obj = [MewNetworkDataModel mj_objectWithKeyValues:responseObject];
successBlock(obj);
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {

View File

@@ -18,7 +18,7 @@
#import <NIMSDK/NIMSDK.h>
#import <YYText/YYText.h>
#import <YYText/YYTextLayout.h>
#import "NSObject+MEWExtension.h"
#import "MewGetColorTool.h"
#import <UIImageView+WebCache.h>
#import <SDImageCache.h>
@@ -26,6 +26,6 @@
#import "MewWebViewController.h"
#import "MewOCServerManager.h"
#import <TXLiteAVSDK_TRTC/TRTCCloud.h>
#import "MewConstant.h"
#import "MewGetPointList.h"
#import <AFNetworking.h>
#import <FFPopup/FFPopup.h>

View File

@@ -15,9 +15,9 @@
#import "yinmeng_ios-Swift.h"
#import <MJExtension/MJExtension.h>
#import "MewBaseNavigationController.h"
#import "MewNavigationVC.h"
#import "UIButton+MewSetButtomArea.h"
#import "MewNetworkDataModel.h"
#import "MewSaveBaseUserModel.h"

View File

@@ -29,7 +29,7 @@ static MewSaveBaseUserModel *_user = nil;
-(MewLoginTokenInfoModel *)mewGetBaseUserData{
NSDictionary *dic = [[NSUserDefaults standardUserDefaults]valueForKey:@"kMewSaveBaseUserModel"];
if(dic == nil)return nil;
MewLoginTokenInfoModel *model = [MewLoginTokenInfoModel mewModelWithDictionary:dic];
MewLoginTokenInfoModel *model = [MewLoginTokenInfoModel mj_objectWithKeyValues:dic];
return model;
}
-(void)mewSaveBaseUserData:(MewLoginTokenInfoModel *_Nullable)model{
@@ -37,7 +37,7 @@ static MewSaveBaseUserModel *_user = nil;
model = [MewLoginTokenInfoModel new];
}
self.mewUserData = model;
NSDictionary *dic = [model mewModel2dictionary];
NSDictionary *dic = [[model mj_keyValues] copy];
[[NSUserDefaults standardUserDefaults]setValue:dic forKey:@"kMewSaveBaseUserModel"];
[[NSUserDefaults standardUserDefaults]synchronize];
}

View File

@@ -1,41 +0,0 @@
//
// NSObject+MEWExtension.h
// yinmeng-ios
//
// Created by duoban on 2023/12/1.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSObject (MEWExtension)
/// 依据数组初始化一个实例数组
/// @param json json 数据
+ (NSArray *)mewModelsWithArray:(id)json;
/// 依据字典初始化一个实例
/// @param dictionary 字典
+ (instancetype)mewModelWithDictionary:(NSDictionary *)dictionary;
/// 依据JSON对象初始化一个实例
/// @param json json 数据
+ (instancetype)mewModelWithJSON:(id)json;
///model 转字典
- (NSDictionary *)mewModel2dictionary;
///转 json string
- (NSString *)mewToJSONString;
///转 json object
- (id)mewToJSONObject;
///扩展方法 按需索取 重写即可
///如果一个模型中 包含一个数组 数组中是另一个模型
+ (NSDictionary *)mewObjectClassInArray;
///如果一个模型中需要字段映射的话 比如id -> ID name -> other.name
+ (NSDictionary *)mewReplacedKeyFromPropertyName;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,61 +0,0 @@
//
// NSObject+MEWExtension.m
// yinmeng-ios
//
// Created by duoban on 2023/12/1.
//
#import "NSObject+MEWExtension.h"
#import <MJExtension/MJExtension.h>
@implementation NSObject (MEWExtension)
///
/// @param json json
+ (NSArray *)mewModelsWithArray:(id)json {
return [self mj_objectArrayWithKeyValuesArray:json];
}
///
/// @param dictionary
+ (instancetype)mewModelWithDictionary:(NSDictionary *)dictionary {
return [self mj_objectWithKeyValues:dictionary];
}
/// JSON
/// @param json json
+ (instancetype)mewModelWithJSON:(id)json {
return [self mj_objectWithKeyValues:json];
}
///model
- (NSDictionary *)mewModel2dictionary {
return [[self mj_keyValues] copy];
}
- (NSString *)mewToJSONString {
return [self mj_JSONString];
}
- (id)mewToJSONObject {
return [self mj_JSONObject];
}
///
+ (NSDictionary *)mj_mewObjectClassInArray {
return [self mewObjectClassInArray];
}
///
+ (NSDictionary *)mj_mewReplacedKeyFromPropertyName {
return [self mewReplacedKeyFromPropertyName];
}
///
///
+ (NSDictionary *)mewObjectClassInArray {
return @{};
}
/// id -> ID name -> other.name
+ (NSDictionary *)mewReplacedKeyFromPropertyName {
return @{};
}
@end

View File

@@ -1,16 +0,0 @@
//
// MewBaseNavigationController.h
// yinmeng-ios
//
// Created by duoban on 2023/12/5.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface MewBaseNavigationController : UINavigationController
@end
NS_ASSUME_NONNULL_END

View File

@@ -10,8 +10,8 @@
NS_ASSUME_NONNULL_BEGIN
@interface MewGetColorTool : NSObject
+ (UIColor *)mewGetColorWithColorText:(NSString *) colorText;
+ (UIColor *)mewGetalphaColorWithColorText:(NSString *) colorText alpha:(CGFloat)alpha;
+ (UIColor *)mewGetColorWithColorText: (int) colorText ;
+ (UIColor *)mewGetalphaColorWithColorText:(int)colorText alpha:(CGFloat)alpha;
@end
NS_ASSUME_NONNULL_END

View File

@@ -9,79 +9,11 @@
@implementation MewGetColorTool
+ (UIColor *)mewGetColorWithColorText: (NSString *) colorText {
if (colorText.length == 0) {
return [UIColor blackColor];
}
NSString *title = [[colorText stringByReplacingOccurrencesOfString: @"#" withString: @""] uppercaseString];
CGFloat alpha, red, blue, green;
switch ([title length]) {
case 3: // #RGB
alpha = 1.0f;
red = [self mewGetColorValue: title begin: 0 count: 1];
green = [self mewGetColorValue: title begin: 1 count: 1];
blue = [self mewGetColorValue: title begin: 2 count: 1];
break;
case 4: // #ARGB
alpha = [self mewGetColorValue: title begin: 0 count: 1];
red = [self mewGetColorValue: title begin: 1 count: 1];
green = [self mewGetColorValue: title begin: 2 count: 1];
blue = [self mewGetColorValue: title begin: 3 count: 1];
break;
case 6: // #RRGGBB
alpha = 1.0f;
red = [self mewGetColorValue: title begin: 0 count: 2];
green = [self mewGetColorValue: title begin: 2 count: 2];
blue = [self mewGetColorValue: title begin: 4 count: 2];
break;
case 8: // #AARRGGBB
alpha = [self mewGetColorValue: title begin: 0 count: 2];
red = [self mewGetColorValue: title begin: 2 count: 2];
green = [self mewGetColorValue: title begin: 4 count: 2];
blue = [self mewGetColorValue: title begin: 6 count: 2];
break;
default:
[NSException raise:@"Invalid color value" format: @"Color value %@ is invalid. It should be a hex value of the form #RBG, #ARGB, #RRGGBB, or #AARRGGBB", colorText];
break;
}
return [UIColor colorWithRed: red green: green blue: blue alpha: alpha];
+ (UIColor *)mewGetColorWithColorText: (int) colorText {
return [UIColor colorWithRed:((float)((colorText & 0xFF0000) >> 16))/255.0 green:((float)((colorText & 0xFF00) >> 8))/255.0 blue:((float)(colorText & 0xFF))/255.0 alpha:1];
}
+ (UIColor *)mewGetalphaColorWithColorText:(NSString *) colorText alpha:(CGFloat)alpha{
if (colorText.length == 0) {
return [UIColor blackColor];
}
NSString *title = [[colorText stringByReplacingOccurrencesOfString: @"#" withString: @""] uppercaseString];
CGFloat red, blue, green;
switch ([title length]) {
case 3: // #RGB
red = [self mewGetColorValue: title begin: 0 count: 1];
green = [self mewGetColorValue: title begin: 1 count: 1];
blue = [self mewGetColorValue: title begin: 2 count: 1];
break;
case 4: // #ARGB
red = [self mewGetColorValue: title begin: 1 count: 1];
green = [self mewGetColorValue: title begin: 2 count: 1];
blue = [self mewGetColorValue: title begin: 3 count: 1];
break;
case 6: // #RRGGBB
red = [self mewGetColorValue: title begin: 0 count: 2];
green = [self mewGetColorValue: title begin: 2 count: 2];
blue = [self mewGetColorValue: title begin: 4 count: 2];
break;
case 8: // #AARRGGBB
red = [self mewGetColorValue: title begin: 2 count: 2];
green = [self mewGetColorValue: title begin: 4 count: 2];
blue = [self mewGetColorValue: title begin: 6 count: 2];
break;
default:
[NSException raise:@"Invalid color value" format: @"Color value %@ is invalid. It should be a hex value of the form #RBG, #ARGB, #RRGGBB, or #AARRGGBB", colorText];
break;
}
return [UIColor colorWithRed: red green: green blue: blue alpha: alpha];
+ (UIColor *)mewGetalphaColorWithColorText:(int)colorText alpha:(CGFloat)alpha{
return [UIColor colorWithRed:((float)((colorText & 0xFF0000) >> 16))/255.0 green:((float)((colorText & 0xFF00) >> 8))/255.0 blue:((float)(colorText & 0xFF))/255.0 alpha:(alpha)];
}
+ (CGFloat) mewGetColorValue: (NSString *) text begin: (NSUInteger) begin count: (NSUInteger) count {
NSString *subText = [text substringWithRange: NSMakeRange(begin, count)];

View File

@@ -0,0 +1,16 @@
//
// MewNavigationVC.h
// yinmeng-ios
//
// Created by duoban on 2024/1/20.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface MewNavigationVC : UINavigationController
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,33 +1,31 @@
//
// MewBaseNavigationController.m
// MewNavigationVC.m
// yinmeng-ios
//
// Created by duoban on 2023/12/5.
// Created by duoban on 2024/1/20.
//
#import "MewBaseNavigationController.h"
#import "MewNavigationVC.h"
@interface MewBaseNavigationController ()<UIGestureRecognizerDelegate>
@interface MewNavigationVC ()<UIGestureRecognizerDelegate>
@end
@implementation MewBaseNavigationController
@implementation MewNavigationVC
- (void)viewDidLoad {
[super viewDidLoad];
if ([self respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
self.interactivePopGestureRecognizer.delegate = self;
}
[self mew_themeConfig];
[self mewSetColorContent];
}
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
if(self.topViewController == viewController) return;
if (self.childViewControllers.count > 0) {
viewController.hidesBottomBarWhenPushed = YES;
UIBarButtonItem *leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"mew_common_nav_back"] style:UIBarButtonItemStyleDone target:self action:@selector(mew_backClick)];
UIBarButtonItem *leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"mew_common_nav_back"] style:UIBarButtonItemStyleDone target:self action:@selector(mewDissViewAction)];
leftBarButtonItem.tintColor = [MewAppColor mewMainTextColor];
viewController.navigationItem.leftBarButtonItem = leftBarButtonItem;
}
@@ -36,11 +34,11 @@
[super pushViewController:viewController animated:animated];
}
- (void)mew_backClick{
- (void)mewDissViewAction{
[self popViewControllerAnimated:YES];
}
- (void)mew_themeConfig {
- (void)mewSetColorContent {
self.navigationBar.shadowImage = [[UIImage alloc] init];
self.navigationBar.barTintColor = [MewAppColor mewViewBgColor];
self.navigationBar.tintColor = [UIColor whiteColor];
@@ -70,4 +68,3 @@
@end

View File

@@ -8,7 +8,7 @@
#import "MewClientConfig.h"
#import "NSObject+MEWExtension.h"
@interface MewClientConfig()
/// 10
@property (nonatomic,assign) int retryCount;
@@ -36,7 +36,7 @@
self.retryCount = 0;
NSDictionary *initData = obj.data;
self.iosPhoneBind = [initData[@"iosPhoneBind"] boolValue];
MewInitInfoModel *model = [MewInitInfoModel mewModelWithDictionary:obj.data];
MewInitInfoModel *model = [MewInitInfoModel mj_objectWithKeyValues:obj.data];
self.configInfo = model;
//

View File

@@ -1,28 +0,0 @@
//
// MewConstant.h
// yinmeng-ios
//
// Created by duoban on 2023/12/5.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface MewConstant : NSObject
typedef NS_ENUM(NSUInteger, KeyType) {
KeyType_PasswordEncode,///密码 des 加密的
KeyType_TRTC,///TRTC key
KeyType_NTESQuickLoginBusinessId,///网易易盾 快捷登录 id
KeyType_NetEase,///云信的key
keyType_YiDunBussinessId,///易盾的id
KeyType_APNSCer,///推送证书的名字
};
/// 获取当前项目中所用到的 type 所对应的 value 的值 type 类型
NSString * const KeyWithType(KeyType type);
+ (CAAnimationGroup *)mewGEtPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint;
@end
NS_ASSUME_NONNULL_END

View File

@@ -144,7 +144,7 @@
if(!_mewTitleView){
_mewTitleView = [UILabel new];
_mewTitleView.font = kMewSetFontMedium(14);
_mewTitleView.textColor = [MewAppColor mewGetColorOfTextWithHexString:@"0x2B2D33"];
_mewTitleView.textColor = [MewAppColor mewGetColorOfTextWithHexString:0x2B2D33];
}
@@ -154,7 +154,7 @@
if(!_mewSubView){
_mewSubView = [UILabel new];
_mewSubView .font = kMewSetFontRegular(11);
_mewSubView .textColor =[MewAppColor mewGetColorOfTextWithHexString:@"0x696D7A"];
_mewSubView .textColor =[MewAppColor mewGetColorOfTextWithHexString:0x696D7A];
}
return _mewSubView;
@@ -164,7 +164,7 @@
_mewHotNumView = [UILabel new];
_mewHotNumView.text = @"0";
_mewHotNumView.font = [UIFont systemFontOfSize:kMewSetScaleWidth(11) weight:UIFontWeightBold];
_mewHotNumView.textColor =[MewAppColor mewGetColorOfTextWithHexString:@"0x696D7A"];
_mewHotNumView.textColor =[MewAppColor mewGetColorOfTextWithHexString:0x696D7A];
}
return _mewHotNumView;

View File

@@ -72,7 +72,7 @@
[MewOCServerManager mewRequestMainHomeGameTabList:^(MewNetworkDataModel * _Nonnull obj, NSInteger num, NSString * _Nonnull text) {
if(obj.code == 200){
NSArray *list = [MewMainHomeGameTabModel mewModelsWithArray:obj.data];
NSArray *list = [MewMainHomeGameTabModel mj_objectArrayWithKeyValuesArray:obj.data];
self.mewGameList = [NSMutableArray arrayWithArray:list];
[self.mewCollectionView reloadData];
}
@@ -86,7 +86,7 @@
-(void)mew_headerRefresh{
[MewOCServerManager mewRequestMainHomeNewFriendList:^(MewNetworkDataModel * _Nonnull obj, NSInteger num, NSString * _Nonnull text) {
if(obj.code == 200){
NSArray * array = [MewMainHomeMakeFriendModel mewModelsWithArray:obj.data];
NSArray * array = [MewMainHomeMakeFriendModel mj_objectArrayWithKeyValuesArray:obj.data];
self.mewRoomList = [NSMutableArray arrayWithArray:array];
[self.mewCollectionView reloadData];
[self.mewCollectionView.mj_header endRefreshing];
@@ -100,23 +100,23 @@
-(void)mewChooseAllAction{
self.mewSex = nil;
self.mewSelecteAllBGView.backgroundColor =
[MewAppColor mewGetAlphaColorOfTextWithHexString:@"0xffffff" alpha:1];
self.mewSelecteManBGView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:@"0xffffff" alpha:0.4];
self.mewSelecteMomanBGView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:@"0xffffff" alpha:0.4];
[MewAppColor mewGetAlphaColorOfTextWithHexString:0xffffff alpha:1];
self.mewSelecteManBGView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:0xffffff alpha:0.4];
self.mewSelecteMomanBGView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:0xffffff alpha:0.4];
[self.mewCollectionView.mj_header beginRefreshing];
}
-(void)mewChooseManAction{
self.mewSex = @"1";
self.mewSelecteAllBGView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:@"0xffffff" alpha:0.4];
self.mewSelecteManBGView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:@"0xffffff" alpha:1];
self.mewSelecteMomanBGView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:@"0xffffff" alpha:0.4];
self.mewSelecteAllBGView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:0xffffff alpha:0.4];
self.mewSelecteManBGView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:0xffffff alpha:1];
self.mewSelecteMomanBGView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:0xffffff alpha:0.4];
[self.mewCollectionView.mj_header beginRefreshing];
}
-(void)mewChooseMomanAction{
self.mewSex = @"2";
self.mewSelecteAllBGView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:@"0xffffff" alpha:0.4];
self.mewSelecteMomanBGView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:@"0xffffff" alpha:1];
self.mewSelecteManBGView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:@"0xffffff" alpha:0.4];
self.mewSelecteAllBGView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:0xffffff alpha:0.4];
self.mewSelecteMomanBGView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:0xffffff alpha:1];
self.mewSelecteManBGView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:0xffffff alpha:0.4];
[self.mewCollectionView.mj_header beginRefreshing];
}
@@ -209,7 +209,7 @@
if(self.mewRoomList.count == 0)return;
MewMainHomeMakeFriendModel *roomModel = [self.mewRoomList objectAtIndex:indexPath.row];
MewRoomPlayVC *roomVC = [[MewRoomPlayVC alloc]initWithMewRoomUid:roomModel.inRoomUid.length > 0 ? roomModel.inRoomUid : roomModel.uid];
MewBaseNavigationController *baseNav = [[MewBaseNavigationController alloc] initWithRootViewController:roomVC];
MewNavigationVC *baseNav = [[MewNavigationVC alloc] initWithRootViewController:roomVC];
baseNav.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentViewController:baseNav animated:YES completion:nil];
@@ -255,7 +255,7 @@
- (UIView *)mewSelecteAllBGView{
if(!_mewSelecteAllBGView){
_mewSelecteAllBGView = [UIView new];
_mewSelecteAllBGView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:@"0xffffff" alpha:1];
_mewSelecteAllBGView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:0xffffff alpha:1];
_mewSelecteAllBGView.layer.cornerRadius = kMewSetScaleWidth(22)/2;
_mewSelecteAllBGView.layer.masksToBounds = YES;
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(mewChooseAllAction)];
@@ -268,7 +268,7 @@
_mewSelecteAllTextView = [UILabel new];
_mewSelecteAllTextView.text = @"全部";
_mewSelecteAllTextView.font = kMewSetFontRegular(11);
_mewSelecteAllTextView.textColor = [MewAppColor mewGetColorOfTextWithHexString:@"0x696D7A"];
_mewSelecteAllTextView.textColor = [MewAppColor mewGetColorOfTextWithHexString:0x696D7A];
_mewSelecteAllTextView.textAlignment = NSTextAlignmentCenter;
}
return _mewSelecteAllTextView;
@@ -276,7 +276,7 @@
- (UIView *)mewSelecteManBGView{
if(!_mewSelecteManBGView){
_mewSelecteManBGView = [UIView new];
_mewSelecteManBGView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:@"0xffffff" alpha:0.5];
_mewSelecteManBGView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:0xffffff alpha:0.5];
_mewSelecteManBGView.layer.cornerRadius = kMewSetScaleWidth(22)/2;
_mewSelecteManBGView.layer.masksToBounds = YES;
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(mewChooseManAction)];
@@ -289,7 +289,7 @@
_mewSelecteManTextView = [UILabel new];
_mewSelecteManTextView.text = @"男生";
_mewSelecteManTextView.font = kMewSetFontRegular(11);
_mewSelecteManTextView.textColor = [MewAppColor mewGetColorOfTextWithHexString:@"0x696D7A"];
_mewSelecteManTextView.textColor = [MewAppColor mewGetColorOfTextWithHexString:0x696D7A];
_mewSelecteManTextView.textAlignment = NSTextAlignmentCenter;
}
return _mewSelecteManTextView;
@@ -297,7 +297,7 @@
- (UIView *)mewSelecteMomanBGView{
if(!_mewSelecteMomanBGView){
_mewSelecteMomanBGView = [UIView new];
_mewSelecteMomanBGView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:@"0xffffff" alpha:0.5];
_mewSelecteMomanBGView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:0xffffff alpha:0.5];
_mewSelecteMomanBGView.layer.cornerRadius = kMewSetScaleWidth(22)/2;
_mewSelecteMomanBGView.layer.masksToBounds = YES;
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(mewChooseMomanAction)];
@@ -310,7 +310,7 @@
_mewSelecteMomanTextView = [UILabel new];
_mewSelecteMomanTextView.text = @"女生";
_mewSelecteMomanTextView.font = kMewSetFontRegular(11);
_mewSelecteMomanTextView.textColor = [MewAppColor mewGetColorOfTextWithHexString:@"0x696D7A"];
_mewSelecteMomanTextView.textColor = [MewAppColor mewGetColorOfTextWithHexString:0x696D7A];
_mewSelecteMomanTextView.textAlignment = NSTextAlignmentCenter;
}
return _mewSelecteMomanTextView;

View File

@@ -108,8 +108,8 @@
- (void)mew_loadHomeDataWithGender:(NSString *)gender {
[MewOCServerManager mewRequestRandomFindFriendList:^(MewNetworkDataModel * _Nullable obj, NSInteger num, NSString * _Nonnull text) {
if(obj.code == 200){
NSArray *array = [MewPersonInfoModel mewModelsWithArray:obj.data[@"randomList"]];
MewPersonInfoModel *mineModel = [MewPersonInfoModel mewModelWithDictionary:obj.data[@"me"]];
NSArray *array = [MewPersonInfoModel mj_objectArrayWithKeyValuesArray:obj.data[@"randomList"]];
MewPersonInfoModel *mineModel = [MewPersonInfoModel mj_objectWithKeyValues:obj.data[@"me"]];
self.MewPersonInfoModels = array;
self.showVoiceView.userInfoArrays = self.MewPersonInfoModels;
self.selfMineModel = mineModel;
@@ -149,7 +149,7 @@
NSString * pageSizeStr = [NSString stringWithFormat:@"%@", pageSize];
[MewOCServerManager mewGetLikeListInfo:^(MewNetworkDataModel * _Nullable obj, NSInteger num, NSString * _Nonnull text) {
if(obj.code == 200){
NSArray * array = [MewPersonInfoModel mewModelsWithArray:obj.data];
NSArray * array = [MewPersonInfoModel mj_objectArrayWithKeyValuesArray:obj.data];
if (state == 0) {
[self.fansListModels removeAllObjects];
[self.rightFollowVoiceView.followCollectionView.mj_header endRefreshing];
@@ -457,7 +457,7 @@
_rightBgVoiceView = [[UIView alloc] init];
_rightBgVoiceView.backgroundColor =
[MewAppColor mewGetColorOfTextWithHexString:@"#1D1F33"];
[MewAppColor mewGetColorOfTextWithHexString:0x1D1F33];
}
return _rightBgVoiceView;
}
@@ -477,7 +477,7 @@
- (MewRightFollowVoiceView *)rightFollowVoiceView {
if (!_rightFollowVoiceView) {
_rightFollowVoiceView = [[MewRightFollowVoiceView alloc] init];
_rightFollowVoiceView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:@"#050505"];
_rightFollowVoiceView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:0x050505];
_rightFollowVoiceView.hidden = YES;
_rightFollowVoiceView.delegate = self;
__weak typeof(self) weakSelf = self;

View File

@@ -122,11 +122,11 @@
// _filterButton.frame = CGRectMake(24, _voiceBgImageView.frame.size.height + 10.0, 61, 27);
[_filterButton setImage:[UIImage imageNamed:@"mew_home_header_voice_filter"] forState:UIControlStateNormal];
[_filterButton setTitle:@"筛选" forState:UIControlStateNormal];
[_filterButton setTitleColor:[MewAppColor mewGetColorOfTextWithHexString:@"#E1E4E6"] forState:UIControlStateNormal];
[_filterButton setTitleColor:[MewAppColor mewGetColorOfTextWithHexString:0xE1E4E6] forState:UIControlStateNormal];
_filterButton.titleLabel.font = kMewSetFontMedium(12);
_filterButton.layer.cornerRadius = 14;
_filterButton.layer.masksToBounds = YES;
_filterButton.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:@"#1D1E1F"];
_filterButton.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:0x1D1E1F];
_filterButton.selected = NO;
[_filterButton addTarget:self action:@selector(filterButtonAction:) forControlEvents:UIControlEventTouchUpInside];
}
@@ -139,11 +139,11 @@
// _reviewLoadButton.frame = CGRectMake(CGRectGetMaxX(_filterButton.frame) + 20, CGRectGetMinY(_filterButton.frame), 76, 27);
[_reviewLoadButton setImage:[UIImage imageNamed:@"mew_home_header_renew_voice"] forState:UIControlStateNormal];
[_reviewLoadButton setTitle:@"换一换" forState:UIControlStateNormal];
[_reviewLoadButton setTitleColor:[MewAppColor mewGetColorOfTextWithHexString:@"#E1E4E6"] forState:UIControlStateNormal];
[_reviewLoadButton setTitleColor:[MewAppColor mewGetColorOfTextWithHexString:0xE1E4E6] forState:UIControlStateNormal];
_reviewLoadButton.titleLabel.font = kMewSetFontMedium(12);
_reviewLoadButton.layer.cornerRadius = 14;
_reviewLoadButton.layer.masksToBounds = YES;
_reviewLoadButton.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:@"#1D1E1F"];
_reviewLoadButton.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:0x1D1E1F];
[_reviewLoadButton addTarget:self action:@selector(reviewLoadButtonAction) forControlEvents:UIControlEventTouchUpInside];
}

View File

@@ -72,7 +72,7 @@ static NSInteger targetIndex = 0;
CGFloat margin = (107 - 3 * 28 - 2 * 6.0)/2;
for (int i = 0; i < self.datas.count; i++) {
UIView *colorBgView = [[UIView alloc] init];
colorBgView.backgroundColor = i==targetIndex ? [MewAppColor mewGetColorOfTextWithHexString:@"#DCDDE0"] : UIColor.clearColor;
colorBgView.backgroundColor = i==targetIndex ? [MewAppColor mewGetColorOfTextWithHexString:0xDCDDE0] : UIColor.clearColor;
colorBgView.tag = i;
colorBgView.layer.cornerRadius = 6;
colorBgView.layer.masksToBounds = YES;
@@ -89,7 +89,7 @@ static NSInteger targetIndex = 0;
UILabel *titleLabel = [[UILabel alloc] init];
titleLabel.text = self.datas[i];
titleLabel.textColor = [MewAppColor mewGetColorOfTextWithHexString:@"#1F1B4F"];
titleLabel.textColor = [MewAppColor mewGetColorOfTextWithHexString:0x1F1B4F];
titleLabel.font = kMewSetFontMedium(12);
titleLabel.textAlignment = NSTextAlignmentCenter;
[colorBgView addSubview:titleLabel];

View File

@@ -197,9 +197,9 @@
_pushVoiceButton.layer.cornerRadius = 52.0/2;
_pushVoiceButton.layer.masksToBounds = YES;
UIImage *backgroundImage = [UIImage mew_gradientColorImageFromColors:@[
[MewAppColor mewGetColorOfTextWithHexString:@"#FF60FD"],
[MewAppColor mewGetColorOfTextWithHexString:@"##8974FF"],
[MewAppColor mewGetColorOfTextWithHexString:@"#69EBFF"]
[MewAppColor mewGetColorOfTextWithHexString:0xFF60FD],
[MewAppColor mewGetColorOfTextWithHexString:0x8974FF],
[MewAppColor mewGetColorOfTextWithHexString:0x69EBFF]
] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(250, 52)];
_pushVoiceButton.backgroundColor = [UIColor colorWithPatternImage:backgroundImage];
[_pushVoiceButton addTarget:self action:@selector(pushVoiceButtonAction) forControlEvents:UIControlEventTouchUpInside];

View File

@@ -112,7 +112,7 @@ static MewPushExclusiveVoiceView *_exclusiveVoiceView = nil;
self = [super initWithFrame:frame];
if (self) {
self.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:@"0x000000" alpha:0.5];
self.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:0x000000 alpha:0.5];
[self mew_initView];
[self mew_initLayout];
}
@@ -314,7 +314,7 @@ static MewPushExclusiveVoiceView *_exclusiveVoiceView = nil;
}
self.longTapColorView.hidden = NO;
self.longTapColorView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:isRecord ? @"#FF43B1" : @"#43F4FF"];
self.longTapColorView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:isRecord ? 0xFF43B1 : 0x43F4FF];
}
///
@@ -485,7 +485,7 @@ static MewPushExclusiveVoiceView *_exclusiveVoiceView = nil;
- (UIView *)whiteBgView {
if (!_whiteBgView) {
_whiteBgView = [[UIView alloc] init];
_whiteBgView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:@"#525566"];;
_whiteBgView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:0x525566];;
_whiteBgView.layer.cornerRadius = 15.0;
_whiteBgView.layer.masksToBounds = YES;
}
@@ -516,7 +516,7 @@ static MewPushExclusiveVoiceView *_exclusiveVoiceView = nil;
- (UIView *)longTapView {
if (!_longTapView) {
_longTapView = [[UIView alloc] init];
_longTapView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:@"#9552FF"];
_longTapView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:0x9552FF];
_longTapView.layer.cornerRadius = 24.0;
_longTapView.layer.masksToBounds = YES;
//
@@ -548,7 +548,7 @@ static MewPushExclusiveVoiceView *_exclusiveVoiceView = nil;
- (UIView *)longTapColorView {
if (!_longTapColorView) {
_longTapColorView = [[UIView alloc] init];
_longTapColorView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:@"#43F4FF"];
_longTapColorView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:0x43F4FF];
_longTapColorView.layer.cornerRadius = 6.0/2.0;
_longTapColorView.layer.masksToBounds = YES;
}
@@ -578,7 +578,7 @@ static MewPushExclusiveVoiceView *_exclusiveVoiceView = nil;
- (UIView *)textBgView {
if (!_textBgView) {
_textBgView = [[UIView alloc] init];
_textBgView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:@"#DCDDE0"];
_textBgView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:0xDCDDE0];
_textBgView.layer.cornerRadius = 11.0;
_textBgView.layer.masksToBounds = YES;
}
@@ -589,7 +589,7 @@ static MewPushExclusiveVoiceView *_exclusiveVoiceView = nil;
_textView = [[UITextView alloc] init];
_textView.delegate = self;
_textView.font = kMewSetFontRegular(13);
_textView.textColor = [MewAppColor mewGetColorOfTextWithHexString:@"#7D8499"];
_textView.textColor = [MewAppColor mewGetColorOfTextWithHexString:0x7D8499];
_textView.backgroundColor = UIColor.clearColor;
}
return _textView;
@@ -598,7 +598,7 @@ static MewPushExclusiveVoiceView *_exclusiveVoiceView = nil;
if (!_placeholdLabel) {
_placeholdLabel = [[UILabel alloc] init];
_placeholdLabel.text = @"说点什么...";
_placeholdLabel.textColor = [MewAppColor mewGetColorOfTextWithHexString:@"#7D8499"];
_placeholdLabel.textColor = [MewAppColor mewGetColorOfTextWithHexString:0x7D8499];
_placeholdLabel.font = kMewSetFontRegular(13);
}
return _placeholdLabel;
@@ -612,7 +612,7 @@ static MewPushExclusiveVoiceView *_exclusiveVoiceView = nil;
_pushVoiceButton.titleLabel.font = kMewSetFontSemibold(16);
_pushVoiceButton.layer.cornerRadius = 23.0;
_pushVoiceButton.layer.masksToBounds = YES;
UIImage *image = [UIImage mew_gradientColorImageFromColors:@[[MewAppColor mewGetColorOfTextWithHexString:@"#FF60FD"], [MewAppColor mewGetColorOfTextWithHexString:@"#8974FF"],[MewAppColor mewGetColorOfTextWithHexString:@"#69EBFF"]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(KMewGetScreenWidth - 4 * 28, 46)];
UIImage *image = [UIImage mew_gradientColorImageFromColors:@[[MewAppColor mewGetColorOfTextWithHexString:0xFF60FD], [MewAppColor mewGetColorOfTextWithHexString:0x8974FF],[MewAppColor mewGetColorOfTextWithHexString:0x69EBFF]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(KMewGetScreenWidth - 4 * 28, 46)];
_pushVoiceButton.backgroundColor = [UIColor colorWithPatternImage:image];
[_pushVoiceButton addTarget:self action:@selector(pushWithRecordVoice) forControlEvents:UIControlEventTouchUpInside];
}

View File

@@ -117,7 +117,7 @@ static MewUserIntroductionView *_userIntroductionView = nil;
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
self.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:@"0x000000" alpha:0.4];
self.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:0x000000 alpha:0.4];
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didSelectBgViewTapGesture:)];
[self addGestureRecognizer:tap];
[self mew_initView];
@@ -372,7 +372,7 @@ static MewUserIntroductionView *_userIntroductionView = nil;
- (UIView *)whiteBgView {
if (!_whiteBgView) {
_whiteBgView = [[UIView alloc] init];
_whiteBgView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:@"#525566"];
_whiteBgView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:0x525566];
_whiteBgView.layer.cornerRadius = 16;
_whiteBgView.layer.masksToBounds = YES;
}
@@ -449,10 +449,10 @@ static MewUserIntroductionView *_userIntroductionView = nil;
_starSignLabel.text = @"天蝎座";
_starSignLabel.textAlignment = NSTextAlignmentCenter;
_starSignLabel.font = kMewSetFontRegular(10);
_starSignLabel.textColor = [MewAppColor mewGetColorOfTextWithHexString:@"#9168FA"];
_starSignLabel.textColor = [MewAppColor mewGetColorOfTextWithHexString:0x9168FA];
_starSignLabel.layer.cornerRadius = 9.0;
_starSignLabel.layer.masksToBounds = YES;
_starSignLabel.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:@"#E9E1FF"];
_starSignLabel.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:0xE9E1FF];
_starSignLabel.hidden = YES;
}
return _starSignLabel;
@@ -463,7 +463,7 @@ static MewUserIntroductionView *_userIntroductionView = nil;
- (UIView *)voiceIntroductionView {
if (!_voiceIntroductionView) {
_voiceIntroductionView = [[UIView alloc] init];
_voiceIntroductionView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:@"#DCDDE0"];
_voiceIntroductionView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:0xDCDDE0];
_voiceIntroductionView.layer.cornerRadius = 11.0;
_voiceIntroductionView.layer.masksToBounds = YES;
}
@@ -475,7 +475,7 @@ static MewUserIntroductionView *_userIntroductionView = nil;
_voiceTitleLabel = [[UILabel alloc] init];
_voiceTitleLabel.text = @"这是一段用户签名,这是一段用户签名,这是一段用户签名~";
_voiceTitleLabel.font = kMewSetFontRegular(13);
_voiceTitleLabel.textColor = [MewAppColor mewGetColorOfTextWithHexString:@"#1F1B4F"];
_voiceTitleLabel.textColor = [MewAppColor mewGetColorOfTextWithHexString:0x1F1B4F];
_voiceTitleLabel.numberOfLines = 0;
}
return _voiceTitleLabel;
@@ -513,7 +513,7 @@ static MewUserIntroductionView *_userIntroductionView = nil;
_voiceTimeLabel = [[UILabel alloc] init];
_voiceTimeLabel.text = @"30”";
_voiceTimeLabel.font = kMewSetFontMedium(14);
_voiceTimeLabel.textColor = [MewAppColor mewGetColorOfTextWithHexString:@"#1F1B4F"];
_voiceTimeLabel.textColor = [MewAppColor mewGetColorOfTextWithHexString:0x1F1B4F];
}
return _voiceTimeLabel;
}
@@ -521,7 +521,7 @@ static MewUserIntroductionView *_userIntroductionView = nil;
- (UIView *)horLineView {
if (!_horLineView) {
_horLineView = [[UIView alloc] init];
_horLineView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:@"0xffffff" alpha:0.2];
_horLineView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:0xffffff alpha:0.2];
}
return _horLineView;
@@ -530,7 +530,7 @@ static MewUserIntroductionView *_userIntroductionView = nil;
- (UIView *)verLineView1 {
if (!_verLineView1) {
_verLineView1 = [[UIView alloc] init];
_verLineView1.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:@"0xffffff" alpha:0.2];
_verLineView1.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:0xffffff alpha:0.2];
}
return _verLineView1;
}
@@ -540,7 +540,7 @@ static MewUserIntroductionView *_userIntroductionView = nil;
- (UIView *)verLineView2 {
if (!_verLineView2) {
_verLineView2 = [[UIView alloc] init];
_verLineView2.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:@"0xffffff" alpha:0.2];
_verLineView2.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:0xffffff alpha:0.2];
}
return _verLineView2;
}

View File

@@ -47,7 +47,7 @@ static MewVoiceGuideView *_guideView = nil;
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
self.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:@"0x000000" alpha:0.4];
self.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:0x000000 alpha:0.4];
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(viewWithTapGesture:)];
[self addGestureRecognizer:tap];
[self mew_initView];
@@ -125,7 +125,7 @@ static MewVoiceGuideView *_guideView = nil;
- (UIView *)guideBgView {
if (!_guideBgView) {
_guideBgView = [[UIView alloc] init];
_guideBgView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:@"#6A60FF"];
_guideBgView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:0x6A60FF];
}
return _guideBgView;
}

View File

@@ -14,7 +14,7 @@ class MewNIMMsgInfoModel: NSObject {
}
extension MewInitInfoModel:NIMCustomAttachment{
func encode() -> String {
return self.mewToJSONString()
return self.mj_JSONString()
}

View File

@@ -6,7 +6,7 @@
//
#import "MewCustomAttachmentDecoder.h"
#import "NSObject+MEWExtension.h"
@implementation MewCustomAttachmentDecoder

View File

@@ -98,7 +98,7 @@
- (UIView *)lineView {
if (!_lineView) {
_lineView = [[UIView alloc] init];
_lineView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:@"#F2F3F6"];
_lineView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:0xF2F3F6];
}
return _lineView;
}

View File

@@ -77,8 +77,8 @@
}
#pragma mark - Event Response
- (void)mew_finishButtonAction:(UIButton *)sender {
NSString * desPassword = [DESEncrypt encryptUseDES:self.codeView.textField.text key:KeyWithType(KeyType_PasswordEncode)];
NSString * phone = [DESEncrypt encryptUseDES:self.phoneView.textField.text key:KeyWithType(KeyType_PasswordEncode)];
NSString * desPassword = [DESEncrypt encryptUseDES:self.codeView.textField.text key:[MewEncryptManager mewAESDecryptText:@"BeKYtw9W3zMhFjuzb+vcnjdojaAyH9EGzCdIxstGcrq4NT2kD4vUPpFe9VZwRGHb"]];
NSString * phone = [DESEncrypt encryptUseDES:self.phoneView.textField.text key:[MewEncryptManager mewAESDecryptText:@"BeKYtw9W3zMhFjuzb+vcnjdojaAyH9EGzCdIxstGcrq4NT2kD4vUPpFe9VZwRGHb"]];
[MewOCServerManager mewAgainSetPassword:^(MewNetworkDataModel * _Nullable obj, NSInteger num, NSString * _Nonnull text) {
if(obj.code == 200){
[[MEWCountDownHelper shareHelper] mewStopCountDown];
@@ -92,14 +92,14 @@
if (self.phoneView.textField.text.length != 11) {
[self mew_showErrorToast:@"请输入正确的手机号码"];
} else {
NSString * phone = [DESEncrypt encryptUseDES:self.phoneView.textField.text key:KeyWithType(KeyType_PasswordEncode)];
NSString * phone = [DESEncrypt encryptUseDES:self.phoneView.textField.text key:[MewEncryptManager mewAESDecryptText:@"BeKYtw9W3zMhFjuzb+vcnjdojaAyH9EGzCdIxstGcrq4NT2kD4vUPpFe9VZwRGHb"]];
[MewOCServerManager mewGetPhoneAuthCode:^(MewNetworkDataModel * _Nullable obj, NSInteger num, NSString * _Nonnull text) {
if(obj.code == 200){
self.codeView.authCodeButton.enabled= NO;
[self mew_showSuccessToast:@"验证码发送成功"];
[[MEWCountDownHelper shareHelper] mewOpenCountdownWithTime:60];
}
} mobile:phone type:[NSString stringWithFormat:@"%lu", (unsigned long)KeyWithType(KeyType_PasswordEncode)]];
} mobile:phone type:[NSString stringWithFormat:@"%lu", (unsigned long)[MewEncryptManager mewAESDecryptText:@"BeKYtw9W3zMhFjuzb+vcnjdojaAyH9EGzCdIxstGcrq4NT2kD4vUPpFe9VZwRGHb"]]];
}
}
@@ -201,7 +201,7 @@
[_finishButton setImage:[UIImage imageNamed:@"mew_login_next"] forState:UIControlStateNormal];
_finishButton.titleLabel.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:18];
[_finishButton setTitleColor:UIColor.blackColor forState:UIControlStateNormal];
UIImage *image = [UIImage mew_gradientColorImageFromColors:@[[MewAppColor mewGetColorOfTextWithHexString:@"#FF60FD"], [MewAppColor mewGetColorOfTextWithHexString:@"#8974FF"],[MewAppColor mewGetColorOfTextWithHexString:@"#69EBFF"]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(KMewGetScreenWidth - 2*36, 52)];
UIImage *image = [UIImage mew_gradientColorImageFromColors:@[[MewAppColor mewGetColorOfTextWithHexString:0xFF60FD], [MewAppColor mewGetColorOfTextWithHexString:0x8974FF],[MewAppColor mewGetColorOfTextWithHexString:0x69EBFF]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(KMewGetScreenWidth - 2*36, 52)];
_finishButton.backgroundColor = [UIColor colorWithPatternImage:image];
[_finishButton addTarget:self action:@selector(mew_finishButtonAction:) forControlEvents:UIControlEventTouchUpInside];
}
@@ -238,7 +238,7 @@
_codeView.placeholder = @"请输入验证码";
_codeView.type = MewLoginForgetEditViewTypeSms;
_codeView.backgroundColor = UIColor.whiteColor;
[_codeView.authCodeButton setTitleColor:[MewAppColor mewGetColorOfTextWithHexString:@"#9552FF"] forState:UIControlStateNormal];
[_codeView.authCodeButton setTitleColor:[MewAppColor mewGetColorOfTextWithHexString:0x9552FF] forState:UIControlStateNormal];
_codeView.layer.cornerRadius = 52/2.f;
_codeView.layer.masksToBounds = YES;
[_codeView.authCodeButton addTarget:self action:@selector(mew_authCodeButtonAction:) forControlEvents:UIControlEventTouchUpInside];

View File

@@ -333,7 +333,7 @@
_nextButton.layer.cornerRadius = 52/2.f;
[_nextButton setImage:[UIImage imageNamed:@"mew_login_next"] forState:UIControlStateNormal];
_nextButton.titleLabel.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:18];
UIImage *image = [UIImage mew_gradientColorImageFromColors:@[[MewAppColor mewGetColorOfTextWithHexString:@"#FF60FD"], [MewAppColor mewGetColorOfTextWithHexString:@"#8974FF"],[MewAppColor mewGetColorOfTextWithHexString:@"#69EBFF"]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(KMewGetScreenWidth - 2*36, 52)];
UIImage *image = [UIImage mew_gradientColorImageFromColors:@[[MewAppColor mewGetColorOfTextWithHexString:0xFF60FD], [MewAppColor mewGetColorOfTextWithHexString:0x8974FF],[MewAppColor mewGetColorOfTextWithHexString:0x69EBFF]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(KMewGetScreenWidth - 2*36, 52)];
_nextButton.backgroundColor = [UIColor colorWithPatternImage:image];
[_nextButton addTarget:self action:@selector(mew_nextButtonAction) forControlEvents:UIControlEventTouchUpInside];
}

View File

@@ -11,7 +11,7 @@
#import <ReactiveObjC/ReactiveObjC.h>
///Tool
#import "MewConstant.h"
#import "MewMacro.h"
#import "UIImage+MewUtils.h"
#import "MewHUDTool.h"
@@ -202,7 +202,7 @@
@strongify(self);
NSString * typeStr = [NSString stringWithFormat:@"%lu", (unsigned long)self.bindingPhoneNumType == MewBindingPhoneNumTypeConfirm ? MewUserLoginType_Unbind_Phone : MewUserLoginType_Bind_Phone];
NSString * phone = [DESEncrypt encryptUseDES:self.phoneNumTextField.text key:KeyWithType(KeyType_PasswordEncode)];
NSString * phone = [DESEncrypt encryptUseDES:self.phoneNumTextField.text key:[MewEncryptManager mewAESDecryptText:@"BeKYtw9W3zMhFjuzb+vcnjdojaAyH9EGzCdIxstGcrq4NT2kD4vUPpFe9VZwRGHb"]];
[MewOCServerManager mewGetPhoneAuthCode:^(MewNetworkDataModel * _Nullable obj, NSInteger num, NSString * _Nonnull text) {
if(obj.code == 200){
self.authCodeBtn.enabled = NO;
@@ -231,7 +231,7 @@
if (self.bindingPhoneNumType == MewBindingPhoneNumTypeConfirm) {
} else {
NSString * ticket = [[MewSaveBaseUserModel share]mewUserTicket];
NSString * phone = [DESEncrypt encryptUseDES:self.phoneNumTextField.text key:KeyWithType(KeyType_PasswordEncode)];
NSString * phone = [DESEncrypt encryptUseDES:self.phoneNumTextField.text key:[MewEncryptManager mewAESDecryptText:@"BeKYtw9W3zMhFjuzb+vcnjdojaAyH9EGzCdIxstGcrq4NT2kD4vUPpFe9VZwRGHb"]];
[MewOCServerManager mewSetUserPhoneInfo:^(MewNetworkDataModel * _Nullable obj, NSInteger num, NSString * _Nonnull text) {
if(obj.code == 200){
[[MEWCountDownHelper shareHelper] mewStopCountDown];
@@ -331,7 +331,7 @@
_confirmBtn.layer.cornerRadius = 52/2.f;
_confirmBtn.layer.masksToBounds = YES;
_confirmBtn.enabled = NO;
UIImage *image = [UIImage mew_gradientColorImageFromColors:@[[MewAppColor mewGetColorOfTextWithHexString:@"#FF60FD"], [MewAppColor mewGetColorOfTextWithHexString:@"#8974FF"],[MewAppColor mewGetColorOfTextWithHexString:@"#69EBFF"]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(KMewGetScreenWidth - 2*36, 52)];
UIImage *image = [UIImage mew_gradientColorImageFromColors:@[[MewAppColor mewGetColorOfTextWithHexString:0xFF60FD], [MewAppColor mewGetColorOfTextWithHexString:0x8974FF],[MewAppColor mewGetColorOfTextWithHexString:0x69EBFF]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(KMewGetScreenWidth - 2*36, 52)];
_confirmBtn.backgroundColor = [UIColor colorWithPatternImage:image];
}
return _confirmBtn;
@@ -341,7 +341,7 @@
if (!_authCodeBtn) {
_authCodeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_authCodeBtn setTitle:@"获取验证码" forState:UIControlStateNormal];
[_authCodeBtn setTitleColor:[MewAppColor mewGetColorOfTextWithHexString:@"#9552FF"] forState:UIControlStateNormal];
[_authCodeBtn setTitleColor:[MewAppColor mewGetColorOfTextWithHexString:0x9552FF] forState:UIControlStateNormal];
// [_authCodeBtn setTitleColor:[ appMainColor] forState:UIControlStateNormal];
[_authCodeBtn setTitleColor:[MewAppColor mewSecondTextColor] forState:UIControlStateDisabled];
[_authCodeBtn.titleLabel setFont:[UIFont systemFontOfSize:12.f]];

View File

@@ -55,7 +55,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:@"#14171B"];
self.view.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:0x14171B];
[self mew_initSubViews];
[self mew_initSubViewConstraints];
}
@@ -250,7 +250,7 @@
_submitButton.layer.masksToBounds = YES;
_submitButton.layer.cornerRadius = 52/2;
_submitButton.enabled = YES;
UIImage *image = [UIImage mew_gradientColorImageFromColors:@[[MewAppColor mewGetColorOfTextWithHexString:@"#FF60FD"], [MewAppColor mewGetColorOfTextWithHexString:@"#8974FF"],[MewAppColor mewGetColorOfTextWithHexString:@"#69EBFF"]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(KMewGetScreenWidth - 2*36, 52)];
UIImage *image = [UIImage mew_gradientColorImageFromColors:@[[MewAppColor mewGetColorOfTextWithHexString:0xFF60FD], [MewAppColor mewGetColorOfTextWithHexString:0x8974FF],[MewAppColor mewGetColorOfTextWithHexString:0x69EBFF]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(KMewGetScreenWidth - 2*36, 52)];
_submitButton.backgroundColor = [UIColor colorWithPatternImage:image];
[_submitButton addTarget:self action:@selector(mew_submitButtonAction:) forControlEvents:UIControlEventTouchUpInside];
}

View File

@@ -21,7 +21,7 @@
#import "MewHUDTool.h"
#import "UIImage+MewUtils.h"
#import "MewConstant.h"
@@ -312,7 +312,7 @@ API_AVAILABLE(ios(13.0))
[MewOCServerManager mewAppleLogin:^(MewNetworkDataModel * _Nullable obj, NSInteger num, NSString * _Nonnull text) {
if(obj.code == 200){
MewLoginTokenInfoModel *model = [MewLoginTokenInfoModel mewModelWithDictionary:obj.data];
MewLoginTokenInfoModel *model = [MewLoginTokenInfoModel mj_objectWithKeyValues:obj.data];
if (model != nil) {
[[MewSaveBaseUserModel share]mewSaveBaseUserData:model];
[self dismissViewControllerAnimated:YES completion:nil];
@@ -367,9 +367,9 @@ API_AVAILABLE(ios(13.0))
[_loginButton setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
_loginButton.titleLabel.font = kMewSetFontMedium(16);
_loginButton.titleLabel.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:18];
UIImage *bgImage = [UIImage mew_gradientColorImageFromColors:@[[MewAppColor mewGetColorOfTextWithHexString:@"#FF60FD"],
[MewAppColor mewGetColorOfTextWithHexString:@"##8974FF"],
[MewAppColor mewGetColorOfTextWithHexString:@"#69EBFF"]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(KMewGetScreenWidth - 80, 52)];
UIImage *bgImage = [UIImage mew_gradientColorImageFromColors:@[[MewAppColor mewGetColorOfTextWithHexString:0xFF60FD],
[MewAppColor mewGetColorOfTextWithHexString:0x8974FF],
[MewAppColor mewGetColorOfTextWithHexString:0x69EBFF]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(KMewGetScreenWidth - 80, 52)];
_loginButton.backgroundColor = [UIColor colorWithPatternImage:bgImage];
[_loginButton addTarget:self action:@selector(mew_loginButtonAction:) forControlEvents:UIControlEventTouchUpInside];
}
@@ -405,7 +405,7 @@ API_AVAILABLE(ios(13.0))
- (NSMutableAttributedString *)privacyAttributedStr{
NSMutableAttributedString *attString = [[NSMutableAttributedString alloc] initWithString:@"同意"];
attString.yy_color = [MewAppColor mewGetAlphaColorOfTextWithHexString:@"0xffffff" alpha:0.8];
attString.yy_color = [MewAppColor mewGetAlphaColorOfTextWithHexString:0xffffff alpha:0.8];
NSString *userString = @"《用户服务协议》";
NSMutableAttributedString *userAttString = [[NSMutableAttributedString alloc] initWithString:userString attributes:@{NSForegroundColorAttributeName:UIColor.whiteColor}];
__weak typeof(self) weakSelf = self;
@@ -418,7 +418,7 @@ API_AVAILABLE(ios(13.0))
} longPressAction:nil];
NSMutableAttributedString *andString = [[NSMutableAttributedString alloc] initWithString:@"和"];
andString.yy_color = [MewAppColor mewGetAlphaColorOfTextWithHexString:@"0xffffff" alpha:0.8];
andString.yy_color = [MewAppColor mewGetAlphaColorOfTextWithHexString:0xffffff alpha:0.8];
NSString *protocolString = @"《隐私政策》";
NSMutableAttributedString *privateString = [[NSMutableAttributedString alloc] initWithString:protocolString attributes:@{NSForegroundColorAttributeName:UIColor.whiteColor}];
[privateString yy_setTextHighlightRange:NSMakeRange(0, privateString.length) color:nil backgroundColor:nil userInfo:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {

View File

@@ -13,7 +13,7 @@
#import "MewHUDTool.h"
#import "UIImage+MewUtils.h"
#import "MewConstant.h"
#import "MewMacro.h"
///View
#import "MewLoginInputView.h"
@@ -63,11 +63,11 @@
[MewHUDTool showErrorWithMessage:@"请输入密码"];
return;
}
NSString * desPassword = [DESEncrypt encryptUseDES:self.codeView.textField.text key:KeyWithType(KeyType_PasswordEncode)];
NSString * phone = [DESEncrypt encryptUseDES:self.phoneView.textField.text key:KeyWithType(KeyType_PasswordEncode)];
NSString * desPassword = [DESEncrypt encryptUseDES:self.codeView.textField.text key:[MewEncryptManager mewAESDecryptText:@"BeKYtw9W3zMhFjuzb+vcnjdojaAyH9EGzCdIxstGcrq4NT2kD4vUPpFe9VZwRGHb"]];
NSString * phone = [DESEncrypt encryptUseDES:self.phoneView.textField.text key:[MewEncryptManager mewAESDecryptText:@"BeKYtw9W3zMhFjuzb+vcnjdojaAyH9EGzCdIxstGcrq4NT2kD4vUPpFe9VZwRGHb"]];
[MewOCServerManager mewLoginAppWithPassword:^(MewNetworkDataModel * _Nullable obj, NSInteger num, NSString * _Nonnull text) {
if(obj.code == 200){
MewLoginTokenInfoModel *model = [MewLoginTokenInfoModel mewModelWithDictionary:obj.data];
MewLoginTokenInfoModel *model = [MewLoginTokenInfoModel mj_objectWithKeyValues:obj.data];
if (model && model.access_token.length > 0){
[[MewSaveBaseUserModel share]mewSaveBaseUserData:model];
}
@@ -144,7 +144,7 @@
[_nextButton setImage:[UIImage imageNamed:@"mew_login_next"] forState:UIControlStateNormal];
_nextButton.titleLabel.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:18];
[_nextButton setTitleColor:UIColor.blackColor forState:UIControlStateNormal];
UIImage *image = [UIImage mew_gradientColorImageFromColors:@[[MewAppColor mewGetColorOfTextWithHexString:@"#FF60FD"], [MewAppColor mewGetColorOfTextWithHexString:@"#8974FF"],[MewAppColor mewGetColorOfTextWithHexString:@"#69EBFF"]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(KMewGetScreenWidth - 2*36, 52)];
UIImage *image = [UIImage mew_gradientColorImageFromColors:@[[MewAppColor mewGetColorOfTextWithHexString:0xFF60FD], [MewAppColor mewGetColorOfTextWithHexString:0x8974FF],[MewAppColor mewGetColorOfTextWithHexString:0x69EBFF]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(KMewGetScreenWidth - 2*36, 52)];
_nextButton.backgroundColor = [UIColor colorWithPatternImage:image];
[_nextButton addTarget:self action:@selector(mew_nextButtonAction) forControlEvents:UIControlEventTouchUpInside];
}
@@ -157,7 +157,7 @@
if (!_forgetPasswordButton) {
_forgetPasswordButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_forgetPasswordButton setTitle:@"忘记密码?" forState:UIControlStateNormal];
[_forgetPasswordButton setTitleColor:[MewAppColor mewGetAlphaColorOfTextWithHexString:@"0xffffff" alpha:0.8] forState:UIControlStateNormal];
[_forgetPasswordButton setTitleColor:[MewAppColor mewGetAlphaColorOfTextWithHexString:0xffffff alpha:0.8] forState:UIControlStateNormal];
_forgetPasswordButton.titleLabel.font = [UIFont fontWithName:@"PingFang-SC-Regular" size:14];
// _forgetPasswordButton.hidden = NO;
[_forgetPasswordButton addTarget:self action:@selector(mew_forgetPasswordButtonAction) forControlEvents:UIControlEventTouchUpInside];

View File

@@ -75,7 +75,7 @@
return;
}
NSString *phone = [DESEncrypt encryptUseDES:self.phone key:KeyWithType(KeyType_PasswordEncode)];
NSString *phone = [DESEncrypt encryptUseDES:self.phone key:[MewEncryptManager mewAESDecryptText:@"BeKYtw9W3zMhFjuzb+vcnjdojaAyH9EGzCdIxstGcrq4NT2kD4vUPpFe9VZwRGHb"]];
[MewOCServerManager mewGetPhoneAuthCode:^(MewNetworkDataModel * _Nullable obj, NSInteger num, NSString * _Nonnull text) {
if(obj.code == 200){
[MewHUDTool showErrorWithMessage:[NSString stringWithFormat:@"验证码已发送\n+86 %@", self.phone]];
@@ -96,11 +96,11 @@
///
- (void)mew_confirmButtonAction {
NSString *phone = [DESEncrypt encryptUseDES:self.phone key:KeyWithType(KeyType_PasswordEncode)];
NSString *phone = [DESEncrypt encryptUseDES:self.phone key:[MewEncryptManager mewAESDecryptText:@"BeKYtw9W3zMhFjuzb+vcnjdojaAyH9EGzCdIxstGcrq4NT2kD4vUPpFe9VZwRGHb"]];
[MewOCServerManager mewLoginAppWithCode:^(MewNetworkDataModel * _Nullable obj, NSInteger num, NSString * _Nonnull text) {
if(obj.code == 200){
MewLoginTokenInfoModel *accountModel = [MewLoginTokenInfoModel mewModelWithDictionary:obj.data];
MewLoginTokenInfoModel *accountModel = [MewLoginTokenInfoModel mj_objectWithKeyValues:obj.data];
if (accountModel && accountModel.access_token.length > 0) {
[[MewSaveBaseUserModel share]mewSaveBaseUserData:accountModel];
}
@@ -251,7 +251,7 @@
- (MewLoginInputView *)phoneInputView {
if (!_phoneInputView) {
_phoneInputView = [[MewLoginInputView alloc] init];
_phoneInputView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:@"#F8F8FB"];
_phoneInputView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:0xF8F8FB];
_phoneInputView.layer.cornerRadius = 51.0/2;
_phoneInputView.layer.masksToBounds = YES;
_phoneInputView.maxLength = 11;
@@ -301,7 +301,7 @@
if (!_retryCodeButton) {
_retryCodeButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_retryCodeButton setTitle:@"获取验证码" forState:UIControlStateNormal];
[_retryCodeButton setTitleColor:[MewAppColor mewGetColorOfTextWithHexString:@"#9552FF"] forState:UIControlStateNormal];
[_retryCodeButton setTitleColor:[MewAppColor mewGetColorOfTextWithHexString:0x9552FF] forState:UIControlStateNormal];
_retryCodeButton.titleLabel.font = [UIFont systemFontOfSize:11 weight:UIFontWeightMedium];
[_retryCodeButton addTarget:self action:@selector(mew_getSmsCodeButtonAction) forControlEvents:UIControlEventTouchUpInside];
_retryCodeButton.hidden = NO;
@@ -318,7 +318,7 @@
_confirmButton.layer.cornerRadius = 52/2.f;
[_confirmButton setImage:[UIImage imageNamed:@"mew_login_next"] forState:UIControlStateNormal];
_confirmButton.titleLabel.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:18];
UIImage *image = [UIImage mew_gradientColorImageFromColors:@[[MewAppColor mewGetColorOfTextWithHexString:@"#FF60FD"], [MewAppColor mewGetColorOfTextWithHexString:@"#8974FF"],[MewAppColor mewGetColorOfTextWithHexString:@"#69EBFF"]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(KMewGetScreenWidth - 2*36, 52)];
UIImage *image = [UIImage mew_gradientColorImageFromColors:@[[MewAppColor mewGetColorOfTextWithHexString:0xFF60FD], [MewAppColor mewGetColorOfTextWithHexString:0x8974FF],[MewAppColor mewGetColorOfTextWithHexString:0x69EBFF]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(KMewGetScreenWidth - 2*36, 52)];
_confirmButton.backgroundColor = [UIColor colorWithPatternImage:image];
[_confirmButton setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
[_confirmButton addTarget:self action:@selector(mew_confirmButtonAction) forControlEvents:UIControlEventTouchUpInside];

View File

@@ -158,7 +158,7 @@
if (!_containerView) {
_containerView = [[UIView alloc] init];
[_containerView mew_setCornerWithLeftTopCorner:36 rightTopCorner:10 bottomLeftCorner:36 bottomRightCorner:10 size:CGSizeMake(KMewGetScreenWidth - 32, 72)];
_containerView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:@"0x525566"];
_containerView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:0x525566];
}
return _containerView;
@@ -192,7 +192,7 @@
_messageLabel = [[UILabel alloc] initWithFrame:CGRectZero];
_messageLabel.backgroundColor = [UIColor clearColor];
_messageLabel.font = [UIFont systemFontOfSize:14.f];
_messageLabel.textColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:@"0xffffff" alpha:0.8];
_messageLabel.textColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:0xffffff alpha:0.8];
_messageLabel.text = @"用户回复信息内容";
}
return _messageLabel;

View File

@@ -9,7 +9,7 @@
#import "MewMessageContentText.h"
#import "NSObject+MEWExtension.h"
#import <NIMSDK/NIMSDK.h>

View File

@@ -6,7 +6,7 @@
//
#import "MewNIMMessageMaker.h"
#import "MewConstant.h"
@implementation MewNIMMessageMaker
@@ -76,7 +76,7 @@
NIMAntiSpamOption *option = [NIMAntiSpamOption new];
option.yidunEnabled = YES;
option.businessId = KeyWithType(keyType_YiDunBussinessId);
option.businessId = [MewEncryptManager mewAESDecryptText:@"EhdbQun+WXkne5z3pctmR/3144MiHQbb+Dw1kIia3a+TcSiMNCCZgxUwTjE3XVDH"];
message.antiSpamOption = option;
}

View File

@@ -148,9 +148,9 @@
_likeButton.titleLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
_likeButton.layer.cornerRadius = 21/2;
_likeButton.layer.masksToBounds = YES;
[_likeButton setTitleColor:[MewAppColor mewGetColorOfTextWithHexString:@"0x9552FF)"] forState:UIControlStateNormal];
[_likeButton setTitleColor:[MewAppColor mewGetColorOfTextWithHexString:0x9552FF] forState:UIControlStateNormal];
_likeButton.layer.borderWidth = 0.5;
_likeButton.layer.borderColor = [MewAppColor mewGetColorOfTextWithHexString:@"0x9552FF"].CGColor;
_likeButton.layer.borderColor = [MewAppColor mewGetColorOfTextWithHexString:0x9552FF].CGColor;
[_likeButton addTarget:self action:@selector(mew_likeButtonAction:) forControlEvents:UIControlEventTouchUpInside];
_likeButton.hidden = NO;
}

View File

@@ -383,7 +383,7 @@
- (UIView *)inputBackView {
if (!_inputBackView) {
_inputBackView = [[UIView alloc] init];
_inputBackView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:@"0xF1F1FA"];
_inputBackView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:0xF1F1FA];
_inputBackView.layer.masksToBounds = YES;
_inputBackView.layer.cornerRadius = 4;
}
@@ -396,7 +396,7 @@
NSAttributedString * attribute = [[NSAttributedString alloc] initWithString:@"请输入消息" attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:15], NSForegroundColorAttributeName : [MewAppColor mewSecondTextColor]}];
_inputView.attributedPlaceholder = attribute;
_inputView.borderStyle = UITextBorderStyleNone;
_inputView.tintColor =[MewAppColor mewGetColorOfTextWithHexString:@"0x9552FF"];
_inputView.tintColor =[MewAppColor mewGetColorOfTextWithHexString:0x9552FF];
_inputView.textColor = [MewAppColor mewMainTextColor];
_inputView.font = [UIFont systemFontOfSize:12.f];
_inputView.delegate = self;
@@ -415,7 +415,7 @@
_audioButton.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
_audioButton.layer.masksToBounds = YES;
_audioButton.layer.cornerRadius = 4;
_audioButton.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:@"0xF1F1FA"];
_audioButton.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:0xF1F1FA];
_audioButton.hidden = YES;
}
return _audioButton;

View File

@@ -15,7 +15,7 @@
#import "UITableView+NIMScrollToBottom.h"
#import "MewClientConfig.h"
#import "NSObject+MEWExtension.h"
/// Third
#import <Masonry/Masonry.h>
#import <NIMSDK/NIMSDK.h>
@@ -189,8 +189,8 @@
}
if (message.yidunAntiSpamRes) {
NSDictionary *spamRes = message.yidunAntiSpamRes.mewToJSONObject;
NSDictionary *spamResExt = ((NSString *)spamRes[@"ext"]).mewToJSONObject;
NSDictionary *spamRes = message.yidunAntiSpamRes.mj_JSONObject;
NSDictionary *spamResExt = ((NSString *)spamRes[@"ext"]).mj_JSONObject;
if ([spamResExt[@"antispam"][@"suggestion"] intValue] == 2) {
NSDictionary *dic = @{@"suggestion":@"2"};
message.localExt = dic;
@@ -307,7 +307,7 @@
[MewOCServerManager mewGetDetailData:^(MewNetworkDataModel * _Nullable obj, NSInteger num, NSString * _Nonnull text) {
if(obj.code == 200){
MewPersonInfoModel * userInfo = [MewPersonInfoModel mewModelWithDictionary:obj.data];
MewPersonInfoModel * userInfo = [MewPersonInfoModel mj_objectWithKeyValues:obj.data];
self.userInfo = userInfo;
if (userInfo.nick.length > 0) {
@@ -445,7 +445,7 @@
_sessionTableView = [[UITableView alloc] init];
_sessionTableView.delegate = self;
_sessionTableView.dataSource = self;
_sessionTableView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:@"0xF8F8FB"];
_sessionTableView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:0xF8F8FB];
_sessionTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_sessionTableView.showsVerticalScrollIndicator = NO;
[_sessionTableView registerClass:[MewSessionMessageCell class] forCellReuseIdentifier:NSStringFromClass([MewSessionMessageCell class])];

View File

@@ -97,7 +97,7 @@
- (UIView *)devideView {
if (!_devideView) {
_devideView = [[UIView alloc] init];
_devideView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:@"0xEAEAF1"];
_devideView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:0xEAEAF1];
}
return _devideView;
}

View File

@@ -112,7 +112,7 @@
NSString * uid = [MewSaveBaseUserModel share].mewGetUserId;
[MewOCServerManager mewGetCollectRoomListData:^(MewNetworkDataModel * _Nullable obj, NSInteger num, NSString * _Nonnull text) {
if(obj.code == 200){
NSArray * array = [MewCollectListItemModel mewModelsWithArray:obj.data[@"fansRoomList"]];
NSArray * array = [MewCollectListItemModel mj_objectArrayWithKeyValuesArray:obj.data[@"fansRoomList"]];
if (state == 0) {
[self.datasource removeAllObjects];
[self.tableView.mj_header endRefreshing];

View File

@@ -108,7 +108,7 @@
NSString * uid = [MewSaveBaseUserModel share].mewGetUserId;
[MewOCServerManager mewGetCollectRoomListData:^(MewNetworkDataModel * _Nullable obj, NSInteger num, NSString * _Nonnull text) {
if(obj.code == 200){
NSArray * array = [MewCollectListItemModel mewModelsWithArray:obj.data[@"fansRoomList"]];
NSArray * array = [MewCollectListItemModel mj_objectArrayWithKeyValuesArray:obj.data[@"fansRoomList"]];
if (state == 0) {
[self.collectionModels removeAllObjects];
[self.collectionTableView.mj_header endRefreshing];

View File

@@ -70,7 +70,7 @@
}
UIView *currentRechargeView = tap.view;
currentRechargeView.layer.borderColor = [MewAppColor mewGetColorOfTextWithHexString:@"#9552FF"].CGColor;
currentRechargeView.layer.borderColor = [MewAppColor mewGetColorOfTextWithHexString:0x9552FF].CGColor;
currentRechargeView.layer.borderWidth = 1.0;
NSInteger selectIndex = tap.view.tag - 100;
@@ -115,7 +115,7 @@
UIView *rechargeBgView = [[UIView alloc] init];
rechargeBgView.frame = CGRectMake((i%2 * (viewWidth + marginX)) + marginLeft, i/2 * (viewHeight + marginTop), viewWidth, viewHeight);
rechargeBgView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:@"0x525566" alpha:0.8];
rechargeBgView.backgroundColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:0x525566 alpha:0.8];
rechargeBgView.layer.cornerRadius = 8.0;
rechargeBgView.layer.masksToBounds = YES;
rechargeBgView.tag = i + 100;
@@ -148,7 +148,7 @@
UILabel *rechargeMoneyLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(rechargeStackView.frame) + 13.0, viewWidth, 20)];
rechargeMoneyLabel.text = [NSString stringWithFormat:@"%@元",model.money];
rechargeMoneyLabel.textColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:@"0xffffff" alpha:0.8];
rechargeMoneyLabel.textColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:0xffffff alpha:0.8];
rechargeMoneyLabel.font = kMewSetFontRegular(14);
rechargeMoneyLabel.textAlignment = NSTextAlignmentCenter;
[rechargeBgView addSubview:rechargeMoneyLabel];
@@ -264,7 +264,7 @@
attString.yy_color = [MewAppColor mewSecondTextColor];
attString.yy_font = [UIFont systemFontOfSize:13];
NSMutableAttributedString *rechargeAttString = [[NSMutableAttributedString alloc] initWithString:@"《用户充值协议》\n" attributes:@{NSForegroundColorAttributeName:[MewAppColor mewGetColorOfTextWithHexString:@"#5DA4F5"]}];
NSMutableAttributedString *rechargeAttString = [[NSMutableAttributedString alloc] initWithString:@"《用户充值协议》\n" attributes:@{NSForegroundColorAttributeName:[MewAppColor mewGetColorOfTextWithHexString:0x5DA4F5]}];
@kWeakify(self);
[rechargeAttString yy_setTextHighlightRange:NSMakeRange(0, rechargeAttString.length) color:nil backgroundColor:nil userInfo:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
@kStrongify(self);
@@ -295,9 +295,9 @@
_rechargeButton.titleLabel.font = kMewSetFontMedium(16);
_rechargeButton.layer.cornerRadius = 24;
_rechargeButton.layer.masksToBounds = YES;
UIImage *image = [UIImage mew_gradientColorImageFromColors:@[[MewAppColor mewGetColorOfTextWithHexString:@"#FF60FD"],
[MewAppColor mewGetColorOfTextWithHexString:@"#8974FF"],
[MewAppColor mewGetColorOfTextWithHexString:@"#69EBFF"]
UIImage *image = [UIImage mew_gradientColorImageFromColors:@[[MewAppColor mewGetColorOfTextWithHexString:0xFF60FD],
[MewAppColor mewGetColorOfTextWithHexString:0x8974FF],
[MewAppColor mewGetColorOfTextWithHexString:0x69EBFF]
] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(KMewGetScreenWidth - 2*40, 48)];
_rechargeButton.backgroundColor = [UIColor colorWithPatternImage:image];
[_rechargeButton addTarget:self action:@selector(mew_rechargeButtonAction) forControlEvents:UIControlEventTouchUpInside];

View File

@@ -67,7 +67,7 @@
[MewOCServerManager mewGetPayDataList:^(MewNetworkDataModel * _Nullable obj, NSInteger num, NSString * _Nonnull text) {
if(obj.code == 200){
NSArray * array = [MewPayItemModel mewModelsWithArray:obj.data];
NSArray * array = [MewPayItemModel mj_objectArrayWithKeyValuesArray:obj.data];
self.rechageView.rechargeModels = array;
}
} channelType:@"8"];
@@ -76,7 +76,7 @@
[MewOCServerManager mewGetDiamondCount:^(MewNetworkDataModel * _Nullable obj, NSInteger num, NSString * _Nonnull text) {
if(obj.code == 200){
MewDiamondNum * model = [MewDiamondNum mewModelWithDictionary:obj.data];
MewDiamondNum * model = [MewDiamondNum mj_objectWithKeyValues:obj.data];
self.rechageView.walletModel = model;
}
} uid:uid ticket:ticket];
@@ -195,7 +195,7 @@
NSString * ticket = [MewSaveBaseUserModel share].mewUserTicket;
[MewOCServerManager mewGetDiamondCount:^(MewNetworkDataModel * _Nullable obj, NSInteger num, NSString * _Nonnull text) {
if(obj.code == 200){
MewDiamondNum * model = [MewDiamondNum mewModelWithDictionary:obj.data];
MewDiamondNum * model = [MewDiamondNum mj_objectWithKeyValues:obj.data];
self.rechageView.walletModel = model;
}
} uid:uid ticket:ticket];

View File

@@ -87,7 +87,7 @@
if (!_subTitleLabel) {
_subTitleLabel = [[UILabel alloc] init];
_subTitleLabel.font = [UIFont systemFontOfSize:12];
_subTitleLabel.textColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:@"0xffffff" alpha:0.8];
_subTitleLabel.textColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:0xffffff alpha:0.8];
_subTitleLabel.textAlignment = NSTextAlignmentRight;
}
return _subTitleLabel;

View File

@@ -41,7 +41,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.title = [NSString stringWithFormat:@"关于%@",@"我们"];
self.view.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:@"#14171B"];
self.view.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:0x14171B];
[self mew_initSubViews];
[self makeConstriants];
}
@@ -140,7 +140,7 @@
if (!_versionLabel) {
_versionLabel = [[UILabel alloc] init];
_versionLabel.font = [UIFont systemFontOfSize:12];
_versionLabel.textColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:@"0xffffff" alpha:0.8];
_versionLabel.textColor = [MewAppColor mewGetAlphaColorOfTextWithHexString:0xffffff alpha:0.8];
_versionLabel.text = [NSString stringWithFormat:@"V%@",[MewUtility appVersion]];
}
return _versionLabel;
@@ -159,7 +159,7 @@
- (UIView *)privacyView {
if(!_privacyView) {
_privacyView = [[UIView alloc] init];
_privacyView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:@"#5E6175"];
_privacyView.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:0x5E6175];
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(mew_pushPrivacyView:)];
[_privacyView addGestureRecognizer:tap];
}
@@ -207,7 +207,7 @@
if(!_companyTitleLabel){
_companyTitleLabel = [[UILabel alloc] init];
_companyTitleLabel.text = @"南宁冰创网络科技有限公司 版权所有";
_companyTitleLabel.textColor = [MewAppColor mewGetColorOfTextWithHexString:@"0xA2A7B8"];
_companyTitleLabel.textColor = [MewAppColor mewGetColorOfTextWithHexString:0xA2A7B8];
_companyTitleLabel.font = kMewSetFontMedium(12);
_companyTitleLabel.textAlignment = NSTextAlignmentCenter;
}

View File

@@ -30,7 +30,7 @@
#import "MewRechargeViewController.h"
#import "MewLoginViewController.h"
#import "MewBaseNavigationController.h"
#import "MewNavigationVC.h"
@interface MewMineSettingViewController ()< UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, strong) UIButton *backButton;
@@ -57,7 +57,7 @@
#pragma mark - Life Cycle
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:@"#14171B"];
self.view.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:0x14171B];
[self mew_initSubViews];
self.models = [self mew_getMineSettingDataSourceWith:self.userInfo];
[self.tableView reloadData];
@@ -103,7 +103,7 @@
NSString *uid = [[MewSaveBaseUserModel share]mewGetUserId];
[MewOCServerManager mewGetUserDataWithUid:^(MewNetworkDataModel * _Nullable obj, NSInteger num, NSString * _Nonnull text) {
if(obj.code == 200){
MewPersonInfoModel *userInfo = [MewPersonInfoModel mewModelWithDictionary:obj.data];
MewPersonInfoModel *userInfo = [MewPersonInfoModel mj_objectWithKeyValues:obj.data];
self.userInfo = userInfo;
self.models = [self mew_getMineSettingDataSourceWith:self.userInfo];
[self.tableView reloadData];
@@ -137,7 +137,7 @@
{
MewRoomPlayVC *roomVC = [[MewRoomPlayVC alloc]initWithMewRoomUid:[MewSaveBaseUserModel share].mewGetUserId];
MewBaseNavigationController *baseNav = [[MewBaseNavigationController alloc] initWithRootViewController:roomVC];
MewNavigationVC *baseNav = [[MewNavigationVC alloc] initWithRootViewController:roomVC];
baseNav.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentViewController:baseNav animated:YES completion:nil];
@@ -212,7 +212,7 @@
[[MewSaveBaseUserModel share]mewSaveBaseUserData:nil];
[[MewSaveBaseUserModel share]mewSaveUserTickets:nil];
MewLoginViewController *loginVC = [[MewLoginViewController alloc] init];
MewBaseNavigationController * nav = [[MewBaseNavigationController alloc] initWithRootViewController:loginVC];
MewNavigationVC * nav = [[MewNavigationVC alloc] initWithRootViewController:loginVC];
nav.modalPresentationStyle = UIModalPresentationFullScreen;
[self.navigationController presentViewController:nav animated:YES completion:nil];
}
@@ -291,7 +291,7 @@
_logoutButton.layer.cornerRadius = 50/2;
_logoutButton.titleLabel.font = [UIFont systemFontOfSize:16];
[_logoutButton setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
UIImage *image = [UIImage mew_gradientColorImageFromColors:@[[MewAppColor mewGetColorOfTextWithHexString:@"#FF60FD"], [MewAppColor mewGetColorOfTextWithHexString:@"#8974FF"], [MewAppColor mewGetColorOfTextWithHexString:@"#69EBFF"]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(KMewGetScreenWidth - 2 * 40, 48)];
UIImage *image = [UIImage mew_gradientColorImageFromColors:@[[MewAppColor mewGetColorOfTextWithHexString:0xFF60FD], [MewAppColor mewGetColorOfTextWithHexString:0x8974FF], [MewAppColor mewGetColorOfTextWithHexString:0x69EBFF]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(KMewGetScreenWidth - 2 * 40, 48)];
_logoutButton.backgroundColor = [UIColor colorWithPatternImage:image];
[_logoutButton setTitle:@"退出账号" forState:UIControlStateNormal];
[_logoutButton addTarget:self action:@selector(logoutButtonAction:) forControlEvents:UIControlEventTouchUpInside];

View File

@@ -16,7 +16,7 @@
#import <QYSDK_NIM/QYSDK.h>
#import <AFNetworkReachabilityManager.h>
///VC
#import "MewBaseNavigationController.h"
#import "MewNavigationVC.h"
#import "MewBaseViewController.h"
#import "MewLoginViewController.h"
#import "MewLoginFullInfoViewController.h"
@@ -25,22 +25,14 @@
#import "MewHomeViewController.h"
#import "MewMineSettingViewController.h"
#import "MewMainHomeMoreGameVC.h"
//#import "loginb"
///Present
/// Model
//
NSString * const kNetworkReachabilityKey = @"kNetworkReachabilityKey";
@interface MewTabBarController() <
NIMLoginManagerDelegate, NIMSystemNotificationManagerDelegate,
NIMChatManagerDelegate,NIMBroadcastManagerDelegate>
///
@property (nonatomic,assign) BOOL isFirstReachability;
@end
@@ -113,46 +105,29 @@ NSString * const kNetworkReachabilityKey = @"kNetworkReachabilityKey";
}
- (MewBaseNavigationController *)mew_createTabBarItem:(UIViewController *)itemVc title:(NSString *)title image:(NSString *)image selectedImage:(NSString *)selectedImage{
- (MewNavigationVC *)mew_createTabBarItem:(UIViewController *)itemVc title:(NSString *)title image:(NSString *)image selectedImage:(NSString *)selectedImage{
itemVc.title = title;
itemVc.tabBarItem.image = [[UIImage imageNamed:image] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
itemVc.tabBarItem.selectedImage = [[UIImage imageNamed:selectedImage] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
[itemVc.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[MewAppColor mewMainTextColor]} forState:UIControlStateSelected];
[itemVc.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:UIColor.blackColor} forState:UIControlStateNormal];
MewBaseNavigationController *nav = [[MewBaseNavigationController alloc] initWithRootViewController:itemVc];
MewNavigationVC *nav = [[MewNavigationVC alloc] initWithRootViewController:itemVc];
return nav;
}
- (void)mew_configTheme {
if (@available(iOS 13.0, *)) {
UITabBarAppearance *appearance = [[UITabBarAppearance alloc] init];
appearance.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:@"#1D2126"];
appearance.backgroundColor = [MewAppColor mewGetColorOfTextWithHexString:0x1D2126];
self.tabBar.standardAppearance = appearance;
if (@available(iOS 15.0, *)) {
self.tabBar.scrollEdgeAppearance = appearance;
}
}
// self.view.backgroundColor = UIColor.whiteColor;
// UIImage *color_image = [UIImage mew_imageWithColor:UIColor.whiteColor size:CGSizeMake(KMewGetScreenWidth, kMewGetTabBarHeight)];
// [[UITabBar appearance] setBackgroundImage:color_image];
// [[UITabBar appearance] setShadowImage:[[UIImage alloc] init]];
// if (@available(iOS 10.0, *)) {
// [[UITabBar appearance] setUnselectedItemTintColor:UIColorMewRGBAlpha(0x333333, 0.4)];
// }
}
#pragma mark - NIMLoginManagerDelegate
#pragma mark - NIMSystemNotificationManagerDelegate
#pragma mark - NIMChatManagerDelegate
#pragma mark - NIMBroadcastManagerDelegate
#pragma mark - MainProtocol
/**
tokenticket
1.
@@ -166,7 +141,7 @@ NSString * const kNetworkReachabilityKey = @"kNetworkReachabilityKey";
NSString *uid = [[MewSaveBaseUserModel share]mewGetUserId];
[MewOCServerManager mewGetUserDataWithUid:^(MewNetworkDataModel * _Nullable obj, NSInteger num, NSString * _Nonnull text) {
if(obj.code == 200){
MewPersonInfoModel *userInfo = [MewPersonInfoModel mewModelWithDictionary:obj.data];
MewPersonInfoModel *userInfo = [MewPersonInfoModel mj_objectWithKeyValues:obj.data];
@@ -206,7 +181,7 @@ NSString * const kNetworkReachabilityKey = @"kNetworkReachabilityKey";
//
- (void)mew_getTokenId {
MewLoginViewController *lvc = [[MewLoginViewController alloc] init];
MewBaseNavigationController * nav = [[MewBaseNavigationController alloc] initWithRootViewController:lvc];
MewNavigationVC * nav = [[MewNavigationVC alloc] initWithRootViewController:lvc];
nav.modalPresentationStyle = UIModalPresentationFullScreen;
[self.navigationController presentViewController:nav animated:YES completion:nil];
@@ -215,7 +190,7 @@ NSString * const kNetworkReachabilityKey = @"kNetworkReachabilityKey";
//
- (void)mew_completeUserInfo {
MewLoginFullInfoViewController * bindPhoneVC = [[MewLoginFullInfoViewController alloc] init];
MewBaseNavigationController * nav = [[MewBaseNavigationController alloc] initWithRootViewController:bindPhoneVC];
MewNavigationVC * nav = [[MewNavigationVC alloc] initWithRootViewController:bindPhoneVC];
nav.modalPresentationStyle = UIModalPresentationFullScreen;
[self.navigationController presentViewController:nav animated:YES completion:nil];
}
@@ -237,36 +212,9 @@ NSString * const kNetworkReachabilityKey = @"kNetworkReachabilityKey";
[MewHUDTool mew_hideHUD];
}
#pragma mark -
- (void)networkReachability{
[[AFNetworkReachabilityManager sharedManager] startMonitoring];
[[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
switch (status) {
case AFNetworkReachabilityStatusUnknown:
self.isFirstReachability = YES;
break;
case AFNetworkReachabilityStatusNotReachable:
self.isFirstReachability = YES;
break;
case AFNetworkReachabilityStatusReachableViaWWAN:
case AFNetworkReachabilityStatusReachableViaWiFi:
{
if (self.isFirstReachability) {
[[NSNotificationCenter defaultCenter] postNotificationName:kNetworkReachabilityKey object:nil userInfo:nil];
[self mew_getTokenId];
[[MewClientConfig shareConfig] mew_clientInit];
}
self.isFirstReachability = YES;
}
break;
default:
break;
}
}];
}
#pragma mark - Pirvate Method

View File

@@ -7,7 +7,7 @@
#import "MewWebViewController.h"
#import "MewLoginViewController.h"
#import "MewBaseNavigationController.h"
#import "MewNavigationVC.h"
/// Tool
#import "MewUtility.h"
@@ -169,7 +169,7 @@ NSString * const mewCancel = @"cancelAccount";
[[MewSaveBaseUserModel share]mewSaveUserTickets:nil];
MewLoginViewController *loginVC = [[MewLoginViewController alloc] init];
MewBaseNavigationController * nav = [[MewBaseNavigationController alloc] initWithRootViewController:loginVC];
MewNavigationVC * nav = [[MewNavigationVC alloc] initWithRootViewController:loginVC];
nav.modalPresentationStyle = UIModalPresentationFullScreen;
[self.navigationController presentViewController:nav animated:YES completion:nil];
});

View File

@@ -10,32 +10,32 @@ import UIKit
class MewAppColor: NSObject {
@objc static func mewViewBgColor() -> UIColor {
return MewAppColor.mewGetColorOfText(hexString: "0xF8F8FB")
return MewAppColor.mewGetColorOfText(hexString: 0xF8F8FB)
}
/// cell 0xFFFFFF
@objc static func mewAppCellBackgroundColor() -> UIColor{
return MewAppColor.mewGetColorOfText(hexString: "0xFFFFFF")
return MewAppColor.mewGetColorOfText(hexString: 0xFFFFFF)
}
/// 0x333333
@objc static func mewMainTextColor() -> UIColor{
return MewAppColor.mewGetColorOfText(hexString: "0x282828")
return MewAppColor.mewGetColorOfText(hexString: 0x282828)
}
/// 0x666666
@objc static func mewSecondTextColor() -> UIColor {
return MewAppColor.mewGetColorOfText(hexString: "0x878B9C")
return MewAppColor.mewGetColorOfText(hexString: 0x878B9C)
}
///线 0xE8E8E8
@objc static func mewDividerColor() -> UIColor {
return MewAppColor.mewGetColorOfText(hexString: "0xE8E8E8")
return MewAppColor.mewGetColorOfText(hexString: 0xE8E8E8)
}
@objc static func mewGetColorOfText(hexString: String) -> UIColor {
@objc static func mewGetColorOfText(hexString: Int) -> UIColor {
return MewGetColorTool.mewGetColor(withColorText: hexString)
return MewGetColorTool.mewGetColor(withColorText: Int32(hexString))
@@ -55,10 +55,10 @@ class MewAppColor: NSObject {
//
// return UIColor(red: red, green: green, blue: blue, alpha: 1.0)
}
@objc static func mewGetAlphaColorOfText(hexString: String,alpha:Double) -> UIColor {
@objc static func mewGetAlphaColorOfText(hexString: Int,alpha:Double) -> UIColor {
return MewGetColorTool.mewGetalphaColor(withColorText: hexString, alpha: alpha)
return MewGetColorTool.mewGetalphaColor(withColorText: Int32(hexString), alpha: alpha)
}

View File

@@ -143,10 +143,13 @@ class MewRoomPlayVC: MewBaseViewController{
}
MewServerApiManager.mewSendGiftToUser(uid: uid, roomUid: String(format: "%ld", roomUid), targetUids:chooseUid , giftNum: giftNum, sendType: sendType, giftId: giftId, giftSource: giftSource, giftType: giftType, msg: "") { obj,model in
if let data = obj as? [AnyHashable : Any]{
let gift = MewReceiveGiftDataModel.mewModel(with:data)
gift.sourceType = "1"
gift.roomSendGiftType = "3"
self?.mewSendGiftSuss(model: gift, dic: data as NSDictionary)
let gift = MewReceiveGiftDataModel.mj_object(withKeyValues: data)
gift?.sourceType = "1"
gift?.roomSendGiftType = "3"
if let _gift = gift{
self?.mewSendGiftSuss(model: _gift, dic: data as NSDictionary)
}
}
} _: { code, msg in
@@ -171,13 +174,13 @@ class MewRoomPlayVC: MewBaseViewController{
if let att = obj.attachment as? MewNIMMsgInfoModel{
if att.first == 3{
let data = MewReceiveGiftDataModel.mewModel(withJSON:att.data)
if data.giftId != "2"{return}
let targetUid = Int(data.targetUid)
self.mewMicSeatView.mewGetChooseView(uid: data.uid as String)
for subView in self.mewMicSeatView.mewViewList {
if let data = MewReceiveGiftDataModel.mj_object(withKeyValues:att.data){
if data.giftId != "2"{return}
let targetUid = Int(data.targetUid)
self.mewMicSeatView.mewGetChooseView(uid: data.uid as String)
for subView in self.mewMicSeatView.mewViewList {
if subView.layer.borderWidth == 2{
if let targetUid = subView.mewMicInfo?.userInfo?.uid{
let point = self.mewMicSeatView.convert(subView.center, to: nil)
@@ -190,17 +193,17 @@ class MewRoomPlayVC: MewBaseViewController{
let gift = data.gift
imageView.sd_setImage(with: URL.init(string: gift?.giftUrl ?? "")) { image, error, type, url in
self.view.addSubview(imageView)
let grop = MewConstant.mewGEtPoint(point, end: end)
let grop = MewGetPointList.mewGEtPoint(point, end: end)
imageView.layer.add(grop, forKey: "ViewAnimation")
self.perform(#selector(self.mewFinish(imageView:)), with: imageView, afterDelay: 5.75)
}
break
}
}
}
}
}
}
@@ -235,7 +238,7 @@ class MewRoomPlayVC: MewBaseViewController{
let ext = MewMsgExtDataModel()
var remoExt: [String:Any] = [:]
remoExt["\(uid)"] = ext.mewModel2dictionary()
remoExt["\(uid)"] = ext.mj_keyValues().copy()
msg.remoteExt = remoExt as [AnyHashable : Any]
let session = NIMSession(msdId, type: .chatroom)
@@ -365,8 +368,8 @@ class MewRoomPlayVC: MewBaseViewController{
let extData = MewMsgExtDataModel()
extData.erbanNo = mewUser.erbanNo
let extDic = NSMutableDictionary.init()
extDic["\(mewUser.uid)"] = extData.mewModel2dictionary()
mewChatRequset.roomExt = extDic.mewToJSONString()
extDic["\(mewUser.uid)"] = extData.mj_keyValues().copy()
mewChatRequset.roomExt = extDic.mj_JSONString()
NIMSDK.shared().chatroomManager.enterChatroom(mewChatRequset) { error, mewChatRoom, mewMember in

View File

@@ -46,7 +46,7 @@ class MewServerApiManager: NSObject {
return
}
userInfo = MewPersonInfoModel.mewModel(with:data)
userInfo = MewPersonInfoModel.mj_object(withKeyValues:data)
}
if(userInfo != nil && roomInfo != nil){
@@ -102,12 +102,12 @@ class MewServerApiManager: NSObject {
manager.requestSerializer.setValue(MewSaveBaseUserModel.share().mewGetUserId(),forHTTPHeaderField: "pub_uid")
manager.requestSerializer.setValue(MewSaveBaseUserModel.share().mewUserTicket(), forHTTPHeaderField: "pub_ticket")
manager.post(MewEncryptManager.mewAESDecryptText("gIV0xamx+afcRMN4yGb5jw=="), parameters: mewGetParams, headers: nil, progress: nil) { task, obj in
let model = MewNetworkDataModel.mewModel(with: obj as! [AnyHashable : Any])
let data = model.data
if data != nil{
successBlock(data,model)
if let model = MewNetworkDataModel.mj_object(withKeyValues: obj as! [AnyHashable : Any]){
let data = model.data
if data != nil{
successBlock(data,model)
}
}
}failure: { task, error in
print(error)
@@ -189,25 +189,25 @@ class MewServerApiManager: NSObject {
manager.requestSerializer.setValue(MewSaveBaseUserModel.share().mewUserTicket(), forHTTPHeaderField: "pub_ticket")
if isPost == true{
manager.post(MewEncryptManager.mewAESDecryptText(path), parameters: mewGetParams, headers: nil, progress: nil) { task, obj in
let model = MewNetworkDataModel.mewModel(with: obj as! [AnyHashable : Any])
let data = model.data
if data != nil{
successBlock(data as! MewRoomPlayModel,model)
if let model = MewNetworkDataModel.mj_object(withKeyValues: obj as! [AnyHashable : Any]){
let data = model.data
if data != nil{
successBlock(data as! MewRoomPlayModel,model)
}
}
}failure: { task, error in
print(error)
}
return
}
manager.get(MewEncryptManager.mewAESDecryptText(path), parameters: mewGetParams, headers: nil, progress: nil) { task, obj in
let model = MewNetworkDataModel.mewModel(with: obj as! [AnyHashable : Any])
let data = model.data
if data != nil{
successBlock(data as! MewRoomPlayModel,model)
if let model = MewNetworkDataModel.mj_object(withKeyValues: obj as! [AnyHashable : Any]){
let data = model.data
if data != nil{
successBlock(data as! MewRoomPlayModel,model)
}
}
}failure: { task, error in
print(error)
@@ -243,15 +243,15 @@ class MewServerApiManager: NSObject {
manager.requestSerializer.setValue(MewSaveBaseUserModel.share().mewUserTicket(), forHTTPHeaderField: "pub_ticket")
if isPost == true{
manager.post(MewEncryptManager.mewAESDecryptText(path), parameters: mewGetParams, headers: nil, progress: nil) { task, obj in
let model = MewNetworkDataModel.mewModel(with: obj as! [AnyHashable : Any])
print(model)
print(model)
print(obj)
let data = model.data
if data != nil{
successBlock(model)
if let model = MewNetworkDataModel.mj_object(withKeyValues: obj as! [AnyHashable : Any]){
print(model)
print(model)
print(obj)
let data = model.data
if data != nil{
successBlock(model)
}
}
}failure: { task, error in
print(error)
@@ -259,13 +259,13 @@ class MewServerApiManager: NSObject {
return
}
manager.get(MewEncryptManager.mewAESDecryptText(path), parameters: mewGetParams, headers: nil, progress: nil) { task, obj in
let model = MewNetworkDataModel.mewModel(with: obj as! [AnyHashable : Any])
let data = model.data
if data != nil{
successBlock(model)
if let model = MewNetworkDataModel.mj_object(withKeyValues: obj as! [AnyHashable : Any]){
let data = model.data
if data != nil{
successBlock(model)
}
}
}failure: { task, error in
print(error)
}

View File

@@ -160,8 +160,8 @@ class MewRoomMicSeatView: UIView {
extData.avatar = mewUser.avatar
extData.uid = mewUser.uid
extData.nick = mewUser.nick
let dic = extData.mewModel2dictionary() as NSDictionary
mewRequest.value = dic.mewToJSONString()
let dic = extData.mj_keyValues().copy() as! NSDictionary
mewRequest.value = dic.mj_JSONString()
mewRequest.roomId = String(format: "%ld", roomId)
mewRequest.transient = true
NIMSDK.shared().chatroomManager.updateChatroomQueueObject(mewRequest) { error in
@@ -240,8 +240,8 @@ class MewRoomMicSeatView: UIView {
extData.avatar = mewUser.avatar
extData.uid = mewUser.uid
extData.nick = mewUser.nick
let dic = extData.mewModel2dictionary() as NSDictionary
mewRequest.value = dic.mewToJSONString()
let dic = extData.mj_keyValues().copy() as! NSDictionary
mewRequest.value = dic.mj_JSONString()
mewRequest.roomId = String(format: "%ld", roomId)
mewRequest.transient = true
NIMSDK.shared().chatroomManager.updateChatroomQueueObject(mewRequest) { error in
@@ -271,19 +271,21 @@ class MewRoomMicSeatView: UIView {
switch mewContent.eventType {
case NIMChatroomEventType.infoUpdated:
if let mewdata = mewContent.notifyExt?.mewToJSONObject() as? NSDictionary, let type = mewdata["type"] as? Int{
if let mewdata = mewContent.notifyExt?.mj_JSONObject() as? NSDictionary, let type = mewdata["type"] as? Int{
var stateList:[MewSeatMicStateModel] = []
switch type {
case 2:
if let micData = mewdata["micInfo"] as? NSDictionary {
let micModel = MewSeatMicStateModel.mewModel(withJSON: micData)
stateList = [micModel]
if let micModel = MewSeatMicStateModel.mj_object(withKeyValues: micData){
stateList = [micModel]
}
}
break
case 3:
if let micData = mewdata["micInfo"] as? NSDictionary {
let micModel = MewSeatMicStateModel.mewModels(withArray: micData)
let micModel = MewSeatMicStateModel.mj_objectArray(withKeyValuesArray: micData)
stateList = micModel as! [MewSeatMicStateModel]
@@ -311,24 +313,25 @@ class MewRoomMicSeatView: UIView {
if let mewData = mewContent.ext as? NSDictionary , let userDic = mewData[NIMChatroomEventInfoQueueChangeItemValueKey] as? String,let type = mewData[NIMChatroomEventInfoQueueChangeTypeKey] as? Int{
let num = mewData[NIMChatroomEventInfoQueueChangeItemKey] as! String
let user = MewPersonInfoModel.mewModel(withJSON: userDic )
if("\(user.uid)" == MewSaveBaseUserModel.share().mewGetUserId() ){
isTRTCChanged = true
}
for obj in self.mewMicList.values{
if obj.userInfo?.uid == user.uid{
obj.userInfo = nil
if let user = MewPersonInfoModel.mj_object(withKeyValues: userDic ){
if("\(user.uid)" == MewSaveBaseUserModel.share().mewGetUserId() ){
isTRTCChanged = true
}
}
if type == 1 {
let micInfo = self.mewMicList[num]
micInfo?.userInfo = user
if "\(micInfo?.userInfo?.uid ?? 0)" == MewSaveBaseUserModel.share().mewGetUserId(){
TRTCCloud.sharedInstance().muteLocalAudio(false)
for obj in self.mewMicList.values{
if obj.userInfo?.uid == user.uid{
obj.userInfo = nil
}
}
if type == 1 {
let micInfo = self.mewMicList[num]
micInfo?.userInfo = user
if "\(micInfo?.userInfo?.uid ?? 0)" == MewSaveBaseUserModel.share().mewGetUserId(){
TRTCCloud.sharedInstance().muteLocalAudio(false)
}
}
isChanged = true
}
isChanged = true
}
break
default:
@@ -390,18 +393,18 @@ class MewRoomMicSeatView: UIView {
if error != nil{return}
var isRTCChange = false
for obj in dataList ?? []{
let userData = MewPersonInfoModel.mewModel(withJSON: obj.values.first ?? "")
if let num = obj.keys.first{
let model = self.mewMicList[num]
model?.userInfo = userData
let myUid = Int(MewSaveBaseUserModel.share().mewGetUserId())
if userData.uid == myUid{
isRTCChange = true
if let userData = MewPersonInfoModel.mj_object(withKeyValues: obj.values.first ?? ""){
if let num = obj.keys.first{
let model = self.mewMicList[num]
model?.userInfo = userData
let myUid = Int(MewSaveBaseUserModel.share().mewGetUserId())
if userData.uid == myUid{
isRTCChange = true
}
}
}
}
@@ -452,15 +455,15 @@ class MewRoomMicSeatView: UIView {
if let roomId = self.mewRoomData?.roomId{
NIMSDK.shared().chatroomManager .fetchChatroomInfo(String(format: "%ld", roomId)) { error, chatData in
if error == nil{
if let data = chatData?.ext?.mewToJSONObject() as? [String:Any],let stateData = data["micQueue"] as? NSDictionary,let state = stateData.mewToJSONObject() as? NSDictionary {
if let data = chatData?.ext?.mj_JSONObject() as? [String:Any],let stateData = data["micQueue"] as? NSDictionary,let state = stateData.mj_JSONObject() as? NSDictionary {
for index in state.allKeys{
if let getIndxe = index as? String{
let curStrate = MewSeatMicStateModel.mewModel(withJSON: state[index] ?? "")
let model:MewMicListModel? = self.mewMicList[getIndxe] ?? nil
model?.microState = curStrate
if let getIndxe = index as? String{
if let curStrate = MewSeatMicStateModel.mj_object(withKeyValues: state[index] ?? ""){
let model:MewMicListModel? = self.mewMicList[getIndxe] ?? nil
model?.microState = curStrate
}
}
}

View File

@@ -47,7 +47,7 @@ class MewRoomTransferMsgView: UIView {
msg.text = self.mewTextView.text
let remoteExt = NSMutableDictionary()
let uid = MewSaveBaseUserModel.share().mewGetUserId()
remoteExt[uid] = extData.mewModel2dictionary()
remoteExt[uid] = extData.mj_keyValues().copy()
msg.remoteExt = remoteExt as? [AnyHashable : Any]
let mewOption = NIMAntiSpamOption()