소스 검색

update:UI,活动单次详情页

KELECHUAN 3 년 전
부모
커밋
500bf20bc1

BIN
.vs/slnx.sqlite


+ 1 - 2
components/interactive-box/interactive-box.vue

@@ -56,8 +56,7 @@
 					<text class="chart-info-text">近七天睡眠</text>
 					<text class="chart-info-text">近七天睡眠</text>
 				</view>
 				</view>
 				<view class="chart-view">
 				<view class="chart-view">
-					<qiun-data-charts type="pie" :chartData="sleepRing" :loadingType="4" tooltipFormat='pieHour'
-						:canvas2d="true" canvasId="canvasId6312231" />
+					<qiun-data-charts type="pie" :chartData="sleepRing" :loadingType="4" tooltipFormat='pieHour' :canvas2d="true" canvasId="canvasId6312231" />
 				</view>
 				</view>
 			</view>
 			</view>
 
 

+ 82 - 89
components/todayclass-box/todayclass-box.vue

@@ -4,41 +4,84 @@
 		<!-- 课程列表 -->
 		<!-- 课程列表 -->
 		<view style="margin-bottom: 20rpx;">
 		<view style="margin-bottom: 20rpx;">
 			<!-- 插画 -->
 			<!-- 插画 -->
-			<view class="detail-image" v-if="state === 'none'" :style="{backgroundImage:`url(${image.none})`}"></view>
+			<view class="detail-image" v-if="classCurrent === -1" :style="{backgroundImage:`url(${image.none})`}">
+			</view>
+			<view v-if="classCurrent === -1">
+				<view class="class-block">
+					<view class="block-title">自由安排</view>
+					<view class="block-tag-box">
+						<view class="block-tag">已下课</view>
+					</view>
+					<view class="block-subtitle">休息时间</view>
+					<view style="display: flex; align-items: center;" @click="navClass">
+						<view class="t-icon t-icon-fenlei" style="width: 40rpx;height: 40rpx;"></view>
+						<view style="font-size: 30rpx;color: #4169E1;">课程列表</view>
+					</view>
+
+				</view>
+			</view>
 			<!-- 课程列表 -->
 			<!-- 课程列表 -->
-			<view class="class-block" v-for="(classInfo,classIndex) in homeClassList" :key="classIndex"
-				:style="{backgroundColor: classIndex === 1 ? '#FFF' : ''}">
-				<view class="block-title" :style="{color: classIndex === 1 ? '#4169E1' : ''}">{{classInfo.name}}</view>
-				<!-- 老师tag -->
-				<view class="block-tag-box">
-					<view class="block-tag">{{classInfo.teacher}}</view>
+			<view v-if="classCurrent != -1">
+				<!-- 上上节 -->
+				<view class="class-block" v-if="classCurrent === classList.length">
+					<view class="block-title">{{classList[classCurrent-3].name}}</view>
+					<view class="block-tag-box">
+						<view class="block-tag">{{classList[classCurrent-3].teacher}}</view>
+					</view>
+					<view class="block-subtitle">更早</view>
+					<view class="block-title">{{classList[classCurrent-3].time}}</view>
+					<view class="t-icon t-icon-sheying" @click="navVideoBefore(classCurrent-3)"></view>
 				</view>
 				</view>
-
-				<!-- 排位 -->
-				<view v-if="state != 'none'">
-					<view class="block-subtitle" v-if="classIndex === 0">{{first}}</view>
-					<view class="block-index" v-if="classIndex === 1">{{second}}</view>
-					<view class="block-subtitle" v-if="classIndex === 2">{{third}}</view>
+				<!-- 上节 -->
+				<view class="class-block" v-if="classCurrent >= 2">
+					<view class="block-title">{{classList[classCurrent-2].name}}</view>
+					<view class="block-tag-box">
+						<view class="block-tag">{{classList[classCurrent-2].teacher}}</view>
+					</view>
+					<view class="block-subtitle">上节</view>
+					<view class="block-title">{{classList[classCurrent-2].time}}</view>
+					<view class="t-icon t-icon-sheying" @click="navVideoBefore(classCurrent-2)"></view>
 				</view>
 				</view>
-
-				<!-- 时间 -->
-				<view class="block-subtitle" :style="{color: classIndex === 1 ? '#4169E1' : (classCurrent === -1? '#4169E1' : '')}" @click="navClass">
-					{{classInfo.time}}
+				<!-- 当前 -->
+				<view class="class-block" style="background-color: #FFF;">
+					<view class="block-title" style="color: #4169E1;">{{classList[classCurrent-1].name}}</view>
+					<view class="block-tag-box">
+						<view class="block-tag">{{classList[classCurrent-1].teacher}}</view>
+					</view>
+					<view class="block-index">当前</view>
+					<view class="block-title" style="color: #4169E1;">{{classList[classCurrent-1].time}}</view>
+					<view class="t-icon t-icon-shipinsheying" @click="navVideoNow(classCurrent-1)"></view>
+				</view>
+				<!-- 下节 -->
+				<view class="class-block" v-if="!(classCurrent === classList.length)">
+					<view class="block-title">{{classList[classCurrent].name}}</view>
+					<view class="block-tag-box">
+						<view class="block-tag">{{classList[classCurrent].teacher}}</view>
+					</view>
+					<view class="block-subtitle">下节</view>
+					<view class="block-title">{{classList[classCurrent].time}}</view>
+					<view class="t-icon t-icon-tonggao" style="width: 64rpx;height: 64rpx;margin-right: 18rpx;"></view>
+				</view>
+				<!-- 下下节 -->
+				<view class="class-block" v-if="classCurrent === 1">
+					<view class="block-title">{{classList[classCurrent+1].name}}</view>
+					<view class="block-tag-box">
+						<view class="block-tag">{{classList[classCurrent+1].teacher}}</view>
+					</view>
+					<view class="block-subtitle">更晚</view>
+					<view class="block-title">{{classList[classCurrent+1].time}}</view>
+					<view class="t-icon t-icon-tonggao" style="width: 62rpx;height: 62rpx;margin-right: 18rpx;"></view>
 				</view>
 				</view>
-				<!-- 操作 -->
-				<u-tag :text="before" :type="beforeType" plain icon="hourglass"
-					v-if="classIndex === 0 && state != 'none'" @click="navVideoBefore(classCurrent-2)"></u-tag>
-				<u-tag :text="now" type="error" icon="play-right" v-if="classIndex === 1"
-					@click="navVideoNow(classCurrent-1)"></u-tag>
-				<u-tag :text="after" type="info"  plain icon="pushpin" v-if="classIndex === 2"></u-tag>
 			</view>
 			</view>
+
 		</view>
 		</view>
-		
+
 	</view>
 	</view>
 </template>
 </template>
 <script>
 <script>
 	import {
 	import {
-		mapState
+		mapState,
+		mapMutations
 	} from 'vuex'
 	} from 'vuex'
 	export default {
 	export default {
 		name: "todayclass-box",
 		name: "todayclass-box",
@@ -55,76 +98,22 @@
 		},
 		},
 		data() {
 		data() {
 			return {
 			return {
-				//展示数据
-				homeClassList: {},
-				//是否展示
-				state: '',
 				image: {
 				image: {
 					none: 'https://image.meiye.art/pic_1631411820764Vm5iw82gnV2lVKWRokFmU',
 					none: 'https://image.meiye.art/pic_1631411820764Vm5iw82gnV2lVKWRokFmU',
 					class: 'https://image.meiye.art/pic_1631411821366fqhkuMI110LbOlAIdv1SV',
 					class: 'https://image.meiye.art/pic_1631411821366fqhkuMI110LbOlAIdv1SV',
 				},
 				},
-				first: '上节',
-				second: '当前',
-				third: '下节',
-
-				before: '查看回放',
-				now: '查看直播',
-				after: '暂未开始',
-
-				beforeType: 'success'
 			};
 			};
 		},
 		},
 		watch: {
 		watch: {
 			classCurrent() {
 			classCurrent() {
-				this.getHomeClassList()
+				this.setClassCurrent()
 			}
 			}
 		},
 		},
 		methods: {
 		methods: {
+			...mapMutations('m_children',['updateClassCurrent']),
 			//获取首页课程数据
 			//获取首页课程数据
-			getHomeClassList() {
-				//不在任何一个时间段内
-				if (this.classCurrent === -1) {
-					this.state = 'none'
-					this.homeClassList = [{
-						name: '休息时间',
-						teacher: '孩子自由安排',
-						time: '查看课程列表'
-					}]
-				}
-				//三节完整数据
-				if (this.classCurrent >= 2 && this.classCurrent <= this.classList.length) {
-					this.state = ''
-					this.third = '下节'
-					this.after = '暂未开始'
-					this.before = '查看回放'
-					this.first = '上节'
-					this.homeClassList = this.classList.slice(this.classCurrent - 2, this.classCurrent + 1)
-					if (this.classCurrent === this.classList.length) {
-						const arr = {
-							name: '结束',
-							teacher: '完成今日课程',
-							time: '17:20'
-						}
-						this.third = '时间:'
-						this.after = '巩固已学'
-						this.homeClassList.push(arr)
-					}
-				}
-				//数据不足三节
-				if (this.classCurrent === 1) {
-					this.state = ''
-					const arr = [{
-						name: '起始',
-						teacher: '开始今日课程',
-						time: '8:30'
-					}]
-					this.before = '上学打卡'
-					this.first = '时间:'
-					this.beforeType = 'info'
-					arr.push(this.classList[0])
-					arr.push(this.classList[1])
-					this.homeClassList = arr
-				}
+			setClassCurrent() {
+				this.updateClassCurrent(this.classCurrent)
 			},
 			},
 			navClass() {
 			navClass() {
 				uni.navigateTo({
 				uni.navigateTo({
@@ -132,11 +121,9 @@
 				})
 				})
 			},
 			},
 			navVideoBefore(index) {
 			navVideoBefore(index) {
-				if (this.before === '查看回放') {
-					uni.navigateTo({
-						url: `/subpkg/video/videopage?info=${index}`
-					})
-				}
+				uni.navigateTo({
+					url: `/subpkg/video/videopage?info=${index}`
+				})
 			},
 			},
 			navVideoNow(index) {
 			navVideoNow(index) {
 				uni.navigateTo({
 				uni.navigateTo({
@@ -145,7 +132,7 @@
 			},
 			},
 		},
 		},
 		created() {
 		created() {
-			this.getHomeClassList()
+			this.setClassCurrent()
 		}
 		}
 	}
 	}
 </script>
 </script>
@@ -165,4 +152,10 @@
 		font-size: 22rpx;
 		font-size: 22rpx;
 		color: $color-mixblue;
 		color: $color-mixblue;
 	}
 	}
+
+	.t-icon {
+		width: 70rpx;
+		height: 70rpx;
+		margin-right:10rpx;
+	}
 </style>
 </style>

+ 2 - 3
gradepkg/common/chartpage.scss

@@ -129,7 +129,6 @@
 		
 		
 				.btn-box {
 				.btn-box {
 					display: flex;
 					display: flex;
-					align-items: center;
 					margin-left: auto;
 					margin-left: auto;
 					margin-right: 45rpx;
 					margin-right: 45rpx;
 					.btn {
 					.btn {
@@ -139,8 +138,8 @@
 						font-size: 28rpx;
 						font-size: 28rpx;
 					}
 					}
 					.t-icon{
 					.t-icon{
-						width: 42rpx; 
-						height: 42rpx;
+						width: 45rpx; 
+						height: 45rpx;
 					}
 					}
 				}
 				}
 			}
 			}

+ 21 - 0
pages.json

@@ -116,6 +116,27 @@
 					"enablePullDownRefresh": false
 					"enablePullDownRefresh": false
 				}
 				}
 
 
+			}, {
+				"path": "detail/exam",
+				"style": {
+					"navigationStyle": "custom",
+					"enablePullDownRefresh": false
+				}
+
+			}, {
+				"path": "detail/homework",
+				"style": {
+					"navigationStyle": "custom",
+					"enablePullDownRefresh": false
+				}
+
+			}, {
+				"path": "detail/activity",
+				"style": {
+					"navigationStyle": "custom",
+					"enablePullDownRefresh": false
+				}
+
 			}, {
 			}, {
 				"path": "detaillist/examlist",
 				"path": "detaillist/examlist",
 				"style": {
 				"style": {

+ 2 - 2
pages/common/mainpage.scss

@@ -59,8 +59,8 @@
 	}
 	}
 	.charts-box {
 	.charts-box {
 		width: 100%;
 		width: 100%;
-		height: 300rpx;
-		padding-bottom: 20rpx;
+		height: 310rpx;
+		padding-bottom: 10rpx;
 	}
 	}
 
 
 	.t-icon {
 	.t-icon {

+ 2 - 2
pages/grade/grade.vue

@@ -297,7 +297,7 @@
 			align-items: center;
 			align-items: center;
 			justify-content: flex-start;
 			justify-content: flex-start;
 			width: 100%;
 			width: 100%;
-			margin: 20rpx 0 35rpx 40rpx;
+			margin: 20rpx 0 20rpx 40rpx;
 
 
 			.chart-name-text {
 			.chart-name-text {
 				margin-left: 15rpx;
 				margin-left: 15rpx;
@@ -309,7 +309,7 @@
 
 
 		.charts-box {
 		.charts-box {
 			width: 100%;
 			width: 100%;
-			height: 250rpx;
+			height: 265rpx;
 		}
 		}
 	}
 	}
 
 

+ 1 - 16
pages/home/home.vue

@@ -15,7 +15,7 @@
 				<view class="card-info" style="padding-bottom: 20rpx;">
 				<view class="card-info" style="padding-bottom: 20rpx;">
 					<view :class="icon.class"></view>
 					<view :class="icon.class"></view>
 					<text class="info-text">今日课程</text>
 					<text class="info-text">今日课程</text>
-					<view style="display: flex; align-items: center;margin: 0 5rpx 0 auto;" @click="navClass">
+					<view style="display: flex; align-items: center;margin: 0 5rpx 0 auto;" @click="navClass" v-if="classCurrent != -1">
 						<view class="t-icon t-icon-fenlei"></view>
 						<view class="t-icon t-icon-fenlei"></view>
 						<view class="msg" style="font-size: 30rpx; margin-left: 5px;color: #4169E1;">课程列表</view>
 						<view class="msg" style="font-size: 30rpx; margin-left: 5px;color: #4169E1;">课程列表</view>
 					</view>
 					</view>
@@ -216,11 +216,6 @@
 					subtitle: {
 					subtitle: {
 						name: this.homeData.evaluationArcbar.series[0].name
 						name: this.homeData.evaluationArcbar.series[0].name
 					},
 					},
-					extra: {
-						arcbar: {
-							type: 'circle'
-						}
-					}
 				}
 				}
 				let homework = {
 				let homework = {
 					title: {
 					title: {
@@ -230,11 +225,6 @@
 					subtitle: {
 					subtitle: {
 						name: this.homeData.homeworkArcbar.series[0].name
 						name: this.homeData.homeworkArcbar.series[0].name
 					},
 					},
-					extra: {
-						arcbar: {
-							type: 'circle'
-						}
-					}
 				}
 				}
 				let activity = {
 				let activity = {
 					title: {
 					title: {
@@ -244,11 +234,6 @@
 					subtitle: {
 					subtitle: {
 						name: this.homeData.activityArcbar.series[0].name
 						name: this.homeData.activityArcbar.series[0].name
 					},
 					},
-					extra: {
-						arcbar: {
-							type: 'circle'
-						}
-					}
 				}
 				}
 				this.evaluationOpts = evaluation;
 				this.evaluationOpts = evaluation;
 				this.homeworkOpts = homework;
 				this.homeworkOpts = homework;

+ 35 - 15
pages/homework/homework.vue

@@ -104,17 +104,16 @@
 						<view class="item-info">
 						<view class="item-info">
 							<view class="t-icon t-icon-daiban"></view>
 							<view class="t-icon t-icon-daiban"></view>
 							<view class="item-text">评测列表</view>
 							<view class="item-text">评测列表</view>
-							<view class="btn" @click="navData">
+							<view class="btn" @click="navListData">
 								<view class="t-icon t-icon-fenlei"></view>
 								<view class="t-icon t-icon-fenlei"></view>
 								<view class="msg">详情列表</view>
 								<view class="msg">详情列表</view>
 							</view>
 							</view>
 						</view>
 						</view>
 						<view style="margin-bottom: 20rpx;">
 						<view style="margin-bottom: 20rpx;">
-							<view class="block-box" v-for="(item,i) in testData" :key="i">
+							<view class="block-box" v-for="(item,i) in testData" :key="i" @click="navSingleData(item)">
 								<view class="index"
 								<view class="index"
 									:style="{backgroundColor: item.examInfo.progress === 'finish'? '#23b46c':'#4169E1'}">
 									:style="{backgroundColor: item.examInfo.progress === 'finish'? '#23b46c':'#4169E1'}">
 								</view>
 								</view>
-
 								<view class="class-block" style="width: 85%;">
 								<view class="class-block" style="width: 85%;">
 									<view style="width: 40%;">
 									<view style="width: 40%;">
 										<view class="list-item-title">{{item.examInfo.name}}</view>
 										<view class="list-item-title">{{item.examInfo.name}}</view>
@@ -133,9 +132,7 @@
 											</view>
 											</view>
 										</view>
 										</view>
 									</view>
 									</view>
-
 								</view>
 								</view>
-
 							</view>
 							</view>
 						</view>
 						</view>
 					</view>
 					</view>
@@ -144,13 +141,13 @@
 						<view class="item-info">
 						<view class="item-info">
 							<view class="t-icon t-icon-daiban"></view>
 							<view class="t-icon t-icon-daiban"></view>
 							<view class="item-text">作业列表</view>
 							<view class="item-text">作业列表</view>
-							<view class="btn" @click="navData">
+							<view class="btn" @click="navListData">
 								<view class="t-icon t-icon-fenlei"></view>
 								<view class="t-icon t-icon-fenlei"></view>
 								<view class="msg">详情列表</view>
 								<view class="msg">详情列表</view>
 							</view>
 							</view>
 						</view>
 						</view>
 						<view style="margin-bottom: 20rpx;">
 						<view style="margin-bottom: 20rpx;">
-							<view class="block-box" v-for="(item,i) in homeworkData" :key="i">
+							<view class="block-box" v-for="(item,i) in homeworkData" :key="i" @click="navSingleData(item)">
 								<view class="index"
 								<view class="index"
 									:style="{backgroundColor: item.work.progress === 'finish'? '#23b46c':'#ff8caf'}">
 									:style="{backgroundColor: item.work.progress === 'finish'? '#23b46c':'#ff8caf'}">
 								</view>
 								</view>
@@ -181,13 +178,13 @@
 						<view class="item-info">
 						<view class="item-info">
 							<view class="t-icon t-icon-daiban"></view>
 							<view class="t-icon t-icon-daiban"></view>
 							<view class="item-text">活动列表</view>
 							<view class="item-text">活动列表</view>
-							<view class="btn" @click="navData">
+							<view class="btn" @click="navListData">
 								<view class="t-icon t-icon-fenlei"></view>
 								<view class="t-icon t-icon-fenlei"></view>
 								<view class="msg">详情列表</view>
 								<view class="msg">详情列表</view>
 							</view>
 							</view>
 						</view>
 						</view>
 						<view style="margin-bottom: 20rpx;">
 						<view style="margin-bottom: 20rpx;">
-							<view class="block-box" v-for="(item,i) in activityData" :key="i">
+							<view class="block-box" v-for="(item,i) in activityData" :key="i" @click="navSingleData(item)">
 								<view class="index"
 								<view class="index"
 									:style="{ backgroundColor: item.survey.progress === 'finish' || item.vote.progress === 'finish'? '#23b46c':'#f9c752'}">
 									:style="{ backgroundColor: item.survey.progress === 'finish' || item.vote.progress === 'finish'? '#23b46c':'#f9c752'}">
 								</view>
 								</view>
@@ -284,7 +281,7 @@
 		},
 		},
 		methods: {
 		methods: {
 			...mapMutations('m_chart', ['updateTestArea', 'updateHomeworkArea', 'updateActivityArea']),
 			...mapMutations('m_chart', ['updateTestArea', 'updateHomeworkArea', 'updateActivityArea']),
-			...mapMutations('m_children', ['updateDetail']),
+			...mapMutations('m_children', ['updateDetailList','updateDetail']),
 			//初始化页面
 			//初始化页面
 			init() {
 			init() {
 				this.timeStamp = (new Date()).format("hh:mm")
 				this.timeStamp = (new Date()).format("hh:mm")
@@ -348,26 +345,49 @@
 				this.updateActivityArea(activityDataTemp)
 				this.updateActivityArea(activityDataTemp)
 			},
 			},
 			//导航到详情页面
 			//导航到详情页面
-			navData() {
+			navListData() {
 				if (this.current === 0) {
 				if (this.current === 0) {
-					this.updateDetail(this.testData)
+					this.updateDetailList(this.testData)
 					uni.navigateTo({
 					uni.navigateTo({
 						url: `/subpkg/detaillist/examlist`
 						url: `/subpkg/detaillist/examlist`
 					})
 					})
 				}
 				}
 				if (this.current === 1) {
 				if (this.current === 1) {
-					this.updateDetail(this.homeworkData)
+					this.updateDetailList(this.homeworkData)
 					uni.navigateTo({
 					uni.navigateTo({
 						url: `/subpkg/detaillist/homeworklist`
 						url: `/subpkg/detaillist/homeworklist`
 					})
 					})
 				}
 				}
 				if (this.current === 2) {
 				if (this.current === 2) {
-					this.updateDetail(this.activityData)
+					this.updateDetailList(this.activityData)
 					uni.navigateTo({
 					uni.navigateTo({
 						url: `/subpkg/detaillist/activitylist`
 						url: `/subpkg/detaillist/activitylist`
 					})
 					})
 				}
 				}
-
+			},
+			//导航到单条数据页面
+			navSingleData(item){
+				if (this.current === 0) {
+					this.updateDetail(item)
+					console.log(item);
+					uni.navigateTo({
+						url: `/subpkg/detail/exam`
+					})
+				}
+				if (this.current === 1) {
+					this.updateDetail(item)
+					console.log(item);
+					uni.navigateTo({
+						url: `/subpkg/detail/homework`
+					})
+				}
+				if (this.current === 2) {
+					this.updateDetail(item)
+					console.log(item);
+					uni.navigateTo({
+						url: `/subpkg/detail/activity`
+					})
+				}
 			}
 			}
 		}
 		}
 	}
 	}

+ 6 - 6
pages/my/my.vue

@@ -43,7 +43,7 @@
 							<view class="t-icon t-icon-zhanghu"></view>
 							<view class="t-icon t-icon-zhanghu"></view>
 							<view class="cell-text">个人信息</view>
 							<view class="cell-text">个人信息</view>
 						</view>
 						</view>
-						<view class="t-icon t-icon-you" style="width: 20px;height: 20px;"></view>
+						<view class="t-icon t-icon-you" style="width: 45rpx;height: 45rpx;"></view>
 					</view>
 					</view>
 					<view class="cell" @click="navMsg">
 					<view class="cell" @click="navMsg">
 						<view class="cell-left">
 						<view class="cell-left">
@@ -54,7 +54,7 @@
 							<view style="margin-right: 20rpx;">
 							<view style="margin-right: 20rpx;">
 								<u-badge type="warning" shape="horn" :value="myData.msgList.length"></u-badge>
 								<u-badge type="warning" shape="horn" :value="myData.msgList.length"></u-badge>
 							</view>
 							</view>
-							<view class="t-icon t-icon-you" style="width: 20px;height: 20px;"></view>
+							<view class="t-icon t-icon-you" style="width: 45rpx;height: 45rpx;"></view>
 						</view>
 						</view>
 					</view>
 					</view>
 					<view class="cell" @click="logout">
 					<view class="cell" @click="logout">
@@ -62,7 +62,7 @@
 							<view class="t-icon t-icon-a-tuichulikai"></view>
 							<view class="t-icon t-icon-a-tuichulikai"></view>
 							<view class="cell-text">退出登录</view>
 							<view class="cell-text">退出登录</view>
 						</view>
 						</view>
-						<view class="t-icon t-icon-you" style="width: 20px;height: 20px;"></view>
+						<view class="t-icon t-icon-you" style="width: 45rpx;height: 45rpx;"></view>
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
@@ -74,21 +74,21 @@
 							<view class="t-icon t-icon-shoucang"></view>
 							<view class="t-icon t-icon-shoucang"></view>
 							<view class="cell-text">订阅中心</view>
 							<view class="cell-text">订阅中心</view>
 						</view>
 						</view>
-						<view class="t-icon t-icon-you" style="width: 20px;height: 20px;"></view>
+						<view class="t-icon t-icon-you" style="width: 45rpx;height: 45rpx;"></view>
 					</view>
 					</view>
 					<view class="cell">
 					<view class="cell">
 						<view class="cell-left">
 						<view class="cell-left">
 							<view class="t-icon t-icon-a-appyingyongchengxukaifa"></view>
 							<view class="t-icon t-icon-a-appyingyongchengxukaifa"></view>
 							<view class="cell-text">帮助中心</view>
 							<view class="cell-text">帮助中心</view>
 						</view>
 						</view>
-						<view class="t-icon t-icon-you" style="width: 20px;height: 20px;"></view>
+						<view class="t-icon t-icon-you" style="width: 45rpx;height: 45rpx;"></view>
 					</view>
 					</view>
 					<view class="cell">
 					<view class="cell">
 						<view class="cell-left">
 						<view class="cell-left">
 							<view class="t-icon t-icon-shuji"></view>
 							<view class="t-icon t-icon-shuji"></view>
 							<view class="cell-text">用户协议</view>
 							<view class="cell-text">用户协议</view>
 						</view>
 						</view>
-						<view class="t-icon t-icon-you" style="width: 20px;height: 20px;"></view>
+						<view class="t-icon t-icon-you" style="width: 45rpx;height: 45rpx;"></view>
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>

+ 14 - 2
store/children.js

@@ -10,6 +10,8 @@ export default {
 		semester: uni.getStorageSync('semester') || '请选择学期',
 		semester: uni.getStorageSync('semester') || '请选择学期',
 		//课程列表
 		//课程列表
 		classList: '',
 		classList: '',
+		//当前课程
+		classCurrent: '',
 		//打卡记录
 		//打卡记录
 		records: '',
 		records: '',
 		//日历打卡统计数据
 		//日历打卡统计数据
@@ -19,6 +21,8 @@ export default {
 		},
 		},
 		//评测作业活动内容
 		//评测作业活动内容
 		detailList: '',
 		detailList: '',
+		//评测作业活动单个详情
+		singleDetail: '',
 	}),
 	}),
 	//模块方法(修改数据)
 	//模块方法(修改数据)
 	mutations: {
 	mutations: {
@@ -45,10 +49,18 @@ export default {
 		updateRecords(state, records){
 		updateRecords(state, records){
 			state.records = records
 			state.records = records
 		},
 		},
-		//更新评测作业活动信息
-		updateDetail(state, detailList) {
+		//更新评测作业活动列表信息
+		updateDetailList(state, detailList) {
 			state.detailList = detailList
 			state.detailList = detailList
 		},
 		},
+		//更新评测作业活动单个详情信息
+		updateDetail(state, singleDetail) {
+			state.singleDetail = singleDetail
+		},
+		//更新当前课程
+		updateClassCurrent(state, classCurrent){
+			state.classCurrent = classCurrent
+		},
 
 
 		
 		
 		
 		

+ 2 - 3
subpkg/calendar/calendar.vue

@@ -18,7 +18,7 @@
 						</view>
 						</view>
 						<view class="number-box">
 						<view class="number-box">
 							<text class="number"
 							<text class="number"
-								:style="{color: monthAttendQuality==='优秀'?'#4169E1':(monthAttendQuality === '良好'?'#f9c752':'#3B4144')}">{{monthAttendQuality}}</text>
+								:style="{color: monthAttendQuality==='优秀'?'#4169E1':(monthAttendQuality === '良好'?'#f9c752':'#ff5959')}">{{monthAttendQuality}}</text>
 							<view class="number-detail">出勤质量</view>
 							<view class="number-detail">出勤质量</view>
 						</view>
 						</view>
 					</view>
 					</view>
@@ -34,7 +34,7 @@
 				</view>
 				</view>
 				<view class="state-box">
 				<view class="state-box">
 					<view class="state"
 					<view class="state"
-						:style="{backgroundColor: attendance==='已打卡'?'#4169E1':(attendance === '未打卡'?'#f9c752':'#bebebe')}">
+						:style="{backgroundColor: attendance==='已打卡'?'#4169E1':(attendance === '未打卡'?'#ff5959':'#bebebe')}">
 						<view class="state-text">{{attendance}}</view>
 						<view class="state-text">{{attendance}}</view>
 					</view>
 					</view>
 					<view class="msg-box">
 					<view class="msg-box">
@@ -100,7 +100,6 @@
 			...mapMutations('m_children', ['updateNoAttendNum', 'updateIsAttendNum']),
 			...mapMutations('m_children', ['updateNoAttendNum', 'updateIsAttendNum']),
 			//选中日期改变回调
 			//选中日期改变回调
 			change(e) {
 			change(e) {
-				
 				if(this.isFirst === false){
 				if(this.isFirst === false){
 					this.todayData = e
 					this.todayData = e
 					this.isFirst = true
 					this.isFirst = true

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 21 - 1
subpkg/common/iconfont-weapp-icon.css


+ 10 - 6
subpkg/common/videopage.scss

@@ -25,7 +25,7 @@
 			align-items: center;
 			align-items: center;
 			justify-content: space-between;
 			justify-content: space-between;
 			padding: 30rpx 50rpx;
 			padding: 30rpx 50rpx;
-			height: 160rpx;
+			height: 150rpx;
 			background-color: #FFF;
 			background-color: #FFF;
 		
 		
 		
 		
@@ -68,7 +68,7 @@
 			}
 			}
 		}
 		}
 		.video-list{
 		.video-list{
-			margin: 40rpx 30rpx;
+			margin: 20rpx 30rpx;
 			display: flex;
 			display: flex;
 			align-items: center;
 			align-items: center;
 			justify-content: center;
 			justify-content: center;
@@ -80,11 +80,10 @@
 				background-color: #FFF;
 				background-color: #FFF;
 				border-radius: 10rpx;
 				border-radius: 10rpx;
 				padding: 20rpx;
 				padding: 20rpx;
-				margin-left: 10rpx;
 				height: 60rpx;
 				height: 60rpx;
 				
 				
 				.content-box{
 				.content-box{
-					width: 480rpx;
+					width: 620rpx;
 					display: flex; 
 					display: flex; 
 					align-items: center; 
 					align-items: center; 
 					justify-content: space-between;
 					justify-content: space-between;
@@ -125,8 +124,8 @@
 			justify-content: space-between;
 			justify-content: space-between;
 		}
 		}
 		.t-icon {
 		.t-icon {
-			width: 50rpx;
-			height: 50rpx;
+			width: 60rpx;
+			height: 60rpx;
 		}
 		}
 		.index{
 		.index{
 			height: 40rpx;
 			height: 40rpx;
@@ -170,5 +169,10 @@
 				}
 				}
 			}
 			}
 		}
 		}
+		.timeInfo{
+			font-weight: bold;
+			font-size: 40rpx;
+			color: #aaaaaa;
+		}
 	}
 	}
 	
 	

+ 30 - 0
subpkg/detail/activity.vue

@@ -0,0 +1,30 @@
+<template>
+	<view class="container">
+		<!-- 返回按钮 -->
+		<back :text="singleDetail.vote.name||singleDetail.survey.name"></back>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex'
+	export default {
+		computed: {
+			...mapState('m_children', ['singleDetail'])
+		},
+		data(){
+			return{
+			};
+		},
+		onLoad() {
+		},
+		methods:{
+
+		}
+	}
+</script>
+
+<style>
+</style>

+ 30 - 0
subpkg/detail/exam.vue

@@ -0,0 +1,30 @@
+<template>
+	<view class="container">
+		<!-- 返回按钮 -->
+		<back :text="singleDetail.examInfo.name"></back>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex'
+	export default {
+		computed: {
+			...mapState('m_children', ['singleDetail'])
+		},
+		data(){
+			return{
+			};
+		},
+		onLoad() {
+		},
+		methods:{
+
+		}
+	}
+</script>
+
+<style>
+</style>

+ 30 - 0
subpkg/detail/homework.vue

@@ -0,0 +1,30 @@
+<template>
+	<view class="container">
+		<!-- 返回按钮 -->
+		<back :text="singleDetail.work.name"></back>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex'
+	export default {
+		computed: {
+			...mapState('m_children', ['singleDetail'])
+		},
+		data(){
+			return{
+			};
+		},
+		onLoad() {
+		},
+		methods:{
+
+		}
+	}
+</script>
+
+<style>
+</style>

+ 58 - 62
subpkg/video/livepage.vue

@@ -1,79 +1,79 @@
 <template>
 <template>
 	<view class="container">
 	<view class="container">
-		<back text="课程直播" :show="false"></back>
-		<!-- 视频资源 -->
-		<view class="video-box">
-			<video class="video" id="classVideo" :src="classInfo.resource" controls></video>
-		</view>
+		<u-sticky>
+			<back text="课程直播" :show="false"></back>
+			<!-- 视频资源 -->
+			<view class="video-box">
+				<video class="video" id="classVideo" :src="classInfo.resource" controls></video>
+			</view>
+		</u-sticky>
 		<!-- 信息模块 -->
 		<!-- 信息模块 -->
 		<view class="info-box">
 		<view class="info-box">
-			<view class="flex-box" style="width: 68%;height: 100%;">
+			<view class="flex-box" style="width: 70%;height: 100%;">
 				<view style="display: flex;align-items: center;">
 				<view style="display: flex;align-items: center;">
-					<view class="index"></view>
-					<view class="info-name" style="margin-left: 15rpx;margin-bottom: 4rpx;">{{classInfo.title}}</view>
+					<view class="info-name">{{classInfo.title}}</view>
 				</view>
 				</view>
-				<view style="display: flex;flex-direction: column;">
-					<view class="info-time">课程时间:</view>
-					<view style="display: flex;">
-						<view class="info-msg" style="margin-right: 20rpx;">{{today}}</view>
-						<view class="info-msg">{{classInfo.time}}</view>
-					</view>
+
+				<view style="display: flex;align-items: baseline;">
+					<view class="timeInfo">{{today.split('-')[0]}}</view>
+					<view class="info-msg">月</view>
+					<view class="timeInfo">{{today.split('-')[1]}}</view>
+					<view class="info-msg" style="margin-right: 20rpx;">日</view>
+					<view class="info-msg">{{classInfo.time}}</view>
 				</view>
 				</view>
 			</view>
 			</view>
-			<view class="flex-box" style=" width: 32%;height: 100%;">
-				<view class="flex">
+			<view class="flex-box" style=" width: 30%;height: 100%;">
+				<view class="flex" style="width: 95%;margin-left: auto;">
 					<view class="block-tag-box">
 					<view class="block-tag-box">
 						<view class="block-tag">{{classInfo.name}}</view>
 						<view class="block-tag">{{classInfo.name}}</view>
 					</view>
 					</view>
-
 					<view class="block-tag-box">
 					<view class="block-tag-box">
 						<view class="block-tag">{{classInfo.teacher}}</view>
 						<view class="block-tag">{{classInfo.teacher}}</view>
 					</view>
 					</view>
 				</view>
 				</view>
 
 
-				<view class="flex">
-					<view class="t-icon t-icon-fenxiang" @click="shareVideo" style="margin-left: auto;"></view>
+				<view class="flex" style="width: 80%;margin-left: auto;">
+					<view class="t-icon t-icon-fenxiang" @click="actionShow = true" style="margin-left: auto;"></view>
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
+
 		<!-- 列表名 -->
 		<!-- 列表名 -->
 		<view class="list-name-box">
 		<view class="list-name-box">
 			<view class="index"></view>
 			<view class="index"></view>
 			<view class="list-name">直播与回放</view>
 			<view class="list-name">直播与回放</view>
 		</view>
 		</view>
-		
+
 		<!-- 视频列表 -->
 		<!-- 视频列表 -->
 		<view class="video-list" v-for="(item,index) in classList" :key="index">
 		<view class="video-list" v-for="(item,index) in classList" :key="index">
 			<!-- 正文 -->
 			<!-- 正文 -->
 			<view class="class-block">
 			<view class="class-block">
-					<!-- <view class="title-box" :style="{backgroundColor: index<current? '#23b46c':(index===current? '#ff5959':'#aaa') }" >
-						<view class="content-subtitle">{{item.name}}</view>
-					</view> -->
-					<view class="content-box">
-						<view :class="index<current? 't-icon t-icon-tick-square-svgrepo-com':(index===current? 't-icon t-icon-a-play-svgrepo-com1':'t-icon t-icon-time-square-svgrepo-com')"></view>
-						<view class="content-info">{{item.name}}</view>
-						<view class="block-tag-box">
-							<view class="block-tag">{{item.teacher}}</view>
-						</view>
-						<view class="info-time">时间: {{item.time}}</view>
+				<view class="content-box">
+					<view
+						:class="index<classCurrent-1? 't-icon t-icon-tick-square-svgrepo-com':(index===classCurrent-1? 't-icon t-icon-a-play-svgrepo-com1':'t-icon t-icon-time-square-svgrepo-com')">
 					</view>
 					</view>
-			</view>
-			<!-- 按钮 -->
-			<view class="btn" v-if="index<current" :style="{backgroundColor:'#23b46c'}" @click="showVideo(index)">
-				<view class="content-subtitle">观看回放</view>
-			</view>
-			<view class="btn" v-if="index===current" :style="{backgroundColor:'#ff5959'}" @click="showLive(index)">
-				<view class="content-subtitle">正在直播</view>
-			</view>
-			<view class="btn" v-if="index>current" :style="{backgroundColor:'#aaa'}">
-				<view class="content-subtitle" >暂未开始</view>
+					<view class="content-info">{{item.name}}</view>
+					<view class="block-tag-box">
+						<view class="block-tag">{{item.teacher}}</view>
+					</view>
+					<view class="info-time">{{item.time}}</view>
+					<!-- 按钮 -->
+					<view class="btn" v-if="index<classCurrent-1" :style="{backgroundColor:'#23b46c'}"
+						@click="showVideo(index)">
+						<view class="content-subtitle">观看回放</view>
+					</view>
+					<view class="btn" v-if="index===classCurrent-1" :style="{backgroundColor:'#ff5959'}"
+						@click="showLive(index)">
+						<view class="content-subtitle">正在直播</view>
+					</view>
+					<view class="btn" v-if="index>classCurrent-1" :style="{backgroundColor:'#aaa'}">
+						<view class="content-subtitle">暂未开始</view>
+					</view>
+				</view>
 			</view>
 			</view>
 		</view>
 		</view>
-		<!-- 缺省区域 -->
-		<!-- <view style="margin-top: 150rpx;">
-			<u-empty mode="data"></u-empty>
-		</view> -->
-		<u-action-sheet :show="actionShow" @close="actionShow = false" title="——  分享视频到  ——" :round="10">
+		<!-- 分享 -->
+		<u-action-sheet :show="actionShow" @close="actionShow = false" title="分享视频到" :round="10">
 			<view class="flex-icon">
 			<view class="flex-icon">
 				<view class="flex-box">
 				<view class="flex-box">
 					<view class="t-icon t-icon-weixin" @click="shareToWeixin"></view>
 					<view class="t-icon t-icon-weixin" @click="shareToWeixin"></view>
@@ -98,32 +98,24 @@
 	} from 'vuex'
 	} from 'vuex'
 	export default {
 	export default {
 		computed: {
 		computed: {
-			...mapState('m_children', ['classList'])
+			...mapState('m_children', ['classList', 'classCurrent'])
 		},
 		},
 		data() {
 		data() {
 			return {
 			return {
 				classInfo: '',
 				classInfo: '',
 				today: '',
 				today: '',
-				//当前课程
-				current: '',
+				//分享
 				actionShow: false,
 				actionShow: false,
-				//下载临时路径
-				tempFilePath: '',
 			};
 			};
 		},
 		},
 		onLoad(options) {
 		onLoad(options) {
-			this.current = parseInt(options.info)
 			this.classInfo = this.classList[options.info]
 			this.classInfo = this.classList[options.info]
 			this.getToday()
 			this.getToday()
 			this.videoContext = uni.createVideoContext('classVideo')
 			this.videoContext = uni.createVideoContext('classVideo')
 		},
 		},
 		methods: {
 		methods: {
 			getToday() {
 			getToday() {
-				this.today = (new Date()).format("yyyy-MM-dd")
-			},
-			//分享界面
-			shareVideo(){
-				this.actionShow = true
+				this.today = (new Date()).format("M-d")
 			},
 			},
 			shareToWeixin() {
 			shareToWeixin() {
 				uni.share({
 				uni.share({
@@ -158,25 +150,29 @@
 				});
 				});
 			},
 			},
 			shareToQQ() {
 			shareToQQ() {
-			
+
 			},
 			},
-			showVideo(index){
+			showVideo(index) {
 				uni.navigateTo({
 				uni.navigateTo({
 					url: `/subpkg/video/videopage?info=${index}`
 					url: `/subpkg/video/videopage?info=${index}`
 				})
 				})
 			},
 			},
-			showLive(index){
-				if(index === this.current){
+			showLive(index) {
+				if (index === this.classCurrent) {
 					uni.$showMsg('当前正在播放此课程')
 					uni.$showMsg('当前正在播放此课程')
-				}else{
+				} else {
 					this.classInfo = this.classList[index]
 					this.classInfo = this.classList[index]
 				}
 				}
 			}
 			}
-			
+
 		}
 		}
 	}
 	}
 </script>
 </script>
 
 
 <style lang="scss">
 <style lang="scss">
 	@import '@/subpkg/common/videopage.scss';
 	@import '@/subpkg/common/videopage.scss';
+
+	.u-icon__icon.data-v-2ee87dc9 {
+		display: none !important;
+	}
 </style>
 </style>

+ 47 - 50
subpkg/video/videopage.vue

@@ -1,38 +1,37 @@
 <template>
 <template>
 	<view class="container">
 	<view class="container">
-		<back text="课程回放" :show="false"></back>
-		<!-- 视频资源 -->
-		<view class="video-box">
-			<video class="video" id="classVideo" :src="classInfo.resource" controls></video>
-		</view>
+		<u-sticky>
+			<back text="课程回放" :show="false"></back>
+			<!-- 视频资源 -->
+			<view class="video-box">
+				<video class="video" id="classVideo" :src="classInfo.resource" controls></video>
+			</view>
+		</u-sticky>
 		<!-- 信息模块 -->
 		<!-- 信息模块 -->
 		<view class="info-box">
 		<view class="info-box">
-			<view class="flex-box" style="width: 68%;height: 100%;">
+			<view class="flex-box" style="width: 70%;height: 100%;">
 				<view style="display: flex;align-items: center;">
 				<view style="display: flex;align-items: center;">
-					<view class="index"></view>
-					<view class="info-name" style="margin-left: 15rpx;margin-bottom: 4rpx;">{{classInfo.title}}</view>
+					<view class="info-name">{{classInfo.title}}</view>
 				</view>
 				</view>
-
-				<view style="display: flex;flex-direction: column;">
-					<view class="info-time">课程时间:</view>
-					<view style="display: flex;">
-						<view class="info-msg" style="margin-right: 20rpx;">{{today}}</view>
-						<view class="info-msg">{{classInfo.time}}</view>
-					</view>
+				<view style="display: flex;align-items: baseline;">
+					<view class="timeInfo">{{today.split('-')[0]}}</view>
+					<view class="info-msg">月</view>
+					<view class="timeInfo">{{today.split('-')[1]}}</view>
+					<view class="info-msg" style="margin-right: 20rpx;">日</view>
+					<view class="info-msg">{{classInfo.time}}</view>
 				</view>
 				</view>
 			</view>
 			</view>
-			<view class="flex-box" style=" width: 32%;height: 100%;">
-				<view class="flex">
+			<view class="flex-box" style=" width: 30%;height: 100%;">
+				<view class="flex" style="width: 95%;margin-left: auto;">
 					<view class="block-tag-box">
 					<view class="block-tag-box">
 						<view class="block-tag">{{classInfo.name}}</view>
 						<view class="block-tag">{{classInfo.name}}</view>
 					</view>
 					</view>
-
 					<view class="block-tag-box">
 					<view class="block-tag-box">
 						<view class="block-tag">{{classInfo.teacher}}</view>
 						<view class="block-tag">{{classInfo.teacher}}</view>
 					</view>
 					</view>
 				</view>
 				</view>
 
 
-				<view class="flex">
+				<view class="flex" style="width: 80%;margin-left: auto;">
 					<view class="t-icon t-icon-baocun" @click="downLoadShow = true"></view>
 					<view class="t-icon t-icon-baocun" @click="downLoadShow = true"></view>
 					<view class="t-icon t-icon-fenxiang" @click="actionShow = true"></view>
 					<view class="t-icon t-icon-fenxiang" @click="actionShow = true"></view>
 				</view>
 				</view>
@@ -48,37 +47,33 @@
 		<view class="video-list" v-for="(item,index) in classList" :key="index">
 		<view class="video-list" v-for="(item,index) in classList" :key="index">
 			<!-- 正文 -->
 			<!-- 正文 -->
 			<view class="class-block">
 			<view class="class-block">
-				<!-- <view class="title-box" :style="{backgroundColor: index<current? '#23b46c':(index===current? '#ff5959':'#aaa') }" >
-					<view class="content-subtitle">{{item.name}}</view>
-				</view> -->
 				<view class="content-box">
 				<view class="content-box">
 					<view
 					<view
-						:class="index<current? 't-icon t-icon-tick-square-svgrepo-com':(index===current? 't-icon t-icon-a-play-svgrepo-com1':'t-icon t-icon-time-square-svgrepo-com')">
+						:class="index<classCurrent-1? 't-icon t-icon-tick-square-svgrepo-com':(index===classCurrent-1? 't-icon t-icon-a-play-svgrepo-com1':'t-icon t-icon-time-square-svgrepo-com')">
 					</view>
 					</view>
 					<view class="content-info">{{item.name}}</view>
 					<view class="content-info">{{item.name}}</view>
 					<view class="block-tag-box">
 					<view class="block-tag-box">
 						<view class="block-tag">{{item.teacher}}</view>
 						<view class="block-tag">{{item.teacher}}</view>
 					</view>
 					</view>
-					<view class="info-time">时间: {{item.time}}</view>
+					<view class="info-time">{{item.time}}</view>
+					<!-- 按钮 -->
+					<view class="btn" v-if="index<classCurrent-1" :style="{backgroundColor:'#23b46c'}"
+						@click="showVideo(index)">
+						<view class="content-subtitle">观看回放</view>
+					</view>
+					<view class="btn" v-if="index===classCurrent-1" :style="{backgroundColor:'#ff5959'}"
+						@click="showLive(index)">
+						<view class="content-subtitle">正在直播</view>
+					</view>
+					<view class="btn" v-if="index>classCurrent1-1" :style="{backgroundColor:'#aaa'}">
+						<view class="content-subtitle">暂未开始</view>
+					</view>
 				</view>
 				</view>
 			</view>
 			</view>
-			<!-- 按钮 -->
-			<view class="btn" v-if="index<current" :style="{backgroundColor:'#23b46c'}" @click="showVideo(index)">
-				<view class="content-subtitle">观看回放</view>
-			</view>
-			<view class="btn" v-if="index===current" :style="{backgroundColor:'#ff5959'}" @click="showLive(index)">
-				<view class="content-subtitle">正在直播</view>
-			</view>
-			<view class="btn" v-if="index>current" :style="{backgroundColor:'#aaa'}">
-				<view class="content-subtitle" >暂未开始</view>
-			</view>
 		</view>
 		</view>
-		<!-- 缺省区域 -->
-		<!-- <view style="margin-top: 150rpx;">
-			<u-empty mode="data"></u-empty>
-		</view> -->
+
 		<!-- 分享 -->
 		<!-- 分享 -->
-		<u-action-sheet :show="actionShow" @close="actionShow = false" title="——  分享视频到  ——" :round="10">
+		<u-action-sheet :show="actionShow" @close="actionShow = false" title="分享视频到" :round="10">
 			<view class="flex-icon">
 			<view class="flex-icon">
 				<view class="flex-box">
 				<view class="flex-box">
 					<view class="t-icon t-icon-weixin" @click="shareToWeixin"></view>
 					<view class="t-icon t-icon-weixin" @click="shareToWeixin"></view>
@@ -95,8 +90,8 @@
 			</view>
 			</view>
 		</u-action-sheet>
 		</u-action-sheet>
 		<!-- 下载 -->
 		<!-- 下载 -->
-		<u-action-sheet :show="downLoadShow" @close="downLoadShow = false" title="——  是否下载该视频  ——" :round="10">
-			<view class="flex-icon" style="padding: 50rpx 80rpx 70rpx 80rpx;">
+		<u-action-sheet :show="downLoadShow" @close="downLoadShow = false" title="视频下载" :round="10">
+			<view class="flex-icon" style="padding: 50rpx 60rpx 70rpx 60rpx;">
 				<view class="confirm" @click="downLoadShow = false" style="background-color: #aaa;">
 				<view class="confirm" @click="downLoadShow = false" style="background-color: #aaa;">
 					<view class="subtitle">取消</view>
 					<view class="subtitle">取消</view>
 				</view>
 				</view>
@@ -114,14 +109,12 @@
 	} from 'vuex'
 	} from 'vuex'
 	export default {
 	export default {
 		computed: {
 		computed: {
-			...mapState('m_children', ['classList'])
+			...mapState('m_children', ['classList', 'classCurrent'])
 		},
 		},
 		data() {
 		data() {
 			return {
 			return {
 				classInfo: '',
 				classInfo: '',
 				today: '',
 				today: '',
-				//当前课程
-				current: '',
 				//正在播放第几个视频
 				//正在播放第几个视频
 				tempIndex: '',
 				tempIndex: '',
 				actionShow: false,
 				actionShow: false,
@@ -130,14 +123,13 @@
 			};
 			};
 		},
 		},
 		onLoad(options) {
 		onLoad(options) {
-			this.current = parseInt(options.info) + 1
 			this.classInfo = this.classList[options.info]
 			this.classInfo = this.classList[options.info]
 			this.getToday()
 			this.getToday()
 			this.videoContext = uni.createVideoContext('classVideo')
 			this.videoContext = uni.createVideoContext('classVideo')
 		},
 		},
 		methods: {
 		methods: {
 			getToday() {
 			getToday() {
-				this.today = (new Date()).format("yyyy-M-d")
+				this.today = (new Date()).format("M-d")
 			},
 			},
 			// 处理多次点击
 			// 处理多次点击
 			noMultipleClicks(methods) {
 			noMultipleClicks(methods) {
@@ -159,7 +151,7 @@
 			//保存video
 			//保存video
 			saveVideo() {
 			saveVideo() {
 				uni.downloadFile({
 				uni.downloadFile({
-					url: this.classInfo.resource, 
+					url: this.classInfo.resource,
 					success: (res) => {
 					success: (res) => {
 						if (res.statusCode === 200) {
 						if (res.statusCode === 200) {
 							uni.$showMsg('下载成功')
 							uni.$showMsg('下载成功')
@@ -231,18 +223,23 @@
 
 
 <style lang="scss">
 <style lang="scss">
 	@import '@/subpkg/common/videopage.scss';
 	@import '@/subpkg/common/videopage.scss';
-	.confirm{
+
+	.confirm {
 		display: flex;
 		display: flex;
 		align-items: center;
 		align-items: center;
 		justify-content: center;
 		justify-content: center;
 		height: 70rpx;
 		height: 70rpx;
-		width: 250rpx;
+		width: 280rpx;
 		border-radius: 10rpx;
 		border-radius: 10rpx;
-		
+
 		.subtitle {
 		.subtitle {
 			font-size: 30rpx;
 			font-size: 30rpx;
 			font-weight: bold;
 			font-weight: bold;
 			color: #FFF;
 			color: #FFF;
 		}
 		}
 	}
 	}
+
+	.u-icon__icon.data-v-2ee87dc9 {
+		display: none !important;
+	}
 </style>
 </style>

+ 1 - 1
subpkg/z-calendar/dateBox.vue

@@ -11,7 +11,7 @@
 				<view class="calendar_date__number">{{ dateInfo.date }}</view>
 				<view class="calendar_date__number">{{ dateInfo.date }}</view>
 				<view class="calendar_date__isToday" v-if="dateInfo.isToday"
 				<view class="calendar_date__isToday" v-if="dateInfo.isToday"
 					:style="{ backgroundColor: dateActiveColor }"></view>
 					:style="{ backgroundColor: dateActiveColor }"></view>
-				<view class="calendar_date__cricle" :style="{backgroundColor: dateInfo.isAttend === 1 ? '#4169E1' : (dateInfo.isAttend === -1 ? '#FFF' : '#f9c752')}"></view>
+				<view class="calendar_date__cricle" :style="{backgroundColor: dateInfo.isAttend === 1 ? '#4169E1' : (dateInfo.isAttend === -1 ? '#FFF' : '#ff5959')}"></view>
 			</view>
 			</view>
 		</view>
 		</view>
 	</view>
 	</view>

+ 4 - 198
subpkg/z-calendar/zsy-calendar.vue

@@ -27,21 +27,7 @@
 						:dateActiveColor="dateActiveColor" :swiperMode="swiperMode" @chooseDate="chooseDate" />
 						:dateActiveColor="dateActiveColor" :swiperMode="swiperMode" @chooseDate="chooseDate" />
 				</swiper-item>
 				</swiper-item>
 			</swiper>
 			</swiper>
-
-			<!-- 收缩情况下的日历轮播 -->
-			<!-- <swiper v-else key="shrinkSwiper" circular :style="{height: swiperHeight('close')}" :current="shrinkCurrent"
-				:duration="duration" :skip-hidden-item-layout="true" @change="e => shrinkCurrent = e.detail.current">
-				<swiper-item v-for="(swiper, swiperIndex) in 3" :key="swiperIndex" class="swiper-item">
-					<DateBox :dates="calendarSwiperShrinkDates[swiperIndex]" :cellHeight="cellHeight"
-						:dateActiveColor="dateActiveColor" :swiperMode="swiperMode" @chooseDate="chooseShrinkDate" />
-				</swiper-item>
-			</swiper> -->
 		</view>
 		</view>
-
-		<!-- 日历切换模式
-		<!-- <view class="calendar_toggle" @tap="swiperMode = swiperMode === 'open' ? 'close' : 'open'">
-			<view class="icon" :class="{down: swiperMode === 'close'}"></view>
-		</view> -->
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -92,7 +78,7 @@
 				selectedDate: null, // 选中日期
 				selectedDate: null, // 选中日期
 				week: [], // 日历周数
 				week: [], // 日历周数
 				current: 1, // 当前日历轮播默认显示索引
 				current: 1, // 当前日历轮播默认显示索引
-				shrinkCurrent: 1, // 缩放日历轮播默认显示索引
+				// shrinkCurrent: 1, // 缩放日历轮播默认显示索引
 				calendarSwiperDates: [], // 日历轮播日期信息
 				calendarSwiperDates: [], // 日历轮播日期信息
 				calendarSwiperShrinkDates: [], // 日历轮播收缩时的日期信息
 				calendarSwiperShrinkDates: [], // 日历轮播收缩时的日期信息
 				dateActive: -1, // 日期选中索引
 				dateActive: -1, // 日期选中索引
@@ -146,29 +132,6 @@
 					this.swiperChange(-1)
 					this.swiperChange(-1)
 				}
 				}
 			},
 			},
-			// 收缩日历轮播切换
-			shrinkCurrent(newV, oldV) {
-				if (newV === 0 && oldV === 2) { // 右滑
-					this.shrinkSwiperChange(1)
-					return
-				}
-				if (newV === 2 && oldV === 0) { // 左滑
-					this.shrinkSwiperChange(-1)
-					return
-				}
-				if (newV > oldV) { // 右滑
-					this.shrinkSwiperChange(1)
-				} else { // 左滑
-					this.shrinkSwiperChange(-1)
-				}
-			},
-			// 日历显示方式切换
-			swiperMode(newV) {
-				// 当收缩时初始化收缩轮播图的日期数据
-				if (newV === 'close') {
-					this.initCalendarShrinkSwiperDates()
-				}
-			},
 			selectedDate: {
 			selectedDate: {
 				deep: true,
 				deep: true,
 				handler(newV, oldV) {
 				handler(newV, oldV) {
@@ -197,9 +160,6 @@
 				this.initWeek() // 初始化要显示的周数
 				this.initWeek() // 初始化要显示的周数
 				this.initCalendarSwiperDates() // 初始化日历轮播日期信息
 				this.initCalendarSwiperDates() // 初始化日历轮播日期信息
 				// 解决swiperMode初始化为收缩时没有初始化日历收缩轮播日期信息
 				// 解决swiperMode初始化为收缩时没有初始化日历收缩轮播日期信息
-				if (this.swiperMode === 'close') {
-					this.initCalendarShrinkSwiperDates()
-				}
 			},
 			},
 			// 初始化周数
 			// 初始化周数
 			initWeek() {
 			initWeek() {
@@ -231,8 +191,6 @@
 				cb && cb()
 				cb && cb()
 			},
 			},
 
 
-
-
 			// 生成展开的日历数据
 			// 生成展开的日历数据
 			generateCalendar(year, month) {
 			generateCalendar(year, month) {
 				let calendarDate = []
 				let calendarDate = []
@@ -331,124 +289,6 @@
 					item.isToday = true
 					item.isToday = true
 				}
 				}
 			},
 			},
-
-
-			// 初始化收缩时的日历轮播日期信息
-			initCalendarShrinkSwiperDates(swiperChangeType) {
-				let line = null
-				/**
-				 * 日历收缩事件/当前滑动不涉及到到上个/下个月的日期数据
-				 * 日历滑动到上一周并且本周不属于第一行并且上一周选中的日期必须是本月份里面的日期
-				 * 日历滑动到下一周且本周不属于最后一行
-				 */
-				const curDateLine = Math.floor(this.dateActive / 7)
-
-				if (!swiperChangeType ||
-					(swiperChangeType === -1 && curDateLine !== 0 && this.calendarSwiperDates[this.current][(curDateLine -
-						1) * 7].type === 'cur') ||
-					(swiperChangeType === 1 && curDateLine + 1 !== this.calendarSwiperDates[this.current].length / 7)
-				) {
-					// 计算当前周选中日期处于日历中的哪一行位置
-					const curCalendarSwiperDates = this.calendarSwiperDates[this.current]
-					line = Math.floor(curCalendarSwiperDates.map(item => item.type === 'cur' ? item.date : -1).indexOf(this
-						.getAssignDateInfo(false, 2)) / 7)
-					// 收缩日历滑动事件需要进行日期的选中处理
-					if (swiperChangeType) {
-						// 将当前选中日期清除选中状态
-						this.calendarSwiperDates[this.current][this.dateActive].isSelected = false
-						// 重新计算日期选中高亮并把下一个日期进行选中
-						this.dateActive = line * 7
-						this.calendarSwiperDates[this.current][this.dateActive].isSelected = true
-					}
-				} else { // 收缩日历滑动事件
-					// 将当前选中日期清除选中状态
-					this.calendarSwiperDates[this.current][this.dateActive].isSelected = false
-					// 涉及了上个月/下个月的日期数据,需要重新计算展开日历轮播的日期数据
-					let currentNum = this.current + swiperChangeType
-					currentNum = currentNum > 2 ? 0 : currentNum < 0 ? 2 : currentNum
-					this.current = currentNum
-					// 计算上一周/下一周选中日期处于日历中的哪一行位置
-					const curCalendarSwiperDates = this.calendarSwiperDates[this.current]
-					line = Math.floor(curCalendarSwiperDates.map(item => item.type === 'cur' ? item.date : -1).indexOf(this
-						.getAssignDateInfo(false, 2)) / 7)
-					// 重新计算日期选中高亮并把下一个日期进行选中
-					this.dateActive = line * 7
-					this.calendarSwiperDates[this.current][this.dateActive].isSelected = true
-
-				}
-				const cur = this.generateShrinkCalendar(0, line)
-				const prev = this.generateShrinkCalendar(-1, line)
-				const next = this.generateShrinkCalendar(1, line)
-				// 根据shrinkCurrent来判断相邻的轮播存放哪些日历数据
-				if (this.shrinkCurrent === 0) {
-					this.calendarSwiperShrinkDates = [cur, next, prev]
-				} else if (this.shrinkCurrent === 1) {
-					this.calendarSwiperShrinkDates = [prev, cur, next]
-				} else if (this.shrinkCurrent === 2) {
-					this.calendarSwiperShrinkDates = [next, prev, cur]
-				}
-			},
-
-
-			// 生成收缩的日历数据
-			generateShrinkCalendar(type, line) {
-				// 返回当前这一周的日期数据
-				if (type === 0) {
-					return this.calendarSwiperDates[this.current].slice(line * 7, (line + 1) * 7)
-				}
-				// 返回上一周的日期数据
-				if (type === -1) {
-					// 当前选中的日期是否位于第一行
-					if (line === 0) {
-						/**
-						 * 当前日历的第一行是否包含有上个月的日期
-						 * 如果有包含,则返回上个月的倒数第二行日期
-						 * 如果没有包含,则返回上个月的倒数第一行日期
-						 */
-						// 计算上个月的索引值
-						const prevIndex = this.current === 0 ? 2 : this.current - 1
-						// 获取上个月的日期数据
-						const prevCalendarSwiperDates = this.calendarSwiperDates[prevIndex]
-						// 获取上个月的日历行数
-						const prevCalendarSwiperDatesLine = prevCalendarSwiperDates.length / 7
-						if (this.calendarSwiperDates[this.current][0].type === 'prev') { // 倒数第二行
-							return prevCalendarSwiperDates.slice((prevCalendarSwiperDatesLine - 2) * 7, (
-								prevCalendarSwiperDatesLine - 1) * 7)
-						} else { // 倒数第一行
-							return prevCalendarSwiperDates.slice((prevCalendarSwiperDatesLine - 1) * 7)
-						}
-					} else {
-						return this.calendarSwiperDates[this.current].slice((line - 1) * 7, line * 7)
-					}
-				}
-				// 返回下一周的日期数据
-				if (type === 1) {
-					// 计算当前日历月份总共有多少行
-					const curMonthMaxLine = this.calendarSwiperDates[this.current].length / 7
-					// 当前选中的日期是否位于最后一行
-					if (line === curMonthMaxLine - 1) {
-						/**
-						 * 当前日历的最后一行是否包含有下个月的日期
-						 * 如果有包含,则返回下个月的第二行日期
-						 * 如果没有包含,则返回上个月的第一行日期
-						 */
-						// 计算下个月的索引值
-						const nextIndex = this.current === 2 ? 0 : this.current + 1
-						// 获取下个月的日期数据
-						const nextCalendarSwiperDates = this.calendarSwiperDates[nextIndex]
-						// 获取下个月的日历行数
-						const nextCalendarSwiperDatesLine = nextCalendarSwiperDates.length / 7
-						if (this.calendarSwiperDates[this.current][this.calendarSwiperDates[this.current].length - 1]
-							.type === 'next') { // 第二行
-							return nextCalendarSwiperDates.slice(7, 14)
-						} else { // 第一行
-							return nextCalendarSwiperDates.slice(0, 7)
-						}
-					} else {
-						return this.calendarSwiperDates[this.current].slice((line + 1) * 7, (line + 2) * 7)
-					}
-				}
-			},
 			// 展开日历轮播切换
 			// 展开日历轮播切换
 			swiperChange(type) {
 			swiperChange(type) {
 				// 通过点击上个月/下个月日期进行切换,不需要默认选中下个月的一号,直接选中点击的那个日期
 				// 通过点击上个月/下个月日期进行切换,不需要默认选中下个月的一号,直接选中点击的那个日期
@@ -457,18 +297,10 @@
 				}
 				}
 				setTimeout(() => { // 设置定时器是为了防止轮播切换时生成数据造成页面卡顿
 				setTimeout(() => { // 设置定时器是为了防止轮播切换时生成数据造成页面卡顿
 					this.initCalendarSwiperDates(() => {
 					this.initCalendarSwiperDates(() => {
-						this.swiperMode === 'close' && this.initCalendarShrinkSwiperDates()
+						this.swiperMode === 'close'
 					}) // 初始化日历轮播日期信息
 					}) // 初始化日历轮播日期信息
 				}, this.swiperMode === 'open' ? this.duration : 0)
 				}, this.swiperMode === 'open' ? this.duration : 0)
 			},
 			},
-			// 收缩日历轮播切换
-			shrinkSwiperChange(type) {
-				// 默认选中下个星期的开始日期
-				this.getPrevOrNextStartDate(type)
-				setTimeout(() => { // 设置定时器是为了防止轮播切换时生成数据造成页面卡顿
-					this.initCalendarShrinkSwiperDates(type) // 初始化日历轮播日期信息
-				}, this.duration)
-			},
 			// 获取上一个月/下一个月的一号日期
 			// 获取上一个月/下一个月的一号日期
 			getPrevOrNextDate(type) {
 			getPrevOrNextDate(type) {
 				const year = this.getAssignDateInfo(false, 0)
 				const year = this.getAssignDateInfo(false, 0)
@@ -497,7 +329,6 @@
 				}
 				}
 				this.selectedDate = date
 				this.selectedDate = date
 				this.initCalendarSwiperDates(() => {
 				this.initCalendarSwiperDates(() => {
-					this.initCalendarShrinkSwiperDates()
 				})
 				})
 			},
 			},
 			// 日历轮播展开的情况下选择日期
 			// 日历轮播展开的情况下选择日期
@@ -515,6 +346,7 @@
 					this.selectedDate = parseTime(new Date(dateInfo.year, dateInfo.month - 1, dateInfo.date),
 					this.selectedDate = parseTime(new Date(dateInfo.year, dateInfo.month - 1, dateInfo.date),
 						'{y}-{m}-{d}')
 						'{y}-{m}-{d}')
 					this.swiperByClick = true
 					this.swiperByClick = true
+					this.$emit('chooseDate', dateInfo, dateIndex)
 					return false
 					return false
 				}
 				}
 				// 将当前选中的日期清空并选中最新的日期
 				// 将当前选中的日期清空并选中最新的日期
@@ -526,33 +358,6 @@
 				this.dateClick = true
 				this.dateClick = true
 				this.$emit('chooseDate', dateInfo, dateIndex)
 				this.$emit('chooseDate', dateInfo, dateIndex)
 			},
 			},
-			// 日历轮播收缩的情况下选择日期
-			chooseShrinkDate(dateInfo, dateIndex) {
-				// 重复点击后续不做处理
-				if (dateInfo.isSelected) return false
-				this.dateClick = true
-				// 是否点击了上个月份的后几天或者点击了下个月份的前几天
-				if (dateInfo.type !== 'cur') {
-					if (dateInfo.type === 'prev') { // 点击了上个月份的后几天,切换到上个月
-						this.current = this.current === 0 ? 2 : this.current - 1
-					} else { // 点击了下个月份的前几天,切换到下个月
-						this.current = this.current === 2 ? 0 : this.current + 1
-					}
-					this.dateActive = dateIndex
-					// 将选中日期赋值为当前点击的那个日期
-					this.selectedDate = parseTime(new Date(dateInfo.year, dateInfo.month - 1, dateInfo.date),
-						'{y}-{m}-{d}')
-					return false
-				}
-				// 计算当前选中日期之前有多少个日期
-				const dateActiveLine = Math.floor(this.dateActive / 7) * 7
-				// 将当前选中的日期清空并选中最新的日期
-				this.calendarSwiperDates[this.current][this.dateActive].isSelected = false
-				this.dateActive = dateIndex + dateActiveLine
-				const date = this.calendarSwiperDates[this.current][this.dateActive]
-				date.isSelected = true
-				this.selectedDate = parseTime(new Date(date.year, date.month - 1, date.date), '{y}-{m}-{d}')
-			},
 			// 向父组件传递当前选中数据
 			// 向父组件传递当前选中数据
 			emitDate() {
 			emitDate() {
 				const {
 				const {
@@ -568,6 +373,7 @@
 				}
 				}
 				this.$emit('change', e)
 				this.$emit('change', e)
 			},
 			},
+
 		}
 		}
 	}
 	}
 </script>
 </script>

+ 57 - 0
uni_modules/qiun-data-charts/changelog.md

@@ -1,3 +1,60 @@
+## 2.4.3-20220505(2022-05-05)
+- 秋云图表组件 修复开启canvas2d后将series赋值为空数组显示加载图标时,再次赋值后画布闪动的bug
+- 秋云图表组件 修复升级hbx最新版后ECharts的highlight方法报错的bug
+- uCharts.js 雷达图新增参数opts.extra.radar.gridEval,数据点位网格抽希,默认1
+- uCharts.js 雷达图新增参数opts.extra.radar.axisLabel,	是否显示刻度点值,默认false
+- uCharts.js 雷达图新增参数opts.extra.radar.axisLabelTofix,刻度点值小数位数,默认0
+- uCharts.js 雷达图新增参数opts.extra.radar.labelPointShow,是否显示末端刻度圆点,默认false
+- uCharts.js 雷达图新增参数opts.extra.radar.labelPointRadius,刻度圆点的半径,默认3
+- uCharts.js 雷达图新增参数opts.extra.radar.labelPointColor,刻度圆点的颜色,默认#cccccc
+- uCharts.js 雷达图新增参数opts.extra.radar.linearType,渐变色类型,可选值"none"关闭渐变,"custom"开启渐变
+- uCharts.js 雷达图新增参数opts.extra.radar.customColor,自定义渐变颜色,数组类型对应series的数组长度以匹配不同series颜色的不同配色方案,例如["#FA7D8D", "#EB88E2"]
+- uCharts.js 雷达图优化支持series.textColor、series.textSize属性
+- uCharts.js 柱状图中温度计式图标,优化支持全圆角类型,修复边框有缝隙的bug,详见官网【演示】中的温度计图表
+- uCharts.js 柱状图新增参数opts.extra.column.activeWidth,当前点击柱状图的背景宽度,默认一个单元格单位
+- uCharts.js 混合图增加opts.extra.mix.area.gradient 区域图是否开启渐变色
+- uCharts.js 混合图增加opts.extra.mix.area.opacity 区域图透明度,默认0.2
+- uCharts.js 饼图、圆环图、玫瑰图、漏斗图,增加opts.series[0].data[i].labelText,自定义标签文字,避免formatter格式化的繁琐,详见官网【演示】中的饼图
+- uCharts.js 饼图、圆环图、玫瑰图、漏斗图,增加opts.series[0].data[i].labelShow,自定义是否显示某一个指示标签,避免因饼图类别太多导致标签重复或者居多导致图形变形的问题,详见官网【演示】中的饼图
+- uCharts.js 增加opts.series[i].legendText/opts.series[0].data[i].legendText(与series.name同级)自定义图例显示文字的方法
+- uCharts.js 优化X轴、Y轴formatter格式化方法增加形参,统一为fromatter:function(value,index,opts){}
+- uCharts.js 修复横屏模式下无法使用双指缩放方法的bug
+- uCharts.js 修复当只有一条数据或者多条数据值相等的时候Y轴自动计算的最大值错误的bug
+- 【官网模板】增加外部自定义图例与图表交互的例子,[点击跳转](https://www.ucharts.cn/v2/#/layout/info?id=2)
+
+## 注意:非unimodules 版本如因更新 hbx 至 3.4.7 导致报错如下,请到码云更新非 unimodules 版本组件,[点击跳转](https://gitee.com/uCharts/uCharts/tree/master/uni-app/uCharts-%E7%BB%84%E4%BB%B6)
+> Error in callback for immediate watcher "uchartsOpts": "SyntaxError: Unexpected token u in JSON at position 0"
+## 2.4.2-20220421(2022-04-21)
+- 秋云图表组件 修复HBX升级3.4.6.20220420版本后echarts报错的问题
+## 2.4.2-20220420(2022-04-20)
+## 重要!此版本uCharts新增了很多功能,修复了诸多已知问题
+- 秋云图表组件 新增onzoom开启双指缩放功能(仅uCharts),前提需要直角坐标系类图表类型,并且ontouch为true、opts.enableScroll为true,详见实例项目K线图
+- 秋云图表组件 新增optsWatch是否监听opts变化,关闭optsWatch后,动态修改opts不会触发图表重绘
+- 秋云图表组件 修复开启canvas2d功能后,动态更新数据后画布闪动的bug
+- 秋云图表组件 去除directory属性,改为自动获取echarts.min.js路径(升级不受影响)
+- 秋云图表组件 增加getImage()方法及@getImage事件,通过ref调用getImage()方法获,触发@getImage事件获取当前画布的base64图片文件流。
+- 秋云图表组件 支付宝、字节跳动、飞书、快手小程序支持开启canvas2d同层渲染设置。
+- 秋云图表组件 新增加【非uniCloud】版本组件,避免有些不需要uniCloud的使用组件发布至小程序需要提交隐私声明问题,请到码云[【非uniCloud版本】](https://gitee.com/uCharts/uCharts/tree/master/uni-app/uCharts-%E7%BB%84%E4%BB%B6),或npm[【非uniCloud版本】](https://www.npmjs.com/package/@qiun/uni-ucharts)下载使用。
+- uCharts.js 新增dobuleZoom双指缩放功能
+- uCharts.js 新增山峰图type="mount",数据格式为饼图类格式,不需要传入categories,具体详见新版官网在线演示
+- uCharts.js 修复折线图当数据中存在null时tooltip报错的bug
+- uCharts.js 修复饼图类当画布比较小时自动计算的半径是负数报错的bug
+- uCharts.js 统一各图表类型的series.formatter格式化方法的形参为(val, index, series, opts),方便格式化时有更多参数可用
+- uCharts.js 标记线功能增加labelText自定义显示文字,增加labelAlign标签显示位置(左侧或右侧),增加标签显示位置微调labelOffsetX、labelOffsetY
+- uCharts.js 修复条状图当数值很小时开启圆角后样式错误的bug
+- uCharts.js 修复X轴开启disabled后,X轴仍占用空间的bug
+- uCharts.js 修复X轴开启滚动条并且开启rotateLabel后,X轴文字与滚动条重叠的bug
+- uCharts.js 增加X轴rotateAngle文字旋转自定义角度,取值范围(-90至90)
+- uCharts.js 修复地图文字标签层级显示不正确的bug
+- uCharts.js 修复饼图、圆环图、玫瑰图当数据全部为0的时候不显示数据标签的bug
+- uCharts.js 修复当opts.padding上边距为0时,Y轴顶部刻度标签位置不正确的bug
+
+## 另外我们还开发了各大原生小程序组件,已发布至码云和npm
+[https://gitee.com/uCharts/uCharts](https://gitee.com/uCharts/uCharts)
+[https://www.npmjs.com/~qiun](https://www.npmjs.com/~qiun)
+
+## 对于原生uCharts文档我们已上线新版官方网站,详情点击下面链接进入官网
+[https://www.uCharts.cn/v2/](https://www.ucharts.cn/v2/)
 ## 2.3.7-20220122(2022-01-22)
 ## 2.3.7-20220122(2022-01-22)
 ## 重要!使用vue3编译,请使用cli模式并升级至最新依赖,HbuilderX编译需要使用3.3.8以上版本
 ## 重要!使用vue3编译,请使用cli模式并升级至最新依赖,HbuilderX编译需要使用3.3.8以上版本
 - uCharts.js 修复uni-app平台组件模式使用vue3编译到小程序报错的bug。
 - uCharts.js 修复uni-app平台组件模式使用vue3编译到小程序报错的bug。

+ 98 - 50
uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue

@@ -1,5 +1,5 @@
 <!-- 
 <!-- 
- * qiun-data-charts 秋云高性能跨全端图表组件 v2.3.7-20220118
+ * qiun-data-charts 秋云高性能跨全端图表组件
  * Copyright (c) 2021 QIUN® 秋云 https://www.ucharts.cn All rights reserved.
  * Copyright (c) 2021 QIUN® 秋云 https://www.ucharts.cn All rights reserved.
  * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  * 复制使用请保留本段注释,感谢支持开源!
  * 复制使用请保留本段注释,感谢支持开源!
@@ -97,7 +97,7 @@
     </block>
     </block>
     <!-- #endif -->
     <!-- #endif -->
     <!-- 其他小程序通过vue渲染图表 -->
     <!-- 其他小程序通过vue渲染图表 -->
-    <!-- #ifdef MP-360 || MP-BAIDU || MP-QQ || MP-TOUTIAO || MP-WEIXIN -->
+    <!-- #ifdef MP-360 || MP-BAIDU || MP-QQ || MP-TOUTIAO || MP-WEIXIN || MP-KUAISHOU || MP-LARK || MP-JD -->
     <block v-if="type2d">
     <block v-if="type2d">
       <view v-if="ontouch" @tap="_tap">
       <view v-if="ontouch" @tap="_tap">
         <canvas
         <canvas
@@ -175,7 +175,7 @@ function deepCloneAssign(origin = {}, ...args) {
 
 
 function formatterAssign(args,formatter) {
 function formatterAssign(args,formatter) {
   for (let key in args) {
   for (let key in args) {
-    if(args[key] !== null && typeof args[key] === 'object'){
+    if(args.hasOwnProperty(key) && args[key] !== null && typeof args[key] === 'object'){
       formatterAssign(args[key],formatter)
       formatterAssign(args[key],formatter)
     }else if(key === 'format' && typeof args[key] === 'string'){
     }else if(key === 'format' && typeof args[key] === 'string'){
       args['formatter'] = formatter[args[key]] ? formatter[args[key]] : undefined;
       args['formatter'] = formatter[args[key]] ? formatter[args[key]] : undefined;
@@ -306,6 +306,14 @@ export default {
       type: Boolean,
       type: Boolean,
       default: false
       default: false
     },
     },
+    optsWatch: {
+      type: Boolean,
+      default: true
+    },
+    onzoom: {
+      type: Boolean,
+      default: false
+    },
     ontap: {
     ontap: {
       type: Boolean,
       type: Boolean,
       default: true
       default: true
@@ -426,16 +434,17 @@ export default {
     if (this.canvas2d === false || systemInfo.platform === 'windows' || systemInfo.platform === 'mac') {
     if (this.canvas2d === false || systemInfo.platform === 'windows' || systemInfo.platform === 'mac') {
       this.type2d = false;
       this.type2d = false;
     }else{
     }else{
+      this.type2d = true;
       this.pixel = systemInfo.pixelRatio;
       this.pixel = systemInfo.pixelRatio;
-      if (this.canvasId === 'uchartsid' || this.canvasId == '') {
-        console.log('[uCharts]:开启canvas2d模式,必须指定canvasId,否则会出现偶尔获取不到dom节点的问题!');
-      }
     }
     }
     // #endif
     // #endif
     //非微信小程序端强制关闭canvas2d模式
     //非微信小程序端强制关闭canvas2d模式
     // #ifndef MP-WEIXIN
     // #ifndef MP-WEIXIN
     this.type2d = false;
     this.type2d = false;
     // #endif
     // #endif
+    // #ifdef  MP-TOUTIAO || MP-LARK || MP-ALIPAY
+    this.type2d = this.canvas2d;
+    // #endif
     // #ifdef MP-ALIPAY
     // #ifdef MP-ALIPAY
     this.inAli = true;
     this.inAli = true;
     this.pixel = systemInfo.pixelRatio;
     this.pixel = systemInfo.pixelRatio;
@@ -511,11 +520,11 @@ export default {
       handler(val, oldval) {
       handler(val, oldval) {
         if (typeof val === 'object') {
         if (typeof val === 'object') {
           if (JSON.stringify(val) !== JSON.stringify(oldval)) {
           if (JSON.stringify(val) !== JSON.stringify(oldval)) {
+            this._clearChart();
             if (val.series && val.series.length > 0) {
             if (val.series && val.series.length > 0) {
               this.beforeInit();
               this.beforeInit();
             }else{
             }else{
               this.mixinDatacomLoading = true;
               this.mixinDatacomLoading = true;
-              this._clearChart();
               this.showchart = false;
               this.showchart = false;
               this.mixinDatacomErrorMessage = null;
               this.mixinDatacomErrorMessage = null;
             }
             }
@@ -549,7 +558,7 @@ export default {
     optsProps: {
     optsProps: {
       handler(val, oldval) {
       handler(val, oldval) {
         if (typeof val === 'object') {
         if (typeof val === 'object') {
-          if (JSON.stringify(val) !== JSON.stringify(oldval) && this.echarts === false) {
+          if (JSON.stringify(val) !== JSON.stringify(oldval) && this.echarts === false && this.optsWatch == true) {
             this.checkData(this.drawData);
             this.checkData(this.drawData);
           }
           }
         } else {
         } else {
@@ -854,10 +863,12 @@ export default {
     },
     },
     _clearChart() {
     _clearChart() {
       let cid = this.cid
       let cid = this.cid
-      if (this.echrts !== true) {
-        const ctx = uni.createCanvasContext(cid, this);
-        ctx.clearRect(0, 0, this.cWidth, this.cHeight);
-        ctx.draw();
+      if (this.echrts !== true && cfu.option[cid] && cfu.option[cid].context) {
+        const ctx = cfu.option[cid].context;
+        if(typeof ctx === "object" && !cfu.option[cid].update){
+          ctx.clearRect(0, 0, this.cWidth, this.cHeight);
+          ctx.draw();
+        }
       }
       }
     },
     },
     init() {
     init() {
@@ -882,6 +893,7 @@ export default {
               cfu.option[cid].animation = this.animation;
               cfu.option[cid].animation = this.animation;
               cfu.option[cid].width = data.width * this.pixel;
               cfu.option[cid].width = data.width * this.pixel;
               cfu.option[cid].height = data.height * this.pixel;
               cfu.option[cid].height = data.height * this.pixel;
+              cfu.option[cid].onzoom = this.onzoom;
               cfu.option[cid].ontap = this.ontap;
               cfu.option[cid].ontap = this.ontap;
               cfu.option[cid].ontouch = this.ontouch;
               cfu.option[cid].ontouch = this.ontouch;
               cfu.option[cid].onmouse = this.openmouse;
               cfu.option[cid].onmouse = this.openmouse;
@@ -924,14 +936,14 @@ export default {
                         const canvas = res[0].node;
                         const canvas = res[0].node;
                         const ctx = canvas.getContext('2d');
                         const ctx = canvas.getContext('2d');
                         cfu.option[cid].context = ctx;
                         cfu.option[cid].context = ctx;
-                        canvas.width = data.width * this.pixel;
-                        canvas.height = data.height * this.pixel;
-                        canvas._width = data.width * this.pixel;
-                        canvas._height = data.height * this.pixel;
                         cfu.option[cid].rotateLock = cfu.option[cid].rotate;
                         cfu.option[cid].rotateLock = cfu.option[cid].rotate;
                         if(cfu.instance[cid] && cfu.option[cid] && cfu.option[cid].update === true){
                         if(cfu.instance[cid] && cfu.option[cid] && cfu.option[cid].update === true){
                           this._updataUChart(cid)
                           this._updataUChart(cid)
                         }else{
                         }else{
+                          canvas.width = data.width * this.pixel;
+                          canvas.height = data.height * this.pixel;
+                          canvas._width = data.width * this.pixel;
+                          canvas._height = data.height * this.pixel;
                           setTimeout(()=>{
                           setTimeout(()=>{
                             cfu.option[cid].context.restore();
                             cfu.option[cid].context.restore();
                             cfu.option[cid].context.save();
                             cfu.option[cid].context.save();
@@ -983,18 +995,39 @@ export default {
     	    //#endif
     	    //#endif
     	    //#ifndef H5
     	    //#ifndef H5
     	      uni.saveImageToPhotosAlbum({
     	      uni.saveImageToPhotosAlbum({
-    	          filePath: res.tempFilePath,
-    	          success: function () {
-    	              uni.showToast({
-    	                  title: '保存成功',
-    	                  duration: 2000
-    	              });
-    	          }
+              filePath: res.tempFilePath,
+              success: function () {
+                uni.showToast({
+                  title: '保存成功',
+                  duration: 2000
+                });
+              }
     	      });
     	      });
     	    //#endif
     	    //#endif
     	  } 
     	  } 
     	},this);
     	},this);
     },
     },
+    getImage(){
+      if(this.type2d == false){
+        uni.canvasToTempFilePath({
+          canvasId: this.cid,
+          success: res=>{
+            this.emitMsg({name: 'getImage', params: {type:"getImage", base64: res.tempFilePath}});
+          }
+        },this);
+      }else{
+        const query = uni.createSelectorQuery().in(this)
+        query
+          .select('#' + this.cid)
+          .fields({ node: true, size: true })
+          .exec(res => {
+            if (res[0]) {
+              const canvas = res[0].node;
+              this.emitMsg({name: 'getImage', params: {type:"getImage", base64: canvas.toDataURL('image/png')}});
+            }
+          });
+      }
+    },
     // #ifndef APP-VUE || H5
     // #ifndef APP-VUE || H5
     _newChart(cid) {
     _newChart(cid) {
       if (this.mixinDatacomLoading == true) {
       if (this.mixinDatacomLoading == true) {
@@ -1124,7 +1157,7 @@ export default {
     _touchStart(e) {
     _touchStart(e) {
       let cid = this.cid
       let cid = this.cid
       lastMoveTime=Date.now();
       lastMoveTime=Date.now();
-      if(cfu.option[cid].enableScroll === true){
+      if(cfu.option[cid].enableScroll === true && e.touches.length == 1){
         cfu.instance[cid].scrollStart(e);
         cfu.instance[cid].scrollStart(e);
       }
       }
       this.emitMsg({name:'getTouchStart', params:{type:"touchStart", event:e.changedTouches[0], id:cid}});
       this.emitMsg({name:'getTouchStart', params:{type:"touchStart", event:e.changedTouches[0], id:cid}});
@@ -1133,19 +1166,23 @@ export default {
       let cid = this.cid
       let cid = this.cid
       let currMoveTime = Date.now();
       let currMoveTime = Date.now();
       let duration = currMoveTime - lastMoveTime;
       let duration = currMoveTime - lastMoveTime;
-      if (duration < Math.floor(1000 / 60)) return;//每秒60帧
+      let touchMoveLimit = cfu.option[cid].touchMoveLimit || 24;
+      if (duration < Math.floor(1000 / touchMoveLimit)) return;//每秒60帧
       lastMoveTime = currMoveTime;
       lastMoveTime = currMoveTime;
-      if(cfu.option[cid].enableScroll === true){
+      if(cfu.option[cid].enableScroll === true && e.changedTouches.length == 1){
         cfu.instance[cid].scroll(e);
         cfu.instance[cid].scroll(e);
       }
       }
-      this.emitMsg({name: 'getTouchMove', params: {type:"touchMove", event:e.changedTouches[0], id: cid}});
       if(this.ontap === true && cfu.option[cid].enableScroll === false && this.onmovetip === true){
       if(this.ontap === true && cfu.option[cid].enableScroll === false && this.onmovetip === true){
         this._tap(e,true)
         this._tap(e,true)
       }
       }
+      if(this.ontouch === true && cfu.option[cid].enableScroll === true && this.onzoom === true && e.changedTouches.length == 2){
+        cfu.instance[cid].dobuleZoom(e);
+      }
+      this.emitMsg({name: 'getTouchMove', params: {type:"touchMove", event:e.changedTouches[0], id: cid}});
     },
     },
     _touchEnd(e) {
     _touchEnd(e) {
       let cid = this.cid
       let cid = this.cid
-      if(cfu.option[cid].enableScroll === true){
+      if(cfu.option[cid].enableScroll === true && e.touches.length == 0){
         cfu.instance[cid].scrollEnd(e);
         cfu.instance[cid].scrollEnd(e);
       }
       }
       this.emitMsg({name:'getTouchEnd', params:{type:"touchEnd", event:e.changedTouches[0], id:cid}});
       this.emitMsg({name:'getTouchEnd', params:{type:"touchEnd", event:e.changedTouches[0], id:cid}});
@@ -1195,7 +1232,7 @@ function rddeepCloneAssign(origin = {}, ...args) {
 
 
 function rdformatterAssign(args,formatter) {
 function rdformatterAssign(args,formatter) {
   for (let key in args) {
   for (let key in args) {
-    if(args[key] !== null && typeof args[key] === 'object'){
+    if(args.hasOwnProperty(key) && args[key] !== null && typeof args[key] === 'object'){
       rdformatterAssign(args[key],formatter)
       rdformatterAssign(args[key],formatter)
     }else if(key === 'format' && typeof args[key] === 'string'){
     }else if(key === 'format' && typeof args[key] === 'string'){
       args['formatter'] = formatter[args[key]] ? formatter[args[key]] : undefined;
       args['formatter'] = formatter[args[key]] ? formatter[args[key]] : undefined;
@@ -1246,19 +1283,22 @@ export default {
         cfe.option[cid] = rddeepCloneAssign({}, eopts);
         cfe.option[cid] = rddeepCloneAssign({}, eopts);
       }
       }
       let newData = eopts.chartData;
       let newData = eopts.chartData;
-      //挂载categories和series
-      if(cfe.option[cid].xAxis && cfe.option[cid].xAxis.type && cfe.option[cid].xAxis.type === 'category'){
-        cfe.option[cid].xAxis.data = newData.categories
-      }
-      if(cfe.option[cid].yAxis && cfe.option[cid].yAxis.type && cfe.option[cid].yAxis.type === 'category'){
-        cfe.option[cid].yAxis.data = newData.categories
-      }
-      cfe.option[cid].series = []
-      for (var i = 0; i < newData.series.length; i++) {
-        cfe.option[cid].seriesTemplate = cfe.option[cid].seriesTemplate ? cfe.option[cid].seriesTemplate : {}
-        let Template = rddeepCloneAssign({},cfe.option[cid].seriesTemplate,newData.series[i])
-        cfe.option[cid].series.push(Template)
+      if(newData){
+        //挂载categories和series
+        if(cfe.option[cid].xAxis && cfe.option[cid].xAxis.type && cfe.option[cid].xAxis.type === 'category'){
+          cfe.option[cid].xAxis.data = newData.categories
+        }
+        if(cfe.option[cid].yAxis && cfe.option[cid].yAxis.type && cfe.option[cid].yAxis.type === 'category'){
+          cfe.option[cid].yAxis.data = newData.categories
+        }
+        cfe.option[cid].series = []
+        for (var i = 0; i < newData.series.length; i++) {
+          cfe.option[cid].seriesTemplate = cfe.option[cid].seriesTemplate ? cfe.option[cid].seriesTemplate : {}
+          let Template = rddeepCloneAssign({},cfe.option[cid].seriesTemplate,newData.series[i])
+          cfe.option[cid].series.push(Template)
+        }
       }
       }
+      
       if (typeof window.echarts === 'object') {
       if (typeof window.echarts === 'object') {
           this.newEChart()
           this.newEChart()
       }else{
       }else{
@@ -1267,9 +1307,9 @@ export default {
         script.src = './uni_modules/qiun-data-charts/static/app-plus/echarts.min.js'
         script.src = './uni_modules/qiun-data-charts/static/app-plus/echarts.min.js'
         // #endif
         // #endif
         // #ifdef H5
         // #ifdef H5
-        const rooturl = window.location.origin 
-        const directory = instance.getDataset().directory
-        script.src = rooturl + directory + 'uni_modules/qiun-data-charts/static/h5/echarts.min.js'
+        const { origin, pathname } = window.location
+        const rooturl = origin + pathname
+        script.src = rooturl + 'uni_modules/qiun-data-charts/static/h5/echarts.min.js'
         // #endif
         // #endif
         script.onload = this.newEChart
         script.onload = this.newEChart
         document.head.appendChild(script)
         document.head.appendChild(script)
@@ -1294,7 +1334,7 @@ export default {
           })
           })
           // 增加ECharts的highlight消息,实现按下移动返回索引功能。add by onefish 创建于 2021-12-11 09:50
           // 增加ECharts的highlight消息,实现按下移动返回索引功能。add by onefish 创建于 2021-12-11 09:50
           cfe.instance[cid].on('highlight', resdata => {
           cfe.instance[cid].on('highlight', resdata => {
-            that[cid].callMethod('emitMsg',{name:"getHighlight", params:{type:"highlight", dataIndex:resdata.batch[0].dataIndex, id:cid}})
+            that[cid].callMethod('emitMsg',{name:"getHighlight", params:{type:"highlight", res:resdata, id:cid}})
           })
           })
         }
         }
         this.updataEChart(cid,cfe.option[cid])
         this.updataEChart(cid,cfe.option[cid])
@@ -1471,30 +1511,38 @@ export default {
       let cid = this.rid
       let cid = this.rid
       let ontouch = cfu.option[cid].ontouch
       let ontouch = cfu.option[cid].ontouch
       if(ontouch == false) return;
       if(ontouch == false) return;
-      cfu.instance[cid].scrollStart(e)
+      if(cfu.option[cid].enableScroll === true && e.touches.length == 1){
+        cfu.instance[cid].scrollStart(e);
+      }
       that[cid].callMethod('emitMsg',{name:"getTouchStart",params:{type:"touchStart",event:e.changedTouches[0],id:cid}})
       that[cid].callMethod('emitMsg',{name:"getTouchStart",params:{type:"touchStart",event:e.changedTouches[0],id:cid}})
     },
     },
     touchMove(e) {
     touchMove(e) {
       let cid = this.rid
       let cid = this.rid
       let ontouch = cfu.option[cid].ontouch
       let ontouch = cfu.option[cid].ontouch
       if(ontouch == false) return;
       if(ontouch == false) return;
-      cfu.instance[cid].scroll(e)
-      that[cid].callMethod('emitMsg',{name:"getTouchMove",params:{type:"touchMove",event:e.changedTouches[0],id:cid}})
+      if(cfu.option[cid].enableScroll === true && e.changedTouches.length == 1){
+        cfu.instance[cid].scroll(e);
+      }
       if(cfu.option[cid].ontap === true && cfu.option[cid].enableScroll === false && cfu.option[cid].onmovetip === true){
       if(cfu.option[cid].ontap === true && cfu.option[cid].enableScroll === false && cfu.option[cid].onmovetip === true){
         let rchartdom = document.getElementById('UC'+cid).getBoundingClientRect()
         let rchartdom = document.getElementById('UC'+cid).getBoundingClientRect()
         let tmpe = { x: e.changedTouches[0].clientX - rchartdom.left, y:e.changedTouches[0].clientY - rchartdom.top + rootdom.top}
         let tmpe = { x: e.changedTouches[0].clientX - rchartdom.left, y:e.changedTouches[0].clientY - rchartdom.top + rootdom.top}
-        e.changedTouches = [];
         e.changedTouches.unshift(tmpe)
         e.changedTouches.unshift(tmpe)
         if(cfu.option[cid].tooltipShow === true){
         if(cfu.option[cid].tooltipShow === true){
           this.showTooltip(e,cid)
           this.showTooltip(e,cid)
         }
         }
       }
       }
+      if(ontouch === true && cfu.option[cid].enableScroll === true && cfu.option[cid].onzoom === true && e.changedTouches.length == 2){
+        cfu.instance[cid].dobuleZoom(e);
+      }
+      that[cid].callMethod('emitMsg',{name:"getTouchMove",params:{type:"touchMove",event:e.changedTouches[0],id:cid}})
     },
     },
     touchEnd(e) {
     touchEnd(e) {
       let cid = this.rid
       let cid = this.rid
       let ontouch = cfu.option[cid].ontouch
       let ontouch = cfu.option[cid].ontouch
       if(ontouch == false) return;
       if(ontouch == false) return;
-      cfu.instance[cid].scrollEnd(e)
+      if(cfu.option[cid].enableScroll === true && e.touches.length == 0){
+        cfu.instance[cid].scrollEnd(e);
+      }
       that[cid].callMethod('emitMsg',{name:"getTouchEnd",params:{type:"touchEnd",event:e.changedTouches[0],id:cid}})
       that[cid].callMethod('emitMsg',{name:"getTouchEnd",params:{type:"touchEnd",event:e.changedTouches[0],id:cid}})
     },
     },
     mouseDown(e) {
     mouseDown(e) {

+ 1 - 1
uni_modules/qiun-data-charts/js_sdk/u-charts/config-echarts.js

@@ -324,7 +324,7 @@ const cfe = {
 			"data": [],
 			"data": [],
 			"radius": "55%",
 			"radius": "55%",
 			"center": ['50%', '50%'],
 			"center": ['50%', '50%'],
-			"rosetype": 'area',
+			"roseType": 'area',
 		},
 		},
 	},
 	},
 	"funnel": {
 	"funnel": {

+ 38 - 28
uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js

@@ -105,24 +105,24 @@ const cfu = {
 			return item.name + '得分率: ' + item.data + ' % '
 			return item.name + '得分率: ' + item.data + ' % '
 		},
 		},
 		"HomeworkPercent": function(item, category, index, opts) {
 		"HomeworkPercent": function(item, category, index, opts) {
-			let value = item.data >= 40? (item.data >= 70? '优秀' : '良好') : '较差'
-			return category.replace('-','月') + '日 ' + item.name +  '完成率: ' + item.data + ' % ' + value
+			let value = item.data >= 40 ? (item.data >= 70 ? '优秀' : '良好') : '较差'
+			return category.replace('-', '月') + '日 ' + item.name + '完成率: ' + item.data + ' % ' + value
 		},
 		},
 		"tooltipHourColum": function(item, category, index, opts) {
 		"tooltipHourColum": function(item, category, index, opts) {
-			return category.replace('-','月') + '日 ' + item.name + ': ' + item.data + ' 小时 '
+			return category.replace('-', '月') + '日 ' + item.name + ': ' + item.data + ' 小时 '
 		},
 		},
 		"pieHour": function(item, category, index, opts) {
 		"pieHour": function(item, category, index, opts) {
-			return item.name.replace('-','月') + '日 ' + item.data + '小时'
+			return item.name.replace('-', '月') + '日 ' + item.data + '小时'
 		},
 		},
 		"pieMinute": function(item, category, index, opts) {
 		"pieMinute": function(item, category, index, opts) {
-			return item.name.replace('-','月') + '日 ' + item.data + '分钟'
+			return item.name.replace('-', '月') + '日 ' + item.data + '分钟'
 		},
 		},
 		"sleepExerciseCom": function(item, category, index, opts) {
 		"sleepExerciseCom": function(item, category, index, opts) {
-			let value = item.data <= 20? (item.data >= 10? '分配科学' : '运动量少') : '运动过量'
+			let value = item.data <= 20 ? (item.data >= 10 ? '分配科学' : '运动量少') : '运动过量'
 			return '运动占睡眠: ' + item.data + '% ' + value
 			return '运动占睡眠: ' + item.data + '% ' + value
 		},
 		},
 		"subjectRankColum": function(item, category, index, opts) {
 		"subjectRankColum": function(item, category, index, opts) {
-			return category + ' ' +item.name + ': ' + item.data + '% 的学生'
+			return category + ' ' + item.name + ': ' + item.data + '% 的学生'
 		},
 		},
 	},
 	},
 	//这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在opts参数,会将demotype与opts中option合并后渲染图表。
 	//这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在opts参数,会将demotype与opts中option合并后渲染图表。
@@ -234,19 +234,23 @@ const cfu = {
 		"animation": true,
 		"animation": true,
 		"timing": "easeOut",
 		"timing": "easeOut",
 		"duration": 500,
 		"duration": 500,
+		"padding":[20,20,20,20],
 		"title": {
 		"title": {
-			"name": "总成绩占比",
-			"fontSize": 20,
+			"name": "",
+			"fontSize": 24,
 			"color": "#4169E1",
 			"color": "#4169E1",
 		},
 		},
 		"subtitle": {
 		"subtitle": {
-			"name": "年级与班级",
-			"fontSize": 15,
-			"color": "#666666",
+			"name": "",
+			"fontSize": 16,
+			"color": "#aaa",
 		},
 		},
 		"extra": {
 		"extra": {
 			"arcbar": {
 			"arcbar": {
-				"width": 16,
+				"width": 22,
+				"type": "circle",
+				"radius": 195,
+				"backgroundColor":"#F5F5F5"
 			}
 			}
 		}
 		}
 	},
 	},
@@ -350,7 +354,7 @@ const cfu = {
 		"padding": [
 		"padding": [
 			0,
 			0,
 			-20,
 			-20,
-			0,
+			10,
 			-20
 			-20
 		],
 		],
 		"dataLabel": false,
 		"dataLabel": false,
@@ -360,7 +364,6 @@ const cfu = {
 			"disabled": true,
 			"disabled": true,
 			"axisLine": false,
 			"axisLine": false,
 			"disableGrid": true,
 			"disableGrid": true,
-			"boundaryGap": "center",
 		},
 		},
 		"yAxis": {
 		"yAxis": {
 			"disabled": true,
 			"disabled": true,
@@ -390,10 +393,10 @@ const cfu = {
 		"duration": 500,
 		"duration": 500,
 		"color": color,
 		"color": color,
 		"padding": [
 		"padding": [
-			0,
-			12,
-			0,
-			12
+		0,
+		10,
+		10,
+		10
 		],
 		],
 		"dataLabel": false,
 		"dataLabel": false,
 		"dataPointShape": false,
 		"dataPointShape": false,
@@ -451,10 +454,10 @@ const cfu = {
 		"duration": 500,
 		"duration": 500,
 		"color": color,
 		"color": color,
 		"padding": [
 		"padding": [
-			10,
 			0,
 			0,
-			0,
-			0
+			-5,
+			10,
+			-5
 		],
 		],
 		"dataLabel": false,
 		"dataLabel": false,
 		"dataPointShape": false,
 		"dataPointShape": false,
@@ -492,10 +495,10 @@ const cfu = {
 		"duration": 500,
 		"duration": 500,
 		"color": color,
 		"color": color,
 		"padding": [
 		"padding": [
-			-10,
-			5,
-			5,
-			5
+			0,
+			0,
+			0,
+			0
 		],
 		],
 		"dataLabel": false,
 		"dataLabel": false,
 		"dataPointShape": false,
 		"dataPointShape": false,
@@ -555,9 +558,16 @@ const cfu = {
 				"opacity": 0.7,
 				"opacity": 0.7,
 				"addLine": true,
 				"addLine": true,
 				"width": 2,
 				"width": 2,
-				"gradient": true
+				"gradient": true,
+			},
+			"tooltip": {
+				"showBox": true,
+				"showArrow": false,
+				"showCategory": false,
+				"borderRadius": 6,
+				"bgOpacity": 0.5,
+				"splitLine": false,
 			},
 			},
-			"tooltip": tooltip,
 		}
 		}
 	},
 	},
 
 

+ 3 - 10
uni_modules/qiun-data-charts/js_sdk/u-charts/readme.md

@@ -1,12 +1,5 @@
 # uCharts JSSDK说明
 # uCharts JSSDK说明
-1、如不使用uCharts组件,可直接引用u-charts.js,打包编译后会`自动压缩`,压缩后体积约为`98kb`。
-2、如果100kb的体积仍需压缩,请手动删除u-charts.js内您不需要的图表类型,如k线图candle
+1、如不使用uCharts组件,可直接引用u-charts.js,打包编译后会`自动压缩`,压缩后体积约为`120kb`。
+2、如果120kb的体积仍需压缩,请手到uCharts官网通过在线定制选择您需要的图表
 3、config-ucharts.js为uCharts组件的用户配置文件,升级前请`自行备份config-ucharts.js`文件,以免被强制覆盖。
 3、config-ucharts.js为uCharts组件的用户配置文件,升级前请`自行备份config-ucharts.js`文件,以免被强制覆盖。
-3、config-echarts.js为ECharts组件的用户配置文件,升级前请`自行备份config-echarts.js`文件,以免被强制覆盖。
-
-# v1.0转v2.0注意事项
-1、opts.colors变更为opts.color
-2、ring圆环图的扩展配置由extra.pie变更为extra.ring
-3、混合图借用的扩展配置由extra.column变更为extra.mix.column
-4、全部涉及到format的格式化属性变更为formatter
-5、不需要再传canvasId及$this参数,如果通过uChats获取context,可能会导致this实例混乱,导致小程序开发者工具报错。如果不使用qiun-data-charts官方组件,需要在new uCharts()实例化之前,自行获取canvas的上下文context(ctx),并传入new中的context(opts.context)。为了能跨更多的端,给您带来的不便敬请谅解。
+4、config-echarts.js为ECharts组件的用户配置文件,升级前请`自行备份config-echarts.js`文件,以免被强制覆盖。

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 810 - 317
uni_modules/qiun-data-charts/js_sdk/u-charts/u-charts.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 18 - 0
uni_modules/qiun-data-charts/js_sdk/u-charts/u-charts.min.js


+ 3 - 3
uni_modules/qiun-data-charts/package.json

@@ -1,8 +1,8 @@
 {
 {
   "id": "qiun-data-charts",
   "id": "qiun-data-charts",
   "displayName": "秋云 ucharts echarts 高性能跨全端图表组件",
   "displayName": "秋云 ucharts echarts 高性能跨全端图表组件",
-  "version": "2.3.7-20220122",
-  "description": "uCharts v2.3.7支持Vue3!全新官方图表组件,支持H5及APP用ECharts渲染图表,uniapp可视化首选组件",
+  "version": "2.4.3-20220505",
+  "description": "uCharts 新增双指缩放、新增山峰图!支持H5及APP用 ucharts echarts 渲染图表,uniapp可视化首选组件",
   "keywords": [
   "keywords": [
     "ucharts",
     "ucharts",
     "echarts",
     "echarts",
@@ -35,7 +35,7 @@
       "data": "插件不采集任何数据",
       "data": "插件不采集任何数据",
       "permissions": "无"
       "permissions": "无"
     },
     },
-    "npmurl": ""
+    "npmurl": "https://www.npmjs.com/~qiun"
   },
   },
   "uni_modules": {
   "uni_modules": {
     "dependencies": [],
     "dependencies": [],

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 94 - 439
uni_modules/qiun-data-charts/readme.md


+ 7 - 5
utils/APIHandler.js

@@ -758,7 +758,7 @@ let activityData = [{
 	},
 	},
 	"status": 200
 	"status": 200
 }, ]
 }, ]
-//判断完成
+//获取完成数据
 let testFinishData = testData.filter(x => x.examInfo.progress === 'finish')
 let testFinishData = testData.filter(x => x.examInfo.progress === 'finish')
 let homeworkFinishData = homeworkData.filter(x => x.work.progress === 'finish')
 let homeworkFinishData = homeworkData.filter(x => x.work.progress === 'finish')
 let activityFinishData = activityData.filter(x => x.vote && x.vote.progress === 'finish')
 let activityFinishData = activityData.filter(x => x.vote && x.vote.progress === 'finish')
@@ -775,6 +775,7 @@ function initApp(phoneNumber) {
 			gender: '男',
 			gender: '男',
 			classid: '0301',
 			classid: '0301',
 			class: '三年级一班',
 			class: '三年级一班',
+			age:9,
 			tmdid: 'tmdid01',
 			tmdid: 'tmdid01',
 			schoolname: '研发学校'
 			schoolname: '研发学校'
 		}, {
 		}, {
@@ -783,6 +784,7 @@ function initApp(phoneNumber) {
 			gender: '女',
 			gender: '女',
 			classid: '0504',
 			classid: '0504',
 			class: '五年级四班',
 			class: '五年级四班',
+			age:11,
 			tmdid: 'tmdid03',
 			tmdid: 'tmdid03',
 			schoolname: '研发学校'
 			schoolname: '研发学校'
 		}, ]
 		}, ]
@@ -839,28 +841,28 @@ function initHome() {
 		timeFrame: '上午第二节',
 		timeFrame: '上午第二节',
 		resource: 'https://klxxcdn.oss-cn-hangzhou.aliyuncs.com/histudy/hrm/media/bg1.mp4',
 		resource: 'https://klxxcdn.oss-cn-hangzhou.aliyuncs.com/histudy/hrm/media/bg1.mp4',
 	}, {
 	}, {
-		title: '阅读文献',
+		title: '阅读专项训练',
 		name: '外语',
 		name: '外语',
 		teacher: '张老师',
 		teacher: '张老师',
 		time: '11:00-11:50',
 		time: '11:00-11:50',
 		timeFrame: '上午第三节',
 		timeFrame: '上午第三节',
 		resource: 'https://klxxcdn.oss-cn-hangzhou.aliyuncs.com/histudy/hrm/media/bg3.mp4',
 		resource: 'https://klxxcdn.oss-cn-hangzhou.aliyuncs.com/histudy/hrm/media/bg3.mp4',
 	}, {
 	}, {
-		title: '哲学起点',
+		title: '思想品德教育',
 		name: '思品',
 		name: '思品',
 		teacher: '史老师',
 		teacher: '史老师',
 		time: '11:50-14:50',
 		time: '11:50-14:50',
 		timeFrame: '下午第一节',
 		timeFrame: '下午第一节',
 		resource: 'https://klxxcdn.oss-cn-hangzhou.aliyuncs.com/histudy/hrm/media/bg2.mp4',
 		resource: 'https://klxxcdn.oss-cn-hangzhou.aliyuncs.com/histudy/hrm/media/bg2.mp4',
 	}, {
 	}, {
-		title: '户外锻炼',
+		title: '户外运动锻炼',
 		name: '体育',
 		name: '体育',
 		teacher: '李老师',
 		teacher: '李老师',
 		time: '14:50-17:50',
 		time: '14:50-17:50',
 		timeFrame: '下午第二节',
 		timeFrame: '下午第二节',
 		resource: 'https://klxxcdn.oss-cn-hangzhou.aliyuncs.com/histudy/hrm/media/bg1.mp4',
 		resource: 'https://klxxcdn.oss-cn-hangzhou.aliyuncs.com/histudy/hrm/media/bg1.mp4',
 	}, {
 	}, {
-		title: '学习实验',
+		title: '科学学习实验',
 		name: '科学',
 		name: '科学',
 		teacher: '张老师',
 		teacher: '张老师',
 		time: '17:55-20:50',
 		time: '17:55-20:50',