杀菌倒计时,恒温温度设定修改

This commit is contained in:
kai60 2020-05-16 14:51:19 +08:00
parent b11f6aaced
commit 9b266aea7b
13 changed files with 125 additions and 64 deletions

View File

@ -15697,8 +15697,8 @@
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 4; CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = WFX8GD5HFX;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
ENABLE_TESTABILITY = YES; ENABLE_TESTABILITY = YES;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
@ -15812,11 +15812,11 @@
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "compiler-default"; CLANG_CXX_LIBRARY = "compiler-default";
CODE_SIGN_ENTITLEMENTS = Ifish/Ifish.entitlements; CODE_SIGN_ENTITLEMENTS = Ifish/Ifish.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 4; CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = WFX8GD5HFX;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
ENABLE_TESTABILITY = YES; ENABLE_TESTABILITY = YES;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
@ -15901,7 +15901,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.shyuying.Ifish8; PRODUCT_BUNDLE_IDENTIFIER = com.shyuying.Ifish8;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = ""; PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = fishdis11;
TARGETED_DEVICE_FAMILY = 1; TARGETED_DEVICE_FAMILY = 1;
USER_HEADER_SEARCH_PATHS = ""; USER_HEADER_SEARCH_PATHS = "";
VERSIONING_SYSTEM = "apple-generic"; VERSIONING_SYSTEM = "apple-generic";

View File

@ -70,7 +70,7 @@
</dict> </dict>
</array> </array>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>4</string> <string>$(CURRENT_PROJECT_VERSION)</string>
<key>ITSAppUsesNonExemptEncryption</key> <key>ITSAppUsesNonExemptEncryption</key>
<false/> <false/>
<key>LSApplicationCategoryType</key> <key>LSApplicationCategoryType</key>
@ -405,6 +405,8 @@
<string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string> <string>UIInterfaceOrientationLandscapeRight</string>
</array> </array>
<key>UIUserInterfaceStyle</key>
<string>Light</string>
<key>UIViewControllerBasedStatusBarAppearance</key> <key>UIViewControllerBasedStatusBarAppearance</key>
<false/> <false/>
</dict> </dict>

View File

@ -117,7 +117,7 @@ methodType url : (NSString *)url
+(void)deviceBindCameraWith:(NSString *)cameraId +(void)deviceBindCameraWith:(NSString *)cameraId
userId:(NSNumber *)userId userId:(NSNumber *)userId
deviceId:(NSString *)deviceId deviceId:(DeviceModel *)device
success:(void (^)(id response))success success:(void (^)(id response))success
failure:(void (^)(NSError* err))failure; failure:(void (^)(NSError* err))failure;

View File

@ -9,6 +9,7 @@
#import "AFNOHeaderHttpTool.h" #import "AFNOHeaderHttpTool.h"
#import "AFNetworking.h" #import "AFNetworking.h"
#import "SVProgressHUD.h" #import "SVProgressHUD.h"
#import "IfishDeviceInfo.h"
#define ContentType @"text/html" #define ContentType @"text/html"
@implementation AFNOHeaderHttpTool @implementation AFNOHeaderHttpTool
- (instancetype)init - (instancetype)init
@ -258,15 +259,20 @@ methodType url : (NSString *)url
+(void)deviceBindCameraWith:(NSString *)cameraId +(void)deviceBindCameraWith:(NSString *)cameraId
userId:(NSNumber *)userId userId:(NSNumber *)userId
deviceId:(NSString *)deviceId deviceId:(DeviceModel *)device
success:(void (^)(id response))success success:(void (^)(id response))success
failure:(void (^)(NSError* err))failure failure:(void (^)(NSError* err))failure
{ {
NSDictionary*para=@{ NSDictionary*para=@{
@"cameraId":cameraId, @"cameraId":cameraId,
@"deviceId":deviceId, @"deviceId":device.deviceId,
@"userId": userId @"userId": userId
}; };
NSMutableDictionary*paradic=[[NSMutableDictionary alloc]initWithDictionary:para];
if ([device.type isEqualToString:DECICE_TYPE_XUANDUO3F])
{
paradic[@"type"]=@"1";
}
[AFNOHeaderHttpTool requestWihtMethod:RequestTypePost url:IfishdeviceBindCamera params:para success:success failure:failure]; [AFNOHeaderHttpTool requestWihtMethod:RequestTypePost url:IfishdeviceBindCamera params:para success:success failure:failure];
} }

View File

@ -128,6 +128,17 @@
// //
Xuanduo3fModel*backModel=model; Xuanduo3fModel*backModel=model;
NSString *stateString1 = [backModel.uvLamp substringWithRange:NSMakeRange(2, 2)]; NSString *stateString1 = [backModel.uvLamp substringWithRange:NSMakeRange(2, 2)];
UInt64 mac1=[dataContorl hexToTen:backModel.vuPHstatus];
//float TPlabel=mac/10+(mac%10)*0.1;
NSString *lasttime = [NSString stringWithFormat:@"%lld",mac1];
UIImage*uvNomal=[UIImage imageNamed:@"杀菌关"];
uvNomal=[uvNomal imageWaterMarkWithString:lasttime rect:CGRectMake(140, 60, 60, 60) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:25]}];
[light1Btn setImage:uvNomal forState:UIControlStateNormal];
UIImage*uvsel=[UIImage imageNamed:@"杀菌开"];
uvsel=[uvsel imageWaterMarkWithString:lasttime rect:CGRectMake(140, 60, 60, 60) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:25]}];
[light1Btn setImage:uvsel forState:UIControlStateSelected];
if ([stateString1 isEqualToString:@"01"]) { if ([stateString1 isEqualToString:@"01"]) {
light1Btn.selected = YES; light1Btn.selected = YES;
}else{ }else{
@ -148,7 +159,19 @@
waterLightBtn.selected = NO; waterLightBtn.selected = NO;
} }
// //
UInt64 mac=[dataContorl hexToTen:backModel.heatingTemperature];
//float TPlabel=mac/10+(mac%10)*0.1;
float temp = mac/10.0;
NSString *stringTemp = [NSString stringWithFormat:@"%.1f℃",temp];
UIImage*imageTempNomal=[UIImage imageNamed:@"恒温关"];
imageTempNomal=[imageTempNomal imageWaterMarkWithString:stringTemp rect:CGRectMake(130, 60, 80, 80) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:25]}];
[light2Btn setImage:imageTempNomal forState:UIControlStateNormal];
UIImage*imageTempsel=[UIImage imageNamed:@"恒温开"];
imageTempsel=[imageTempsel imageWaterMarkWithString:stringTemp rect:CGRectMake(130, 60, 80, 80) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:25]}];
[light2Btn setImage:imageTempsel forState:UIControlStateSelected];
NSString *stateString4 = [backModel.constTmep substringWithRange:NSMakeRange(2, 2)]; NSString *stateString4 = [backModel.constTmep substringWithRange:NSMakeRange(2, 2)];
if ([stateString4 isEqualToString:@"01"]) { if ([stateString4 isEqualToString:@"01"]) {
light2Btn.selected = YES; light2Btn.selected = YES;
@ -156,18 +179,6 @@
light2Btn.selected = NO; light2Btn.selected = NO;
} }
UInt64 mac=[dataContorl hexToTen:backModel.heatingTemperature];
//float TPlabel=mac/10+(mac%10)*0.1;
float temp = mac/10.0;
NSString *stringTemp = [NSString stringWithFormat:@"%.1f℃",temp];
UIImage*imageTempNomal=[UIImage imageNamed:@"恒温关"];
imageTempNomal=[imageTempNomal imageWaterMarkWithString:stringTemp rect:CGRectMake(130, 60, 60, 60) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:30]}];
[light2Btn setImage:imageTempNomal forState:UIControlStateNormal];
UIImage*imageTempsel=[UIImage imageNamed:@"恒温开"];
imageTempsel=[imageTempNomal imageWaterMarkWithString:stringTemp rect:CGRectMake(130, 60, 60, 60) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:30]}];
[light2Btn setImage:imageTempsel forState:UIControlStateSelected];

View File

@ -1273,7 +1273,7 @@ static NSString *setTimerflag = @"SetTimerCell";
baseModel*tempModel=[[baseModel alloc]init]; baseModel*tempModel=[[baseModel alloc]init];
tempModel.sendmacId =self.currentdevice.macAddress; tempModel.sendmacId =self.currentdevice.macAddress;
tempModel.resavemacId =self.currentdevice.macAddress; tempModel.resavemacId =self.currentdevice.macAddress;
tempModel.functionCode=@"14"; tempModel.functionCode=@"0e";
tempModel.massagelegth=@"13"; tempModel.massagelegth=@"13";

View File

@ -276,18 +276,18 @@
[Xuanduo2DataUtility readCycleSocketDataWithBackMsgModel:_cycleModel addWithBackStr:string1 type:self.currentDevice.type]; [Xuanduo2DataUtility readCycleSocketDataWithBackMsgModel:_cycleModel addWithBackStr:string1 type:self.currentDevice.type];
if (_cycleModel.lastTime.length) if (_cycleModel.lastTime.length)
{ {
UInt64 mac1=[dataContorl hexToTen:_cycleModel.lastTime]; // UInt64 mac1=[dataContorl hexToTen:_cycleModel.lastTime];
//
//float TPlabel=mac/10+(mac%10)*0.1; // //float TPlabel=mac/10+(mac%10)*0.1;
float temp1 = mac1; // float temp1 = mac1;
NSString *stringTemp = [NSString stringWithFormat:@"%f℃",temp1]; // NSString *stringTemp = [NSString stringWithFormat:@"%f℃",temp1];
UIImage*uvNomal=[UIImage imageNamed:@"杀菌关"]; // UIImage*uvNomal=[UIImage imageNamed:@"杀菌关"];
uvNomal=[uvNomal imageWaterMarkWithString:stringTemp rect:CGRectMake(140, 60, 60, 60) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:30]}]; // uvNomal=[uvNomal imageWaterMarkWithString:stringTemp rect:CGRectMake(140, 60, 60, 60) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:30]}];
[self.light1 setImage:uvNomal forState:UIControlStateNormal]; // [self.light1 setImage:uvNomal forState:UIControlStateNormal];
//
UIImage*uvsel=[UIImage imageNamed:@"杀菌开"]; // UIImage*uvsel=[UIImage imageNamed:@"杀菌开"];
uvsel=[uvsel imageWaterMarkWithString:stringTemp rect:CGRectMake(140, 60, 60, 60) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:30]}]; // uvsel=[uvsel imageWaterMarkWithString:stringTemp rect:CGRectMake(140, 60, 60, 60) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:30]}];
[self.light1 setImage:uvsel forState:UIControlStateSelected]; // [self.light1 setImage:uvsel forState:UIControlStateSelected];
} }
} }
else else
@ -875,8 +875,15 @@
[para setValue:priId forKey:@"priId.deviceId"]; [para setValue:priId forKey:@"priId.deviceId"];
[para setValue:userId forKey:@"priId.userId"]; [para setValue:userId forKey:@"priId.userId"];
NSString*string=[NSString stringWithFormat:@"%@/api/user/deleteDeviceUser.do",JIEKOUPORT];
if ([self.currentDevice.type isEqualToString:DECICE_TYPE_XUANDUO3F]) {
string=[NSString stringWithFormat:@"%@/api/user/deletePetDeviceUser.do",JIEKOUPORT];
[para removeAllObjects];
para[@"userId"]=userId;
para[@"deviceId"]=priId;
}
// __weak typeof (self)weakSelf=self; // __weak typeof (self)weakSelf=self;
[mannager POST:kDeleteDeviceUser parameters:para success:^(AFHTTPRequestOperation *operation, id responseObject) { [mannager POST:string parameters:para success:^(AFHTTPRequestOperation *operation, id responseObject) {
if (responseObject) { if (responseObject) {
NSDictionary*resultDic=[NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableContainers error:nil]; NSDictionary*resultDic=[NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableContainers error:nil];
NSLog(@"result:%@",resultDic[@"result"]); NSLog(@"result:%@",resultDic[@"result"]);

View File

@ -386,10 +386,15 @@ Assign BOOL isPush;
for (NSDictionary*deviceDic in deviceArray) { for (NSDictionary*deviceDic in deviceArray) {
DeviceModel*devicemodel=[[DeviceModel alloc] initWithDict:deviceDic]; DeviceModel*devicemodel=[[DeviceModel alloc] initWithDict:deviceDic];
if (devicemodel.storeName.length)//
if ([devicemodel.type isEqualToString:DECICE_TYPE_XUANDUO3F])//
{ {
NSString*storeName=devicemodel.storeName; NSString*storeName=devicemodel.storeName;
if ([storeName isKindOfClass:[NSNull class]]||([storeName isKindOfClass: [NSString class]]&&storeName.length==0)) {
storeName=@"宠物店";
}
NSMutableArray*array=petStores[storeName]; NSMutableArray*array=petStores[storeName];
if (!array) { if (!array) {
array=[NSMutableArray array]; array=[NSMutableArray array];
@ -851,7 +856,7 @@ Assign BOOL isPush;
for (DeviceModel *device in deivceArr) { for (DeviceModel *device in deivceArr) {
if (!device.storeName.length) if (![device.type isEqualToString:DECICE_TYPE_XUANDUO3F])
{ {
FormatTankAddCamera *deviceListModel =[[FormatTankAddCamera alloc] init]; FormatTankAddCamera *deviceListModel =[[FormatTankAddCamera alloc] init];
deviceListModel.device = device; deviceListModel.device = device;

View File

@ -392,15 +392,15 @@
self.device = arr[index]; self.device = arr[index];
[self bidDeviceAddCamerawithdeviceId:self.device.deviceId]; [self bidDeviceAddCamerawithdeviceId:self.device];
} }
-(void)bidDeviceAddCamerawithdeviceId:(NSString *)deviceId{ -(void)bidDeviceAddCamerawithdeviceId:(DeviceModel *)device{
NSString *usId =[dataContorl dataControlGetUserIdInfo]; NSString *usId =[dataContorl dataControlGetUserIdInfo];
NSNumber *userId =(NSNumber *)usId ; NSNumber *userId =(NSNumber *)usId ;
[AFNOHeaderHttpTool deviceBindCameraWith:self.cameraId userId:userId deviceId:deviceId success:^(id response) { [AFNOHeaderHttpTool deviceBindCameraWith:self.cameraId userId:userId deviceId:device.deviceId success:^(id response) {
NSDictionary *reDic=[NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers error:nil]; NSDictionary *reDic=[NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers error:nil];
@ -416,7 +416,7 @@
NSArray *devicCameraArr = [[DataCenter defaultDtacenter] valueForKey:@"devicamerArr"]; NSArray *devicCameraArr = [[DataCenter defaultDtacenter] valueForKey:@"devicamerArr"];
DeviceCameraModel *devicecamera=[[DeviceCameraModel alloc] init]; DeviceCameraModel *devicecamera=[[DeviceCameraModel alloc] init];
devicecamera.cameraId = self.cameraId; devicecamera.cameraId = self.cameraId;
devicecamera.deviceId = deviceId; devicecamera.deviceId = device.deviceId;
NSMutableArray *camerwIdArr = [[NSMutableArray alloc] initWithArray:devicCameraArr]; NSMutableArray *camerwIdArr = [[NSMutableArray alloc] initWithArray:devicCameraArr];
@ -445,7 +445,7 @@
for (DeviceModel *model in deviceArry) { for (DeviceModel *model in deviceArry) {
if ([model.deviceId isEqual:deviceId]) { if ([model.deviceId isEqual:device.deviceId]) {
[newArr removeObject:model]; [newArr removeObject:model];

View File

@ -15,6 +15,7 @@
@property (nonatomic,strong) DeviceModel *erdevicemodel; @property (nonatomic,strong) DeviceModel *erdevicemodel;
@property (nonatomic, strong) NSString *deviceid; @property (nonatomic, strong) NSString *deviceid;
@property (weak, nonatomic) IBOutlet UILabel *tips;
@end @end

View File

@ -10,6 +10,7 @@
#import "QRCodeGenerator.h" #import "QRCodeGenerator.h"
#import "DeviceModel.h" #import "DeviceModel.h"
#import "UINavigationBar+Background.h" #import "UINavigationBar+Background.h"
#import "IfishDeviceInfo.h"
@interface CreatErWeiMaController () @interface CreatErWeiMaController ()
@property(nonatomic,strong)NSArray*arry; @property(nonatomic,strong)NSArray*arry;
@end @end
@ -42,8 +43,25 @@
// } // }
//DeviceModel*model=[_arry objectAtIndex:0];// //DeviceModel*model=[_arry objectAtIndex:0];//
if ([self.erdevicemodel.deviceId isKindOfClass:[NSNumber class]]) {
self.erdevicemodel.deviceId=[NSString stringWithFormat:@"%ld",self.erdevicemodel.deviceId.integerValue];
}
NSString*str=[NSString stringWithFormat:@"deviceId=%@",self.erdevicemodel.deviceId.length?self.erdevicemodel.deviceId:[CommonUtils getNotNilStr:self.deviceid]]; NSString*str=[NSString stringWithFormat:@"deviceId=%@",self.erdevicemodel.deviceId.length?self.erdevicemodel.deviceId:[CommonUtils getNotNilStr:self.deviceid]];
self.erWeiMaView.image=[QRCodeGenerator qrImageForString:str imageSize:self.erWeiMaView.bounds.size.width]; self.erWeiMaView.image=[QRCodeGenerator qrImageForString:str imageSize:self.erWeiMaView.bounds.size.width];
if ([self.erdevicemodel.type isEqualToString:DECICE_TYPE_XUANDUO3F])
{
self.tips.text=@"点击扫一扫,和我一起控制我的宠物笼吧!";
}
else if (self.deviceid)
{
self.tips.text=@"点击扫一扫,和我一起控制我的摄像头吧!";
}
else if (self.deviceid)
{
self.tips.text=@"点击扫一扫,和我一起控制我的水族箱吧!";
}
} }
- (void)didReceiveMemoryWarning { - (void)didReceiveMemoryWarning {

View File

@ -1,48 +1,51 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10117" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="CreatErWeiMaController"> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="CreatErWeiMaController">
<connections> <connections>
<outlet property="erWeiMaView" destination="hze-My-ZuV" id="UYM-4u-hMR"/> <outlet property="erWeiMaView" destination="hze-My-ZuV" id="UYM-4u-hMR"/>
<outlet property="tips" destination="6uw-d3-3oM" id="o1N-wz-TYr"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections> </connections>
</placeholder> </placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT"> <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/> <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="hze-My-ZuV"> <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="hze-My-ZuV">
<rect key="frame" x="60" y="150" width="200" height="200"/> <rect key="frame" x="107" y="150" width="200" height="200"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="200" id="7N3-0U-BEk"/> <constraint firstAttribute="height" constant="200" id="7N3-0U-BEk"/>
<constraint firstAttribute="width" constant="200" id="AwJ-0M-W5D"/> <constraint firstAttribute="width" constant="200" id="AwJ-0M-W5D"/>
</constraints> </constraints>
</imageView> </imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="IfishQrcLabel.png" translatesAutoresizingMaskIntoConstraints="NO" id="T92-RX-kCw"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6uw-d3-3oM">
<rect key="frame" x="20" y="410" width="280" height="56"/> <rect key="frame" x="67" y="410" width="280" height="56"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="56" id="pom-vr-A4e"/> <constraint firstAttribute="width" constant="280" id="YnI-Yn-2eh"/>
<constraint firstAttribute="width" constant="280" id="wfz-SD-4rR"/> <constraint firstAttribute="height" constant="56" id="p9D-kE-9Rq"/>
</constraints> </constraints>
</imageView> <fontDescription key="fontDescription" type="italicSystem" pointSize="18"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews> </subviews>
<color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/> <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstItem="T92-RX-kCw" firstAttribute="top" secondItem="hze-My-ZuV" secondAttribute="bottom" constant="60" id="98I-uM-O6P"/> <constraint firstItem="6uw-d3-3oM" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="CLF-UB-CHZ"/>
<constraint firstItem="T92-RX-kCw" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="Ktd-gL-fpr"/>
<constraint firstItem="hze-My-ZuV" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="150" id="aCG-nC-4Dq"/> <constraint firstItem="hze-My-ZuV" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="150" id="aCG-nC-4Dq"/>
<constraint firstItem="6uw-d3-3oM" firstAttribute="top" secondItem="hze-My-ZuV" secondAttribute="bottom" constant="60" id="cZN-dp-8TY"/>
<constraint firstItem="hze-My-ZuV" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="dkc-Hj-wT7"/> <constraint firstItem="hze-My-ZuV" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="dkc-Hj-wT7"/>
</constraints> </constraints>
<point key="canvasLocation" x="388" y="293"/> <point key="canvasLocation" x="562.31884057971024" y="196.20535714285714"/>
</view> </view>
</objects> </objects>
<resources>
<image name="IfishQrcLabel.png" width="694" height="137"/>
</resources>
</document> </document>

View File

@ -297,7 +297,13 @@
-(void)shareDeviceWithUserId:(NSNumber*)userId addDeviceId:(NSString*)deviceId{ -(void)shareDeviceWithUserId:(NSNumber*)userId addDeviceId:(NSString*)deviceId{
NSString *userID =[NSString stringWithFormat:@"%@",userId]; NSString *userID =[NSString stringWithFormat:@"%@",userId];
[AFHttpTool shareDeviceWhth:userID deviceId:deviceId success:^(id response) {
NSString *url = [NSString stringWithFormat:@"%@%@",kshareDeviceByQrCode,userID];
NSDictionary*para=@{
@"deviceId":deviceId
};
[AFHttpTool requestWihtMethod:RequestMethodTypePost url:url params:para success:^(id response) {
NSDictionary*resultDic=[NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers error:nil]; NSDictionary*resultDic=[NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers error:nil];
NSLog(@"result:%@",resultDic[@"result"]); NSLog(@"result:%@",resultDic[@"result"]);
@ -317,6 +323,8 @@
}]; }];
} }
- (void)reStartScan - (void)reStartScan
{ {