联系我们修改

This commit is contained in:
kai60
2020-06-20 21:35:31 +08:00
parent 1ba176bf37
commit 2cc38e21dc
9 changed files with 290 additions and 21 deletions
@@ -7,10 +7,11 @@
//
#import "IfishConnectUsViewController.h"
#import "InfoByImageViewController.h"
@interface IfishConnectUsViewController ()
@interface IfishConnectUsViewController ()<UITextViewDelegate>
Strong UIImageView *codeImage;//二维码
Strong UIButton *telBtn;
Strong UITextView *textView;
@end
@implementation IfishConnectUsViewController
@@ -18,34 +19,110 @@ Strong UIButton *telBtn;
- (void)viewDidLoad {
[super viewDidLoad];
self.titleString = @"联系我们";
self.view.backgroundColor=[UIColor whiteColor];
[self.view addSubview:self.codeImage];
[self.view addSubview:self.telBtn];
[self.view addSubview:self.textView];
[self.codeImage mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(kSizeFrom750(128));
make.width.mas_equalTo(kSizeFrom750(578));
make.height.mas_equalTo(kSizeFrom750(770));
make.bottom.mas_equalTo(self.view.mas_bottom).offset(-34);
make.width.mas_equalTo(kSizeFrom750(300.5));
make.height.mas_equalTo(kSizeFrom750(400));
make.centerX.mas_equalTo(self.view);
}];
[self.telBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.centerX.mas_equalTo(self.codeImage);
make.top.mas_equalTo(self.codeImage.mas_bottom).offset(kSizeFrom750(70));
make.height.mas_equalTo(kSizeFrom750(70));
[self.textView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.view.mas_left).offset(10);
make.right.mas_equalTo(self.view.mas_right).offset(-10);
make.top.mas_equalTo(self.view.mas_top).offset(0);
make.bottom.mas_equalTo(self.codeImage.mas_top);
}];
// Do any additional setup after loading the view.
}
-(UIButton *)telBtn{
if (!_telBtn) {
_telBtn = InitObject(UIButton);
_telBtn.titleLabel.font = SYSTEMSIZE(34);
[_telBtn setTitle:@"服务热线:18667812003" forState:UIControlStateNormal];
[_telBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[_telBtn addTarget:self action:@selector(telBtnClick:) forControlEvents:UIControlEventTouchUpInside];
-(UITextView *)textView{
if (!_textView) {
_textView = InitObject(UITextView);
[self protocolIsSelect:YES];
}
return _telBtn;
return _textView;
}
- (void)protocolIsSelect:(BOOL)select {
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:@"1、设备绑定不上?查看遥控器或显示屏控制插排是否正常?\na、若不正常考虑设备问题,可与购买方或厂家联系。\nb、若正常先查看手机连接路由器是否为2.4g频率wifi。若连接时提示去更改网络,则此时手机连接一定为5g网络,需更换2.4g网络重新绑定。\n2、换路由器后网络为2.4g频率WIFI,还是无法绑定?\na、若老路由器连接没问题,先用老路由器把设备绑定在线,联系爱鱼奇客服升级。\nb、两台手机开热点方法(暂时不用路由器)先把设备绑定上,设备在线后与爱鱼奇客服联系升级。手机开热点如何连接点击这里。\nc、手机开热点也连接不上,可与购买方或厂家联系。\n3、感谢您使用爱鱼奇app,连接智能设备请查看下方说明书,内含操作视频:http://u.eqxiu.com/s/KmmVl87l,插排及热流器售后服务热线点击这里。\n4、摄像头售后及爱鱼奇服务微信:18667812003"];
[attributedString addAttribute:NSLinkAttributeName
value:@"apmode://"
range:[[attributedString string] rangeOfString:@"手机开热点如何连接点击这里。"]];
[attributedString addAttribute:NSLinkAttributeName
value:@"http://u.eqxiu.com/s/KmmVl87l"
range:[[attributedString string] rangeOfString:@"http://u.eqxiu.com/s/KmmVl87l"]];
[attributedString addAttribute:NSLinkAttributeName
value:@"hotbar://"
range:[[attributedString string] rangeOfString:@"插排及热流器售后服务热线点击这里。"]];
[attributedString addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:18] range:NSMakeRange(0, attributedString.length)];
[attributedString addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:18] range:[[attributedString string] rangeOfString:@"http://u.eqxiu.com/s/KmmVl87l"]];
[attributedString addAttribute:NSLinkAttributeName value:@"tel://18667812003" range:[[attributedString string] rangeOfString:@"18667812003"]];
_textView.attributedText = attributedString;
_textView.linkTextAttributes = @{NSForegroundColorAttributeName: [UIColor blueColor],
NSUnderlineColorAttributeName: [UIColor lightGrayColor],
NSUnderlineStyleAttributeName: @(NSUnderlinePatternSolid)};
_textView.delegate=self;
_textView.editable=NO;
_textView.scrollEnabled = NO;
}
- (BOOL)textView:(UITextView *)textView shouldInteractWithURL:(NSURL *)URL inRange:(NSRange)characterRange {
self.hidesBottomBarWhenPushed=YES;
if ([[URL scheme] isEqualToString:@"apmode"]) {
InfoByImageViewController*info=[[InfoByImageViewController alloc]init];
info.title=@"热点连接方法";
info.image=[UIImage imageNamed:@"apmodeInfo"];
[self.navigationController pushViewController:info animated:YES];
return NO;
} else if ([[URL scheme] isEqualToString:@"hotbar"]) {
InfoByImageViewController*info=[[InfoByImageViewController alloc]init];
info.title=@"售后服务热线";
info.type=@"service";
info.image=[UIImage imageNamed:@"hotbarInfo"];
[self.navigationController pushViewController:info animated:YES];
return NO;
}
return YES;
}
-(UIImageView *)codeImage
{
if (!_codeImage) {