瀏覽代碼

完成课程列表展示逻辑,完成作业页面设计等

KELECHUAN 3 年之前
父節點
當前提交
e3d45f5459

+ 46 - 55
components/todayclass-box/todayclass-box.vue

@@ -2,40 +2,41 @@
 	<!-- 今日课程 -->
 	<!-- 今日课程 -->
 	<!-- 内容 -->
 	<!-- 内容 -->
 	<view>
 	<view>
-		<view class="home-title-text">
-			<view class="msg">课程数:</view>
-			<view class="card-content">{{classList.length}}</view>
-			<view style="display: flex; align-items: center; margin-left: auto; margin-right: 30rpx;">
+		<view class="home-title-text" style="margin: 0 0 30rpx 0;">
+			<view class="msg">最近课程</view>
+			<view style="display: flex; align-items: center;margin: 0 30rpx 0 auto;">
 				<view class="t-icon t-icon-chakan" @click="navClass"></view>
 				<view class="t-icon t-icon-chakan" @click="navClass"></view>
-				<view class="msg" style="margin-left: 10rpx;" @click="navClass">查看全部课程</view>
+				<view class="msg" style="margin-left: 10rpx;" @click="navClass">查看课程列表</view>
 			</view>
 			</view>
 		</view>
 		</view>
 
 
 		<!-- 课程列表 -->
 		<!-- 课程列表 -->
-		<view class="u-page__item">
-			<view class="class-block">
-				<view class="block-title">{{classList[classCurrent-1]}}</view>
-				<u-tag :text="teacherList[classCurrent-1]" size="mini" plain  shape="circle"></u-tag>
+		<view>
+			<view class="class-block" v-if="classCurrent > 1">
+				<view class="block-title">{{classList[classCurrent-2].name}}</view>
+				<u-tag :text="classList[classCurrent-2].teacher" size="mini" plain shape="circle"></u-tag>
 				<view class="block-subtitle">上节</view>
 				<view class="block-subtitle">上节</view>
-				<view class="block-subtitle">14:00-15:20</view>
+				<view class="block-subtitle">{{classList[classCurrent-2].time}}</view>
 				<u-tag text="查看回放" plain icon="hourglass"></u-tag>
 				<u-tag text="查看回放" plain icon="hourglass"></u-tag>
 			</view>
 			</view>
 
 
-			<view class="class-block" style="background-color: #fff;">
-				<view class="block-title">{{classList[classCurrent]}}</view>
-				<u-tag :text="teacherList[classCurrent]" size="mini" shape="circle"></u-tag>
-				<view class="block-subtitle">当前</view>
-				<view class="block-subtitle">15:30-16:50</view>
+			<view class="class-block" style="background-color: #fff;" v-if="classCurrent <= classNum">
+				<view class="block-title" style="color: #3c9cff;">{{classList[classCurrent - 1].name}}</view>
+				<u-tag :text="classList[classCurrent - 1].teacher" size="mini" shape="circle"></u-tag>
+				<view class="block-subtitle" style="color: #3c9cff;">当前</view>
+				<view class="block-subtitle" style="color: #3c9cff;">{{classList[classCurrent - 1].time}}</view>
 				<u-tag text="查看直播" type="error" icon="play-right"></u-tag>
 				<u-tag text="查看直播" type="error" icon="play-right"></u-tag>
 			</view>
 			</view>
 
 
-			<view class="class-block">
-				<view class="block-title">{{classList[classCurrent+1]}}</view>
-				<u-tag :text="teacherList[classCurrent+1]" size="mini" plain shape="circle"></u-tag>
+			<view class="class-block" v-if="classCurrent < classNum">
+				<view class="block-title">{{classList[classCurrent].name}}</view>
+				<u-tag :text="classList[classCurrent].teacher" size="mini" plain shape="circle"></u-tag>
 				<view class="block-subtitle">下节</view>
 				<view class="block-subtitle">下节</view>
-				<view class="block-subtitle">17:00-18:20</view>
+				<view class="block-subtitle">{{classList[classCurrent].time}}</view>
 				<u-tag text="暂未开始" plain icon="pushpin"></u-tag>
 				<u-tag text="暂未开始" plain icon="pushpin"></u-tag>
 			</view>
 			</view>
+			
+			
 		</view>
 		</view>
 	</view>
 	</view>
 
 
@@ -43,58 +44,48 @@
 </template>
 </template>
 
 
 <script>
 <script>
+	import {
+		mapState
+	} from 'vuex'
 	export default {
 	export default {
 		name: "todayclass-box",
 		name: "todayclass-box",
+		computed: {
+			...mapState('m_children', ['classList'])
+		},
+		props: {
+			classCurrent: {
+				type: Number,
+				default () {
+					return 2
+				}
+			},
+		},
 		data() {
 		data() {
 			return {
 			return {
-				//今日课程
-				classList: ['数学', '语文', '英语', '体育', '思品'],
-				//授课老师
-				teacherList: ['张老师', '李老师', '王老师', '陈老师', '黄老师'],
-				//当前课程
-				classCurrent: 2,
+				//课程数量
+				classNum:'',//测试数据最大为6最小为1
 				//倒计时时间
 				//倒计时时间
 				dayTimeData: {},
 				dayTimeData: {},
 				classTimeData: {}
 				classTimeData: {}
 			};
 			};
 		},
 		},
 		methods: {
 		methods: {
-			navClass(){
+			navClass() {
 				uni.navigateTo({
 				uni.navigateTo({
-					url:'/subpkg/classmsg/classmsg'
+					url: '/subpkg/classmsg/classmsg'
 				})
 				})
 			},
 			},
-			
+			//获取到课程列表长度
+			getClassNum(){
+				this.classNum = this.classList.length
+			}
+		},
+		created() {
+			this.getClassNum()
 		}
 		}
 	}
 	}
 </script>
 </script>
 
 
 <style lang="scss">
 <style lang="scss">
