ソースを参照

金额显示修改

Steven 5 ヶ月 前
コミット
d7dad8cea5

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/Controller/FreezeListViewController.m

@@ -286,6 +286,7 @@
     if (!_sortArray) {
         _sortArray = [NSMutableArray array];
         [_sortArray addObject:@{@"name" : @"全部类型", @"bizType": @""}];
+        [_sortArray addObject:@{@"name" : @"VIP定制课", @"bizType": @"VIP"}];
         [_sortArray addObject:@{@"name" : @"趣纠课", @"bizType": @"PRACTICE"}];
         [_sortArray addObject:@{@"name" : @"直播课", @"bizType": @"LIVE"}];
         [_sortArray addObject:@{@"name" : @"视频课", @"bizType": @"VIDEO"}];

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/Controller/MyIncomeViewController.m

@@ -326,6 +326,7 @@
     if (!_sortArray) {
         _sortArray = [NSMutableArray array];
         [_sortArray addObject:@{@"name" : @"全部收入", @"bizType": @""}];
+        [_sortArray addObject:@{@"name" : @"VIP定制课", @"bizType": @"VIP"}];
         [_sortArray addObject:@{@"name" : @"趣纠课", @"bizType": @"PRACTICE"}];
         [_sortArray addObject:@{@"name" : @"直播课", @"bizType": @"LIVE"}];
         [_sortArray addObject:@{@"name" : @"视频课", @"bizType": @"VIDEO"}];

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/Controller/NoRecordViewController.m

@@ -285,6 +285,7 @@
     if (!_sortArray) {
         _sortArray = [NSMutableArray array];
         [_sortArray addObject:@{@"name" : @"全部类型", @"bizType": @""}];
+        [_sortArray addObject:@{@"name" : @"VIP定制课", @"bizType": @"VIP"}];
         [_sortArray addObject:@{@"name" : @"趣纠课", @"bizType": @"PRACTICE"}];
         [_sortArray addObject:@{@"name" : @"直播课", @"bizType": @"LIVE"}];
         [_sortArray addObject:@{@"name" : @"视频课", @"bizType": @"VIDEO"}];

+ 4 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/View/MyIncomeListCell.m

@@ -68,6 +68,10 @@
         NSString *createTime = [NSString returnNoNullStringWithString:[dateFormatter stringFromDate:createDate]];
         self.courseTime.text = createTime;
     }
+    else if ([sourceModel.bizType isEqualToString:@"VIP"]) { // VIP定制
+#warning 需要更换图片
+        [self.courseTypeImage setImage:[UIImage imageNamed:@"income_accompany"]];
+    }
     else if ([sourceModel.bizType isEqualToString:@"PRACTICE"]) { // 其他
         [self.courseTypeImage setImage:[UIImage imageNamed:@"income_accompany"]];
     }

+ 4 - 5
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageLiveCourse/MineLiveCourseGroupCell.m

@@ -17,6 +17,7 @@
 
 @property (weak, nonatomic) IBOutlet UILabel *orderUser;
 @property (weak, nonatomic) IBOutlet UILabel *courseTime;
+@property (weak, nonatomic) IBOutlet UILabel *tagLabel;
 
 @property (weak, nonatomic) IBOutlet UILabel *priceLabel;
 @property (weak, nonatomic) IBOutlet UILabel *courseCount;
@@ -51,14 +52,12 @@
     
     if (model.coursePrice > 0) {
         NSString *mountMsg = [NSString formatDoubleNum:model.coursePrice];
-        NSString *descMsg = [NSString stringWithFormat:@"¥%@",mountMsg];
-        
-        NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:descMsg attributes:@{NSFontAttributeName:[UIFont fontWithName:@"DIN Alternate Bold" size:14.0f],NSForegroundColorAttributeName:HexRGB(0xF44541)}];
-        [attr addAttributes:@{NSFontAttributeName:[UIFont fontWithName:@"DIN Alternate Bold" size:18.0f]} range:[descMsg rangeOfString:mountMsg]];
-        self.priceLabel.attributedText = attr;
+        self.priceLabel.text = mountMsg;
+        self.tagLabel.hidden = NO;
     }
     else {
         self.priceLabel.text = [NSString  stringWithFormat:@"免费"];
+        self.tagLabel.hidden = YES;
     }
     
     self.courseCount.text = [NSString stringWithFormat:@"/%.0f课时",model.courseNum];

+ 15 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageLiveCourse/MineLiveCourseGroupCell.xib

@@ -138,8 +138,8 @@
                                     </userDefinedRuntimeAttribute>
                                 </userDefinedRuntimeAttributes>
                             </view>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="120" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6cN-Qs-aEM">
-                                <rect key="frame" x="173.66666666666666" y="258" width="49" height="24"/>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="120" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6cN-Qs-aEM">
+                                <rect key="frame" x="193.66666666666666" y="258" width="29" height="24"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="24" id="dVD-1n-VbO"/>
                                 </constraints>
@@ -153,6 +153,15 @@
                                 <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gvo-Hj-3h0">
+                                <rect key="frame" x="184.66666666666666" y="264" width="7" height="16"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="16" id="y8t-9d-Ykz"/>
+                                </constraints>
+                                <fontDescription key="fontDescription" name="DINAlternate-Bold" family="DIN Alternate" pointSize="14"/>
+                                <color key="textColor" red="0.95686274509803915" green="0.27058823529411763" blue="0.25490196078431371" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
                         </subviews>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                         <constraints>
@@ -165,6 +174,9 @@
                             <constraint firstItem="Vjg-7W-RnJ" firstAttribute="leading" secondItem="6cN-Qs-aEM" secondAttribute="trailing" constant="8" id="9ak-Kw-gjF"/>
                             <constraint firstItem="L2D-Md-biT" firstAttribute="top" relation="greaterThanOrEqual" secondItem="fVi-EI-HNi" secondAttribute="bottom" constant="8" id="CMG-Mi-kxN"/>
                             <constraint firstItem="0Gb-VJ-opm" firstAttribute="centerY" secondItem="xdA-OV-wj5" secondAttribute="centerY" id="CR4-UW-XoV"/>
+                            <constraint firstItem="6cN-Qs-aEM" firstAttribute="leading" secondItem="gvo-Hj-3h0" secondAttribute="trailing" constant="2" id="CgL-pn-0nq"/>
+                            <constraint firstItem="6cN-Qs-aEM" firstAttribute="bottom" secondItem="gvo-Hj-3h0" secondAttribute="bottom" constant="2" id="D6A-RE-eXG"/>
+                            <constraint firstItem="6cN-Qs-aEM" firstAttribute="leading" secondItem="gvo-Hj-3h0" secondAttribute="trailing" constant="2" id="Fm5-Mt-bFE"/>
                             <constraint firstItem="xdA-OV-wj5" firstAttribute="top" secondItem="oRV-eY-dq7" secondAttribute="top" constant="15" id="Gzd-oJ-mYe"/>
                             <constraint firstAttribute="trailing" secondItem="Vjg-7W-RnJ" secondAttribute="trailing" constant="12" id="Nfj-7d-Hgh"/>
                             <constraint firstAttribute="bottom" secondItem="L2D-Md-biT" secondAttribute="bottom" constant="14" id="O7X-Nf-Xek"/>
@@ -211,6 +223,7 @@
                 <outlet property="statusLabel" destination="o0s-oa-65j" id="cXG-m7-vo5"/>
                 <outlet property="statusView" destination="yTY-zb-NMC" id="ghW-PV-chX"/>
                 <outlet property="subjectLabel" destination="jUo-GT-p8T" id="gPU-lT-YWZ"/>
+                <outlet property="tagLabel" destination="gvo-Hj-3h0" id="Qkw-o7-cAw"/>
                 <outlet property="teacherDesc" destination="fVi-EI-HNi" id="Abh-M5-AbX"/>
             </connections>
             <point key="canvasLocation" x="156.4885496183206" y="97.183098591549296"/>

+ 1 - 5
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/VipCourse/MinePageVipProgramCell.m

@@ -48,11 +48,7 @@
     self.priceLabel.text = [NSString stringWithFormat:@""];
     
     NSString *mountMsg = [NSString formatDoubleNum:model.subjectPrice];
-    NSString *descMsg = [NSString stringWithFormat:@"¥%@",mountMsg];
-    
-    NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:descMsg attributes:@{NSFontAttributeName:[UIFont fontWithName:@"DIN Alternate Bold" size:14.0f],NSForegroundColorAttributeName:HexRGB(0xF44541)}];
-    [attr addAttributes:@{NSFontAttributeName:[UIFont fontWithName:@"DIN Alternate Bold" size:18.0f]} range:[descMsg rangeOfString:mountMsg]];
-    self.priceLabel.attributedText = attr;
+    self.priceLabel.text = mountMsg;
     [self.subjectImage sd_setImageWithURL:[NSURL URLWithString:[model.subjectPic getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:@""]];
 }
 

