提示和跳转;
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#import "IFishHotpotUDPHelper.h"
|
||||
#import "ESPTouchResult.h"
|
||||
#import "ESPTouchTask.h"
|
||||
#import "IfishDataUnity.h"
|
||||
|
||||
@interface ConnectHotpotViewController ()<UITextFieldDelegate, IFishHotpotUDPHelperDelegate>
|
||||
@property (weak, nonatomic) IBOutlet UIScrollView *scrollView;
|
||||
@@ -244,6 +245,7 @@
|
||||
-(void)bindDeviceWithSsid:(NSString*)bssid{
|
||||
NSLog(@"设备bssid_%@",bssid);
|
||||
NSString *userId = [dataContorl dataControlGetUserIdInfo];
|
||||
[self.view makeToast:[NSString stringWithFormat:@"正在绑定设备,bssid:%@", bssid]];
|
||||
[AFHttpTool bindDeviceWithUserId:userId macAddress:bssid success:^(id response) {
|
||||
NSDictionary*resultDic=[NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers error:nil];
|
||||
NSLog(@"data:%@",resultDic[@"data"]);
|
||||
@@ -270,6 +272,9 @@
|
||||
[self showTitle:@"" messsage:@"设备不在服务器"];
|
||||
|
||||
}else{
|
||||
[self.view makeToast:@"设备绑定成功"];
|
||||
[[IfishDataUnity shareDataInstance] initAppCenterVcWith:devicemodel addWithdissMisVc:nil];
|
||||
|
||||
//绑定成功 加 经验值
|
||||
[[IfishUserObsever sharedInstance] xinZengJingYanZhi:IFISHADDEXP_BIDDEVICE addType:IFISHADDEXPTYPE1];
|
||||
}
|
||||
@@ -287,6 +292,7 @@
|
||||
}else if ([resultDic[@"result"] isEqualToString:@"302"]){
|
||||
// 请求被舍弃未执行
|
||||
self.bakbutton.userInteractionEnabled=YES;
|
||||
[self.view makeToast:@"绑定失败"];
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user