说明书更改为内置图片,微信登陆时更换手机号加强验证

This commit is contained in:
kai60
2020-12-20 17:54:01 +08:00
parent 0ece8602fb
commit 6796226366
31 changed files with 439 additions and 41 deletions
@@ -7,6 +7,7 @@
//
#import <UIKit/UIKit.h>
#import "InfoByImageViewController.h"
@interface IfishMeViewController : UIViewController
@@ -535,7 +535,16 @@
// webVC.pushtitle = NSLocalizedString(@"ifish_deviceuse", nil);
// [self.navigationController pushViewController:webVC animated:YES];
// self.hidesBottomBarWhenPushed = NO;
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:IFISH_DEVCEITROURL]];
// [[UIApplication sharedApplication] openURL:[NSURL URLWithString:IFISH_DEVCEITROURL]];
self.hidesBottomBarWhenPushed = YES;
InfoByImageViewController*info=[[InfoByImageViewController alloc]init];
info.title=NSLocalizedString(@"ifish_deviceuse", nil);;;
info.type=@"instruction";
info.image=[UIImage imageNamed:@"instruction"];
[self.navigationController pushViewController:info animated:YES];
self.hidesBottomBarWhenPushed = NO;
}else if (indexPath.section == 3 && indexPath.row == 2){
//联系我们
@@ -11,6 +11,8 @@
NS_ASSUME_NONNULL_BEGIN
@interface InfoByImageViewController : BaseViewController
@property (nonatomic, strong) UIScrollView *scrollView;
@property (nonatomic, strong) UIImageView *imageView;
@property (nonatomic, strong) UIImage *image;
@property (nonatomic, strong) NSString *type;
@@ -17,17 +17,48 @@
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.scrollView=[[UIScrollView alloc]initWithFrame:CGRectZero];
//self.scrollView.clipsToBounds=YES;
self.imageView=[[UIImageView alloc]initWithFrame:CGRectZero];
[self.view addSubview:self.imageView];
// self.imageView.contentMode=UIViewContentModeCenter;
[self.scrollView addSubview:self.imageView];
//self.scrollView.scrollEnabled=NO;
[self.view addSubview:self.scrollView];
self.imageView.userInteractionEnabled=YES;
[ self.scrollView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(0);
make.top.mas_equalTo(0);
make.bottom.mas_equalTo(0);
make.right.mas_equalTo(0);
}];
CGFloat imageHeight=kScreenHeight-TOP_HEIGHT;
CGFloat imageWidth=kScreenWidth;
CGFloat ratio=imageWidth/imageHeight;
if (self.image)
{
ratio=self.image.size.width/self.image.size.height;
}
imageHeight=imageWidth/ratio;
self.scrollView.contentSize=CGSizeMake(imageWidth, imageHeight);
[ self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(0);
make.top.mas_equalTo(0);
make.bottom.mas_equalTo(0);
make.right.mas_equalTo(0);
make.left.mas_equalTo(self.scrollView);
make.top.mas_equalTo(self.scrollView);
make.height.mas_equalTo(imageHeight);
make.width.mas_equalTo(imageWidth);
// make.right.mas_equalTo(self.view);
}];
if (self.image)
{
self.imageView.image=self.image;
}
if (self.title)
{
@@ -36,12 +67,12 @@
if ([self.type isEqualToString:@"service"])
{
UIButton*xuanduo=[UIButton buttonWithType:UIButtonTypeSystem];
[self.view addSubview:xuanduo];
[self.imageView addSubview:xuanduo];
[xuanduo mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(0);
make.top.mas_equalTo(0);
make.height.mas_equalTo(self.view.frame.size.height/12);
make.height.mas_equalTo(imageHeight/12);
make.right.mas_equalTo(0);
}];
@@ -53,12 +84,12 @@
UIButton*reuxin=[UIButton buttonWithType:UIButtonTypeSystem];
[self.view addSubview:reuxin];
[self.imageView addSubview:reuxin];
[reuxin mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(0);
make.top.mas_equalTo(4*self.view.frame.size.height/12-25);
make.height.mas_equalTo(self.view.frame.size.height/12);
make.top.mas_equalTo(4*imageHeight/12);
make.height.mas_equalTo(imageHeight/12);
make.right.mas_equalTo(0);
}];
@@ -68,12 +99,13 @@
UIButton*songnuo=[UIButton buttonWithType:UIButtonTypeSystem];
[self.view addSubview:songnuo];
[self.imageView addSubview:songnuo];
[songnuo mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(0);
make.top.mas_equalTo(8*self.view.frame.size.height/12-25);
make.height.mas_equalTo(self.view.frame.size.height/12);
make.top.mas_equalTo(8*imageHeight/12);
make.height.mas_equalTo(imageHeight/12);
make.right.mas_equalTo(0);
}];
@@ -82,8 +114,153 @@
[songnuo addTarget:self action:@selector(service:) forControlEvents:UIControlEventTouchUpInside];
}
else if ([self.type isEqualToString:@"instruction"])//详细说明书
{
UIButton*camera=[UIButton buttonWithType:UIButtonTypeSystem];
[self.imageView addSubview:camera];
[camera mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(0);
make.top.mas_equalTo(0);
make.height.mas_equalTo(imageHeight/7);
make.right.mas_equalTo(0);
}];
camera.tag=1;
camera.backgroundColor=[UIColor clearColor];
[camera addTarget:self action:@selector(instruction:) forControlEvents:UIControlEventTouchUpInside];
UIButton*senven=[UIButton buttonWithType:UIButtonTypeSystem];
[self.imageView addSubview:senven];
[senven mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(0);
make.top.mas_equalTo(imageHeight/7);
make.height.mas_equalTo(1*imageHeight/7);
make.right.mas_equalTo(0);
}];
senven.tag=2;
senven.backgroundColor=[UIColor clearColor];
[senven addTarget:self action:@selector(instruction:) forControlEvents:UIControlEventTouchUpInside];
UIButton*sw7=[UIButton buttonWithType:UIButtonTypeSystem];
[self.imageView addSubview:sw7];
[sw7 mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(0);
make.top.mas_equalTo(2*imageHeight/7);
make.height.mas_equalTo(1*imageHeight/7);
make.right.mas_equalTo(0);
}];
sw7.tag=3;
sw7.backgroundColor=[UIColor clearColor];
[sw7 addTarget:self action:@selector(instruction:) forControlEvents:UIControlEventTouchUpInside];
UIButton*sw10=[UIButton buttonWithType:UIButtonTypeSystem];
[self.imageView addSubview:sw10];
[sw10 mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(0);
make.top.mas_equalTo(3*imageHeight/7);
make.height.mas_equalTo(1*imageHeight/7);
make.right.mas_equalTo(0);
}];
sw10.tag=4;
sw10.backgroundColor=[UIColor clearColor];
[sw10 addTarget:self action:@selector(instruction:) forControlEvents:UIControlEventTouchUpInside];
UIButton*cw2=[UIButton buttonWithType:UIButtonTypeSystem];
[self.imageView addSubview:cw2];
[cw2 mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(0);
make.top.mas_equalTo(4*imageHeight/7);
make.height.mas_equalTo(1*imageHeight/7);
make.right.mas_equalTo(0);
}];
cw2.tag=5;
cw2.backgroundColor=[UIColor clearColor];
[cw2 addTarget:self action:@selector(instruction:) forControlEvents:UIControlEventTouchUpInside];
UIButton*sw1_6=[UIButton buttonWithType:UIButtonTypeSystem];
[self.imageView addSubview:sw1_6];
[sw1_6 mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(0);
make.top.mas_equalTo(5*imageHeight/7);
make.height.mas_equalTo(1*imageHeight/7);
make.right.mas_equalTo(0);
}];
sw1_6.tag=6;
sw1_6.backgroundColor=[UIColor clearColor];
[sw1_6 addTarget:self action:@selector(instruction:) forControlEvents:UIControlEventTouchUpInside];
UIButton*hxwy01=[UIButton buttonWithType:UIButtonTypeSystem];
[self.imageView addSubview:hxwy01];
[hxwy01 mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(0);
make.top.mas_equalTo(6*imageHeight/7);
make.height.mas_equalTo(1*imageHeight/7);
make.right.mas_equalTo(0);
}];
hxwy01.tag=7;
hxwy01.backgroundColor=[UIColor clearColor];
[hxwy01 addTarget:self action:@selector(instruction:) forControlEvents:UIControlEventTouchUpInside];
}
}
-(void)instruction:(UIButton*)button
{
self.hidesBottomBarWhenPushed = YES;
InfoByImageViewController*info=[[InfoByImageViewController alloc]init];
if (button.tag==1) {
info.title=@"常见失败原因";
info.image=[UIImage imageNamed:@"failreason"];
}
else if (button.tag==2) {
info.title=@"小7摄像头";
info.image=[UIImage imageNamed:@"cameraInfo"];
}
else if (button.tag==3) {
info.title=@"绚多SW7";
info.image=[UIImage imageNamed:@"SW7"];
}
else if (button.tag==4) {
info.title=@"绚多SW10";
info.image=[UIImage imageNamed:@"SW10"];
}
else if (button.tag==5) {
info.title=@"绚多CW2";
info.image=[UIImage imageNamed:@"CW2"];
}
else if (button.tag==6) {
info.title=@"绚多SW1/SW6/W6";
info.image=[UIImage imageNamed:@"sw1"];
}
else if (button.tag==7) {
info.title=@"睿芯HX-WY01";
info.image=[UIImage imageNamed:@"HX-WY01"];
}
[self.navigationController pushViewController:info animated:YES];
}
-(void)service:(UIButton*)button
{
@@ -25,7 +25,7 @@
// CFShow((__bridge CFTypeRef)(infoDic));
NSString *app_Version=[infoDic objectForKey:@"CFBundleShortVersionString"];
NSLog(@"app_Version%@",app_Version);
app_Version=@"4.7.7";
app_Version=@"4.7.8";
NSString *versionStr = [NSString stringWithFormat:@"v%@",app_Version];
NSString *buildVersion = [infoDic objectForKey:@"CFBundleVersion"];
if (buildVersion.length > 0) {
@@ -27,8 +27,11 @@
[self addTitleViewWithTitle:@"更换手机号"];
//self.title = @"更换手机号";
UserModel*model=[[DataCenter defaultDtacenter]valueForKey:@"UserLogIn"];
NSMutableString*string=[[NSMutableString alloc]initWithString:model.phoneNumber];
[string replaceCharactersInRange:NSMakeRange(3, 4) withString:@"***"];
NSMutableString*string=[[NSMutableString alloc]initWithString:[CommonUtils getNotNilStr:model.phoneNumber]];
if (string.length>7) {
[string replaceCharactersInRange:NSMakeRange(3, 4) withString:@"***"];
}
self.yuanTelPhone.text=string;
[self.timerbutton addTarget:self action:@selector(startTime) forControlEvents:UIControlEventTouchUpInside];
[self textStyle];