Commit 9cf04e23 authored by lmj_521aiau@163.com's avatar lmj_521aiau@163.com

Merge branch 'lmj_branch'

parents 92f65529 5f0aa8e4
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="0.84705882352941175" colorSpace="calibratedRGB"/> <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="0.84705882352941175" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Qr2-CO-OPH"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Qr2-CO-OPH">
<rect key="frame" x="78.5" y="52" width="28.5" height="13.5"/> <rect key="frame" x="78.5" y="52" width="245" height="13.5"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/> <fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="0.84999999999999998" colorSpace="calibratedRGB"/> <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="0.84999999999999998" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
...@@ -58,11 +58,6 @@ ...@@ -58,11 +58,6 @@
<constraints> <constraints>
<constraint firstAttribute="height" constant="0.5" id="4F4-Qx-peC"/> <constraint firstAttribute="height" constant="0.5" id="4F4-Qx-peC"/>
</constraints> </constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="massBackgroundColor">
<color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view> </view>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gXT-DX-0tB"> <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gXT-DX-0tB">
<rect key="frame" x="0.0" y="91.5" width="327" height="0.5"/> <rect key="frame" x="0.0" y="91.5" width="327" height="0.5"/>
...@@ -70,11 +65,6 @@ ...@@ -70,11 +65,6 @@
<constraints> <constraints>
<constraint firstAttribute="height" constant="0.5" id="eYN-wY-6mm"/> <constraint firstAttribute="height" constant="0.5" id="eYN-wY-6mm"/>
</constraints> </constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="massBackgroundColor">
<color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view> </view>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ueJ-Hi-iHu"> <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ueJ-Hi-iHu">
<rect key="frame" x="0.0" y="0.0" width="0.5" height="92"/> <rect key="frame" x="0.0" y="0.0" width="0.5" height="92"/>
...@@ -82,11 +72,6 @@ ...@@ -82,11 +72,6 @@
<constraints> <constraints>
<constraint firstAttribute="width" constant="0.5" id="2HY-KF-4Uk"/> <constraint firstAttribute="width" constant="0.5" id="2HY-KF-4Uk"/>
</constraints> </constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="massBackgroundColor">
<color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view> </view>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cNF-xd-ZI3"> <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cNF-xd-ZI3">
<rect key="frame" x="326.5" y="0.0" width="0.5" height="92"/> <rect key="frame" x="326.5" y="0.0" width="0.5" height="92"/>
...@@ -94,11 +79,6 @@ ...@@ -94,11 +79,6 @@
<constraints> <constraints>
<constraint firstAttribute="width" constant="0.5" id="dMT-k5-LvS"/> <constraint firstAttribute="width" constant="0.5" id="dMT-k5-LvS"/>
</constraints> </constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="massBackgroundColor">
<color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view> </view>
</subviews> </subviews>
<constraints> <constraints>
...@@ -109,6 +89,7 @@ ...@@ -109,6 +89,7 @@
<constraint firstItem="q6x-Wi-XlX" firstAttribute="centerY" secondItem="qF0-JD-PDf" secondAttribute="centerY" id="Bfh-9b-clB"/> <constraint firstItem="q6x-Wi-XlX" firstAttribute="centerY" secondItem="qF0-JD-PDf" secondAttribute="centerY" id="Bfh-9b-clB"/>
<constraint firstAttribute="bottom" secondItem="cNF-xd-ZI3" secondAttribute="bottom" id="GBq-tj-zlW"/> <constraint firstAttribute="bottom" secondItem="cNF-xd-ZI3" secondAttribute="bottom" id="GBq-tj-zlW"/>
<constraint firstAttribute="bottom" secondItem="gXT-DX-0tB" secondAttribute="bottom" id="Ghl-BA-NS0"/> <constraint firstAttribute="bottom" secondItem="gXT-DX-0tB" secondAttribute="bottom" id="Ghl-BA-NS0"/>
<constraint firstItem="cNF-xd-ZI3" firstAttribute="leading" secondItem="Qr2-CO-OPH" secondAttribute="trailing" constant="3" id="Hc6-bk-mo3"/>
<constraint firstItem="Qr2-CO-OPH" firstAttribute="top" secondItem="FUe-po-yXc" secondAttribute="bottom" constant="8" id="Jcq-qe-SD3"/> <constraint firstItem="Qr2-CO-OPH" firstAttribute="top" secondItem="FUe-po-yXc" secondAttribute="bottom" constant="8" id="Jcq-qe-SD3"/>
<constraint firstAttribute="trailing" secondItem="cNF-xd-ZI3" secondAttribute="trailing" id="Pyf-Ko-c7B"/> <constraint firstAttribute="trailing" secondItem="cNF-xd-ZI3" secondAttribute="trailing" id="Pyf-Ko-c7B"/>
<constraint firstItem="Qr2-CO-OPH" firstAttribute="leading" secondItem="FUe-po-yXc" secondAttribute="leading" id="QYI-r0-Jks"/> <constraint firstItem="Qr2-CO-OPH" firstAttribute="leading" secondItem="FUe-po-yXc" secondAttribute="leading" id="QYI-r0-Jks"/>
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
UITapGestureRecognizer *yearTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(selectedYearAction)]; UITapGestureRecognizer *yearTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(selectedYearAction)];
[self.yearContentView addGestureRecognizer: yearTap]; [self.yearContentView addGestureRecognizer: yearTap];
self.weakPriceLabel.text = @"3天免费试用,之后";
self.products = [NSMutableArray array]; self.products = [NSMutableArray array];
[self getIpaList]; [self getIpaList];
...@@ -69,10 +70,8 @@ ...@@ -69,10 +70,8 @@
[weakSelf.products addObject:model]; [weakSelf.products addObject:model];
if ([model.productId containsString:@"week"]) { if ([model.productId containsString:@"week"]) {
weakSelf.weakPeriodOfUseLabel.text = model.name; weakSelf.weakPeriodOfUseLabel.text = model.name;
weakSelf.weakPriceLabel.text = model.payDesc;
} else if ([model.productId containsString:@"year"]) { } else if ([model.productId containsString:@"year"]) {
weakSelf.yearPeriodOfUseLabel.text = model.name; weakSelf.yearPeriodOfUseLabel.text = model.name;
weakSelf.yearPriceLabel.text = [NSString stringWithFormat:@"%@ (%@)", model.payDesc, model.greyBgStr];
} }
} }
} }
......
...@@ -51,10 +51,16 @@ static ICUserManager * manager; ...@@ -51,10 +51,16 @@ static ICUserManager * manager;
} }
- (BOOL)isMember { - (BOOL)isMember {
NSString *dateString = [[NSUserDefaults standardUserDefaults] valueForKeyPath:@"expiryDate"]; NSString *dateString = [[NSUserDefaults standardUserDefaults] valueForKeyPath:@"expiryDate"];
if (dateString.length <= 0) { if (dateString.length <= 0) {
#ifdef DEBUG
return false;
#else
return self.model.isMember; return self.model.isMember;
#endif
} }
NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
formatter.dateFormat = @"yyyy-MM-dd HH:mm"; formatter.dateFormat = @"yyyy-MM-dd HH:mm";
NSDate *expiryDate = [formatter dateFromString:dateString]; NSDate *expiryDate = [formatter dateFromString:dateString];
...@@ -66,7 +72,6 @@ static ICUserManager * manager; ...@@ -66,7 +72,6 @@ static ICUserManager * manager;
// else if ([expiryDate timeIntervalSinceDate:[NSDate date]] <= 0) { // else if ([expiryDate timeIntervalSinceDate:[NSDate date]] <= 0) {
// return false; // return false;
// } // }
return self.model.isMember; return self.model.isMember;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment