Commit 8920d92b by 路少雄

1.龙岗水份测试

parents
# OS X
.DS_Store
# Xcode
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
*.xccheckout
profile
*.moved-aside
DerivedData
*.hmap
*.ipa
# Bundler
.bundle
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts
Carthage/Build
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
# Note: if you ignore the Pods directory, make sure to uncomment
# `pod install` in .travis.yml
#
Pods/
Podfile.lock
#
#
\ No newline at end of file
source "https://rubygems.org"
gem "fastlane"
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.3)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
atomos (0.1.3)
aws-eventstream (1.1.0)
aws-partitions (1.414.0)
aws-sdk-core (3.110.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.40.0)
aws-sdk-core (~> 3, >= 3.109.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.87.0)
aws-sdk-core (~> 3, >= 3.109.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.2.2)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
claide (1.0.3)
colored (1.2)
colored2 (3.1.2)
commander-fastlane (4.4.6)
highline (~> 1.7.2)
declarative (0.0.20)
declarative-option (0.1.0)
digest-crc (0.6.3)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.6)
emoji_regex (3.2.1)
excon (0.78.1)
faraday (1.2.0)
multipart-post (>= 1.2, < 3)
ruby2_keywords
faraday-cookie_jar (0.0.7)
faraday (>= 0.8.0)
http-cookie (~> 1.0.0)
faraday_middleware (1.0.0)
faraday (~> 1.0)
fastimage (2.2.1)
fastlane (2.170.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.3, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored
commander-fastlane (>= 4.4.6, < 5.0.0)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 4.0)
excon (>= 0.71.0, < 1.0.0)
faraday (~> 1.0)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (~> 1.0)
fastimage (>= 2.1.0, < 3.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-api-client (>= 0.37.0, < 0.39.0)
google-cloud-storage (>= 1.15.0, < 2.0.0)
highline (>= 1.7.2, < 2.0.0)
json (< 3.0.0)
jwt (>= 2.1.0, < 3)
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (~> 2.0.0)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.3)
simctl (~> 1.6.3)
slack-notifier (>= 2.0.0, < 3.0.0)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (>= 1.4.5, < 2.0.0)
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
fastlane-plugin-pgyer (0.2.2)
gh_inspector (1.1.3)
google-api-client (0.38.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 0.9)
httpclient (>= 2.8.1, < 3.0)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
signet (~> 0.12)
google-cloud-core (1.5.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.4.0)
faraday (>= 0.17.3, < 2.0)
google-cloud-errors (1.0.1)
google-cloud-storage (1.29.2)
addressable (~> 2.5)
digest-crc (~> 0.4)
google-api-client (~> 0.33)
google-cloud-core (~> 1.2)
googleauth (~> 0.9)
mini_mime (~> 1.0)
googleauth (0.14.0)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (~> 0.14)
highline (1.7.10)
http-cookie (1.0.3)
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.4.0)
json (2.5.1)
jwt (2.2.2)
memoist (0.16.2)
mini_magick (4.11.0)
mini_mime (1.0.2)
multi_json (1.15.0)
multipart-post (2.0.0)
nanaimo (0.3.0)
naturally (2.2.0)
os (1.1.1)
plist (3.6.0)
public_suffix (4.0.6)
rake (13.0.3)
representable (3.0.4)
declarative (< 0.1.0)
declarative-option (< 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rouge (2.0.7)
ruby2_keywords (0.0.2)
rubyzip (2.3.0)
security (0.1.3)
signet (0.14.0)
addressable (~> 2.3)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simctl (1.6.8)
CFPropertyList
naturally
slack-notifier (2.3.2)
terminal-notifier (2.0.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
tty-cursor (0.7.1)
tty-screen (0.8.1)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.7)
unicode-display_width (1.7.0)
word_wrap (1.0.0)
xcodeproj (1.19.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.0)
xcpretty (~> 0.2, >= 0.0.7)
PLATFORMS
ruby
DEPENDENCIES
fastlane
fastlane-plugin-pgyer
BUNDLED WITH
2.1.4
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'SkinMagnifier' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
pod 'AFNetworking'
pod 'IQKeyboardManager'
pod 'Masonry'
pod 'SVProgressHUD'
pod 'MJExtension'
pod 'MJRefresh'
pod 'SDWebImage'
pod 'FMDB'
pod 'Bugly'
pod 'AliyunOSSiOS'
pod 'CocoaAsyncSocket'
pod 'MOFSPickerManager'
pod 'TZImagePickerController'
pod 'NSString+RemoveEmoji'
pod 'OpenCV'
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
end
end
end
end
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3916A39C255243E200C94453"
BuildableName = "SkinMagnifier.app"
BlueprintName = "SkinMagnifier"
ReferencedContainer = "container:SkinMagnifier.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3916A39C255243E200C94453"
BuildableName = "SkinMagnifier.app"
BlueprintName = "SkinMagnifier"
ReferencedContainer = "container:SkinMagnifier.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3916A39C255243E200C94453"
BuildableName = "SkinMagnifier.app"
BlueprintName = "SkinMagnifier"
ReferencedContainer = "container:SkinMagnifier.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:SkinMagnifier.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
//
// SMESEditView.h
// SkinMagnifier
//
// Created by nana on 2020/11/7.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface SMESEditView : UIView
@property(nonatomic, strong)void (^Nextblock)(NSString *phone);
@end
NS_ASSUME_NONNULL_END
//
// SMESEditView.m
// SkinMagnifier
//
// Created by nana on 2020/11/7.
//
#import "SMESEditView.h"
@interface SMESEditView()
@property(nonatomic, weak)UITextField *telTF ;
@property(nonatomic, weak)UIButton *nextBtn;
@end
@implementation SMESEditView
- (instancetype)init
{
self = [super init];
if (self) {
[self setupUI];
}
return self;
}
- (void)setupUI {
UIView *contView = [[UIView alloc] init];
contView.backgroundColor = rgba(255, 255, 255, 1);
contView.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.17].CGColor;
contView.layer.shadowOffset = CGSizeMake(0,4);
contView.layer.shadowOpacity = 1;
contView.layer.shadowRadius = 30;
[self addSubview:contView];
[contView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(safaTop(64.5) );
make.left.bottom.right.mas_equalTo(0);
}];
UIView *hLineView = [[UIView alloc] init];
hLineView.backgroundColor = rgba(239, 239, 239, 1);
hLineView.layer.cornerRadius = 1;
[contView addSubview:hLineView];
[hLineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(0);
make.top.mas_equalTo(17);
make.size.mas_equalTo(CGSizeMake(39.5, 2));
}];
UILabel *XinTipsLabel = [[UILabel alloc] init];
XinTipsLabel.attributedText = createAttString(@"设置新手机号", 25, rgba(76, 74, 66, 1));
[contView addSubview:XinTipsLabel];
[XinTipsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(45);
make.top.mas_equalTo(53);
}];
UILabel *xinInputTipsLabel = [[UILabel alloc] init];
xinInputTipsLabel.attributedText = createAttString(@"请输入您当前门店要绑定的手机号", 14, rgba(153, 153, 153, 1));
[contView addSubview:xinInputTipsLabel];
[xinInputTipsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(45);
make.top.mas_equalTo(94.5);
}];
UITextField *telHeaderTF = [[UITextField alloc] init];
telHeaderTF.userInteractionEnabled = NO;
telHeaderTF.attributedText = createAttString(@"+86", 14, rgba(185, 185, 185, 1));
[contView addSubview:telHeaderTF];
[telHeaderTF mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(45);
make.top.mas_equalTo(164.5);
}];
UIView *telSlineView = [[UIView alloc] init];
telSlineView.backgroundColor = rgba(255, 124, 78, 1);
telSlineView.layer.cornerRadius = 0.5;
[contView addSubview:telSlineView];
[telSlineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(87);
make.centerY.equalTo(telHeaderTF);
make.height.mas_equalTo(26);
make.width.mas_equalTo(1);
}];
UITextField *telTF = [[UITextField alloc] init];
[telTF addTarget:self action:@selector(txtChnage:) forControlEvents:UIControlEventEditingChanged];
_telTF = telTF;
telTF.attributedPlaceholder = createAttString(@"请输入手机号", 18, rgba(185, 185, 185, 1));
[contView addSubview:telTF];
[telTF mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(89);
make.centerY.equalTo(telHeaderTF);
make.right.mas_equalTo(-45);
make.height.mas_equalTo(26);
}];
UIView *telLineView = [[UIView alloc] init];
telLineView.backgroundColor = rgba(229, 229, 229, 1);
telLineView.layer.cornerRadius = 0.5;
[contView addSubview:telLineView];
[telLineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(45);
make.right.mas_equalTo(-45);
make.height.mas_equalTo(1);
make.top.equalTo(telHeaderTF.mas_bottom).offset(14);
}];
UIButton *nextBtn = [[UIButton alloc] init];
_nextBtn = nextBtn;
[nextBtn addTarget:self action:@selector(nextBtnClick:) forControlEvents:UIControlEventTouchUpInside];
nextBtn.userInteractionEnabled = NO;
nextBtn.selected = YES;
[nextBtn setAttributedTitle: createAttString(@"下一步", 15, rgba(255, 255, 255, 1)) forState:UIControlStateNormal];
[nextBtn setBackgroundImage:[[UIImage wb_imageWithColor:rgba(255, 124, 78, 1) size:CGSizeMake(225.5, 45)] sd_roundedCornerImageWithRadius:45/2.0 corners:0xff borderWidth:0 borderColor:rgba(0, 0, 0, 0)] forState:UIControlStateNormal];
[nextBtn setBackgroundImage:[[UIImage wb_imageWithColor:rgba(255, 200, 180, 1) size:CGSizeMake(225.5, 45)] sd_roundedCornerImageWithRadius:45/2.0 corners:0xff borderWidth:0 borderColor:rgba(0, 0, 0, 0)] forState:UIControlStateSelected];
[contView addSubview:nextBtn];
[nextBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(telLineView.mas_bottom).offset(30);
make.centerX.mas_equalTo(0);
}];
}
- (void)txtChnage:(UITextField *)tf {
if (tf.text.length != 11) {
self.nextBtn.selected = YES;
self.nextBtn.userInteractionEnabled = NO;
}else {
self.nextBtn.selected = NO;
self.nextBtn.userInteractionEnabled = YES;
}
}
- (void)nextBtnClick:(UIButton *)btn {
if (self.Nextblock) {
self.Nextblock(self.telTF.text);
}
}
@end
//
// SMESPhoneView.h
// SkinMagnifier
//
// Created by nana on 2020/11/7.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface SMESPhoneView : UIView
@property(nonatomic, strong)void (^saveBlock)(NSString *phone);
- (void)checkCodeWithPhone:(NSString *)phone;
@end
NS_ASSUME_NONNULL_END
//
// SMESPhoneView.m
// SkinMagnifier
//
// Created by nana on 2020/11/7.
//
#import "SMESPhoneView.h"
#import "SMRVerificationCodeView.h"
#import "SMDownView.h"
#import "SMESEditView.h"
@interface SMESPhoneView()
@property(nonatomic, strong)SMRVerificationCodeView *vcView;
@property(nonatomic, strong)SMESEditView *eView;
@property(nonatomic, strong)NSString *phone;
@end
@implementation SMESPhoneView
- (instancetype)init
{
self = [super init];
if (self) {
[self setupUI];
}
return self;
}
- (void)setupUI {
self.backgroundColor = rgba(0, 0, 0, 0.3);
CGSize sSize = [UIScreen mainScreen].bounds.size;
self.eView = [[SMESEditView alloc] init];
self.eView.frame = CGRectMake(0,0,sSize.width,sSize.height);
[self addSubview:self.eView];
self.vcView = [[SMRVerificationCodeView alloc] init];
self.vcView.hidden = YES;
self.vcView.frame = CGRectMake(0,0,sSize.width,sSize.height);
[self addSubview:self.vcView];
SMDownView *downView = [[SMDownView alloc] init];
downView.frame = CGRectMake(0, 0,sSize.width, 104.5);
[self addSubview:downView];
@weakify(self);
self.vcView.endInputCodeBlock = ^(NSString * _Nonnull code) {
@strongify(self);
self.saveBlock(self.phone);
[self wb_disMiss];
};
self.eView.Nextblock = ^(NSString * _Nonnull phone) {
@strongify(self);
self.phone = phone;
self.vcView.hidden = NO;
[self.vcView checkCodeWithPhone:phone];
};
}
- (void)checkCodeWithPhone:(NSString *)phone {
}
@end
//
// SMEditShopInfoViewController.h
// SkinMagnifier
//
// Created by nana on 2020/11/7.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface SMEditShopInfoViewController : UIViewController
@property(nonatomic, strong)void (^saveBlock)(NSString *dname);
@end
NS_ASSUME_NONNULL_END
//
// SMLoginView.h
// SkinMagnifier
//
// Created by nana on 2020/11/4.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface SMLoginView : UIView
@property(nonatomic, copy)void (^loginBlock)(NSString *account ,NSString *dmname);
@end
NS_ASSUME_NONNULL_END
//
// SMRCompleteView.h
// SkinMagnifier
//
// Created by nana on 2020/11/5.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface SMRCompleteView : UIView
@property(nonatomic, copy)void (^compBlock)(void);
@end
NS_ASSUME_NONNULL_END
//
// SMRCompleteView.m
// SkinMagnifier
//
// Created by nana on 2020/11/5.
//
#import "SMRCompleteView.h"
#import "SMCountDownButton.h"
@interface SMRCompleteView ()
@property(nonatomic, weak)SMCountDownButton *cdBtn;
@end
@implementation SMRCompleteView
- (instancetype)init
{
self = [super init];
if (self) {
[self setupUI];
}
return self;
}
- (void)setupUI {
self.backgroundColor = [UIColor whiteColor];
UIView *hLineView = [[UIView alloc] init];
hLineView.backgroundColor = rgba(239, 239, 239, 1);
hLineView.layer.cornerRadius = 1;
[self addSubview:hLineView];
[hLineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(0);
make.top.mas_equalTo(safaTop(17));
make.size.mas_equalTo(CGSizeMake(39.5, 2));
}];
UIImageView *tipsImageView = [UIImageView new];
tipsImageView.image = [UIImage imageNamed:@"login_icon_wc"];
[self addSubview:tipsImageView];
[tipsImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(0);
make.top.mas_equalTo(safaTop(220));
}];
UILabel *tipsLabel = [[UILabel alloc] init];
tipsLabel.attributedText = createAttString(@"注册成功", 20, rgba(76, 74, 66, 1));
[self addSubview:tipsLabel];
[tipsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(0);
make.top.equalTo(tipsImageView.mas_bottom).offset(18.5);
}];
SMCountDownButton *cdbtn = [[SMCountDownButton alloc] init];
_cdBtn = cdbtn;
@weakify(self);
__block int maxCount = 6;
cdbtn.timeBlock = ^{
@strongify(self);
maxCount--;
if (maxCount == 0) {
[self.cdBtn stopTime];
if (self.compBlock) {
self.compBlock();
}
}
NSAttributedString *btnAtt= [[NSAttributedString alloc] wb_initWithString:[NSString stringWithFormat:@"%ds进入首页",maxCount] FontSize:12 TextColor:rgba(153, 153, 153, 1)];
[self.cdBtn setAttributedTitle:btnAtt forState:UIControlStateNormal];
};
[self addSubview:cdbtn];
[cdbtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(0);
make.bottom.mas_equalTo(-108);
}];
;
UIButton *homeBtn = [[UIButton alloc] init];
[homeBtn addTarget:self action:@selector(homeClick:) forControlEvents:UIControlEventTouchUpInside];
[homeBtn setAttributedTitle:createAttString(@"前往首页", 15, rgba(255, 255, 255, 1)) forState:UIControlStateNormal];
[homeBtn setBackgroundImage:[[UIImage wb_imageWithColor:rgba(255, 124, 78, 1) size:CGSizeMake(225.5, 45)] sd_roundedCornerImageWithRadius:45/2.0 corners:0xff borderWidth:0 borderColor:rgba(0, 0, 0, 0)] forState:UIControlStateNormal];
[homeBtn setBackgroundImage:[[UIImage wb_imageWithColor:rgba(255, 200, 180, 1) size:CGSizeMake(225.5, 45)] sd_roundedCornerImageWithRadius:45/2.0 corners:0xff borderWidth:0 borderColor:rgba(0, 0, 0, 0)] forState:UIControlStateSelected];
[self addSubview:homeBtn];
[homeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.mas_equalTo(-50);
make.centerX.mas_equalTo(0);
}];
[self.cdBtn startTime];
}
- (void)homeClick:(UIButton *)btn {
if (self.compBlock) {
self.compBlock();
}
}
@end
//
// SMRInputPhoneView.h
// SkinMagnifier
//
// Created by nana on 2020/11/4.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface SMRInputPhoneView : UIView
@property(nonatomic, copy)void (^nextBlock)(NSString *phone);
@end
NS_ASSUME_NONNULL_END
//
// SMRInputPhoneView.m
// SkinMagnifier
//
// Created by nana on 2020/11/4.
//
#import "SMRInputPhoneView.h"
#import "SMAgreementView.h"
@interface SMRInputPhoneView()
@property(nonatomic, weak)UIButton *nextBtn;
@property(nonatomic, weak)UIButton *agreenBtn;
@property(nonatomic, weak)UITextField *telTF;
@end
@implementation SMRInputPhoneView
- (instancetype)init {
if (self = [super init]) {
[self setupUI];
}
return self;
}
- (void)setupUI {
UIView *contView = [[UIView alloc] init];
contView.backgroundColor = rgba(255, 255, 255, 1);
contView.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.17].CGColor;
contView.layer.shadowOffset = CGSizeMake(0,4);
contView.layer.shadowOpacity = 1;
contView.layer.shadowRadius = 30;
[self addSubview:contView];
[contView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(safaTop(64.5) );
make.left.bottom.right.mas_equalTo(0);
}];
UIView *hLineView = [[UIView alloc] init];
hLineView.backgroundColor = rgba(239, 239, 239, 1);
hLineView.layer.cornerRadius = 1;
[contView addSubview:hLineView];
[hLineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(0);
make.top.mas_equalTo(17);
make.size.mas_equalTo(CGSizeMake(39.5, 2));
}];
UILabel *sjTipsLabel = [[UILabel alloc] init];
sjTipsLabel.attributedText = createAttString(@"商家注册", 25, rgba(76, 74, 66, 1));;
[contView addSubview:sjTipsLabel];
[sjTipsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(52.5);
make.left.mas_equalTo(45);
}];
UILabel *telTipsLabel = [[UILabel alloc] init];
telTipsLabel.attributedText = createAttString(@"请输入您当前门店绑定的手机号", 14, rgba(153, 153, 153, 1));
[contView addSubview:telTipsLabel];
[telTipsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(94.5);
make.left.mas_equalTo(45);
}];
UITextField *telHeaderTF = [[UITextField alloc] init];
telHeaderTF.userInteractionEnabled = NO;
telHeaderTF.attributedText = createAttString(@"+86", 14, rgba(185, 185, 185, 1));
[contView addSubview:telHeaderTF];
[telHeaderTF mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(45);
make.top.mas_equalTo(164.5);
}];
// UIView *telSlineView = [[UIView alloc] init];
// telSlineView.backgroundColor = rgba(255, 124, 78, 1);
// telSlineView.layer.cornerRadius = 0.5;
// [contView addSubview:telSlineView];
// [telSlineView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.left.mas_equalTo(87);
// make.centerY.equalTo(telHeaderTF);
// make.height.mas_equalTo(26);
// make.width.mas_equalTo(1);
// }];
UITextField *telTF = [[UITextField alloc] init];
telTF.tintColor = rgba(255, 124, 78, 1);
telTF.keyboardType = UIKeyboardTypePhonePad;
[telTF addTarget:self action:@selector(textChange:) forControlEvents:UIControlEventEditingChanged];
telTF.attributedPlaceholder = createAttString(@"请输入手机号", 18, rgba(185, 185, 185, 1));
[contView addSubview:telTF];
_telTF = telTF;
[telTF mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(89);
make.centerY.equalTo(telHeaderTF);
make.right.mas_equalTo(-45);
make.height.mas_equalTo(26);
}];
UIView *telLineView = [[UIView alloc] init];
telLineView.backgroundColor = rgba(229, 229, 229, 1);
telLineView.layer.cornerRadius = 0.5;
[contView addSubview:telLineView];
[telLineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(45);
make.right.mas_equalTo(-45);
make.height.mas_equalTo(1);
make.top.equalTo(telHeaderTF.mas_bottom).offset(14);
}];
UIButton *agreenBtn = [[UIButton alloc] init];
[agreenBtn addTarget:self action:@selector(agreenClick:) forControlEvents:UIControlEventTouchUpInside];
// NSMutableAttributedString *aAttString = [[NSMutableAttributedString alloc] init];
// [aAttString appendAttributedString:
// ];
// [aAttString appendAttributedString:
// createAttString(@"《用户服务协议》", 12,rgba(255, 124, 78, 1))];
[agreenBtn setAttributedTitle:createAttString(@"我已阅读并同意", 12,rgba(185, 185, 185, 1)) forState:UIControlStateNormal];
[agreenBtn wb_setImageName:@"login_jz"];
[agreenBtn setImageEdgeInsets:UIEdgeInsetsMake(0, -4.5, 0, 4.5)];
[contView addSubview:agreenBtn];
_agreenBtn = agreenBtn;
[agreenBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(45);
make.top.equalTo(telLineView.mas_bottom).offset(13.5);
}];
UIButton *xieyiBtn = [[UIButton alloc] init];
[xieyiBtn addTarget:self action:@selector(xieyiClick:) forControlEvents:UIControlEventTouchUpInside];
[xieyiBtn setAttributedTitle: createAttString(@"《用户服务协议》", 12,rgba(255, 124, 78, 1)) forState:UIControlStateNormal];
[xieyiBtn setImageEdgeInsets:UIEdgeInsetsMake(0, -4.5, 0, 4.5)];
[contView addSubview:xieyiBtn];
[xieyiBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(agreenBtn.mas_right).offset(1);
make.centerY.equalTo(agreenBtn);
}];
UIButton *nextBtn = [[UIButton alloc] init];
[nextBtn addTarget:self action:@selector(nextBtnClick:) forControlEvents:UIControlEventTouchUpInside];
nextBtn.userInteractionEnabled = NO;
nextBtn.selected = YES;
[nextBtn setAttributedTitle:createAttString(@"下一步", 15,rgba(255, 255, 255, 1)) forState:UIControlStateNormal];
[nextBtn setBackgroundImage:[[UIImage wb_imageWithColor:rgba(255, 124, 78, 1) size:CGSizeMake(225.5, 45)] sd_roundedCornerImageWithRadius:45/2.0 corners:0xff borderWidth:0 borderColor:rgba(0, 0, 0, 0)] forState:UIControlStateNormal];
[nextBtn setBackgroundImage:[[UIImage wb_imageWithColor:rgba(255, 200, 180, 1) size:CGSizeMake(225.5, 45)] sd_roundedCornerImageWithRadius:45/2.0 corners:0xff borderWidth:0 borderColor:rgba(0, 0, 0, 0)] forState:UIControlStateSelected];
[self addSubview:nextBtn];
_nextBtn = nextBtn;
[nextBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(agreenBtn.mas_bottom).offset(30);
make.centerX.mas_equalTo(0);
}];
}
- (void)textChange:(UITextField *)tf {
[self userAgreen];
}
- (void)xieyiClick:(UIButton *)btn {
SMAgreementView *view = [[SMAgreementView alloc ] init];
[view wb_showRTLFromSuperView:self.superview];
}
- (void)agreenClick:(UIButton *)btn{
btn.selected = !btn.selected;
[self userAgreen];
}
- (void)nextBtnClick:(UIButton *)btn {
if (self.nextBlock) {
self.nextBlock(self.telTF.text);
}
self.telTF.text = @"";
}
- (void)userAgreen {
if (self.agreenBtn.selected && self.telTF.text.length == 11) {
self.nextBtn.selected = NO;
self.nextBtn.userInteractionEnabled = YES;
}else {
self.nextBtn.selected = YES;
self.nextBtn.userInteractionEnabled = NO;
}
}
@end
//
// SMRSetPwdView.h
// SkinMagnifier
//
// Created by nana on 2020/11/4.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface SMRSetPwdView : UIView
@property(nonatomic, strong)UIButton *registBtn;
- (void)saveAccount:(NSString *)account;
@property(nonatomic, strong)void (^registBlock)(NSString *pwd);
@end
NS_ASSUME_NONNULL_END
//
// SMRSetPwdView.m
// SkinMagnifier
//
// Created by nana on 2020/11/4.
//
#import "SMRSetPwdView.h"
@interface SMRSetPwdView ()
@property(nonatomic, weak)UITextField *onePwdTF;
@property(nonatomic, weak)UITextField *twoPwdTF;
@property(nonatomic, weak)UILabel *smallTipsLabel;
@property(nonatomic, strong)NSString *accountString;
@end
@implementation SMRSetPwdView
- (instancetype)init
{
self = [super init];
if (self) {
[self setupUI];
}
return self;
}
- (void)setupUI {
UIView *contView = [[UIView alloc] init];
contView.backgroundColor = rgba(255, 255, 255, 1);
contView.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.17].CGColor;
contView.layer.shadowOffset = CGSizeMake(0,4);
contView.layer.shadowOpacity = 1;
contView.layer.shadowRadius = 30;
[self addSubview:contView];
[contView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(safaTop(64.5));
make.left.bottom.right.mas_equalTo(0);
}];
UIView *hLineView = [[UIView alloc] init];
hLineView.backgroundColor = rgba(239, 239, 239, 1);
hLineView.layer.cornerRadius = 1;
[contView addSubview:hLineView];
[hLineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(0);
make.top.mas_equalTo(17);
make.size.mas_equalTo(CGSizeMake(39.5, 2));
}];
UILabel *setTipsLabel = [[UILabel alloc] init];
setTipsLabel.attributedText = createAttString(@"设置密码", 25,rgba(76, 74, 66, 1));
[contView addSubview:setTipsLabel];
[setTipsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(44);
make.top.mas_equalTo(53);
}];
UILabel *smallTipsLabel = [[UILabel alloc] init];
_smallTipsLabel = smallTipsLabel;
smallTipsLabel.attributedText = createAttString(@" ",14,rgba(153, 153, 153, 1));
[contView addSubview:smallTipsLabel];
[smallTipsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(44);
make.top.mas_equalTo(94.5);
}];
UITextField *onePwdTF = [[UITextField alloc] init];
_onePwdTF = onePwdTF;
onePwdTF.secureTextEntry = YES;
onePwdTF.attributedPlaceholder = createAttString(@"请输入不少于6位数的密码", 14,rgba(185, 185, 185, 1));
[contView addSubview:onePwdTF];
[onePwdTF mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(167.5);
make.left.mas_equalTo(45);
make.right.mas_equalTo(-45);
}];
UIView *oneLineView = [[UIView alloc] init];
oneLineView.layer.cornerRadius = 0.5;
oneLineView.backgroundColor = rgba(229, 229, 229, 1);
[contView addSubview:oneLineView];
[oneLineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(onePwdTF.mas_bottom).offset(10);
make.left.right.equalTo(onePwdTF);
make.height.mas_equalTo(1);
}];
UITextField *twoPwdTF = [[UITextField alloc] init];
_twoPwdTF = twoPwdTF;
twoPwdTF.secureTextEntry = YES;
twoPwdTF.attributedPlaceholder = createAttString(@"重复密码", 14,rgba(185, 185, 185, 1));
[contView addSubview:twoPwdTF];
[twoPwdTF mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(221.5);
make.left.mas_equalTo(45);
make.right.mas_equalTo(-45);
}];
UIView *twoLineView = [[UIView alloc] init];
twoLineView.layer.cornerRadius = 0.5;
twoLineView.backgroundColor = rgba(229, 229, 229, 1);
[contView addSubview:twoLineView];
[twoLineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(twoPwdTF.mas_bottom).offset(10);
make.left.right.equalTo(twoPwdTF);
make.height.mas_equalTo(1);
}];
UIButton *registBtn = [[UIButton alloc] init];
registBtn.selected = YES;
registBtn.userInteractionEnabled = NO;
[registBtn setAttributedTitle:createAttString(@"注册", 15, rgba(255, 255, 255, 1)) forState:UIControlStateNormal];
[registBtn addTarget:self action:@selector(registBtnClick:) forControlEvents:UIControlEventTouchUpInside];
[registBtn setBackgroundImage:[[UIImage wb_imageWithColor:rgba(255, 124, 78, 1) size:CGSizeMake(225.5, 45)] sd_roundedCornerImageWithRadius:45/2.0 corners:0xff borderWidth:0 borderColor:rgba(0, 0, 0, 0)] forState:UIControlStateNormal];
[registBtn setBackgroundImage:[[UIImage wb_imageWithColor:rgba(255, 200, 180, 1) size:CGSizeMake(225.5, 45)] sd_roundedCornerImageWithRadius:45/2.0 corners:0xff borderWidth:0 borderColor:rgba(0, 0, 0, 0)] forState:UIControlStateSelected];
[self addSubview:registBtn];
_registBtn =registBtn;
[registBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(twoLineView.mas_bottom).offset(30);
make.centerX.mas_equalTo(0);
}];
[self.onePwdTF addTarget:self action:@selector(textFiledChange:) forControlEvents:UIControlEventEditingChanged];
[self.twoPwdTF addTarget:self action:@selector(textFiledChange:) forControlEvents:UIControlEventEditingChanged];
}
- (void)registBtnClick:(UIButton *)btn {
if (self.registBlock) {
self.registBlock(self.onePwdTF.text);
}
self.onePwdTF.text = @"";
self.twoPwdTF.text = @"";
}
- (void)saveAccount:(NSString *)account {
self.accountString = account;
NSMutableAttributedString *sAttString = [[NSMutableAttributedString alloc] init];
[sAttString appendAttributedString:createAttString(@"账号", 14,rgba(153, 153, 153, 1))];
NSMutableDictionary *pDict = [[NSMutableDictionary alloc] init];
pDict[NSFontAttributeName] = [UIFont systemFontOfSize:14];
pDict[NSForegroundColorAttributeName] = rgba(100, 98, 92, 1);
pDict[NSUnderlineStyleAttributeName] = @(1);
[sAttString appendAttributedString:
[[NSAttributedString alloc] initWithString:account attributes:pDict]];
[sAttString appendAttributedString:createAttString(@"由系统自动分配,请谨记", 14,rgba(153, 153, 153, 1))];
self.smallTipsLabel.attributedText = sAttString;
[self.onePwdTF becomeFirstResponder];
}
- (void)textFiledChange:(UITextField *)tf {
if ([tf isEqual:self.onePwdTF] ||
[tf isEqual:self.twoPwdTF] ) {
NSString *onePWd =self.onePwdTF.text;
NSString *twoPWd =self.twoPwdTF.text;
if ([onePWd isEqualToString:twoPWd] && onePWd.length >= 6) {
self.registBtn.selected = NO;
self.registBtn.userInteractionEnabled = YES;
}else {
self.registBtn.selected = YES;
self.registBtn.userInteractionEnabled = NO;
}
}
}
@end
//
// SMRVerificationCodeView.h
// SkinMagnifier
//
// Created by nana on 2020/11/4.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface SMRVerificationCodeView : UIView
@property(nonatomic, copy)void (^endInputCodeBlock)(NSString *code);
- (void)checkCodeWithPhone:(NSString *)phone;
@end
NS_ASSUME_NONNULL_END
//
// SMRVerificationCodeView.m
// SkinMagnifier
//
// Created by nana on 2020/11/4.
//
#import "SMRVerificationCodeView.h"
#import "SMCountDownButton.h"
#import "SMYZMView.h"
@interface SMRVerificationCodeView()
@property(nonatomic,strong)NSMutableArray *inputArray;
@property(nonatomic,strong)NSString *phoneString;
@property(nonatomic,weak)SMCountDownButton *cdBtn;
@property(nonatomic,strong)NSString *codeString;
@property(nonatomic,weak)UILabel *phoneLabel;
@end
@implementation SMRVerificationCodeView
- (instancetype)init
{
self = [super init];
if (self) {
[self setupUI];
}
return self;
}
- (void)setupUI {
self.inputArray = [[NSMutableArray alloc] init];
UIView *contView = [[UIView alloc] init];
contView.backgroundColor = rgba(255, 255, 255, 1);
contView.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.17].CGColor;
contView.layer.shadowOffset = CGSizeMake(0,4);
contView.layer.shadowOpacity = 1;
contView.layer.shadowRadius = 30;
[self addSubview:contView];
[contView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(safaTop(64.5) );
make.left.bottom.right.mas_equalTo(0);
}];
UIView *hLineView = [[UIView alloc] init];
hLineView.backgroundColor = rgba(239, 239, 239, 1);
hLineView.layer.cornerRadius = 1;
[contView addSubview:hLineView];
[hLineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(0);
make.top.mas_equalTo(17);
make.size.mas_equalTo(CGSizeMake(39.5, 2));
}];
UILabel *bigTipsLabel = [[UILabel alloc] init];
bigTipsLabel.attributedText = createAttString(@"请您输入手机号验证码", 25,rgba(76, 74, 66, 1));
[contView addSubview:bigTipsLabel];
[bigTipsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(45);
make.top.mas_equalTo(53);
}];
UILabel *smallTipsLabel = [[UILabel alloc] init];
smallTipsLabel.attributedText = createAttString(@"验证码已经发送到您的手机", 14,rgba(153, 153, 153, 1));
[contView addSubview:smallTipsLabel];
[smallTipsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(45);
make.top.equalTo(bigTipsLabel.mas_bottom).offset(18);
}];
UILabel *phoneLabel = [[UILabel alloc] init];
_phoneLabel = phoneLabel;
// phoneLabel.attributedText = createAttString(@"+86 13145806096", 14,rgba(153, 153, 153, 1));
[contView addSubview:phoneLabel];
[phoneLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(45);
make.top.equalTo(smallTipsLabel.mas_bottom).offset(10);
}];
UIImage *norImage = [[UIImage wb_imageWithColor:rgba(241, 241, 241, 1) size:CGSizeMake(57, 57)] sd_roundedCornerImageWithRadius:5 corners:0xff borderWidth:0 borderColor:[UIColor clearColor]];
// UIView *inputBGView = [[UIView alloc] init];
// [contView addSubview:inputBGView];
// [inputBGView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.centerX.mas_equalTo(0);
// make.top.mas_equalTo(171);
// make.height.mas_equalTo(57);
// }];
SMYZMView *mView = [[SMYZMView alloc ] init];
@weakify(self);
mView.editBlock = ^(NSString * _Nonnull str) {
@strongify(self);
if ([str isEqualToString:self.codeString]) {
if (self.endInputCodeBlock) {
self.endInputCodeBlock(self.codeString);
}
}else {
[SVProgressHUD showErrorWithStatus:@"请输入正确的验证码"];
}
};
[contView addSubview:mView];
[mView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(200);
make.centerX.mas_equalTo(0);
make.width.mas_equalTo((57+19)*4);
make.height.mas_equalTo(57);
}];
SMCountDownButton *cdbtn = [[SMCountDownButton alloc] init];
[cdbtn setAttributedTitle:createAttString(@"获取验证码", 12, rgba(153, 153, 153, 1)) forState:UIControlStateNormal];
[cdbtn addTarget:self action:@selector(cdBtnClick:) forControlEvents:UIControlEventTouchUpInside];
_cdBtn = cdbtn;
// @weakify(self);
__block int maxCount = 60;
cdbtn.timeBlock = ^{
@strongify(self);
maxCount--;
NSAttributedString *btnAtt = nil;
if (maxCount == 0) {
btnAtt = createAttString(@"获取验证码", 12, rgba(153, 153, 153, 1));
[self.cdBtn stopTime];
maxCount = 60;
}else {
btnAtt= [[NSAttributedString alloc] wb_initWithString:[NSString stringWithFormat:@"%ds",maxCount] FontSize:12 TextColor:rgba(153, 153, 153, 1)];
}
[self.cdBtn setAttributedTitle:btnAtt forState:UIControlStateNormal];
};
[self addSubview:cdbtn];
[cdbtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(mView).offset(-15);
make.bottom.equalTo(mView.mas_top).offset(-15);
}];
}
- (void)cdBtnClick:(UIButton *)btn {
[self checkCode];
}
- (void)checkCodeWithPhone:(NSString *)phone {
self.phoneString = phone;
_phoneLabel.attributedText = createAttString([NSString stringWithFormat:@"+86 %@",phone], 14,rgba(153, 153, 153, 1));
[self checkCode];
}
- (void)checkCode {
NSMutableDictionary *pDict = [[NSMutableDictionary alloc] init];
pDict[@"phone"] = self.phoneString;
@weakify(self);
[self postFormDataWithUrl:@"/magnifier/public/sendVerifiyCode" params:pDict success:^(NSDictionary * _Nonnull responseObject, JFResponseModel * _Nonnull JsonData) {
@strongify(self);
if ([JsonData.code isEqualToString:@"200"]) {
self.codeString = [NSString stringWithFormat:@"%@",JsonData.data];
[self.cdBtn startTime];
}
}];
}
@end
//
// SMRegistView.h
// SkinMagnifier
//
// Created by nana on 2020/11/4.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface SMRegistView : UIView
@property(nonatomic,copy)void(^registBlock)(NSString *account, NSString *dname);
@end
NS_ASSUME_NONNULL_END
//
// SMRegistView.m
// SkinMagnifier
//
// Created by nana on 2020/11/4.
//
#import "SMRegistView.h"
#import "SMDownView.h"
#import "SMRInputPhoneView.h"
#import "SMRVerificationCodeView.h"
#import "SMRSetPwdView.h"
#import "SMRCompleteView.h"
@interface SMRegistView()
@property(nonatomic, strong)SMRInputPhoneView *inputPhoneView;
@property(nonatomic, strong)SMRVerificationCodeView *vcodeView;
@property(nonatomic, strong)SMRSetPwdView *spView;
@property(nonatomic, strong)NSString *phone;
@property(nonatomic, strong)NSString *code;
@property(nonatomic, strong)NSString *account;
@end
@implementation SMRegistView
- (instancetype)init
{
self = [super init];
if (self) {
[self setupUI];
}
return self;
}
- (void)setupUI {
self.backgroundColor = rgba(0, 0, 0, 0.34);
CGSize sSize = [UIScreen mainScreen].bounds.size;
self.inputPhoneView = [[SMRInputPhoneView alloc] init];
self.inputPhoneView.frame = CGRectMake(0,0,sSize.width,sSize.height);
[self addSubview:self.inputPhoneView];
self.vcodeView = [[SMRVerificationCodeView alloc] init];
self.vcodeView.hidden = YES;
self.vcodeView.frame = CGRectMake(0,0,sSize.width,sSize.height);
[self addSubview:self.vcodeView];
self.spView = [[SMRSetPwdView alloc] init];
// [self.spView.registBtn addTarget:self action:@selector(spRegistClick:) forControlEvents:UIControlEventTouchUpInside];
self.spView.hidden = YES;
self.spView.frame = CGRectMake(0,0,sSize.width,sSize.height);
[self addSubview:self.spView];
SMDownView *downView = [[SMDownView alloc] init];
downView.frame = CGRectMake(0, 0,sSize.width, 104.5);
[self addSubview:downView];
@weakify(self);
self.inputPhoneView.nextBlock = ^(NSString * _Nonnull phone) {
@strongify(self);
self.phone = phone;
self.vcodeView.hidden = NO;
[self.inputPhoneView endEditing:YES];
[self.vcodeView checkCodeWithPhone:phone];
};
self.vcodeView.endInputCodeBlock = ^(NSString * _Nonnull code) {
@strongify(self);
self.code = code;
NSMutableDictionary *pDict = [[NSMutableDictionary alloc ] init];
pDict[@"code"] = code;
[self postFormDataWithUrl:@"/magnifier/public/generateAccount" params:pDict success:^(NSDictionary * _Nonnull responseObject, JFResponseModel * _Nonnull JsonData) {
@strongify(self);
if ([JsonData.code isEqualToString:@"200"]) {
NSString *account = (NSString *)JsonData.data;
self.account = account;
self.spView.hidden = NO;
[self.vcodeView endEditing:YES];
[self.spView saveAccount:account];
}else {
[SVProgressHUD showErrorWithStatus:@"验证失败"];
}
}];
};
self.spView.registBlock = ^(NSString * _Nonnull pwd) {
@strongify(self);
NSMutableDictionary *pDict = [[NSMutableDictionary alloc] init];
pDict[@"account"] = self.account;
pDict[@"phone"] = self.phone;
pDict[@"pwd"] = encryptAES128(pwd, @"jinhaoyang201905");
pDict[@"verifycode"] = self.code;
[self postFormDataWithUrl:@"/magnifier/public/registeredMember" params:pDict success:^(NSDictionary * _Nonnull responseObject, JFResponseModel * _Nonnull JsonData) {
@strongify(self);
self.inputPhoneView.hidden = NO;
self.vcodeView.hidden = YES;
self.spView.hidden = YES;
if ([JsonData.code isEqualToString:@"200"]) {
NSDictionary *rDict = ( NSDictionary *)JsonData.data;
NSMutableDictionary *sDict = [[NSMutableDictionary alloc] init];
[SMGlobalModel share].mid = [NSString stringWithFormat:@"%@", rDict[@"id"]];
[SMGlobalModel share].account = rDict[@"account"];
[SMGlobalModel share].dmname = rDict[@"dmname"];
sDict[@"account"] = self.account;
sDict[@"pwd"] = encryptAES128(pwd, @"jinhaoyang201905");
[[NSUserDefaults standardUserDefaults] setObject:sDict forKey:@"saveAccountKey"];
SMRCompleteView *cView = [[SMRCompleteView alloc] init];
cView.frame = CGRectMake(0,safaTop(64.5) ,self.bounds.size.width,self.bounds.size.height-safaTop(64.5));
[self addSubview:cView];
@weakify(cView);
cView.compBlock = ^{
@strongify(self);
@strongify(cView);
if (self.registBlock) {
self.registBlock([SMGlobalModel share].account, [SMGlobalModel share].dmname);
}
[cView removeFromSuperview];
};
}else if([JsonData.code isEqualToString:@"-53"]){
[SVProgressHUD showErrorWithStatus:@"手机号码已存在"];
}else {
[SVProgressHUD showErrorWithStatus:@"注册失败"];
}
}];
};
}
- (void)spRegistClick:(UIButton *)btn {
}
@end
//
// SMShopInfoModel.h
// SkinMagnifier
//
// Created by nana on 2020/12/3.
//
#import "JFBaseModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface SMShopInfoModel : JFBaseModel
@property(nonatomic, strong)NSString *areatxt;
@property(nonatomic, strong)NSString *address;
@property(nonatomic, strong)NSString *dmname;
@property(nonatomic, strong)NSString *lxname;
@property(nonatomic, strong)NSString *phone;
@property(nonatomic, strong)NSString *areacity;
@property(nonatomic, strong)NSString *areaprovince;
@property(nonatomic, strong)NSString *arearegion;
@end
NS_ASSUME_NONNULL_END
//
// SMShopInfoModel.m
// SkinMagnifier
//
// Created by nana on 2020/12/3.
//
#import "SMShopInfoModel.h"
@implementation SMShopInfoModel
@end
//
// AppDelegate.h
// SkinMagnifier
//
// Created by nana on 2020/11/4.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property(nonatomic, strong)UIWindow *window;
@end
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "icon_40@2x.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"filename" : "icon_60@2x.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"filename" : "icon_58@2x.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"filename" : "icon_87@3x.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"filename" : "icon_80@2x.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"filename" : "icon_120@2x.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"filename" : "icon_120@2x-1.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"filename" : "icon_180@3x.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"filename" : "icon_20.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"filename" : "icon_40@2x-1.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"filename" : "icon_29.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"filename" : "icon_58@2x-1.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"filename" : "icon_40@2x-2.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"filename" : "icon_80@2x-1.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"filename" : "icon_76.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"filename" : "icon_152@2x.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"filename" : "icon_167@2x.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"filename" : "icon_1024png.png",
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "login_icon_wc@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "login_icon_wc@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "login_icon_xs@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "login_icon_xs@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "login_icon_xyb@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "login_icon_xyb@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "login_icon_yc@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "login_icon_yc@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "login_jz_nor@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "login_jz_nor@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "login_jz_sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "login_jz_sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Program_icon_delete@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Program_icon_delete@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "client_list_button_ch_delete@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "client_list_button_ch_delete@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "client_time_bg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "client_time_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "customer_edit@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "customer_edit@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "customer_icon_xyb@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "customer_icon_xyb@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "customer_image_bg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "customer_image_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "customer_logo@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "customer_logo@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "customer_xj@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "customer_xj@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dh_check_Oil_bg_1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dh_check_Oil_bg_1@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment