|
@@ -60,7 +60,6 @@
|
|
|
if ([ERequest isSuccessWithResult:result]) {
|
|
|
weak_self.mUserModel.isOK = YES;
|
|
|
weak_self.mUserModel.token = result[KEY_DATA][@"token"];
|
|
|
- weak_self.mUserModel.isPay = [result[KEY_DATA][@"isPay"] boolValue];
|
|
|
callback(YES);
|
|
|
} else {
|
|
|
callback(NO);
|
|
@@ -199,8 +198,6 @@
|
|
|
|
|
|
self.mUserModel.mac = [TestDataManager getMacAddress];
|
|
|
|
|
|
- self.mUserModel.isPay = NO;
|
|
|
-
|
|
|
self.mUserModel.part = @"左手";
|
|
|
self.mUserModel.deviceName = DEVICE_MODEL;
|
|
|
#endif
|
|
@@ -223,30 +220,34 @@
|
|
|
}
|
|
|
|
|
|
- (BOOL)isLock {
|
|
|
- if (self.mPayInfoModel.isOK) {
|
|
|
- //有试用,说明未付款
|
|
|
- if (self.mPayInfoModel.isTryout)
|
|
|
- return YES;
|
|
|
- else {
|
|
|
- BOOL isOK1 = self.mPayInfoModel.isExpired;
|
|
|
- BOOL isOK2 = self.mPayInfoModel.count <= 0;
|
|
|
- return isOK1 && isOK2;
|
|
|
- }
|
|
|
- }
|
|
|
- return YES;
|
|
|
+ if (!self.mPayInfoModel.isOK)
|
|
|
+ return YES;
|
|
|
+
|
|
|
+ //有试用,说明未付款
|
|
|
+ if (self.mPayInfoModel.isTryout)
|
|
|
+ return YES;
|
|
|
+
|
|
|
+ BOOL isOK1 = self.mPayInfoModel.isExpired;
|
|
|
+ BOOL isOK2 = self.mPayInfoModel.count <= 0;
|
|
|
+ return isOK1 && isOK2;
|
|
|
}
|
|
|
|
|
|
- (NSString *)getMacAddress {
|
|
|
NSString* mac = self.mUserModel.mac;
|
|
|
- if (!mac || [mac isEqualToString:@""])
|
|
|
- mac = [TestDataManager getMacAddress];
|
|
|
+ if (!mac)
|
|
|
+ return @"";
|
|
|
return [mac stringByReplacingOccurrencesOfString:@":" withString:@""];
|
|
|
}
|
|
|
|
|
|
- (void)setMacAddress:(NSString*)mac {
|
|
|
- if (mac) {
|
|
|
- self.mUserModel.mac = mac;
|
|
|
- }
|
|
|
+ if (!mac || [mac isEqualToString:@""])
|
|
|
+ return;
|
|
|
+
|
|
|
+ if ([mac isEqualToString:self.mUserModel.mac])
|
|
|
+ return;
|
|
|
+
|
|
|
+ self.mUserModel.mac = mac;
|
|
|
+ self.mPayInfoModel.isOK = NO; //更新新mac,重新获取payinfo
|
|
|
}
|
|
|
|
|
|
- (void)reduceDetectionCount {
|