KELECHUAN 3 yıl önce
ebeveyn
işleme
ff3ae40d2c

+ 3 - 3
components/back/back.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="back" :style="{height: capsuleHeight+ 'px',top:capsuleHighly+'px'}">
-		<u-icon name="arrow-left" :color="color" size="22" @click="backIconHandler"></u-icon>
+		<u-icon name="arrow-left" :color="color" size="24" @click="backIconHandler"></u-icon>
 		<view class="back-text" :style="{color: color}">
 			{{ text }}
 		</view>
@@ -17,7 +17,7 @@
 			},
 			color:{
 				type:String,
-				default:'#000'
+				default:'#3B4144'
 			}
 		},
 		data() {
@@ -60,7 +60,7 @@
 		
 		.back-text{
 			font-size: 40rpx;
-			margin:0 0 8rpx 20rpx;
+			margin:0 0 6rpx 20rpx;
 		}
 	}
 </style>

+ 2 - 2
components/todayclass-box/todayclass-box.vue

@@ -104,7 +104,7 @@
 							teacher: '完成今日课程',
 							time: '17:20'
 						}
-						this.third = '时间'
+						this.third = '时间:'
 						this.after = '巩固已学'
 						this.homeClassList.push(arr)
 					}
@@ -118,7 +118,7 @@
 						time: '8:30'
 					}]
 					this.before = '完成打卡'
-					this.first = '时间'
+					this.first = '时间:'
 					this.beforeType = 'info'
 					arr.push(this.classList[0])
 					arr.push(this.classList[1])

+ 75 - 40
components/todaydata-box/todaydata-box.vue

@@ -27,7 +27,7 @@
 					<text class="chart-info-text">近七天学习记录</text>
 				</view>
 				<view style=" width:100%; margin-top: -30rpx;">
-					<qiun-data-charts type="column" :chartData="todayData.studyColumn" :loadingType="4"
+					<qiun-data-charts type="column" :chartData="studyColumn" :loadingType="4"
 						tooltipFormat='tooltipHour' :canvas2d="true" canvasId="canvasId9839618"/>
 				</view>
 			</view>
@@ -38,7 +38,7 @@
 					<text class="chart-info-text">近七天运动</text>
 				</view>
 				<view class="chart-view">
-					<qiun-data-charts type="pie" :chartData="todayData.exercisePie" :loadingType="4"
+					<qiun-data-charts type="pie" :chartData="exercisePie" :loadingType="4"
 						tooltipFormat='pieMinute' :canvas2d="true" canvasId="canvasId91234111" />
 				</view>
 			</view>
@@ -49,10 +49,22 @@
 					<text class="chart-info-text">近七天睡眠</text>
 				</view>
 				<view class="chart-view">
-					<qiun-data-charts type="pie" :chartData="todayData.sleepRing" :loadingType="4"
+					<qiun-data-charts type="pie" :chartData="sleepRing" :loadingType="4"
 						tooltipFormat='tooltipHour' :canvas2d="true" canvasId="canvasId6312231" />
 				</view>
 			</view>
+			
+			<view class="chart-item" style="width: 100%;">
+				<view class="chart-info">
+					<view class="t-icon t-icon-qingjiashenqing"></view>
+					<text class="chart-info-text">运动睡眠对比</text>
+				</view>
+				<view style=" width:100%;margin-top: -30rpx;height: 450rpx;">
+					<qiun-data-charts type="area" :chartData="exerciseSleepArea" :loadingType="4"
+						tooltipFormat='tooltipHourCom' :canvas2d="true" canvasId="canvasId983131231"/>
+				</view>
+			</view>
+			
 		</view>
 		<!-- 时间选择器 -->
 		<u-picker :show="setTimePicker" :columns="pickerList" ref="uPicker" @confirm="pickerConfirm"
@@ -63,30 +75,23 @@
 </template>
 
 <script>