-	.class-block {
-		display: flex;
-		align-items: center;
-		justify-content: space-around;
-		background-color: #f6f7f8;
-		margin: -10rpx auto 20rpx auto;
-		padding: 5rpx;
-		width: 94%;
-		height: 120rpx;
-		border-radius: $card-border-radius;
-
-		.block-title {
-			font-size: 32rpx;
-			font-weight: bold;
-			color: $color-title;
-		}
-		.block-subtitle{
-			font-size: 22rpx;
-			color: $color-title;
-		}
-	}
-
-	.t-icon {
-		width: 30rpx;
-		height: 30rpx;
-	}
-	
+	@import '@/pages/common/blockmsg.scss';
 </style>
 </style>

+ 1 - 1
gradepkg/common/chartpage.scss

@@ -69,7 +69,7 @@
 					font-size: 30rpx;
 					font-size: 30rpx;
 					font-weight: bold;
 					font-weight: bold;
 					color: $color-title;
 					color: $color-title;
-					margin-left: 10rpx;
+					margin-left: 15rpx;
 				}
 				}
 
 
 				.btn-box {
 				.btn-box {

+ 34 - 1
information/children.js

@@ -12,7 +12,40 @@ export default{
 		
 		
 		semester: uni.getStorageSync('semester') || '请选择学期',
 		semester: uni.getStorageSync('semester') || '请选择学期',
 		
 		
-		semesterList: [['21学年下学期', '21学年上学期', '20学年下学期', '20学年上学期']]
+		semesterList: [['21学年下学期', '21学年上学期', '20学年下学期', '20学年上学期']],
+		
+		classList: 
+				[{
+					name: '语文',
+					teacher: '王老师',
+					time: '09:00-09:50',
+					timeFrame: '上午'
+				},{
+					name: '数学',
+					teacher: '李老师',
+					time: '10:00-10:50',
+					timeFrame: '上午'
+				},{
+					name: '外语',
+					teacher: '张老师',
+					time: '11:00-11:50',
+					timeFrame: '上午'
+				},{
+					name: '思品',
+					teacher: '史老师',
+					time: '14:00-14:50',
+					timeFrame: '下午'
+				},{
+					name: '体育',
+					teacher: '李老师',
+					time: '15:00-15:50',
+					timeFrame: '下午'
+				},{
+					name: '科学',
+					teacher: '张老师',
+					time: '16:00-16:50',
+					timeFrame: '上午'
+				}],
 		
 		
 	}),
 	}),
 	//模块方法(修改数据)
 	//模块方法(修改数据)

+ 3 - 2
pages.json

@@ -105,8 +105,9 @@
 			}, {
 			}, {
 				"path": "classmsg/classmsg",
 				"path": "classmsg/classmsg",
 				"style": {
 				"style": {
-					"navigationBarTitleText": "",
-					"enablePullDownRefresh": false
+					"navigationStyle": "custom",
+					"enablePullDownRefresh": false,
+					"backgroundColor":"#FFF"
 				}
 				}
 
 
 			}
 			}

+ 31 - 0
pages/common/blockmsg.scss

@@ -0,0 +1,31 @@
+	.class-block {
+		display: flex;
+		align-items: center;
+		justify-content: space-around;
+		background-color: #f6f6f6;
+		margin: 10rpx auto 20rpx auto;
+		padding: 5rpx;
+		width: 94%;
+		height: 120rpx;
+		border-radius: $card-border-radius;
+	
+		.block-title {
+			font-size: 30rpx;
+			font-weight: bold;
+			color: $color-title;
+		}
+	
+		.block-subtitle {
+			font-size: 22rpx;
+			color: $color-title;
+		}
+		.block-tag-box{
+			border-radius: 20rpx;
+			border: 1rpx solid #3C9CFF;
+			padding: 6rpx;
+			.block-tag{
+				font-size: 22rpx;
+				color: #3C9CFF;
+			}
+		}
+	}

+ 8 - 8
pages/common/mainpage.scss

@@ -33,18 +33,18 @@
 					.info-text {
 					.info-text {
 						font-size: 30rpx;
 						font-size: 30rpx;
 						font-weight: bold;
 						font-weight: bold;
-						color: #3B4144;
-						margin-left: 10rpx;
+						color: $color-title;
+						margin-left: 15rpx;
 					}
 					}
 				}
 				}
-				.card-content {
-					font-size: 35rpx;
-					margin: 10rpx 0 10rpx 25rpx;
-					color: $u-primary;
-					font-weight: bold;
-				}
 			}
 			}
 		}
 		}
