Переглянути джерело

首页推荐和模考试卷报告页修改

xuqiaoying 3 роки тому
батько
коміт
5d75c94bee

+ 39 - 28
pages/index/index.vue

@@ -100,16 +100,18 @@
 				<view v-for="(item, index) in menu" :key="index" class="tab_item" :class="{nactive: tabNum == index}" @click="tab(index)">{{ item.name }}</view>
 			</view>
 			<view class="filters">
-				<template v-if="tabNum == 0">
-					<view v-for="(item, index) in courseName" :key="index" class="filter_item" :class="{nactive: couIndex == index}" @click="changeCou(item.recommendId, index)">
-						{{ item.name }}
-					</view>
-				</template>
-				<template v-if="tabNum == 1">
-					<view v-for="(item, index) in bankName" :key="index" class="filter_item" :class="{nactive: bankIndex == index}" @click="changebank(item.recommendId, index)">
-						{{ item.name }}
-					</view>
-				</template>
+				<scroll-view class="scroll_view_H" scroll-x="true" >
+					<template v-if="tabNum == 0">
+						<view v-for="(item, index) in courseName" :key="index" class="filter_item"  @click="changeCou(item.recommendId, index)">
+							<view class="name" :class="{nactive: couIndex == index}">{{ item.name }}</view>
+						</view>
+					</template>
+					<template v-if="tabNum == 1">
+						<view v-for="(item, index) in bankName" :key="index" class="filter_item" @click="changebank(item.recommendId, index)">
+							<view class="name" :class="{nactive: couIndex == index}">{{ item.name }}</view>
+						</view>
+					</template>
+				</scroll-view>
 			</view>
 			<view class="course-list" v-show="tabCurrent==0">
 				<template v-if="list1.length">
@@ -322,6 +324,8 @@ export default {
 		this.getInfo() // 判断有没有关注公众号		
 		this.isClickOff() //关注公众号,每天最多显示1次;当天学员关闭弹窗后,无需再显示
 		uni.removeStorageSync('goPath')
+		this.list1 = []
+		this.list2 = []
 		this.courseLists();
 		// this.bankList();
 		if (uni.getStorageSync('updateHome')){
@@ -362,9 +366,9 @@ export default {
 		}
 	},
 	async onReachBottom() {
-		console.log('加载加载--', this.tabNum)
-		console.log(this.paramList[0].total,'total', this.paramList[1].total)
-		console.log(this.list1.length,'length', this.list2.length)
+		// console.log('加载加载--', this.tabNum)
+		// console.log(this.paramList[0].total,'total', this.paramList[1].total)
+		// console.log(this.list1.length,'length', this.list2.length)
 		if (this.tabNum == 0) {
 			if (this.list1.length < this.paramList[0].total) {
 				this.paramList[0].pageNum++
@@ -586,14 +590,15 @@ export default {
 					//课程
 					this.courseName = list.filter(x => x.type == 1).sort((a,b) => a.sort - b.sort).map(x => {
 						return {
-							name: x.educationName,
+							name: x.name,
 							recommendId: x.recommendId
 						}
 					});
+					console.log('couIndex', this.couIndex, this.courseName)
 					//题库
 					this.bankName = list.filter(x => x.type == 2).sort((a,b) => a.sort - b.sort).map(x => {
 						return {
-							name: x.educationName,
+							name: x.name,
 							recommendId: x.recommendId
 						}
 					});
@@ -1169,29 +1174,35 @@ page {
 		}
 
 		.filters {
+			width: 100%;
 			padding: 0rpx 16rpx;
 			margin-bottom: 32rpx;
 			display: flex;
 			align-items: center;
+			.scroll_view_H {
+				width: 100%;
+				overflow: hidden;
+				white-space: nowrap;
+			}
 			.filter_item {
-				font-size: 24rpx;
-				color: #666666;
-				padding: 12rpx 16rpx;
-				width: 152rpx;
-				height: 56rpx;
-				text-align: center;
-				background: #FFFFFF;
-				border-radius: 8rpx;
+				display: inline-block;
 				margin-right: 16rpx;
-				&.nactive {
-					color: #3F8DFD;
+				.name {
+					font-size: 24rpx;
+					color: #666666;
+					padding: 12rpx 16rpx;
+					height: 56rpx;
+					text-align: center;
+					background: #FFFFFF;
+					border-radius: 8rpx;
+					&.nactive {
+						color: #3F8DFD;
+					}
 				}
 			}
 		}
 	}
-	// .botms {
-	// 	padding-bottom: 100rpx;
-	// }
+
 	
 	.my-list {
 		margin:32rpx 0;

+ 1 - 1
pages5/examBank/index.vue

@@ -962,7 +962,7 @@ export default {
       }, 1000);
     } else {
       //进入页面
-      // await this.bankExam();
+      await this.bankExam();
 			await this.setSystemTime()
       this.goodsQuestionList();
     }

+ 14 - 8
pages5/examList/index.vue

@@ -309,7 +309,6 @@ export default {
 			}
 			// mock/subscribe/listSubscribe
 			this.$api.mockSubscribeListSubscribe(param).then(res => {
-				console.log('请求请求')
 				
 				this.recordList.push(...res.data.rows)
 				this.total = res.data.total
@@ -360,11 +359,18 @@ export default {
 				}).then((res) => {
 					if (res.data.code == 200) {
 						const { examTime, startTime, endTime, eachExamId} = res.data.data
-						item.applySiteExamTime = examTime // 当前时间的时间戳
-						item.applySiteStartTime = startTime
-						item.applySiteEndTime = endTime
-						item.eachExamId = eachExamId
-						this.toJump(item)
+						let o_item = {
+							...item,
+							applySiteExamTime: examTime,
+							applySiteStartTime: startTime,
+							applySiteEndTime: endTime,
+							eachExamId: eachExamId,
+						}
+						// item.applySiteExamTime = examTime // 当前时间的时间戳
+						// item.applySiteStartTime = startTime
+						// item.applySiteEndTime = endTime
+						// item.eachExamId = eachExamId
+						this.toJump(o_item, index)
 					} else {
 						this.$u.toast(res.data.msg)
 						return
@@ -373,11 +379,11 @@ export default {
 				})
 				
 			} else {
-				this.toJump(item)
+				this.toJump(item, index)
 			
 			}
 		},
-		toJump(item) {
+		toJump(item, index) {
 			if(this.goTest(item)) {
 				uni.showToast({
 					icon:'none',

+ 3 - 4
pages5/examReport/index.vue

@@ -82,18 +82,18 @@
 							试卷得分
 							<text>(不含简答和案例题)</text>
 						</view>
-						<canvas class="canvas" canvas-id="Canvas1"></canvas>
+						<canvas v-show="!noticeModal" class="canvas" canvas-id="Canvas1"></canvas>
 					</view>
 					<view class="item" v-show="reportdata.examTime">
 						<view class="title">答题时长</view>
-						<canvas canvas-id="Canvas2"></canvas>
+						<canvas v-show="!noticeModal" canvas-id="Canvas2"></canvas>
 					</view>
 					
 					<view class="item" v-show="reportdata.score != -1">
 						<view class="title">试卷得分
 							<text>(含简答和案例题)</text>
 						</view>
-						<canvas canvas-id="Canvas3"></canvas>
+						<canvas v-show="!noticeModal" canvas-id="Canvas3"></canvas>
 					</view>
 				</view>
 			</view>
@@ -706,7 +706,6 @@ page {
 		background: #FFFFFF;
 		display: flex;
 		flex-direction: column;
-		
 		.body {
 			flex:1;