-	import {
-		mapState,
-		mapMutations
-	} from 'vuex'
 	export default {
 		name: "todaydata-box",
-		computed: {
-			...mapState('m_chart', ['todayData']),
-		},
-		watch: {
-			historyData: {
-				handler(newValue){
-					this.saveToStudyChart()
-				},
-				immediate: true
-			},
-		},
 		data() {
 			return {
+				//学习记录表
+				studyColumn: {},
+				//锻炼时间表
+				exercisePie: {},
+				//睡眠时间表
+				sleepRing: {},
+				//运动睡眠比
+				exerciseSleepArea: {},
 				//模块名
 				list: [{
-					name: '家庭记录'
+					name: '每日记录'
 				}, {
-					name: '历史记录'
+					name: '记录分析'
 				}],
 				//当前模块
 				current: 0,
@@ -139,7 +144,6 @@
 			this.saveToStudyChart()
 		},
 		methods: {
-			...mapMutations('m_chart', ['updateStudyColumn', 'updateExercisePie', 'updateSleepRing']),
 			//更改模块
 			changeModule(index) {
 				this.current = index.index
@@ -163,8 +167,7 @@
 				}
 				//转换为数据记录到图表中
 				if (this.moduleData[this.cardCurrent].numData.search('小时') == -1) {
-					let timeData = parseFloat(parseInt(this.moduleData[this.cardCurrent].numData.replace('分钟', '')) / 60).toFixed(1)
-					console.log(timeData)
+					let timeData = parseFloat((parseInt(this.moduleData[this.cardCurrent].numData.replace('分钟', '')) / 60).toFixed(1))
 					switch (this.cardCurrent) {
 						case 0:
 							this.historyData.study.push(timeData)
@@ -175,18 +178,21 @@
 							this.historyData.rest.shift()
 							break
 						case 2:
-							this.historyData.exercise.push(timeData)
+						  let numExercise = parseInt(this.moduleData[this.cardCurrent].numData.replace('分钟', ''))/60
+							this.historyData.exercise.push(numExercise)
 							this.historyData.exercise.shift()
+							console.log(this.historyData.exercise);
 							break
 						case 3:
 							this.historyData.sleep.push(timeData)
 							this.historyData.sleep.shift()
+							console.log(this.historyData.sleep);
 							break
 					}
+					this.saveToStudyChart()
 				} else {
 					let timeTemp = this.moduleData[this.cardCurrent].numData.replace('小时', '.').replace('分钟', '').split('.')
 					let timeData = parseInt(timeTemp[0]) + parseFloat((timeTemp[1] / 60).toFixed(1))
-					console.log(timeData)
 					switch (this.cardCurrent) {
 						case 0:
 							this.historyData.study.push(timeData)
@@ -199,12 +205,15 @@
 						case 2:
 							this.historyData.exercise.push(timeData)
 							this.historyData.exercise.shift()
+							console.log(this.historyData.exercise);
 							break
 						case 3:
 							this.historyData.sleep.push(timeData)
 							this.historyData.sleep.shift()
+							console.log(this.historyData.sleep);
 							break
 					}
+					this.saveToStudyChart()
 				}
 				uni.$showMsg('记录完成', 1000)
 				this.setTimePicker = false
@@ -218,17 +227,12 @@
 			saveToStudyChart() {
 				let studyColumn = {
 					categories: [],
-					series: [{
-						name: '自主学习',
-						data: this.historyData.study
-					}, {
-						name: '娱乐放松',
-						data: this.historyData.rest
-					}]
+					series: [{name: '自主学习',data: this.historyData.study}, 
+					{name: '娱乐放松',data: this.historyData.rest}]
 				}
 				//时间
 				studyColumn.categories = this.$getRecentDateArray(7)
-				//数据
+				//学习记录表数据记录
 				switch (this.cardCurrent) {
 					case 0:
 					studyColumn.series[0].data = this.historyData.study
@@ -237,10 +241,40 @@
 					studyColumn.series[1].data = this.historyData.rest
 					break
 				}
-				//解除对象指向同一块内存(深拷贝)
-				// let studyColumnTemp = JSON.parse(JSON.stringify(studyColumn))
-				//存储
-				this.updateStudyColumn(studyColumn)
+				//学习记录表赋值
+				this.studyColumn = studyColumn
+				//运动记录表
+				let exercisePie = {
+					series: [{
+						data: [{},{},{},{},{},{},{}]
+					}]
+				}
+				//睡眠记录表
+				let sleepRing = {
+					series: [{
+						data: [{},{},{},{},{},{},{}]
+					}]
+				}
+				studyColumn.categories.forEach((value,index)=>{
+					exercisePie.series[0].data[index].name = value
+					exercisePie.series[0].data[index].value = this.historyData.exercise[index]*60
+					sleepRing.series[0].data[index].name = value
+					sleepRing.series[0].data[index].value = this.historyData.sleep[index]
+				})
+				this.exercisePie = exercisePie
+				this.sleepRing = sleepRing
+				
+				let exerciseSleepArea = {
+					categories: [],
+					series:
+					[{name: "每日锻炼时间",data: []},
+					{name: "每日睡眠时间",data: []}]
+				}
+				exerciseSleepArea.categories = studyColumn.categories
+				exerciseSleepArea.series[0].data = this.historyData.exercise
+				exerciseSleepArea.series[1].data = this.historyData.sleep
+				this.exerciseSleepArea = exerciseSleepArea
+				
 			}
 
 		}
@@ -269,12 +303,12 @@
 			overflow: hidden;
 
 			.module-item-box {
-				padding: 35rpx;
+				padding: 35rpx 30rpx 20rpx 30rpx;
 				width: 100%;
 				display: flex;
 				flex-direction: column;
 				justify-content: space-around;
-				height: 150rpx;
+				height: 170rpx;
 
 				.t-icon {
 					width: 250rpx;
@@ -329,7 +363,8 @@
 		}
 
 		.chart-view {
-			height: 350rpx;
+			height: 320rpx;
+			width: 100%;
 		}
 	}
 </style>

+ 3 - 3
gradepkg/ability-chart/ability-chart.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="page-box">
-		<back></back>
+		<back text="考试能力"></back>
 
 		<view class="children-box">
 			<image class="children-avatar" :src="childreninfo.avatar"></image>
@@ -14,7 +14,7 @@
 		<view class="data-box">
 			<view class="data-box-item" style="background-color: #0080ff;">
 				<view class="item-text">考试成绩波动对比:</view>
-				<view class="item-number">{{mainExamUndulate>=quizExamUndulate?'小考稳定':'大考稳定'}}</view>
+				<view class="item-text" style="font-size: 50rpx;">{{mainExamUndulate>=quizExamUndulate?'小考稳定':'大考稳定'}}</view>
 				<view class="analysis-box">
 					<view v-if="mainExamUndulate>=quizExamUndulate" class="t-icon t-icon-jiangbei-4"></view>
 					<view v-if="mainExamUndulate<quizExamUndulate" class="t-icon t-icon-jiangbei-3"></view>
@@ -25,7 +25,7 @@
 
 			<view class="data-box-item" style="background-color: #ff8caf;">
 				<view class="item-text">考试得分能力对比:</view>
-				<view class="item-number">{{avgMain>=avgquiz?'大考能力强':'小考能力强'}}</view>
+				<view class="item-text" style="font-size: 50rpx;">{{avgMain>=avgquiz?'大考能力强':'小考能力强'}}</view>
 				<view class="analysis-box">
 					<view v-if="avgMain<avgquiz" class="t-icon t-icon-jiangbei-4"></view>
 					<view v-if="avgMain>=avgquiz" class="t-icon t-icon-jiangbei-3"></view>

+ 7 - 19
gradepkg/common/chartpage.scss

@@ -13,36 +13,24 @@
 				margin: 2% 0;
 				display: flex;
 				flex-direction: column;
-				border-radius: $card-border-radius;
+				justify-content: space-around;
 				width: 48%;
-				height: auto;
+				height: 300rpx;
+				border-radius: $card-border-radius;
 		
 				.item-text {
-					font-size: 28rpx;
-					font-weight: bold;
-					color: #FFFFFF;
-					margin: 20rpx 20rpx 0 25rpx;
-				}
-				.item-number {
-					font-size: 55rpx;
-					color: #FFFFFF;
+					margin-left: 20rpx;
+					font-size: 30rpx;
 					font-weight: bold;
-					margin: 20rpx 20rpx 0 25rpx;
-				}
-				.item-number-mini{
-					font-size: 34rpx;
 					color: #FFFFFF;
-					font-weight: bold;
-					margin: 20rpx 20rpx 0 25rpx;
 				}
 				
 				.analysis-box{
 					display: flex;
 					align-items: center;
-					margin: 20rpx 10rpx 10rpx 5rpx;
 					
 					.t-icon {
-						width: 140rpx;
+						width: 150rpx;
 						height: 100rpx;
 						background-repeat: no-repeat;
 					}
@@ -51,9 +39,9 @@
 						font-size: 32rpx;
 						font-weight: bold;
 						color: #FFFFFF;
-						margin-left: 20rpx;
 					}
 				}
+				
 			}
 		}
 	.tooltip {

+ 2 - 2
gradepkg/rank-chart/rank-chart.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="page-box">
-		<back></back>
+		<back text="排行占比"></back>
 
 		<view class="children-box">
 			<image class="children-avatar" :src="childreninfo.avatar"></image>
@@ -15,7 +15,7 @@
 			<view class="data-box-item" v-for="(item,index) in analysisData" :key="index"
 				:style="{background: item.color}">
 				<view class="item-text">{{item.title}}</view>
-				<view class="item-number">{{item.data}}%的同学</view>
+				<view class="item-text" style="font-size: 50rpx;">{{item.data}}%的同学</view>
 				<view class="analysis-box">
 					<view v-if="item.data<40" class="t-icon t-icon-jiangbei-5"></view>
 					<view v-if="item.data>=40 && item.data<70" class="t-icon t-icon-jiangbei-4"></view>

+ 2 - 2
gradepkg/single-chart/single-chart.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="page-box">
-		<back></back>
+		<back text="单次考试"></back>
 
 		<view class="children-box">
 			<image class="children-avatar" :src="childreninfo.avatar"></image>
@@ -14,7 +14,7 @@
 		<view class="data-box">
 			<view class="data-box-item" v-for="(item,index) in analysisData" :key="index" :style="{background: item.color}">
 				<view class="item-text">{{item.title}}</view>
-				<view class="item-number">{{item.data/0.01}}%的同学</view>
+				<view class="item-text" style="font-size: 50rpx;">{{item.data/0.01}}%的同学</view>
 				<view class="analysis-box">
 					<view v-if="item.data<0.4" class="t-icon t-icon-jiangbei-5"></view>
 					<view v-if="item.data>=0.4 && item.data<0.7" class="t-icon t-icon-jiangbei-4"></view>

+ 3 - 3
gradepkg/subject-chart/subject-chart.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="page-box">
-		<back></back>
+		<back text="优劣科目"></back>
 
 		<view class="children-box">
 			<image class="children-avatar" :src="childreninfo.avatar"></image>
@@ -14,8 +14,8 @@
 		<view class="data-box">
 			<view class="data-box-item" v-for="(item,index) in analysisData" :key="index" :style="{background: item.color}">
 				<view class="item-text">{{item.title}}</view>
-				<view class="item-number">{{item.data.name}}</view>
-				<view class="item-number-mini">得分率为:  {{item.data.value}}%</view>
+				<view class="item-text" style="font-size: 44rpx;">{{item.data.name}}</view>
+				<view class="item-text" style="font-size: 34rpx;">得分率为:  {{item.data.value}}%</view>
 				<view class="analysis-box">
 					<view v-if="item.data.value>=80" class="t-icon t-icon-jiangbei-3"></view>
 					<view v-if="item.data.value<80 && item.data.value>=50" class="t-icon t-icon-jiangbei-4"></view>

+ 0 - 83
information/chart.js

@@ -465,77 +465,6 @@ export default {
 					"color": "#f9c752"
 				}]
 			},
-			//孩子数据记录
-			//学习休息时长对比
-			studyColumn: {},
-			//锻炼时长
-			exercisePie: {
-				"series": [{
-					"data": [{
-							"name": "周一",
-							"value": 20
-						},
-						{
-							"name": "周二",
-							"value": 30
-						},
-						{
-							"name": "周三",
-							"value": 50
-						},
-						{
-							"name": "周四",
-							"value": 100
-						},
-						{
-							"name": "周五",
-							"value": 40
-						},
-						{
-							"name": "周六",
-							"value": 40
-						},
-						{
-							"name": "周日",
-							"value": 60
-						}
-					]
-				}]
-			},
-			sleepRing: {
-				"series": [{
-					"data": [{
-							"name": "周一",
-							"value": 8
-						},
-						{
-							"name": "周二",
-							"value": 7
-						},
-						{
-							"name": "周三",
-							"value": 8.5
-						},
-						{
-							"name": "周四",
-							"value": 6.5
-						},
-						{
-							"name": "周五",
-							"value": 8
-						},
-						{
-							"name": "周六",
-							"value": 8
-						},
-						{
-							"name": "周日",
-							"value": 9
-						}
-					]
-				}]
-			},
-
 		},
 		//作业页面图表数据
 		homeworkData: {
@@ -543,7 +472,6 @@ export default {
 			testData: '',
 			homeworkData: '',
 			activityData: '',
-			
 		}
 
 	}),
@@ -557,17 +485,6 @@ export default {
 			state.gradeData.rankChart.semesterSubjectRank = semesterSubjectRank
 		},
 		
-		//更新今日模块数据
-		updateStudyColumn(state, studyColumn) {
-			state.todayData.studyColumn = studyColumn
-		},
-		updateExercisePie(state, exercisePie) {
-			state.todayData.exercisePie = exercisePie
-		},
-		updateSleepRing(state, sleepRing){
-			state.todayData.sleepRing = sleepRing
-		},
-		
 		//更新作业模块数据
 		updateTestArea(state, testData){
 			state.homeworkData.testData = testData

+ 1 - 1
pages.json

@@ -112,7 +112,7 @@
 			}, {
 				"path": "classvideo/classvideo",
 				"style": {
-					"navigationBarTitleText": "",
+					"navigationStyle": "custom",
 					"enablePullDownRefresh": false
 				}
 

+ 1 - 2
pages/homework/homework.vue

@@ -89,8 +89,7 @@
 							<view class="item-text">{{item.detail.title}}</view>
 							<!-- 详情列表展示(评测,活动或者作业)信息 -->
 							<view style="display: flex; align-items: center;margin: 0 10rpx 0 auto;">
-								<view class="t-icon t-icon-liebiao" style="width: 30rpx; height: 30rpx;"
-									@click="navData"></view>
+								<view class="t-icon t-icon-liebiao" style="width: 30rpx; height: 30rpx;" @click="navData"></view>
 								<view class="msg" @click="navData" style="color: #3C9CFF;">详情列表</view>
 							</view>
 						</view>

+ 2 - 1
pages/interactive/interactive.vue

@@ -1,7 +1,8 @@
 <template>
 	<view class="container">
 		<!-- 头部区域 -->
-		<top-box :timeStamp="timeStamp"></top-box>
+		<top-box :timeStamp="timeStamp"></top-box>
+		<!-- 记录模块 -->
 		<todaydata-box></todaydata-box>
 		<!-- 列表区域 -->
 		<view class="card-box">

+ 41 - 18
subpkg/classvideo/classvideo.vue

@@ -1,19 +1,42 @@
-<template>
-	<view>
-		
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				
-			};
-		}
-	}
-</script>
-
-<style lang="scss">
-
+<template>
+	<view>
+		<back text="课程直播"></back>
+		<view class="video-box">
+			<video class="video" id="classVideo" :src="video" @error="videoErrorCallback" controls></video>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				video: 'https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/%E7%AC%AC1%E8%AE%B2%EF%BC%88uni-app%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D%EF%BC%89-%20DCloud%E5%AE%98%E6%96%B9%E8%A7%86%E9%A2%91%E6%95%99%E7%A8%8B@20200317.mp4',
+			};
+		},
+		onLoad() {
+			this.videoContext = uni.createVideoContext('classVideo')
+		},
+		methods: {
+			videoErrorCallback(e) {
+				uni.showModal({
+					content: e.target.errMsg,
+					showCancel: false
+				})
+			},
+
+
+
+		}
+	}
+</script>
+
+<style lang="scss">
+	.video-box {
+		width: 100%;
+
+		.video {
+			width: 100%;
+		}
+	}
 </style>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 6 - 10
subpkg/common/iconfont-weapp-icon.css


+ 3 - 5
subpkg/subscribecenter/subscribecenter.vue

@@ -7,7 +7,7 @@
 		<view class="bg2"></view>
 
 		<view class="vipcard" style="display: flex; align-items: center;">
-			<view>
+			<view style="height: 100%; display: flex; flex-direction: column; justify-content: space-around;">
 				<view class="flex">
 					<view class="t-icon t-icon-huiyuan1"></view>
 					<view class="card-title">{{myData.subscribeLevel}}</view>
@@ -50,7 +50,7 @@
 			</view>
 		</view>
 		
-		<view class="bg3" :style="{backgroundImage: `url(${image})`}"></view>
+		<!-- <view class="bg3" :style="{backgroundImage: `url(${image})`}"></view> -->
 
 	</view>
 </template>
@@ -80,7 +80,7 @@
 						text: '测试测试3'
 					}
 				],
-				image: 'https://ouch-cdn2.icons8.com/TkDU4uToX9e3o75BLBT0mMcvbRy6Ffw8EZrdODM7kbU/rs:fit:256:171/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9zdmcvMjM5/L2IxYTNmM2Q4LTdj/NjktNGQ2NC04ZjIz/LTJjZGM4ZDJmYWEw/ZC5zdmc.png'
+				// image: 'https://ouch-cdn2.icons8.com/TkDU4uToX9e3o75BLBT0mMcvbRy6Ffw8EZrdODM7kbU/rs:fit:256:171/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9zdmcvMjM5/L2IxYTNmM2Q4LTdj/NjktNGQ2NC04ZjIz/LTJjZGM4ZDJmYWEw/ZC5zdmc.png'
 			};
 		},
 		onLoad() {
@@ -149,14 +149,12 @@
 		}
 
 		.card-detail {
-			margin-top: 20rpx;
 			font-size: 26rpx;
 			color: #b4986b;
 		}
 
 		.btn-box {
 			width: 270rpx;
-			margin-top: 80rpx;
 			display: flex;
 			align-items: center;
 			justify-content: space-between;

+ 3 - 0
uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js

@@ -127,6 +127,9 @@ const cfu = {
 		"tooltipHour": function(item, category, index, opts) {
 			return item.name + ': ' + item.data + ' 小时 '
 		},
+		"tooltipHourCom": function(item, category, index, opts) {
+			return item.name + ': ' + item.data.toFixed(2) + ' 小时 '
+		},
 		"pieMinute": function(item, category, index, opts) {
 			return item.name + ': ' + item.data + ' 分钟 '
 		},