添加了h5地址的获取方式 项目中key的获取
This commit is contained in:
@@ -63,6 +63,9 @@
|
||||
E81C279326EB394D0031E639 /* LoginForgetPasswordViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E81C279226EB394D0031E639 /* LoginForgetPasswordViewController.m */; };
|
||||
E81C279626EB39CC0031E639 /* LoginForgetPasswordPresent.m in Sources */ = {isa = PBXBuildFile; fileRef = E81C279526EB39CC0031E639 /* LoginForgetPasswordPresent.m */; };
|
||||
E81C279826EB3AC40031E639 /* LoginForgetPasswordProtocol.h in Sources */ = {isa = PBXBuildFile; fileRef = E81C279726EB39E10031E639 /* LoginForgetPasswordProtocol.h */; };
|
||||
E81C279D26EEEC620031E639 /* XPConstant.m in Sources */ = {isa = PBXBuildFile; fileRef = E81C279C26EEEC620031E639 /* XPConstant.m */; };
|
||||
E81C27A026EEF83D0031E639 /* XPHtmlUrl.m in Sources */ = {isa = PBXBuildFile; fileRef = E81C279F26EEF83D0031E639 /* XPHtmlUrl.m */; };
|
||||
E81C27A226EF23490031E639 /* XPEnum.h in Sources */ = {isa = PBXBuildFile; fileRef = E81C27A126EF23370031E639 /* XPEnum.h */; };
|
||||
E872308926E89BE000B90D4F /* LoginPhoneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E872308826E89BE000B90D4F /* LoginPhoneViewController.m */; };
|
||||
E872308D26E89DAA00B90D4F /* LoginInputView.m in Sources */ = {isa = PBXBuildFile; fileRef = E872308C26E89DAA00B90D4F /* LoginInputView.m */; };
|
||||
E872309326E8D31500B90D4F /* LoginVerifCodeView.m in Sources */ = {isa = PBXBuildFile; fileRef = E872309226E8D31500B90D4F /* LoginVerifCodeView.m */; };
|
||||
@@ -188,6 +191,12 @@
|
||||
E81C279426EB39CC0031E639 /* LoginForgetPasswordPresent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoginForgetPasswordPresent.h; sourceTree = "<group>"; };
|
||||
E81C279526EB39CC0031E639 /* LoginForgetPasswordPresent.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LoginForgetPasswordPresent.m; sourceTree = "<group>"; };
|
||||
E81C279726EB39E10031E639 /* LoginForgetPasswordProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoginForgetPasswordProtocol.h; sourceTree = "<group>"; };
|
||||
E81C279A26EB65560031E639 /* XPMacro.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMacro.h; sourceTree = "<group>"; };
|
||||
E81C279B26EEEC620031E639 /* XPConstant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPConstant.h; sourceTree = "<group>"; };
|
||||
E81C279C26EEEC620031E639 /* XPConstant.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPConstant.m; sourceTree = "<group>"; };
|
||||
E81C279E26EEF83D0031E639 /* XPHtmlUrl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHtmlUrl.h; sourceTree = "<group>"; };
|
||||
E81C279F26EEF83D0031E639 /* XPHtmlUrl.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHtmlUrl.m; sourceTree = "<group>"; };
|
||||
E81C27A126EF23370031E639 /* XPEnum.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPEnum.h; sourceTree = "<group>"; };
|
||||
E872308726E89BE000B90D4F /* LoginPhoneViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoginPhoneViewController.h; sourceTree = "<group>"; };
|
||||
E872308826E89BE000B90D4F /* LoginPhoneViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LoginPhoneViewController.m; sourceTree = "<group>"; };
|
||||
E872308B26E89DAA00B90D4F /* LoginInputView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoginInputView.h; sourceTree = "<group>"; };
|
||||
@@ -263,6 +272,7 @@
|
||||
189DD52B26DE255300AB55B1 /* xplan-ios */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E81C279926EB64BA0031E639 /* Global */,
|
||||
189DD56B26DF5B0900AB55B1 /* Base */,
|
||||
189DD56126DE45F800AB55B1 /* Main */,
|
||||
189DD52C26DE255300AB55B1 /* AppDelegate.h */,
|
||||
@@ -569,6 +579,19 @@
|
||||
path = Security;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E81C279926EB64BA0031E639 /* Global */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E81C279A26EB65560031E639 /* XPMacro.h */,
|
||||
E81C279B26EEEC620031E639 /* XPConstant.h */,
|
||||
E81C279C26EEEC620031E639 /* XPConstant.m */,
|
||||
E81C279E26EEF83D0031E639 /* XPHtmlUrl.h */,
|
||||
E81C279F26EEF83D0031E639 /* XPHtmlUrl.m */,
|
||||
E81C27A126EF23370031E639 /* XPEnum.h */,
|
||||
);
|
||||
path = Global;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E872308A26E89D5100B90D4F /* CustomView */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -722,6 +745,7 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
E81C27A226EF23490031E639 /* XPEnum.h in Sources */,
|
||||
E81C279826EB3AC40031E639 /* LoginForgetPasswordProtocol.h in Sources */,
|
||||
E8B825C726EA0D9A009E8E9F /* LoginVerifCodeProtocol.h in Sources */,
|
||||
E8B825CA26EA1231009E8E9F /* LoginVerifCodeViewController.m in Sources */,
|
||||
@@ -731,6 +755,7 @@
|
||||
E81C279626EB39CC0031E639 /* LoginForgetPasswordPresent.m in Sources */,
|
||||
E8B825B726E9A7D8009E8E9F /* BaseObject.m in Sources */,
|
||||
189DD53426DE255300AB55B1 /* TabbarViewController.m in Sources */,
|
||||
E81C279D26EEEC620031E639 /* XPConstant.m in Sources */,
|
||||
187EEEFE26E8A82C002833B2 /* NSObject+AutoCoding.m in Sources */,
|
||||
189DD55A26DE39D200AB55B1 /* BaseMvpPresenter.m in Sources */,
|
||||
189DD6FF26E20E5900AB55B1 /* HttpRequestHelper.m in Sources */,
|
||||
@@ -742,6 +767,7 @@
|
||||
9B0E1C5926E77022005D4442 /* BaseNavigationController.m in Sources */,
|
||||
189DD54B26DE338800AB55B1 /* BaseViewController.m in Sources */,
|
||||
E81C279026EB314D0031E639 /* LoginForgetEditView.m in Sources */,
|
||||
E81C27A026EEF83D0031E639 /* XPHtmlUrl.m in Sources */,
|
||||
18E7B1B726E8B2D10064BC9B /* Api+Main.m in Sources */,
|
||||
E8B825C226EA00DF009E8E9F /* LoginVerifCodePresent.m in Sources */,
|
||||
18E7B1B226E8AF980064BC9B /* MainPresenter.m in Sources */,
|
||||
|
@@ -14,44 +14,6 @@
|
||||
|
||||
#define AppName ([[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"])
|
||||
|
||||
//iPhoneX系列设备(刘海屏设备)
|
||||
#define iPhoneXSeries \
|
||||
({BOOL isPhoneXSeries = NO;\
|
||||
if (@available(iOS 11.0, *)) {\
|
||||
isPhoneXSeries = [[UIApplication sharedApplication] delegate].window.safeAreaInsets.bottom > 0.0;\
|
||||
}\
|
||||
(isPhoneXSeries);})
|
||||
|
||||
#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
|
||||
|
||||
/// 默认主题色
|
||||
#define ThemeDefaultColor UIColorFromRGB(0x248CFE)
|
||||
/// 页面背景色
|
||||
#define ThemeBackgroundColor UIColorFromRGB(0x1C1B22)
|
||||
/// 字体默认颜色
|
||||
#define ThemeTextColor UIColorFromRGB(0xC6C6E9)
|
||||
/// 字体默认颜色
|
||||
#define ThemeTextSecondColor UIColorFromRGB(0x4F516A)
|
||||
/// 按钮渐变色 start
|
||||
#define ThemeButtonGradientStartColor UIColorFromRGB(0x218EFF)
|
||||
/// 按钮渐变色 end
|
||||
#define ThemeButtonGradientEndColor UIColorFromRGB(0x7727E4)
|
||||
/// Tabbar 未选中
|
||||
#define ThemeTabbarNormalColor UIColorFromRGB(0x555574)
|
||||
/// Tabbar 选中
|
||||
#define ThemeTabbarSelectedColor UIColorFromRGB(0x248CFE)
|
||||
/// Tabbar 背景色
|
||||
#define ThemeTabbarBackgroundColor UIColorFromRGB(0x2A2A39)
|
||||
|
||||
#define KScreenWidth [[UIScreen mainScreen] bounds].size.width
|
||||
#define KScreenHeight [[UIScreen mainScreen] bounds].size.height
|
||||
#define statusbarHeight [[UIApplication sharedApplication] statusBarFrame].size.height
|
||||
#define kStatusBarHeight statusbarHeight
|
||||
#define kSafeAreaBottomHeight (iPhoneXSeries ? 34 : 0)
|
||||
#define kSafeAreaTopHeight (iPhoneXSeries ? 24 : 0)
|
||||
#define kNavigationHeight (kStatusBarHeight + 44)
|
||||
#define kTabBarHeight (iPhoneXSeries ? 49.0+34.0 : 49.0)
|
||||
|
||||
#ifdef DEBUG
|
||||
#define NSLog(fmt,...) NSLog((@"%s [Line %d]" fmt),__PRETTY_FUNCTION__,__LINE__,##__VA_ARGS__)
|
||||
#else
|
||||
|
@@ -6,6 +6,8 @@
|
||||
//
|
||||
|
||||
#import "BaseNavigationController.h"
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
|
||||
@interface BaseNavigationController ()
|
||||
|
||||
@@ -25,7 +27,7 @@
|
||||
|
||||
- (void)themeConfig {
|
||||
self.navigationBar.shadowImage = [[UIImage alloc] init];
|
||||
self.navigationBar.barTintColor = ThemeBackgroundColor;
|
||||
self.navigationBar.barTintColor = [ThemeColor appBackgroundColor];
|
||||
self.navigationBar.tintColor = [UIColor whiteColor];
|
||||
self.navigationBar.translucent = NO;
|
||||
|
||||
|
@@ -6,6 +6,8 @@
|
||||
//
|
||||
|
||||
#import "BaseViewController.h"
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
|
||||
@interface BaseViewController ()
|
||||
|
||||
@@ -19,7 +21,7 @@
|
||||
}
|
||||
|
||||
- (void)themeConfig {
|
||||
self.view.backgroundColor = ThemeBackgroundColor;
|
||||
self.view.backgroundColor = [ThemeColor appBackgroundColor];
|
||||
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
|
||||
}
|
||||
|
||||
|
@@ -38,6 +38,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
+ (UIColor *)disableButtonBackColor;
|
||||
/// 按钮不可点击文字颜色 #4F516A
|
||||
+ (UIColor *)disableButtonTextColor;
|
||||
///tabbar 没有点击的时候颜色555574
|
||||
+ (UIColor *)tabbarNormalColor;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -7,6 +7,7 @@
|
||||
|
||||
#import "ThemeColor.h"
|
||||
|
||||
#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
|
||||
|
||||
@implementation ThemeColor
|
||||
/// 主题色 #248CFE
|
||||
@@ -65,5 +66,9 @@
|
||||
+ (UIColor *)disableButtonTextColor {
|
||||
return UIColorFromRGB(0x4F516A);
|
||||
}
|
||||
///tabbar 没有点击的时候颜色555574
|
||||
+ (UIColor *)tabbarNormalColor {
|
||||
return UIColorFromRGB(0x555574);
|
||||
}
|
||||
|
||||
@end
|
||||
|
24
xplan-ios/Global/XPConstant.h
Normal file
24
xplan-ios/Global/XPConstant.h
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// XPConstant.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/13.
|
||||
//
|
||||
///一些项目中所用到的key
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPConstant : NSObject
|
||||
|
||||
typedef NS_ENUM(NSUInteger, KeyType) {
|
||||
KeyType_PasswordEncode,///密码des 加密的
|
||||
KeyType_NTESQuickLoginBusinessId,///玩意易盾 快捷登录 id
|
||||
};
|
||||
|
||||
/// 获取当前项目中所用到的 type 所对应的valu的值 type 类型
|
||||
NSString * const KeyWithType(KeyType type);
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
31
xplan-ios/Global/XPConstant.m
Normal file
31
xplan-ios/Global/XPConstant.m
Normal file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// XPConstant.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/13.
|
||||
//
|
||||
|
||||
#import "XPConstant.h"
|
||||
|
||||
@implementation XPConstant
|
||||
|
||||
///在里面进行判断当前环境是什么
|
||||
NSString * const KeyWithType(KeyType type) {
|
||||
BOOL isRelease = YES;
|
||||
NSDictionary * dic = @{
|
||||
///正式环境
|
||||
@(YES):@{
|
||||
@(KeyType_PasswordEncode): @"1ea53d260ecf11e7b56e00163e046a26",
|
||||
@(KeyType_NTESQuickLoginBusinessId): @"09c1214706c34f4798d3f05d86148608"
|
||||
},
|
||||
///测试环境
|
||||
@(NO):@{
|
||||
@(KeyType_PasswordEncode): @"1ea53d260ecf11e7b56e00163e046a26",
|
||||
@(KeyType_NTESQuickLoginBusinessId): @"09c1214706c34f4798d3f05d86148608"
|
||||
}
|
||||
};
|
||||
NSDictionary * enviroDic = [dic objectForKey:@(isRelease)];
|
||||
return [enviroDic objectForKey:@(type)];
|
||||
}
|
||||
|
||||
@end
|
17
xplan-ios/Global/XPEnum.h
Normal file
17
xplan-ios/Global/XPEnum.h
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// XPEnum.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/13.
|
||||
//
|
||||
///放置一些全局的枚举
|
||||
#ifndef XPEnum_h
|
||||
#define XPEnum_h
|
||||
|
||||
typedef NS_ENUM(NSUInteger, ThirdLoginType) {
|
||||
ThirdLoginType_WeChat,///微信
|
||||
ThirdLoginType_QQ,///QQ
|
||||
ThirdLoginType_Apple,///苹果登录
|
||||
};
|
||||
|
||||
#endif /* XPEnum_h */
|
23
xplan-ios/Global/XPHtmlUrl.h
Normal file
23
xplan-ios/Global/XPHtmlUrl.h
Normal file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// XPHtmlUrl.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/13.
|
||||
//
|
||||
///放置h5的链接地址
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPHtmlUrl : NSObject
|
||||
|
||||
typedef NS_ENUM(NSUInteger, URLType) {
|
||||
kPrivacyURL,///隐私政策
|
||||
kUserProtocalURL, ///用户协议
|
||||
};
|
||||
|
||||
NSString * const URLWithType(URLType type);
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
23
xplan-ios/Global/XPHtmlUrl.m
Normal file
23
xplan-ios/Global/XPHtmlUrl.m
Normal file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// XPHtmlUrl.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/13.
|
||||
//
|
||||
|
||||
#import "XPHtmlUrl.h"
|
||||
|
||||
@implementation XPHtmlUrl
|
||||
|
||||
NSString * const URLWithType(URLType type) {
|
||||
NSString * prefix = @"yinyou";
|
||||
NSDictionary * dic = @{
|
||||
@(kPrivacyURL): @"modules/rule/privacy-wap.html",
|
||||
@(kUserProtocalURL) : @"modules/rule/protocol.html"
|
||||
|
||||
};
|
||||
NSString * url = [dic objectForKey:@(type)];
|
||||
|
||||
return [NSString stringWithFormat:@"%@/%@",prefix, url];
|
||||
}
|
||||
@end
|
28
xplan-ios/Global/XPMacro.h
Normal file
28
xplan-ios/Global/XPMacro.h
Normal file
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// XPMacro.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/10.
|
||||
//
|
||||
///一些宏
|
||||
#ifndef XPMacro_h
|
||||
#define XPMacro_h
|
||||
|
||||
//iPhoneX系列设备(刘海屏设备)
|
||||
#define iPhoneXSeries \
|
||||
({BOOL isPhoneXSeries = NO;\
|
||||
if (@available(iOS 11.0, *)) {\
|
||||
isPhoneXSeries = [[UIApplication sharedApplication] delegate].window.safeAreaInsets.bottom > 0.0;\
|
||||
}\
|
||||
(isPhoneXSeries);})
|
||||
|
||||
#define KScreenWidth [[UIScreen mainScreen] bounds].size.width
|
||||
#define KScreenHeight [[UIScreen mainScreen] bounds].size.height
|
||||
#define statusbarHeight [[UIApplication sharedApplication] statusBarFrame].size.height
|
||||
#define kStatusBarHeight statusbarHeight
|
||||
#define kSafeAreaBottomHeight (iPhoneXSeries ? 34 : 0)
|
||||
#define kSafeAreaTopHeight (iPhoneXSeries ? 24 : 0)
|
||||
#define kNavigationHeight (kStatusBarHeight + 44)
|
||||
#define kTabBarHeight (iPhoneXSeries ? 49.0+34.0 : 49.0)
|
||||
|
||||
#endif /* XPMacro_h */
|
@@ -11,6 +11,7 @@
|
||||
///Tool
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "DESEncrypt.h"
|
||||
#import "XPConstant.h"
|
||||
///Api
|
||||
#import "Api+Login.h"
|
||||
///Presenter
|
||||
@@ -43,7 +44,7 @@
|
||||
/// @param newPwd 新的密码
|
||||
/// @param smsCode 验证码
|
||||
- (void)resetPassword:(NSString *)phone newPwd:(NSString *)newPwd smsCode:(NSString *)smsCode {
|
||||
NSString * desPassword = [DESEncrypt encryptUseDES:newPwd key:@"1ea53d260ecf11e7b56e00163e046a26"];
|
||||
NSString * desPassword = [DESEncrypt encryptUseDES:newPwd key:KeyWithType(KeyType_PasswordEncode)];
|
||||
[Api resetPasswordWithPhone:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
[[self getView] resetPasswrodSuccess];
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
|
@@ -11,6 +11,7 @@
|
||||
///Tool
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "DESEncrypt.h"
|
||||
#import "XPConstant.h"
|
||||
///Model
|
||||
#import "AccountModel.h"
|
||||
///Protocol
|
||||
@@ -27,7 +28,7 @@
|
||||
/// @param phone 手机号
|
||||
/// @param password 验证码
|
||||
- (void)loginWithPhone:(NSString *)phone password:(NSString *)password {
|
||||
NSString * desPassword = [DESEncrypt encryptUseDES:password key:@"1ea53d260ecf11e7b56e00163e046a26"];
|
||||
NSString * desPassword = [DESEncrypt encryptUseDES:password key:KeyWithType(KeyType_PasswordEncode)];
|
||||
[Api loginWithPassword:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
AccountModel * accountModel = [AccountModel modelWithDictionary:data.data];
|
||||
if (accountModel && accountModel.access_token.length > 0) {
|
||||
|
@@ -195,7 +195,7 @@
|
||||
_cutdownLabel = [[UILabel alloc] init];
|
||||
_cutdownLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_cutdownLabel.font = [UIFont boldSystemFontOfSize:11];
|
||||
_cutdownLabel.textColor = ThemeTextColor;
|
||||
_cutdownLabel.textColor = [ThemeColor mainTextColor];
|
||||
_cutdownLabel.hidden = NO;
|
||||
}
|
||||
return _cutdownLabel;
|
||||
|
@@ -6,23 +6,24 @@
|
||||
//
|
||||
|
||||
#import "LoginViewController.h"
|
||||
#import "LoginPresenter.h"
|
||||
#import "LoginProtocol.h"
|
||||
#import "UIImage+Utils.h"
|
||||
#import "GCDHelper.h"
|
||||
#import "XCHUDTool.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <ReactiveObjC.h>
|
||||
#import <YYText.h>
|
||||
#import <NTESQuickPass/NTESQuickPass.h>
|
||||
///Tool
|
||||
#import "UIImage+Utils.h"
|
||||
#import "GCDHelper.h"
|
||||
#import "XCHUDTool.h"
|
||||
#import "XPMacro.h"
|
||||
#import "ThemeColor.h"
|
||||
#import "XPConstant.h"
|
||||
///Present
|
||||
#import "LoginPresenter.h"
|
||||
#import "LoginProtocol.h"
|
||||
///VC
|
||||
#import "LoginPhoneViewController.h"
|
||||
|
||||
// 易盾 本机一键登录
|
||||
#ifdef DEBUG
|
||||
NSString *businessID = @"09c1214706c34f4798d3f05d86148608";
|
||||
#else
|
||||
NSString *businessID = @"09c1214706c34f4798d3f05d86148608";
|
||||
#endif
|
||||
|
||||
typedef NS_ENUM(NSUInteger, XYLoginType) {
|
||||
XYLoginTypeUnknow = 0, //未知
|
||||
@@ -87,7 +88,7 @@ typedef NS_ENUM(NSInteger,XYThirdLoginType) {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:11];
|
||||
_titleLabel.textColor = ThemeTextColor;
|
||||
_titleLabel.textColor = [ThemeColor mainTextColor];
|
||||
_titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
return _titleLabel;
|
||||
@@ -305,7 +306,7 @@ typedef NS_ENUM(NSInteger,XYThirdLoginType) {
|
||||
return;
|
||||
}
|
||||
|
||||
[qlManager registerWithBusinessID:businessID timeout:3*1000 configURL:nil extData:nil completion:^(NSDictionary * _Nullable params, BOOL regSuccess) {
|
||||
[qlManager registerWithBusinessID:KeyWithType(KeyType_NTESQuickLoginBusinessId) timeout:3*1000 configURL:nil extData:nil completion:^(NSDictionary * _Nullable params, BOOL regSuccess) {
|
||||
@strongify(self)
|
||||
if (!regSuccess) {
|
||||
dispatch_main_sync_safe(^{
|
||||
@@ -378,7 +379,7 @@ typedef NS_ENUM(NSInteger,XYThirdLoginType) {
|
||||
}else { //电信
|
||||
CMModel.logoImg = [UIImage imageNamed:@"login_ct_mobile"];
|
||||
}
|
||||
CMModel.backgroundColor = ThemeBackgroundColor;
|
||||
CMModel.backgroundColor = [ThemeColor appBackgroundColor];
|
||||
|
||||
CMModel.logoWidth = 95;
|
||||
CMModel.logoHeight = 95;
|
||||
@@ -388,14 +389,14 @@ typedef NS_ENUM(NSInteger,XYThirdLoginType) {
|
||||
CMModel.navTextFont = [UIFont boldSystemFontOfSize:18];
|
||||
|
||||
CMModel.navReturnImg = [UIImage imageNamed:@"common_nav_back"];
|
||||
CMModel.navBgColor = ThemeBackgroundColor;
|
||||
CMModel.navBgColor = [ThemeColor appBackgroundColor];
|
||||
|
||||
CMModel.logBtnHeight = 45;
|
||||
CMModel.logBtnRadius = 45.f / 2;
|
||||
CMModel.logBtnOffsetTopY= 260;
|
||||
CMModel.logBtnOriginLeft = 52;
|
||||
CMModel.logBtnOriginRight = 52;
|
||||
CMModel.logBtnUsableBGColor = ThemeDefaultColor;
|
||||
CMModel.logBtnUsableBGColor = [ThemeColor appMainColor];
|
||||
CMModel.logBtnText = @"本机号码一键登录";
|
||||
CMModel.logBtnTextColor = UIColor.whiteColor;
|
||||
CMModel.logBtnTextFont = [UIFont systemFontOfSize:18 weight:UIFontWeightMedium];
|
||||
@@ -409,11 +410,11 @@ typedef NS_ENUM(NSInteger,XYThirdLoginType) {
|
||||
CMModel.checkedImg = [UIImage imageNamed:@"common_checkbox_checked"];
|
||||
CMModel.checkboxWH = 20;
|
||||
|
||||
CMModel.privacyColor = ThemeTextColor;
|
||||
CMModel.privacyColor = [ThemeColor mainTextColor];
|
||||
CMModel.appPrivacyText = @"登录即代表同意《默认》,并授权音游获取本机号码。";
|
||||
CMModel.privacyState = YES;
|
||||
CMModel.privacyFont = [UIFont systemFontOfSize:12];
|
||||
CMModel.protocolColor = ThemeDefaultColor;
|
||||
CMModel.protocolColor = [ThemeColor appMainColor];
|
||||
|
||||
CMModel.backActionBlock = ^{ //点击了返回按钮
|
||||
[XCHUDTool hideHUD];
|
||||
@@ -435,7 +436,7 @@ typedef NS_ENUM(NSInteger,XYThirdLoginType) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:18];
|
||||
_titleLabel.text = AppName;
|
||||
_titleLabel.textColor = ThemeTextColor;
|
||||
_titleLabel.textColor = [ThemeColor mainTextColor];
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
@@ -445,7 +446,7 @@ typedef NS_ENUM(NSInteger,XYThirdLoginType) {
|
||||
_subTitleLabel = [[UILabel alloc] init];
|
||||
_subTitleLabel.font = [UIFont systemFontOfSize:13];
|
||||
_subTitleLabel.text = @"来音游打游戏,争夺更多赏金!";
|
||||
_subTitleLabel.textColor = ThemeTextColor;
|
||||
_subTitleLabel.textColor = [ThemeColor secondTextColor];
|
||||
_subTitleLabel.textAlignment = NSTextAlignmentLeft;
|
||||
}
|
||||
return _subTitleLabel;
|
||||
@@ -459,7 +460,7 @@ typedef NS_ENUM(NSInteger,XYThirdLoginType) {
|
||||
[_loginButton setTitle:@"本机号码一键登录" forState:UIControlStateNormal];
|
||||
_loginButton.titleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightMedium];
|
||||
[_loginButton setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
|
||||
UIImage *image = [UIImage gradientColorImageFromColors:@[ThemeButtonGradientStartColor,ThemeButtonGradientEndColor] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(KScreenWidth - 52 * 2, 45)];
|
||||
UIImage *image = [UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor],[ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(KScreenWidth - 52 * 2, 45)];
|
||||
[_loginButton setBackgroundImage:image forState:UIControlStateNormal];
|
||||
}
|
||||
return _loginButton;
|
||||
@@ -488,9 +489,9 @@ typedef NS_ENUM(NSInteger,XYThirdLoginType) {
|
||||
|
||||
- (NSMutableAttributedString *)privacyAttributedStr{
|
||||
NSMutableAttributedString *attString = [[NSMutableAttributedString alloc] initWithString:@"登录即代表同意"];
|
||||
attString.yy_color = ThemeTextColor;
|
||||
attString.yy_color = [ThemeColor mainTextColor];
|
||||
NSString *userString = @"《用户服务协议》";
|
||||
NSMutableAttributedString *userAttString = [[NSMutableAttributedString alloc] initWithString:userString attributes:@{NSForegroundColorAttributeName:ThemeDefaultColor}];
|
||||
NSMutableAttributedString *userAttString = [[NSMutableAttributedString alloc] initWithString:userString attributes:@{NSForegroundColorAttributeName:[ThemeColor appMainColor]}];
|
||||
@weakify(self)
|
||||
[userAttString yy_setTextHighlightRange:NSMakeRange(0, userAttString.length) color:nil backgroundColor:nil userInfo:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||
@strongify(self);
|
||||
@@ -499,9 +500,9 @@ typedef NS_ENUM(NSInteger,XYThirdLoginType) {
|
||||
} longPressAction:nil];
|
||||
|
||||
NSMutableAttributedString *andString = [[NSMutableAttributedString alloc] initWithString:@"和"];
|
||||
andString.yy_color = ThemeTextColor;
|
||||
andString.yy_color = [ThemeColor mainTextColor];
|
||||
NSString *protocolString = @"《隐私政策》";
|
||||
NSMutableAttributedString *privateString = [[NSMutableAttributedString alloc] initWithString:protocolString attributes:@{NSForegroundColorAttributeName:ThemeDefaultColor}];
|
||||
NSMutableAttributedString *privateString = [[NSMutableAttributedString alloc] initWithString:protocolString attributes:@{NSForegroundColorAttributeName:[ThemeColor appMainColor]}];
|
||||
[privateString yy_setTextHighlightRange:NSMakeRange(0, privateString.length) color:nil backgroundColor:nil userInfo:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||
@strongify(self);
|
||||
// 跳转隐私政策
|
||||
|
@@ -5,13 +5,21 @@
|
||||
// Created by zu on 2021/8/31.
|
||||
//
|
||||
#import <UIKit/UIKit.h>
|
||||
///Third
|
||||
#import <flutter_boost/FlutterBoost.h>
|
||||
///Tool
|
||||
#import "XPMacro.h"
|
||||
#import "ThemeColor.h"
|
||||
#import "UIImage+Utils.h"
|
||||
///VC
|
||||
#import "TabbarViewController.h"
|
||||
#import "BaseViewController.h"
|
||||
#import "UIImage+Utils.h"
|
||||
#import "LoginViewController.h"
|
||||
///Present
|
||||
#import "MainPresenter.h"
|
||||
#import "MainProtocol.h"
|
||||
#import <flutter_boost/FlutterBoost.h>
|
||||
|
||||
|
||||
|
||||
@interface TabbarViewController () <BaseMvpProtocol, MainProtocol>
|
||||
|
||||
@@ -55,10 +63,10 @@
|
||||
}
|
||||
|
||||
- (void)configTheme {
|
||||
[[UITabBar appearance] setBackgroundImage:[UIImage imageWithColor:ThemeTabbarBackgroundColor size:CGSizeMake(KScreenWidth, kTabBarHeight)]];
|
||||
[[UITabBar appearance] setBackgroundImage:[UIImage imageWithColor:[ThemeColor appCellBackgroundColor] size:CGSizeMake(KScreenWidth, kTabBarHeight)]];
|
||||
[[UITabBar appearance] setShadowImage:[[UIImage alloc]init]];
|
||||
if (@available(iOS 10.0, *)) {
|
||||
[[UITabBar appearance] setUnselectedItemTintColor:ThemeTabbarNormalColor];
|
||||
[[UITabBar appearance] setUnselectedItemTintColor:[ThemeColor tabbarNormalColor]];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,8 +95,8 @@
|
||||
itemVc.title = title;
|
||||
itemVc.tabBarItem.image = [[UIImage imageNamed:image] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
||||
itemVc.tabBarItem.selectedImage = [[UIImage imageNamed:selectedImage] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
||||
[itemVc.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:ThemeTabbarSelectedColor} forState:UIControlStateSelected];
|
||||
[itemVc.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:ThemeTabbarNormalColor} forState:UIControlStateNormal];
|
||||
[itemVc.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[ThemeColor appMainColor]} forState:UIControlStateSelected];
|
||||
[itemVc.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[ThemeColor tabbarNormalColor]} forState:UIControlStateNormal];
|
||||
}
|
||||
|
||||
@end
|
||||
|
Reference in New Issue
Block a user