柒零 1 år sedan
förälder
incheckning
f744a0ba72
2 ändrade filer med 30 tillägg och 27 borttagningar
  1. 7 7
      pages/data/data.js
  2. 23 20
      pages/data/data.wxml

+ 7 - 7
pages/data/data.js

@@ -4220,7 +4220,7 @@ Page({
 		// console.log("睡眠数据=>", sleepData);
 		// console.log("睡眠数据=>", sleepData.length);
 		var awakeColor = [{ offset: 0, color: '#F7FCBE' }, { offset: 1, color: '#FDBE25' }];;
-		var lightSleepColor = [{ offset: 0, color: '#FDBE25' }, { offset: 1, color: '#FD7778' }];
+		var lightSleepColor = [{ offset: 0, color: '#FFBCBD' }, { offset: 1, color: '#FA6263' }];
 		var sleptInColor = [{ offset: 0, color: '#FD7778' }, { offset: 1, color: '#AA3CFF' }];
 		var deepSleepColor = [{ offset: 0, color: '#AA3CFF' }, { offset: 1, color: '#7C3CFF' }];
 		// var linearGradient = new echarts.graphic.LinearGradient(
@@ -4251,16 +4251,16 @@ Page({
 		};
 		// 状态映射  
 		const statusColorMap = {
-			"0": awakeColor,
-			"10": lightSleepColor,
-			"20": sleptInColor,
+			"20": awakeColor,
+			"0": lightSleepColor,
+			"10": sleptInColor,
 			"30": deepSleepColor
 		};
 		// 状态映射  
 		const statusIndexMap = {
-			"0": 3,
-			"10": 2,
-			"20": 1,
+			"20": 3,
+			"0": 2,
+			"10": 1,
 			"30": 0
 		};
 		// 初始化变量  reportDate

+ 23 - 20
pages/data/data.wxml

@@ -563,19 +563,19 @@
 				<view
 					style="width: 8rpx;height: 24rpx;margin-right: 16rpx; background: linear-gradient( 180deg, #FD7778 0%, #AA3CFF 100%);border-radius: 2rpx">
 				</view>
-				<text class="card-t3">睡</text>
+				<text class="card-t3">睡</text>
 			</view>
 			<view class="card-item">
 				<view
-					style="width: 8rpx;height: 24rpx;margin-right: 16rpx; background: linear-gradient( 180deg, #FDBE25 0%, #FD7778 100%);border-radius: 2rpx">
+					style="width: 8rpx;height: 24rpx;margin-right: 16rpx; background: linear-gradient( 180deg, #FFBCBD 0%, #FA6263 100%);border-radius: 2rpx">
 				</view>
-				<text class="card-t3">浅睡</text>
+				<text class="card-t3">清醒</text>
 			</view>
 			<view class="card-item">
 				<view
 					style="width: 8rpx;height: 24rpx;margin-right: 16rpx;  background: linear-gradient( 180deg, #F7FCBE 0%, #FDBE25 100%);border-radius: 2rpx">
 				</view>
-				<text class="card-t3">清醒</text>
+				<text class="card-t3">REM</text>
 			</view>
 		</view>
 		<!-- <view class="card5-h"> -->
@@ -622,7 +622,7 @@
 					<text class="left-title">清醒</text>
 				</view>
 			</view> -->
-			<view style="position: absolute;top: 0;left: 30rpx;right: 30rpx;bottom: 45rpx;border: 1rpx solid #EEEEEE;">
+			<view style="position: absolute;top: 0;left: 30rpx;right: 30rpx;bottom: 60rpx;border: 1rpx solid #EEEEEE;">
 			</view>
 			<view class="echarts-container_c6" style="flex:1">
 				<ec-canvas id="chartTimeWaterfall-dom" canvas-id="mychart-time-waterfall"
@@ -647,52 +647,55 @@
 						class="text-line_c31-units">小时</text>{{rdeep_durationFormat.formattedMinutes}}<text
 						class="text-line_c31-units">分钟</text></text>
 			</view>
+
 			<view class="card-item2">
 				<view class="card-h" style="justify-content: space-between;align-items: center;">
 					<view
 						style="width: 16rpx;height: 16rpx;background: linear-gradient( 180deg, #FD7778 0%, #AA3CFF 100%);border-radius: 4rpx;">
 					</view>
-					<text style="flex: 1;margin-left: 20rpx;font-size: 28rpx;color: #3E3D44;">睡</text>
-					<text style="font-size: 28rpx;color: #3E3D44;font-weight: 700;">{{rin_duration_efficiency ||
+					<text style="flex: 1;margin-left: 20rpx;font-size: 28rpx;color: #3E3D44;">睡</text>
+					<text style="font-size: 28rpx;color: #3E3D44;font-weight: 700;">{{rlight_duration_efficiency ||
 						'0%'}}</text>
 				</view>
 				<text class="title-text-right_c6"
-					style="text-align: left;margin-left: 36rpx;font-size: 28rpx;">{{rin_durationFormat.formattedHours}}<text
-						class="text-line_c31-units">小时</text>{{rin_durationFormat.formattedMinutes}}<text
+					style="text-align: left;margin-left: 36rpx;font-size: 28rpx;">{{rlight_durationFormat.formattedHours}}<text
+						class="text-line_c31-units">小时</text>{{rlight_durationFormat.formattedMinutes}}<text
 						class="text-line_c31-units">分钟</text></text>
 			</view>
 
 			<view class="card-item2">
 				<view class="card-h" style="justify-content: space-between;align-items: center;">
 					<view
-						style="width: 16rpx;height: 16rpx;background: linear-gradient( 180deg, #FDBE25 0%, #FD7778 100%);border-radius: 4rpx;">
+						style="width: 16rpx;height: 16rpx;background: linear-gradient( 180deg, #FFBCBD 0%, #FA6263 100%);border-radius: 4rpx;">
 					</view>
-					<text style="flex: 1;margin-left: 20rpx;font-size: 28rpx;color: #3E3D44;">浅睡</text>
-					<text style="font-size: 28rpx;color: #3E3D44;font-weight: 700;">{{rlight_duration_efficiency ||
+					<text style="flex: 1;margin-left: 20rpx;font-size: 28rpx;color: #3E3D44;">清醒</text>
+					<text style="font-size: 28rpx;color: #3E3D44;font-weight: 700;">{{rawake_duration_efficiency ||
 						'0%'}}</text>
 				</view>
 				<text class="title-text-right_c6"
-					style="text-align: left;margin-left: 36rpx;font-size: 28rpx;">{{rlight_durationFormat.formattedHours}}<text
-						class="text-line_c31-units">小时</text>{{rlight_durationFormat.formattedMinutes}}<text
+					style="text-align: left;margin-left: 36rpx;font-size: 28rpx;">{{rawake_durationFormat.formattedHours}}<text
+						class="text-line_c31-units">小时</text>{{rawake_durationFormat.formattedMinutes}}<text
 						class="text-line_c31-units">分钟</text></text>
 			</view>
 
 			<view class="card-item2">
 				<view class="card-h" style="justify-content: space-between;align-items: center;">
+
+
 					<view
 						style="width: 16rpx;height: 16rpx;background: linear-gradient( 180deg, #F7FCBE 0%, #FDBE25 100%);border-radius: 4rpx;">
 					</view>
-					<text style="flex: 1;margin-left: 20rpx;font-size: 28rpx;color: #3E3D44;">清醒</text>
-					<text style="font-size: 28rpx;color: #3E3D44;font-weight: 700;">{{rawake_duration_efficiency ||
+
+
+					<text style="flex: 1;margin-left: 20rpx;font-size: 28rpx;color: #3E3D44;">REM</text>
+					<text style="font-size: 28rpx;color: #3E3D44;font-weight: 700;">{{rin_duration_efficiency ||
 						'0%'}}</text>
 				</view>
 				<text class="title-text-right_c6"
-					style="text-align: left;margin-left: 36rpx;font-size: 28rpx;">{{rawake_durationFormat.formattedHours}}<text
-						class="text-line_c31-units">小时</text>{{rawake_durationFormat.formattedMinutes}}<text
+					style="text-align: left;margin-left: 36rpx;font-size: 28rpx;">{{rin_durationFormat.formattedHours}}<text
+						class="text-line_c31-units">小时</text>{{rin_durationFormat.formattedMinutes}}<text
 						class="text-line_c31-units">分钟</text></text>
 			</view>
-
-
 		</view>
 
 	</view>