+ 14 - 6
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/VipCourse/MinePageVipProgramCell.xib

@@ -67,17 +67,17 @@
                                     <action selector="deleteProgram:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="rwy-pb-wPy"/>
                                 </connections>
                             </button>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥ 100.00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nwI-CN-eRd">
-                                <rect key="frame" x="72" y="38" width="48" height="24"/>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="100.00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nwI-CN-eRd">
+                                <rect key="frame" x="81" y="38" width="50.333333333333343" height="24"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="24" id="sS5-HV-SNL"/>
                                 </constraints>
-                                <fontDescription key="fontDescription" name="DINAlternate-Bold" family="DIN Alternate" pointSize="14"/>
-                                <color key="textColor" red="1" green="0.40784313725490196" blue="0.15294117647058825" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <fontDescription key="fontDescription" name="DINAlternate-Bold" family="DIN Alternate" pointSize="19"/>
+                                <color key="textColor" red="0.95686274509803915" green="0.27058823529411763" blue="0.25490196078431371" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="/25分钟" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hwq-i8-T3E">
-                                <rect key="frame" x="120" y="38" width="51" height="24"/>
+                                <rect key="frame" x="131.33333333333334" y="38" width="51" height="24"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="24" id="jYu-SH-8zG"/>
                                 </constraints>
@@ -85,14 +85,21 @@
                                 <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="abM-Az-FQz">
+                                <rect key="frame" x="72" y="43" width="7" height="17"/>
+                                <fontDescription key="fontDescription" name="DINAlternate-Bold" family="DIN Alternate" pointSize="14"/>
+                                <color key="textColor" red="0.95686274509803915" green="0.27058823529411763" blue="0.25490196078431371" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
                         </subviews>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                         <constraints>
                             <constraint firstItem="xlA-Bv-gE1" firstAttribute="top" secondItem="nbw-m5-dtr" secondAttribute="top" id="4n8-7m-5gV"/>
                             <constraint firstAttribute="trailing" secondItem="iRv-tB-juu" secondAttribute="trailing" id="64j-Bm-e1o"/>
                             <constraint firstItem="hwq-i8-T3E" firstAttribute="leading" secondItem="nwI-CN-eRd" secondAttribute="trailing" id="6oz-3O-wAP"/>
+                            <constraint firstItem="abM-Az-FQz" firstAttribute="leading" secondItem="geC-8C-ZFK" secondAttribute="leading" id="BbW-d6-vRW"/>
                             <constraint firstItem="lj2-cE-uvp" firstAttribute="top" secondItem="nbw-m5-dtr" secondAttribute="top" constant="12" id="DvU-3B-NEZ"/>
-                            <constraint firstItem="nwI-CN-eRd" firstAttribute="leading" secondItem="lj2-cE-uvp" secondAttribute="trailing" constant="10" id="EUu-1k-sE0"/>
+                            <constraint firstItem="nwI-CN-eRd" firstAttribute="bottom" secondItem="abM-Az-FQz" secondAttribute="bottom" constant="2" id="NlW-B6-8eW"/>
                             <constraint firstAttribute="bottom" secondItem="lj2-cE-uvp" secondAttribute="bottom" constant="12" id="OXh-nV-zy6"/>
                             <constraint firstItem="geC-8C-ZFK" firstAttribute="leading" secondItem="lj2-cE-uvp" secondAttribute="trailing" constant="10" id="SxJ-Tu-OMm"/>
                             <constraint firstItem="geC-8C-ZFK" firstAttribute="top" secondItem="nbw-m5-dtr" secondAttribute="top" constant="12" id="T6V-JH-FqF"/>
@@ -101,6 +108,7 @@
                             <constraint firstItem="hwq-i8-T3E" firstAttribute="centerY" secondItem="nwI-CN-eRd" secondAttribute="centerY" id="ggm-sN-YM4"/>
                             <constraint firstItem="iRv-tB-juu" firstAttribute="top" secondItem="nbw-m5-dtr" secondAttribute="top" id="mV3-7W-afY"/>
                             <constraint firstItem="xlA-Bv-gE1" firstAttribute="leading" secondItem="geC-8C-ZFK" secondAttribute="trailing" constant="10" id="sRn-TK-wte"/>
+                            <constraint firstItem="nwI-CN-eRd" firstAttribute="leading" secondItem="abM-Az-FQz" secondAttribute="trailing" constant="2" id="xoy-4p-CAr"/>
                             <constraint firstItem="lj2-cE-uvp" firstAttribute="leading" secondItem="nbw-m5-dtr" secondAttribute="leading" constant="12" id="zGP-CC-Y1R"/>
                         </constraints>
                         <userDefinedRuntimeAttributes>