+	}
+	.card-content {
+		font-size: 35rpx;
+		margin: 10rpx 0 10rpx 25rpx;
+		color: $u-primary;
+		font-weight: bold;
 	}
 	}
 	
 	
 	.home-title-text {
 	.home-title-text {

+ 1 - 1
pages/grade/grade.vue

@@ -241,7 +241,7 @@
 			margin: 20rpx 0 35rpx 40rpx;
 			margin: 20rpx 0 35rpx 40rpx;
 
 
 			.chart-name-text {
 			.chart-name-text {
-				margin-left: 20rpx;
+				margin-left: 15rpx;
 				font-size: 30rpx;
 				font-size: 30rpx;
 				font-weight: bold;
 				font-weight: bold;
 				color: $color-title;
 				color: $color-title;

+ 58 - 17
pages/home/home.vue

@@ -16,9 +16,9 @@
 					<view :class="icon.class"></view>
 					<view :class="icon.class"></view>
 					<text class="info-text">今日课程</text>
 					<text class="info-text">今日课程</text>
 				</view>
 				</view>
-				<todayclass-box></todayclass-box>
+				<todayclass-box :classCurrent="classIndex"></todayclass-box>
 			</view>
 			</view>
-			
+
 			<!-- 今日打卡 -->
 			<!-- 今日打卡 -->
 			<view class="card-item">
 			<view class="card-item">
 				<view class="card-info">
 				<view class="card-info">
@@ -37,7 +37,7 @@
 					<view class="msg">打卡时间:</view>
 					<view class="msg">打卡时间:</view>
 					<view style="margin-left: 10rpx;">
 					<view style="margin-left: 10rpx;">
 						<!-- <u-tag text="8点15分" plain shape="circle"></u-tag> -->
 						<!-- <u-tag text="8点15分" plain shape="circle"></u-tag> -->
-						<view style="display: flex; align-items: center;">
+						<view style="display: flex; align-items: center; margin-left: 10rpx;">
 							<view class="number-box">08</view>
 							<view class="number-box">08</view>
 							<view style="color: #3C9CFF;">:</view>
 							<view style="color: #3C9CFF;">:</view>
 							<view class="number-box">15</view>
 							<view class="number-box">15</view>
@@ -48,12 +48,12 @@
 					<view class="msg">本周出勤质量:</view>
 					<view class="msg">本周出勤质量:</view>
 					<view class="card-content">优秀</view>
 					<view class="card-content">优秀</view>
 				</view>
 				</view>
-				
+
 			</view>
 			</view>
-			
-			
+
+
 			<!-- 评测 -->
 			<!-- 评测 -->
-			<view class="card-item" @click="navHomework">
+			<view class="card-item" @click="navHomework(0)">
 				<view class="card-info">
 				<view class="card-info">
 					<view :class="icon.evaluation"></view>
 					<view :class="icon.evaluation"></view>
 					<text class="info-text">今日评测</text>
 					<text class="info-text">今日评测</text>
@@ -64,7 +64,7 @@
 				</view>
 				</view>
 			</view>
 			</view>
 			<!-- 作业 -->
 			<!-- 作业 -->
-			<view class="card-item" @click="navHomework">
+			<view class="card-item" @click="navHomework(1)">
 				<view class="card-info">
 				<view class="card-info">
 					<view :class="icon.homework"></view>
 					<view :class="icon.homework"></view>
 					<text class="info-text">今日作业</text>
 					<text class="info-text">今日作业</text>
@@ -75,7 +75,7 @@
 				</view>
 				</view>
 			</view>
 			</view>
 			<!-- 问卷 -->
 			<!-- 问卷 -->
-			<view class="card-item" @click="navHomework">
+			<view class="card-item" @click="navHomework(2)">
 				<view class="card-info">
 				<view class="card-info">
 					<view :class="icon.activity"></view>
 					<view :class="icon.activity"></view>
 					<text class="info-text">今日活动</text>
 					<text class="info-text">今日活动</text>
@@ -86,7 +86,6 @@
 				</view>
 				</view>
 			</view>
 			</view>
 
 
-
 		</view>
 		</view>
 	</view>
 	</view>
 </template>
 </template>
@@ -98,18 +97,24 @@
 	export default {
 	export default {
 		computed: {
 		computed: {
 			...mapState('m_chart', ['todayData']),
 			...mapState('m_chart', ['todayData']),
-			...mapState('m_children', ['childreninfo']),
+			...mapState('m_children', ['childreninfo', 'classList']),
 			...mapState('m_parent', ['myData'])
 			...mapState('m_parent', ['myData'])
 		},
 		},
 		data() {
 		data() {
 			return {
 			return {
 				//滚动通知
 				//滚动通知
 				noticeMsg: '',
 				noticeMsg: '',
+				//当前课程索引
+				classIndex: '',
+				//作业页面展示索引
+				homeworkPageIndex: [0,1,2],
 				//首页数据
 				//首页数据
 				homeData: {
 				homeData: {
 					//出勤状况
 					//出勤状况
 					attendance: '已打卡',
 					attendance: '已打卡',
 				},
 				},
+
+				//属性(不修改)
 				//图标
 				//图标
 				icon: {
 				icon: {
 					record: 't-icon t-icon-dakaqiandao',
 					record: 't-icon t-icon-dakaqiandao',
@@ -133,9 +138,11 @@
 			this.setOpts()
 			this.setOpts()
 			this.$getTimeStamp()
 			this.$getTimeStamp()
 			this.getNoticeMsg()
 			this.getNoticeMsg()
+			this.getClassCurrent()
 		},
 		},
 		onPullDownRefresh() {
 		onPullDownRefresh() {
 			this.$getTimeStamp()
 			this.$getTimeStamp()
+			this.getClassCurrent()
 			console.log('refresh')
 			console.log('refresh')
 			setTimeout(function() {
 			setTimeout(function() {
 				uni.stopPullDownRefresh()
 				uni.stopPullDownRefresh()
@@ -146,14 +153,47 @@
 			getNoticeMsg() {
 			getNoticeMsg() {
 				this.noticeMsg = `您有 ${this.myData.msgList.length} 个通知,请点击查看`
 				this.noticeMsg = `您有 ${this.myData.msgList.length} 个通知,请点击查看`
 			},
 			},
-			navHomework() {
-				uni.switchTab({
-					url: '/pages/homework/homework'
+			//计算当前课程
+			getClassCurrent() {
+				//当前时间戳是否在课程时间段内
+				function CompareDate(start, finish) {
+					//获得当前时间时间戳
+					let timeNow = (new Date()).format("yyyy-MM-dd hh:mm").replace(new RegExp("-", "gm"), "/")
+					let timeHaoMiao = (new Date(timeNow)).getTime()
+					//获得课程开始结束时间戳
+					let today = (new Date()).format("yyyy-MM-dd ")
+					let classStart = (today + start).replace(new RegExp("-", "gm"), "/")
+					let classFinish = (today + finish).replace(new RegExp("-", "gm"), "/")
+					let classStartHaoMiao = (new Date(classStart)).getTime()
+					let classFinishHaoMiao = (new Date(classFinish)).getTime()
+					//比较
+					if (timeHaoMiao < classFinishHaoMiao) {
+						if (classStartHaoMiao < timeHaoMiao)
+							return true
+					}
+					return false
+				}
+				//获取当前课程索引值
+				let i = 1
+				for (let item of this.classList) {
+					let timeArr = item.time.split("-")
+					let res = CompareDate(timeArr[0], timeArr[1])
+					if (res) {
+						break
+					}
+					i++
+				}
+				this.classIndex = i
+				i = 0
+			},
+			navHomework(index) {
+				uni.reLaunch({
+					url: `/pages/homework/homework?index=${index}`
 				})
 				})
 			},
 			},
 			navCalendar() {
 			navCalendar() {
 				uni.navigateTo({
 				uni.navigateTo({
-					url:'/subpkg/calendarmsg/calendarmsg'
+					url: '/subpkg/calendarmsg/calendarmsg'
 				})
 				})
 			},
 			},
 			//设置圆环图描述更新
 			//设置圆环图描述更新
@@ -205,14 +245,15 @@
 				this.homeworkOpts = homework;
 				this.homeworkOpts = homework;
 				this.activityOpts = activity;
 				this.activityOpts = activity;
 			},
 			},
-			
+
 		},
 		},
 	}
 	}
 </script>
 </script>
 
 
 <style lang="scss">
 <style lang="scss">
 	@import '@/pages/common/mainpage.scss';
 	@import '@/pages/common/mainpage.scss';
-	.number-box{
+
+	.number-box {
 		width: 40rpx;
 		width: 40rpx;
 		height: 40rpx;
 		height: 40rpx;
 		border-radius: 8rpx;
 		border-radius: 8rpx;

+ 199 - 89
pages/homework/homework.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
 	<view class="homework-container">
 	<view class="homework-container">
 		<!-- 头部区域 -->
 		<!-- 头部区域 -->
-		<top-box :timeStamp="timeStamp"></top-box>
+		<top-box :timeStamp="timeStamp" />
 		<view class="module-container">
 		<view class="module-container">
 			<view style="margin: 0 20rpx;">
 			<view style="margin: 0 20rpx;">
 				<u-tabs :list="list" :current="current" @change="changeModule"
 				<u-tabs :list="list" :current="current" @change="changeModule"
@@ -14,12 +14,13 @@
 			<view class="module-box" v-for="(item,index) in card" :key="index" v-if="current == index">
 			<view class="module-box" v-for="(item,index) in card" :key="index" v-if="current == index">
 				<view class="card" :style="{backgroundColor: `${item.color}`}">
 				<view class="card" :style="{backgroundColor: `${item.color}`}">
 					<view style="display: flex; flex-direction: column;">
 					<view style="display: flex; flex-direction: column;">
-						<text class="card-title">{{item.title}}{{item.num}}</text>
-						<text class="card-subtitle">{{item.subtitle}}{{item.finish}}</text>
+						<text class="card-title">{{item.title}}{{item.detail.data.length}}</text>
+						<text class="card-subtitle">{{item.subtitle}}{{item.detail.finishData.length}}</text>
 						<text class="card-subtitle">完成情况: {{item.level}}</text>
 						<text class="card-subtitle">完成情况: {{item.level}}</text>
 					</view>
 					</view>
 					<view class="image" :style="{backgroundImage:`url(${item.image})`}"></view>
 					<view class="image" :style="{backgroundImage:`url(${item.image})`}"></view>
 				</view>
 				</view>
+
 				<!-- 中间标题 -->
 				<!-- 中间标题 -->
 				<view style="display: flex; align-items: center;">
 				<view style="display: flex; align-items: center;">
 					<view class="cut-off">{{item.detail.nav}}</view>
 					<view class="cut-off">{{item.detail.nav}}</view>
@@ -33,17 +34,15 @@
 							<view class="t-icon t-icon-ceping"></view>
 							<view class="t-icon t-icon-ceping"></view>
 							<view class="item-text">近七天完成率</view>
 							<view class="item-text">近七天完成率</view>
 						</view>
 						</view>
+						<!-- 图表部分 -->
 						<view class="charts-box" v-if="current == 0">
 						<view class="charts-box" v-if="current == 0">
-							<qiun-data-charts type="fin-column" :chartData="homeworkData.testData" :loadingType="4"
-								:canvas2d='true' tooltipFormat='tooltipPercent' canvasId='canvans0980111' />
+							<qiun-data-charts type="fin-area" :chartData="homeworkData.testData" :loadingType="4" :canvas2d='true' tooltipFormat='HomeworkPercent' canvasId='canvans0980111' />
 						</view>
 						</view>
 						<view class="charts-box" v-if="current == 1">
 						<view class="charts-box" v-if="current == 1">
-							<qiun-data-charts type="fin-column" :chartData="homeworkData.homeworkData" :loadingType="4"
-								:canvas2d='true' tooltipFormat='tooltipPercent' canvasId='canvans0933511' />
+							<qiun-data-charts type="fin-area" :chartData="homeworkData.homeworkData" :loadingType="4" :canvas2d='true' tooltipFormat='HomeworkPercent' canvasId='canvans0933511' />
 						</view>
 						</view>
 						<view class="charts-box" v-if="current == 2">
 						<view class="charts-box" v-if="current == 2">
-							<qiun-data-charts type="fin-column" :chartData="homeworkData.activityData" :loadingType="4"
-								:canvas2d='true' tooltipFormat='tooltipPercent' canvasId='canvans0531032' />
+							<qiun-data-charts type="fin-area" :chartData="homeworkData.activityData" :loadingType="4" :canvas2d='true' tooltipFormat='HomeworkPercent' canvasId='canvans0531032' />
 						</view>
 						</view>
 					</view>
 					</view>
 
 
@@ -52,8 +51,24 @@
 							<view class="t-icon t-icon-shenhe"></view>
 							<view class="t-icon t-icon-shenhe"></view>
 							<view class="item-text">今日已完成</view>
 							<view class="item-text">今日已完成</view>
 						</view>
 						</view>
-
+						
+						<view style="display: flex; flex-wrap: wrap;">
+							<view class="block-finish" v-for="(j,y) in item.detail.finishData" :key="y">
+								<view class="title">{{j.name}}</view>
+								<view style="display: flex;">
+									<view class="tag-box">
+										<view class="tag">{{j.subject}}</view>
+									</view>
+									<view class="tag-box">
+										<view class="tag">{{j.teacher}}</view>
+									</view>
+								</view>
+								
+							</view>
+						</view>
+						
 					</view>
 					</view>
+					
 
 
 					<view class="detail-box-item">
 					<view class="detail-box-item">
 						<view class="item-info">
 						<view class="item-info">
@@ -61,24 +76,22 @@
 							<view class="item-text">{{item.detail.title}}</view>
 							<view class="item-text">{{item.detail.title}}</view>
 						</view>
 						</view>
 						
 						
-						<view style="padding: 20rpx;">
-							<u-swipe-action v-for="(msg,i) in item.detail.data" :key="i" >
-								<u-swipe-action-item :options="options1">
-									<view class="swipe-action u-border-top u-border-bottom">
-										<view class="swipe-action__content">
-											<text class="swipe-action__content__text">{{msg.name}}</text>
-										</view>
-									</view>
-								</u-swipe-action-item>
-							</u-swipe-action>
+						<view class="class-block" v-for="(i,x) in item.detail.data" :key="x">
+							<view class="block-title">{{i.name}}</view>
+							<view class="block-tag-box">
+								<view class="block-tag">{{i.subject}}</view>
+							</view>
+							<view class="block-tag-box">
+								<view class="block-tag">{{i.teacher}}</view>
+							</view>
+							<view class="block-subtitle">{{i.description}}</view>
 						</view>
 						</view>
 					</view>
 					</view>
 
 
-
 				</view>
 				</view>
 			</view>
 			</view>
-		</view>
 
 
+		</view>
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -108,9 +121,7 @@
 				//卡片内容
 				//卡片内容
 				card: [{
 				card: [{
 					title: '今日评测数:' + '\xa0\xa0\xa0',
 					title: '今日评测数:' + '\xa0\xa0\xa0',
-					num: 5,
 					subtitle: '评测已完成:' + '\xa0\xa0\xa0',
 					subtitle: '评测已完成:' + '\xa0\xa0\xa0',
-					finish: 3,
 					level: '良好',
 					level: '良好',
 					color: '#0080ff;',
 					color: '#0080ff;',
 					image: 'https://ouch-cdn2.icons8.com/gpV8ZT40juL5H5uR0cv7ptJaV0vbUu64ANLmkch6cr4/rs:fit:1289:912/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9zdmcvNTE3/L2M0Zjg4MDUzLTMx/ZDUtNDlhZS05M2Nj/LWU4YWM3YTNjODAx/My5zdmc.png',
 					image: 'https://ouch-cdn2.icons8.com/gpV8ZT40juL5H5uR0cv7ptJaV0vbUu64ANLmkch6cr4/rs:fit:1289:912/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9zdmcvNTE3/L2M0Zjg4MDUzLTMx/ZDUtNDlhZS05M2Nj/LWU4YWM3YTNjODAx/My5zdmc.png',
@@ -118,22 +129,53 @@
 						nav: '评测信息',
 						nav: '评测信息',
 						title: '评测列表',
 						title: '评测列表',
 						data: [{
 						data: [{
-							name: '评测数据1'
+							name: '评测数据1',
+							subject: '数学',
+							teacher: '王老师',
+							description: '这里是评测描述信息'
 						}, {
 						}, {
-							name: '评测数据2'
+							name: '评测数据2',
+							subject: '语文',
+							teacher: '张老师',
+							description: '这里是评测描述信息'
 						}, {
 						}, {
-							name: '评测数据3'
+							name: '评测数据3',
+							subject: '语文',
+							teacher: '张老师',
+							description: '这里是评测描述信息'
 						}, {
 						}, {
-							name: '评测数据4'
+							name: '评测数据4',
+							subject: '思品',
+							teacher: '李老师',
+							description: '这里是评测描述信息'
 						}, {
 						}, {
-							name: '评测数据5'
+							name: '评测数据5',
+							subject: '科学',
+							teacher: '李老师',
+							description: '这里是评测描述信息'
+						}],
+						
+						
+						finishData: [{
+							name: '评测数据1',
+							subject: '数学',
+							teacher: '王老师',
+							description: '这里是评测描述信息'
+						}, {
+							name: '评测数据2',
+							subject: '语文',
+							teacher: '张老师',
+							description: '这里是评测描述信息'
+						}, {
+							name: '评测数据3',
+							subject: '语文',
+							teacher: '张老师',
+							description: '这里是评测描述信息'
 						}]
 						}]
 					}
 					}
 				}, {
 				}, {
 					title: '今日作业数:' + '\xa0\xa0\xa0',
 					title: '今日作业数:' + '\xa0\xa0\xa0',
-					num: 3,
 					subtitle: '作业已完成:' + '\xa0\xa0\xa0',
 					subtitle: '作业已完成:' + '\xa0\xa0\xa0',
-					finish: 3,
 					level: '完美',
 					level: '完美',
 					color: '#ff8caf;',
 					color: '#ff8caf;',
 					image: 'https://ouch-cdn2.icons8.com/XuAMXajgkDqsOY7cp6uY1LQivtTxahNZjWM1Qk2bfoY/rs:fit:1216:912/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9zdmcvMzE4/LzdjYTU2NDM4LTc4/MTktNDVhNi1hMjZh/LTMyZWE5NDE4YzI5/My5zdmc.png',
 					image: 'https://ouch-cdn2.icons8.com/XuAMXajgkDqsOY7cp6uY1LQivtTxahNZjWM1Qk2bfoY/rs:fit:1216:912/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9zdmcvMzE4/LzdjYTU2NDM4LTc4/MTktNDVhNi1hMjZh/LTMyZWE5NDE4YzI5/My5zdmc.png',
@@ -141,18 +183,42 @@
 						nav: '作业信息',
 						nav: '作业信息',
 						title: '作业列表',
 						title: '作业列表',
 						data: [{
 						data: [{
-							name: '作业数据1'
+							name: '作业数据1',
+							subject: '数学',
+							teacher: '王老师',
+							description: '这里是作业描述信息'
+						}, {
+							name: '作业数据2',
+							subject: '数学',
+							teacher: '王老师',
+							description: '这里是作业描述信息'
 						}, {
 						}, {
-							name: '作业数据2'
+							name: '作业数据3',
+							subject: '数学',
+							teacher: '王老师',
+							description: '这里是作业描述信息'
+						}],
+						
+						finishData:[{
+							name: '作业数据1',
+							subject: '数学',
+							teacher: '王老师',
+							description: '这里是作业描述信息'
+						}, {
+							name: '作业数据2',
+							subject: '数学',
+							teacher: '王老师',
+							description: '这里是作业描述信息'
 						}, {
 						}, {
-							name: '作业数据3'
+							name: '作业数据3',
+							subject: '数学',
+							teacher: '王老师',
+							description: '这里是作业描述信息'
 						}]
 						}]
 					}
 					}
 				}, {
 				}, {
 					title: '今日活动数:' + '\xa0\xa0\xa0',
 					title: '今日活动数:' + '\xa0\xa0\xa0',
-					num: 6,
 					subtitle: '活动已完成:' + '\xa0\xa0\xa0',
 					subtitle: '活动已完成:' + '\xa0\xa0\xa0',
-					finish: 5,
 					level: '优秀',
 					level: '优秀',
 					color: '#f9c752;',
 					color: '#f9c752;',
 					image: 'https://ouch-cdn2.icons8.com/xrmiKHmKAqKegMFWYXXUHk6mqTXXTqoU0wsTFULoboQ/rs:fit:1002:912/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9zdmcvNzcy/LzczYWVmZjhkLTk4/N2ItNDI2Ny04NmNk/LTA1NTI4YjhiMTIw/Ni5zdmc.png',
 					image: 'https://ouch-cdn2.icons8.com/xrmiKHmKAqKegMFWYXXUHk6mqTXXTqoU0wsTFULoboQ/rs:fit:1002:912/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9zdmcvNzcy/LzczYWVmZjhkLTk4/N2ItNDI2Ny04NmNk/LTA1NTI4YjhiMTIw/Ni5zdmc.png',
@@ -160,42 +226,82 @@
 						nav: '活动信息',
 						nav: '活动信息',
 						title: '活动列表',
 						title: '活动列表',
 						data: [{
 						data: [{
-							name: '活动数据1'
+							name: '活动数据1',
+							subject: '数学',
+							teacher: '王老师',
+							description: '这里是活动描述信息'
+						}, {
+							name: '活动数据2',
+							subject: '语文',
+							teacher: '张老师',
+							description: '这里是活动描述信息'
 						}, {
 						}, {
-							name: '活动数据2'
+							name: '活动数据3',
+							subject: '语文',
+							teacher: '张老师',
+							description: '这里是活动描述信息'
 						}, {
 						}, {
-							name: '活动数据3'
+							name: '活动数据4',
+							subject: '数学',
+							teacher: '王老师',
+							description: '这里是活动描述信息'
 						}, {
 						}, {
-							name: '活动数据4'
+							name: '活动数据5',
+							subject: '数学',
+							teacher: '王老师',
+							description: '这里是活动描述信息'
 						}, {
 						}, {
-							name: '活动数据5'
+							name: '活动数据6',
+							subject: '数学',
+							teacher: '王老师',
+							description: '这里是活动描述信息'
+						}],
+						
+						
+						finishData:[{
+							name: '活动数据1',
+							subject: '数学',
+							teacher: '王老师',
+							description: '这里是活动描述信息'
+						}, {
+							name: '活动数据2',
+							subject: '语文',
+							teacher: '张老师',
+							description: '这里是活动描述信息'
 						}, {
 						}, {
-							name: '活动数据6'
+							name: '活动数据3',
+							subject: '语文',
+							teacher: '张老师',
+							description: '这里是活动描述信息'
+						}, {
+							name: '活动数据4',
+							subject: '数学',
+							teacher: '王老师',
+							description: '这里是活动描述信息'
+						}, {
+							name: '活动数据5',
+							subject: '数学',
+							teacher: '王老师',
+							description: '这里是活动描述信息'
 						}]
 						}]
 					}
 					}
 				}],
 				}],
 				//历史数据
 				//历史数据
 				historyData: {
 				historyData: {
-					test: [90, 89, 98, 100, 50, 55,77],
-					homework: [10, 29, 38, 60, 50,88,100],
-					activity: [70, 19, 28, 40, 60,100,100]
+					test: [90, 89, 98, 100, 50, 55, 77],
+					homework: [10, 29, 38, 60, 50, 88, 100],
+					activity: [70, 19, 28, 40, 60, 100, 100]
 				},
 				},
-				options1: [{
-					text: '待办',
-					style: {
-						backgroundColor: '#3c9cff'
-					}
-				}, {
-					text: '删除',
-					style: {
-						backgroundColor: '#f56c6c'
-					}
-				}],
+
+
 			};
 			};
 		},
 		},
 		onLoad() {
 		onLoad() {
 			this.$getTimeStamp()
 			this.$getTimeStamp()
 			this.saveToStudyChart()
 			this.saveToStudyChart()
+			let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
+			let curParam = routes[routes.length - 1].options; //获取路由参数
+			this.current = curParam.index 
 		},
 		},
 		//刷新页面
 		//刷新页面
 		onPullDownRefresh() {
 		onPullDownRefresh() {
@@ -243,12 +349,10 @@
 </script>
 </script>
 
 
 <style lang="scss">
 <style lang="scss">
-	.homework-container {
-
+	@import '@/pages/common/blockmsg.scss';
 		.home-topinfo {
 		.home-topinfo {
 			background: linear-gradient($color-green, $page-background-color) !important;
 			background: linear-gradient($color-green, $page-background-color) !important;
 		}
 		}
-	}
 
 
 	.module-container {
 	.module-container {
 		margin-top: -70rpx;
 		margin-top: -70rpx;
@@ -310,6 +414,7 @@
 				.item-info {
 				.item-info {
 					display: flex;
 					display: flex;
 					align-items: center;
 					align-items: center;
+					padding: 20rpx;
 
 
 					.t-icon {
 					.t-icon {
 						width: 40rpx;
 						width: 40rpx;
@@ -320,42 +425,47 @@
 						font-size: 30rpx;
 						font-size: 30rpx;
 						font-weight: bold;
 						font-weight: bold;
 						color: $color-title;
 						color: $color-title;
-						margin-left: 10rpx;
+						margin-left: 15rpx;
 					}
 					}
 				}
 				}
 			}
 			}
 		}
 		}
 	}
 	}
