浏览代码

修改测试反馈

chen 3 年之前
父节点
当前提交
68483f0cd1

+ 2 - 1
manifest.json

@@ -79,7 +79,8 @@
         "setting" : {
             "urlCheck" : false,
             "postcss" : true,
-            "minified" : true
+            "minified" : true,
+            "es6" : false
         },
         "usingComponents" : true,
         "permission" : {

+ 29 - 1
package-lock.json

@@ -1,8 +1,36 @@
 {
   "name": "zz-applet",
   "version": "1.0.0",
-  "lockfileVersion": 1,
+  "lockfileVersion": 2,
   "requires": true,
+  "packages": {
+    "": {
+      "name": "zz-applet",
+      "version": "1.0.0",
+      "license": "ISC",
+      "dependencies": {
+        "jweixin-module": "^1.6.0",
+        "tki-qrcode": "^0.1.6",
+        "uview-ui": "^1.8.3"
+      },
+      "devDependencies": {}
+    },
+    "node_modules/jweixin-module": {
+      "version": "1.6.0",
+      "resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz",
+      "integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
+    },
+    "node_modules/tki-qrcode": {
+      "version": "0.1.6",
+      "resolved": "https://registry.npmjs.org/tki-qrcode/-/tki-qrcode-0.1.6.tgz",
+      "integrity": "sha512-EnnlS8psowC7PsW3MDYcxvJYkuklX3WAZ/BYanR4TdBHTu74GfjTBX8Y16REP+AeDENiVtBPh4jtTRL2P736hQ=="
+    },
+    "node_modules/uview-ui": {
+      "version": "1.8.3",
+      "resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.8.3.tgz",
+      "integrity": "sha512-DqKc+qRrOZLPcyfWv4b0HspSS9n1Cd6BbgKiYEv9rjTAnWoqJV7rXsvWqZdr5iKGP5EMNbNS741GLNw4sIHbpw=="
+    }
+  },
   "dependencies": {
     "jweixin-module": {
       "version": "1.6.0",

+ 4 - 1
pages2/bank/questionBankExplain.vue

@@ -366,6 +366,7 @@ export default {
 		goodsQuestionList() {
 			//继续答题
 			if(this.isContinue) {
+				
 				console.log(this.isContinue,"历史做题")
 				this.$api.examReport(this.recordId).then(res => {
 					let json = JSON.parse(res.data.data.historyExamJson)
@@ -462,6 +463,8 @@ export default {
 					
 					this.questionList = res.data.data;
 					
+					console.log(this.questionList)
+					
 				})
 			}
 			
@@ -478,7 +481,7 @@ export default {
 			if(!this.isSubmit) {
 				let number = 0;
 				let score = 0;
-				this.questionList.forEach((item,index) => {
+				this.questionList.length && this.questionList.forEach((item,index) => {
 					if(item.type == 1) {
 						if(item.ques == item.ans) { 
 							score += item.score;

+ 20 - 8
pages2/bank/question_record.vue

@@ -1,12 +1,20 @@
 <template>
 	<view>
 		<view class="tabs">
-			<view class="tab" :class="{ active: index == 1 }" data-index="1" @click="tab">全部题库记录</view>
-			<view class="tab" :class="{ active: index == 2 }" data-index="2" @click="tab">全部试卷类型</view>
+			<view class="tab" :class="{ active: index == 1 }" data-index="1" @click="tab">
+				全部题库记录
+				<u-icon v-if="index == 1" name="arrow-up"></u-icon>
+				<u-icon v-else name="arrow-down"></u-icon>
+			</view>
+			<view class="tab" :class="{ active: index == 2 }" data-index="2" @click="tab">
+				全部试卷类型
+				<u-icon v-if="index == 2" name="arrow-up"></u-icon>
+				<u-icon v-else name="arrow-down"></u-icon>
+			</view>
 		</view>
 
 		<view class="record">
-			<view class="item" v-for="record in recordList">
+			<view class="item" v-for="(record,index) in recordList" :key="index">
 				<view class="note">{{ record.paperName }}</view>
 				<view class="title">{{ record.examName }}</view>
 				<view class="desc">
@@ -52,7 +60,7 @@
 								''
 						"
 					>
-						<view class="btn" v-if="record.status == 0 && record.historyExamJson">继续</view>
+						<view class="btn continue" v-if="record.status == 0 && record.historyExamJson">继续答题</view>
 					</navigator>
 				</view>
 			</view>
@@ -62,7 +70,7 @@
 			<view class="content">
 				<view class="top" :class="activeIndex === 0 ? 'activesty' : ''" @click="testClick(3)">全部题库记录</view>
 				<view class="list">
-					<view class="item" :class="activeIndex == listItem.goodsId ? 'activesty' : ''" v-for="listItem in list" @click="testClick(listItem)">
+					<view class="item" :class="activeIndex == listItem.goodsId ? 'activesty' : ''" v-for="(listItem,listIndex) in list" :key="listIndex" @click="testClick(listItem)">
 						{{ listItem.goodsName }}
 					</view>
 				</view>
@@ -74,7 +82,7 @@
 			<view class="content">
 				<view class="top" :class="typeIndex === 0 ? 'activesty' : ''" @click="paperClick(3)">全部试卷类型</view>
 				<view class="list">
-					<view class="item" :class="typeIndex == listItem.paperId ? 'activesty' : ''" v-for="listItem in list1" @click="paperClick(listItem)">{{ listItem.paperName }}</view>
+					<view class="item" :class="typeIndex == listItem.paperId ? 'activesty' : ''" v-for="(listItem,listIndex) in list1" :key="listIndex" @click="paperClick(listItem)">{{ listItem.paperName }}</view>
 				</view>
 			</view>
 			<view class="modal_wrap" @click="index = 0"></view>
@@ -139,7 +147,7 @@ export default {
 		 * 去做题
 		 */
 		async doRepeat(id, goodsId, moduleId = 0, chapterId = 0) {
-			await this.getDetail(goodsId);
+			// await this.getDetail(goodsId);
 			let count = await this.examRecordCount(id,goodsId);
 			let answerNum = await this.getExamDetail(id);
 			//超过答题次数
@@ -294,7 +302,7 @@ page {
 			height: 40rpx;
 			text-align: center;
 			line-height: 40rpx;
-			background: linear-gradient(0deg, #4facfe, #007aff);
+			background: linear-gradient(180deg, #4facfe, #007aff);
 			border-radius: 16rpx 0px 16rpx 0rpx;
 		}
 
@@ -336,6 +344,10 @@ page {
 				background: #ffffff;
 				border: 1rpx solid #007aff;
 				border-radius: 16rpx;
+				
+				&.continue {
+					width:317rpx;
+				}
 			}
 		}
 	}

+ 32 - 17
pages2/bank/question_report.vue

@@ -29,7 +29,13 @@
 				</view>
 			</view>
 			<view class="dis_fst">
-				<!-- <view class="btnACs">错题解析</view> -->
+				<navigator
+					:url="
+						'/pages2/subject/wrongBank?explain=1&id=' + reportdata.examId
+					"
+				>
+					<view class="btnACs">错题解析</view>
+				</navigator>
 				<navigator
 					:url="
 						'/pages2/bank/questionBankExplain?explain=1&id=' +
@@ -77,7 +83,7 @@ export default {
 			id: '',
 			reportdata: {},
 			context1: null,
-			context2: null
+			context2: null,
 		};
 	},
 	onUnload() {},
@@ -95,7 +101,7 @@ export default {
 					.in(this)
 					.select('.canvas')
 					.boundingClientRect()
-					.exec(newRes => {
+					.exec(async newRes => {
 						var width = newRes[0].width;
 						var height = newRes[0].height;
 						var caculateX = winW / 750;
@@ -106,8 +112,19 @@ export default {
 						context1.setStrokeStyle('#EEEEEE');
 						context1.setLineWidth(caculateX * 20);
 						context1.arc(caculateX * 90, caculateX * 90, caculateX * 80, 0, 2 * Math.PI, true);
-						// context1.arc(caculateX * 90, caculateX * 90, caculateX * 80, 0, (this.reportdata.performance / this.reportdata.goodsId) * 2 * Math.PI, false);
 						context1.stroke();
+						context1.draw();
+						
+						var context2 = uni.createCanvasContext('Canvas2');
+						this.context2 = context2;
+						context2.setStrokeStyle('#EEEEEE');
+						context2.setLineWidth(caculateX * 20);
+						context2.arc(caculateX * 90, caculateX * 90, caculateX * 80, 0, 2 * Math.PI, true);
+						context2.stroke();
+						context2.draw();
+						
+						await this.examReport();
+						
 						context1.beginPath();
 						context1.setStrokeStyle('#32D74B');
 						context1.setFillStyle('#32D74B');
@@ -121,19 +138,13 @@ export default {
 						context1.fillText(`满分${this.reportdata.totalScore}`, caculateX * 90, caculateX * 130, caculateX * 180);
 						context1.arc(caculateX * 90, caculateX * 90, caculateX * 80, 0, (this.reportdata.performance / this.reportdata.totalScore) * 2 * Math.PI, false);
 						context1.stroke();
-						context1.draw();
-
-						var context2 = uni.createCanvasContext('Canvas2');
-						this.context2 = context2;
-						context2.setStrokeStyle('#EEEEEE');
-						context2.setLineWidth(caculateX * 20);
-						context2.arc(caculateX * 90, caculateX * 90, caculateX * 80, 0, 2 * Math.PI, true);
-						context2.stroke();
+						context1.draw(true);
+						
 						context2.beginPath();
 						context2.setStrokeStyle('#007AFF');
 						context2.setFillStyle('#007AFF');
 						context2.setTextAlign('center');
-						context1.setTextBaseline('middle');
+						context2.setTextBaseline('middle');
 						context2.setLineCap('round');
 						context2.setFontSize(caculateX * 64);
 						context2.fillText(`${this.reportdata.doTime}'`, caculateX * 90, caculateX * 90, caculateX * 180);
@@ -142,7 +153,7 @@ export default {
 						context2.fillText(`限时${this.reportdata.examTime}'`, caculateX * 90, caculateX * 130, caculateX * 180);
 						context2.arc(caculateX * 90, caculateX * 90, caculateX * 80, 0, (this.reportdata.doTime / this.reportdata.examTime) * 2 * Math.PI, false);
 						context2.stroke();
-						context2.draw();
+						context2.draw(true);
 					});
 			}
 		});
@@ -205,9 +216,13 @@ export default {
 			});
 		},
 		examReport() {
-			this.$api.examReport(this.id).then(res => {
-				this.reportdata = res.data.data;
-			});
+			return new Promise(resolve => {
+				this.$api.examReport(this.id).then(res => {
+					this.reportdata = res.data.data;
+				});
+				
+				resolve()
+			})
 		}
 	}
 };

+ 57 - 32
pages2/wd/question_bank.vue

@@ -2,31 +2,36 @@
 	<view style="padding: 32rpx;">
 		<navigator url="/pages2/bank/my_question">
 			<view class="my_question">
-					<view class="flex">
-						<view class="text">我的题库<u-icon name="arrow-right"></u-icon></view>
-						<image src="/static/icon/my_icon7.png" class="my_icon"></image>
-					</view>
+				<view class="flex">
+					<view class="text">我的题库<u-icon name="arrow-right"></u-icon></view>
+				</view>
+				<image src="/static/questionBank.png" class="my_bg"></image>
 			</view>
 		</navigator>
 		<view class="bottom">
 			<navigator url="/pages2/subject/collect">
 				<view class="item collect">
 					<view class="text">收藏集<u-icon name="arrow-right"></u-icon></view>
-					<image class="img" src="/static/sc.png"></image>
+					<image class="img" src="/static/questionBank_collect.png"></image>
 				</view>
 			</navigator>
 			<view class="item list">
 				<navigator url="/pages2/bank/question_record">
 					<view class="list-in">
-						<image class="img" src="/static/icon/wk_icon2.png" ></image>
-						做题记录 <u-icon name="arrow-right"></u-icon>
+						<image class="img" src="/static/questionBank_record.png" ></image>
+						<view class="text">
+							做题记录 <u-icon name="arrow-right"></u-icon>
+						</view>
+						
 					</view>
 				</navigator>
 				
 				<navigator url="/pages2/subject/wrong">
 					<view class="list-in">
-						<image class="img" src="/static/icon/wk_icon2.png"></image>
-						错题集 <u-icon name="arrow-right"></u-icon>
+						<image class="img" src="/static/questionBank_wrong.png"></image>
+						<view class="text">
+							错题集 <u-icon name="arrow-right"></u-icon>
+						</view>
 					</view>
 				</navigator>
 			</view>
@@ -62,14 +67,25 @@
 </style>
 <style lang="scss" scope>
 	.my_question {
+		position:relative;
 		display: flex;
 		width: 686rpx;
 		height: 240rpx;
-		background: linear-gradient(45deg, #015EEA, #00C0FA);
 		border-radius: 24rpx;
 		padding:0 40rpx;
 		
+		
+		.my_bg {
+			position:absolute;
+			left:0;
+			top:0;
+			width:100%;
+			height:100%;
+		}
+		
 		.flex {
+			position: relative;
+			z-index: 10;
 			.text {
 				padding-top:32rpx;
 				font-size: 32rpx;
@@ -77,20 +93,8 @@
 				font-weight: bold;
 				color: #FFFFFF;
 			}
-			
-			.my_icon {
-				margin-top:23rpx;
-				width: 122rpx;
-				height: 132rpx;
-			}
-		}
-		
-		.flex_auto {
-			flex:1;
-			.bg {
-				width:100%;
-			}
 		}
+
 	}
 	
 	.bottom {
@@ -101,29 +105,40 @@
 			width: 335rpx;
 			
 			&.collect {
+				position: relative;
 				font-size: 32rpx;
 				color: #FFFFFF;
 				height: 240rpx;
-				background: linear-gradient(45deg, rgba(255, 177, 2, 0.75), rgba(255, 84, 79, 0.75));
 				border-radius: 24rpx;
 				padding:32rpx;
 				
+				.text {
+					position:relative;
+					z-index: 10;
+					font-size: 32rpx;
+					font-weight: bold;
+					color: #FFFFFF;
+				}
+				
 				.img {
-					width: 125rpx;
-					height: 126rpx;
-					opacity: 0.4;
+					position:absolute;
+					left:0;
+					top:0;
+					width:100%;
+					height:100%;
+					
 				}
 			}
 			
 			&.list {
 				.list-in {
+					position:relative;
 					width: 335rpx;
 					height: 112rpx;
 					background: #007AFF;
 					border-radius: 24rpx;
 					display: flex;
 					align-items: center;
-					justify-content: center;
 					font-size: 32rpx;
 					color: #fff;
 					
@@ -131,11 +146,21 @@
 						margin-bottom:16rpx;
 					}
 					
+					.text {
+						padding-left:91rpx;
+						position:relative;
+						z-index: 10;
+						font-size: 32rpx;
+						font-weight: bold;
+						color: #FFFFFF;
+					}
+					
 					.img {
-						width: 32rpx;
-						height: 32rpx;
-						opacity: 0.8;
-						margin-right:17rpx;
+						position:absolute;
+						left:0;
+						top:0;
+						width:100%;
+						height:100%;
 					}
 				}
 			}

二进制
static/questionBank.png


二进制
static/questionBank_collect.png


二进制
static/questionBank_record.png


二进制
static/questionBank_wrong.png