liuzhenxing1118 2 сар өмнө
parent
commit
af4d66cd10

+ 1 - 1
ChineseMedicine/ChineseMedicineSDK/Controller/HealthDatasDrankViewController.m

@@ -54,7 +54,7 @@
 //返回每个子视图的大小
 -(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
     if (indexPath.row == 0) {
-        NSInteger height = [SKUtils getLabelHeight:self.mReportDrankModel.drank.healthTipsContent withFont:[UIFont systemFontOfSize:12] withWidth:SCREEN_WIDTH-30*2 withSpace:0 withZspace:0];
+        NSInteger height = [SKUtils getLabelHeight:self.mReportDrankModel.drunkJudgment.healthTipsContent withFont:[UIFont systemFontOfSize:12] withWidth:SCREEN_WIDTH-30*2 withSpace:0 withZspace:0];
         height = 130 + height + 20;
         return CGSizeMake(SCREEN_WIDTH - 2*20, height);
     } else if (indexPath.row == 1 || indexPath.row == 2) {

+ 3 - 0
ChineseMedicine/ChineseMedicineSDK/Model/ReportModel.m

@@ -112,4 +112,7 @@
 @implementation ReportStressModel
 @end
 
+@implementation ReportDrankModel
+@end
+
 

+ 7 - 4
ChineseMedicine/ChineseMedicineSDK/View/HealthDatasDrankCellView.m

@@ -9,6 +9,9 @@
 
 - (void)setDatas:(NSInteger)index model:(ReportDrankModel*)model {
     if (index == 1) {
+        [self.pulseLabel setText:[NSString stringWithFormat:@"%ld",(long)model.healthy.heartRate]];
+        [self.pulseStatusBtn changeRiskStyle:model.healthy.level];
+    } else if (index == 2) {
         [self.spo2Label setText:[NSString stringWithFormat:@"%ld",(long)model.healthy.bloodOxygen]];
         [self.mSlider setValue:model.healthy.bloodOxygen];
     } else {
@@ -17,11 +20,11 @@
 }
 
 - (void)setDrank:(ReportDrankModel*)model {
-    if (!model || !(model.drank))
+    if (!model || !(model.drunkJudgment))
         return;
-    [self.drankLevelLabel setText:[NSString stringWithFormat:@"%ld", model.drank.score]];
-    [self.drankLevelDetailLabel setText:model.drank.content];
-    [self.drankLevelHintLabel setText:model.drank.healthTipsContent];
+    [self.drankLevelLabel setText:[NSString stringWithFormat:@"%ld%@", model.drunkJudgment.score, @"级"]];
+    [self.drankLevelDetailLabel setText:model.drunkJudgment.content];
+    [self.drankLevelHintLabel setText:model.drunkJudgment.healthTipsContent];
 }
 
 @end