-
+	.block-finish{
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: space-around;
+		background-color: #f6f6f6;
+		margin: 10rpx auto 10rpx auto;
+		padding: 5rpx;
+		width: 44%;
+		height: 120rpx;
+		border-radius: $card-border-radius;
+		.title {
+			font-size: 30rpx;
+			font-weight: bold;
+			color: $color-title;
+		}
+			
+		.subtitle {
+			font-size: 22rpx;
+			color: $color-title;
+		}
+		.tag-box{
+			border-radius: 20rpx;
+			border: 1rpx solid #3C9CFF;
+			padding: 6rpx;
+			margin: 10rpx;
+			.tag{
+				font-size: 22rpx;
+				color: #3C9CFF;
+			}
+		}
+	}
 	.charts-box {
 	.charts-box {
 		width: 100%;
 		width: 100%;
-		height: 250rpx;
+		height: 230rpx;
 		margin-bottom: 20rpx;
 		margin-bottom: 20rpx;
 	}
 	}
-
-	.t-icon {
-		margin: 20rpx;
-		width: 110rpx;
-		height: 110rpx;
-	}
-
-	.u-page {
-		padding: 0;
-	}
-
-	.u-demo-block__title {
-		padding: 10px 0 2px 15px;
-	}
-
-	.swipe-action {
-		&__content {
-			padding: 25rpx 0;
-
-			&__text {
-				font-size: 15px;
-				color: $u-main-color;
-				padding-left: 30rpx;
-			}
-		}
-	}
-</style>
+</style>

