宠物笼绑定界面修改,不同类型弹框

This commit is contained in:
kai60
2020-07-07 17:26:22 +08:00
parent 80e310693f
commit f9b3f4074f
5 changed files with 52 additions and 28 deletions
@@ -320,7 +320,7 @@ Copy NSString *deviceId;
mask.alpha=0.5;
_mask=mask;
UITapGestureRecognizer*tap=[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(dismissStore)];
[mask addGestureRecognizer:tap];
//[mask addGestureRecognizer:tap];
}
return _mask;
@@ -330,6 +330,7 @@ Copy NSString *deviceId;
[self.storeNameView removeFromSuperview];
[self.mask removeFromSuperview];
[self.progressView endProgressWithString:@"绑定已经取消..."];
[self.navigationController popViewControllerAnimated:YES];
}
-(void)showStoreNameView
{
@@ -349,9 +350,10 @@ Copy NSString *deviceId;
};
store.sureBlock=^(NSString*name)
{
if (!name)
if (!name.length)
{
name=@"宠物店";
[weakSelf.view makeToast:@"请设置或者选择名称!"];
return ;
}
[weakSelf.mask removeFromSuperview];
[weakSelf.storeNameView removeFromSuperview];
@@ -430,6 +432,18 @@ Copy NSString *deviceId;
[self appendTrakContent:@"绑定返回状态码错误。设备信息为:%@"];
self.HUD.labelText = @"绑定失败";
self.bakbutton.userInteractionEnabled=YES;
NSString*msg= resultDic[@"data"];
if ([msg isKindOfClass:[NSString class]]&&msg.length&&![msg isEqualToString:@"null"])
{
}
else
{
msg=@"绑定失败";
}
[self.view makeToast:msg];
}else if ([resultDic[@"result"] isEqualToString:@"301"]){
[self appendTrakContent:@"绑定返回状态码错误。设备信息为:%@"];