+ 125 - 18
subpkg/classmsg/classmsg.vue

@@ -1,19 +1,126 @@
-<template>
-	<view>
-		
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				
-			};
-		}
-	}
-</script>
-
-<style lang="scss">
-
+<template>
+	<view>
+		<back></back>
+
+		<view class="card-box">
+			<view class="card-item" style="width: 100%;">
+				<view class="card-info">
+					<view class="t-icon t-icon-shuji1"></view>
+					<text class="info-text">今日课程列表</text>
+				</view>
+
+				<view class="home-title-text" style="margin: 0 0 30rpx 0;">
+					<view class="msg">今日课程数:</view>
+					<view class="card-content">{{classList.length}}</view>
+					<view style="display: flex; align-items: center; margin-left: auto; margin-right: 30rpx;">
+						<view class="t-icon t-icon-lishi"></view>
+						<view class="msg" style="margin-left: 10rpx;">3月29日</view>
+						<view class="msg" style="margin-left: 10rpx;">星期二</view>
+					</view>
+				</view>
+
+
+				<view class="class-block" v-for="(item,index) in classList" :key="index">
+					<view class="block-title">{{item.name}}</view>
+					<view class="block-tag-box">
+						<view class="block-tag">{{item.teacher}}</view>
+					</view>
+					<view class="block-subtitle">{{item.timeFrame}}</view>
+					<view class="block-subtitle">{{item.time}}</view>
+				</view>
+
+			</view>
+
+			<view class="card-item" style="width: 100%;">
+				<view class="card-info">
+					<view class="t-icon t-icon-zhishi"></view>
+					<text class="info-text">孩子课程表</text>
+				</view>
+			</view>
+		</view>
+
+
+	</view>
+</template>
+
+<script>
+	import {
+		mapState
+	} from 'vuex'
+	export default {
+		computed: {
+			...mapState('m_children', ['classList'])
+		},
+		data() {
+			return {
+
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+	@import '@/pages/common/blockmsg.scss';
+	.card-box {
+		display: flex;
+		flex-flow: column wrap;
+		margin: 0 20rpx 0 20rpx;
+		justify-content: space-between;
+
+		.card-item {
+			margin: 2% 0;
+			width: 48%;
+			height: auto;
+			display: flex;
+			flex-direction: column;
+			justify-content: space-around;
+			background-color: #FFF;
+			// box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.05);
+			border-radius: $card-border-radius;
+
+			.card-info {
+				display: flex;
+				align-items: center;
+				padding: 20rpx;
+
+				.info-text {
+					font-size: 30rpx;
+					font-weight: bold;
+					color: #3B4144;
+					margin-left: 10rpx;
+				}
+			}
+		}
+	}
+
+	.card-content {
+		font-size: 35rpx;
+		margin: 10rpx 0 10rpx 25rpx;
+		color: $u-primary;
+		font-weight: bold;
+	}
+
+	.home-title-text {
+		display: flex;
+		align-items: center;
+		flex-wrap: wrap;
+		margin: -10rpx 0 10rpx 0;
+
+		.t-icon {
+			width: 30rpx;
+			height: 30rpx;
+		}
+	}
+
+	.msg {
+		color: $color-title;
+		margin-left: 30rpx;
+		font-size: 30rpx;
+		font-weight: bold;
+	}
+
+	.t-icon {
+		width: 40rpx;
+		height: 40rpx;
+	}
 </style>
 </style>

+ 16 - 33
uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js

@@ -82,13 +82,13 @@ const formatDateTime = (timeStamp, returnType) => {
 const cfu = {
 const cfu = {
 	//demotype为自定义图表类型,一般不需要自定义图表类型,只需要改根节点上对应的类型即可
 	//demotype为自定义图表类型,一般不需要自定义图表类型,只需要改根节点上对应的类型即可
 	"type": ["pie", "ring", "rose", "arcbar", "line", "column", "area", "radar", "mainline", "mini-line",
 	"type": ["pie", "ring", "rose", "arcbar", "line", "column", "area", "radar", "mainline", "mini-line",
-		"mini-area", "mini-column", "mini-rose", "fin-column"
+		"mini-area", "mini-column", "mini-rose", "fin-area"
 	],
 	],
 	"range": [],
 	"range": [],
 	//增加自定义图表类型,如果需要categories,请在这里加入您的图表类型,例如最后的"demotype"
 	//增加自定义图表类型,如果需要categories,请在这里加入您的图表类型,例如最后的"demotype"
 	//自定义类型时需要注意"tline","tarea","scatter","bubble"等时间轴(矢量x轴)类图表,没有categories,不需要加入categories
 	//自定义类型时需要注意"tline","tarea","scatter","bubble"等时间轴(矢量x轴)类图表,没有categories,不需要加入categories
 	"categories": ["line", "column", "bar", "area", "radar", "mainline", "mini-line", "mini-area", "mini-column",
 	"categories": ["line", "column", "bar", "area", "radar", "mainline", "mini-line", "mini-area", "mini-column",
-		"fin-column"
+		"fin-area"
 	],
 	],
 	//instance为实例变量承载属性,不要删除
 	//instance为实例变量承载属性,不要删除
 	"instance": {},
 	"instance": {},
@@ -120,6 +120,9 @@ const cfu = {
 		"tooltipPercent": function(item, category, index, opts) {
 		"tooltipPercent": function(item, category, index, opts) {
 			return category + ' ' + item.name + ': ' + item.data + ' % '
 			return category + ' ' + item.name + ': ' + item.data + ' % '
 		},
 		},
+		"HomeworkPercent": function(item, category, index, opts) {
+			return category + ' ' + item.name + '第'+(index+1)+'天: ' + item.data + ' % '
+		},
 		"tooltipHour": function(item, category, index, opts) {
 		"tooltipHour": function(item, category, index, opts) {
 			return item.name + ': ' + item.data + ' 小时 '
 			return item.name + ': ' + item.data + ' 小时 '
 		},
 		},
@@ -526,17 +529,17 @@ const cfu = {
 			},
 			},
 		},
 		},
 	},
 	},
-	"fin-column": {
-		"type": "column",
+	"fin-area": {
+		"type": "area",
 		"animation": true,
 		"animation": true,
 		"timing": "easeOut",
 		"timing": "easeOut",
 		"duration": 500,
 		"duration": 500,
 		"color": color,
 		"color": color,
 		"padding": [
 		"padding": [
 			10,
 			10,
-			15,
-			0,
-			15
+			-10,
+			-10,
+			-10
 		],
 		],
 		"dataLabel": false,
 		"dataLabel": false,
 		"dataPointShape": false,
 		"dataPointShape": false,
@@ -557,32 +560,12 @@ const cfu = {
 			"show": false,
 			"show": false,
 		},
 		},
 		"extra": {
 		"extra": {
-			"column": {
-				"type": "group",
-				"width": 10,
-				"seriesGap": 2,
-				"categoryGap": 3,
-				"barBorderCircle": false,
-				"barBorderRadius": [
-					10,
-					10,
-					10,
-					10
-				],
-				"linearType": "opacity",
-				"linearOpacity": 0.7,
-				"customColor": [
-					"#0052d4",
-					"#FFFFFF",
-					"#ff5959",
-					"#FFFFFF"
-				],
-				"colorStop": 0.5,
-				"meterBorder": 1,
-				"meterFillColor": "#FFFFFF",
-				"activeBgColor": "#FFFFFF",
-				"activeBgOpacity": 0.08,
-				"meterBorde": 1
+			"area": {
+				"type": "curve",
+				"opacity": 0.7,
+				"addLine": true,
+				"width": 2,
+				"gradient": true
 			},
 			},
 			"tooltip": tooltip,
 			"tooltip": tooltip,
 		}
 		}