소스 검색

修改bug

chenxiong 3 년 전
부모
커밋
eed0965d62

+ 9 - 0
common/httpList/goods.js

@@ -189,6 +189,15 @@ export default {
 		})
 	},
 	
+	examWrongRecordWrongNum(data) {
+		return myRequest({
+			url:`/exam/wwrong/record/wrongNum/${data}`,
+			method: 'get'
+		})
+	},
+	
+	
+	
 	bankExam(data) {
 		return myRequest({
 			url: '/bank/exam/'+data,

+ 4 - 4
pages/login/login.vue

@@ -8,18 +8,18 @@
 			</view>
 			<view class="login_box">
 				<u-form :model="form" ref="uForm" v-if="current==0">
-					<u-form-item ><u-input  v-model="form.account" placeholder="手机号/学员身份证"/></u-form-item>
+					<u-form-item ><u-input type="idcard" v-model="form.account" placeholder="手机号/学员身份证"/></u-form-item>
 					<u-form-item ><u-input v-model="form.pwd" type="password" placeholder="登录密码"/></u-form-item>
 				</u-form>
 				<u-form :model="form" ref="uForm" v-if="current==1">
-					<u-form-item ><u-input  v-model="form.tel" placeholder="手机号"/></u-form-item>
+					<u-form-item ><u-input type="number" maxlength="11"  v-model="form.tel" placeholder="手机号"/></u-form-item>
 					<u-form-item >
-						<u-input v-model="form.code"  placeholder="验证码"/>
+						<u-input v-model="form.code" type="number"  placeholder="验证码"/>
 						<u-button slot="right"  size="mini" @click="getCode">{{codeTips}}</u-button>
 					</u-form-item>
 				</u-form>
 			</view>
-			<button class="loginBtn" @click="login" v-if="current==0">
+			<button class="loginBtn" @click="login" v-if="current==0"> 
 				登录
 			</button>
 			<button :disabled="isUse" class="loginBtn" @click="sms_login" v-if="current==1">

+ 9 - 11
pages2/bank/detail.vue

@@ -43,9 +43,9 @@
 						<template v-if="item1.showList">
 							<view v-for="(item2,index2) in item1.list" :key="index2" >
 								<view class="section" @click="changeItem" :data-index1="index1" :data-index2="index2" :data-id="item2.chapterExamId" :data-type="item1.type">
-									<image src="/static/icon/up1.png" class="icon_up" v-if="!item2.showList"></image>
-									<image src="/static/icon/down1.png" class="icon_up" v-if="item2.showList"></image>
-									{{item2.name}}
+									<u-icon  v-if="!item2.showList" name="arrow-up"></u-icon>
+									<u-icon  v-if="item2.showList" name="arrow-down"></u-icon>
+									<text style="margin-left:34rpx;">{{ item2.name }}</text>
 								</view>
 								<view  v-if="item2.showList">
 									<view class="article" :class="{active:showTest(article.examId)}"  v-for="(article,index3) in item2.list" :key="index3">
@@ -64,9 +64,9 @@
 					
 					<template v-if="item1.type ==2">
 						<view class="section" :data-index1="index1" :data-id="item1.majorId" @click="changeItem" :data-type="item1.type">
-							<image src="/static/icon/up1.png" class="icon_up" v-if="!item1.showList"></image>
-							<image src="/static/icon/down1.png" class="icon_up" v-if="item1.showList"></image>
-							{{item1.name}}
+							<u-icon  v-if="!item1.showList" name="arrow-up"></u-icon>
+							<u-icon  v-if="item1.showList" name="arrow-down"></u-icon>
+							<text style="margin-left:34rpx;">{{ item1.name }}</text>
 						</view>
 						<view v-if="item1.showList" >
 							<view class="article" :class="{active:showTest(article.examId)}"  :key="index3" v-for="(article,index2) in item1.list">
@@ -325,7 +325,7 @@ export default {
 				padding:10rpx 16rpx;
 				
 				.module {
-					font-size: 30rpx;
+					font-size: 32rpx;
 					color: #333333;
 					
 					.icon {
@@ -335,9 +335,7 @@ export default {
 				
 				.section {
 					font-size: 30rpx;
-					font-family: PingFang SC;
-					font-weight: bold;
-					color: #333333;
+					color: #333;
 					white-space:nowrap;
 					overflow:hidden;
 					text-overflow:ellipsis; 
@@ -350,7 +348,7 @@ export default {
 					height:80rpx;
 					display: flex;
 					align-items: center;
-
+					margin-left:64rpx;
 					font-size: 24rpx;
 					color: #666666;
 					border-bottom: 1rpx solid #EEEEEE;

+ 0 - 15
pages2/bank/questionBank.vue

@@ -477,7 +477,6 @@ export default {
 			}
 		} else {
 			this.goodsQuestionList();
-			// this.wrongRecordExamQuestionList();
 			this.bankExam();
 		}
 	},
@@ -510,24 +509,10 @@ export default {
 				}
 			});
 		},
-		/**
-		 * 获取错题集
-		 */
-		wrongRecordExamQuestionList() {
-			this.$api
-				.wrongRecordExamQuestionList({
-					examId: this.id,
-					goodsId: this.goodsId
-				})
-				.then(res => {
-					this.wrongList = res.data.rows;
-				});
-		},
 		/**
 		 * 点击后退按钮
 		 */
 		clickLeft() {
-			this.questionOverNum();
 			if (this.bankType == 1) {
 				let ansCount = this.questionOverNum(); //已答题数
 				this.lastCount = this.questionList.length - ansCount; //统计未答完的题数

+ 11 - 1
pages2/bank/question_report.vue

@@ -24,7 +24,7 @@
 						<u-icon name="close" color="#FF3B30" size="38" style="margin-right: 26rpx;"></u-icon>
 						<!-- <image src="/static/5-4_03.png" mode=""></image> -->
 						<view class="text">错误题数</view>
-						<text class="red">{{ reportdata.totalQuestionNum - reportdata.rightQuestionNum }}</text>
+						<text class="red">{{ wrongRecordWrongNum }}</text>
 					</view>
 				</view>
 			</view>
@@ -88,11 +88,13 @@ export default {
 			examId:'',
 			context1: null,
 			context2: null,
+			wrongRecordWrongNum:'',
 		};
 	},
 	onUnload() {},
 	computed: { ...mapGetters(['userInfo']) },
 	async onShow() {
+		this.examWrongRecordWrongNum();
 		await this.bankExam();
 		await this.examReport();
 		
@@ -210,6 +212,14 @@ export default {
 				});
 			});
 		},
+		examWrongRecordWrongNum() {
+			return new Promise(resolve => {
+				this.$api.examWrongRecordWrongNum(this.id).then(res => {
+					this.wrongRecordWrongNum = res.data.data;
+					resolve();
+				});
+			});
+		},
 		/**
 		 * 查询试卷历史做题次数
 		 */

+ 6 - 6
pages2/bank/question_statistics.vue

@@ -57,11 +57,11 @@
 											<view class="desc">
 												<view class="flex-auto">
 													正确率
-													<text class="green">65%</text>
+													<text class="green">{{(article.rightQuestionNum / article.totalQuestionNum * 100).toFixed(0) +'%'}}</text>
 												</view>
 												<view class="flex-auto">
 													已完成
-													<text class="blue">65%</text>
+													<text class="blue">{{article.doQuestionNum +'/'+article.totalQuestionNum}}</text>
 												</view>
 											</view>
 										</view>
@@ -105,11 +105,11 @@
 									<view class="desc">
 										<view class="flex-auto">
 											正确率
-											<text class="green">65%</text>
+											<text class="green">{{(article.rightQuestionNum / article.totalQuestionNum * 100).toFixed(0) +'%'}}</text>
 										</view>
 										<view class="flex-auto">
 											已完成
-											<text class="blue">65%</text>
+											<text class="blue">{{article.doQuestionNum +'/'+article.totalQuestionNum}}</text>
 										</view>
 									</view>
 								</view>
@@ -141,11 +141,11 @@
 								<view class="desc">
 									<view class="flex-auto">
 										正确率
-										<text class="green">65%</text>
+										<text class="green">{{(item1.rightQuestionNum / item1.totalQuestionNum * 100).toFixed(0) +'%'}}</text>
 									</view>
 									<view class="flex-auto">
 										已完成
-										<text class="blue">65%</text>
+										<text class="blue">{{item1.doQuestionNum +'/'+item1.totalQuestionNum}}</text>
 									</view>
 								</view>
 							</view>

+ 10 - 8
pages2/order/confirm_list.vue

@@ -52,15 +52,17 @@
 											<u-radio
 												shape="circle"
 												:name="index"
-											></u-radio>
-										</view>
-										<view :class="item.checked?'white-box blue-box':'white-box'" >
-											<view>
-												<view class="blackTxt">{{item.className}}</view>
-												<view class="redTxt" v-if="item.classEndTime">有效期至:{{$method.timestampToTime(item.classEndTime)}}</view>
-												<view class="redTxt" v-if="item.classEndTime">本班还剩{{$method.GetRTime(item.classEndTime)}}天将结束学习</view>
-											</view>
+											>
+												<view :class="item.checked?'white-box blue-box':'white-box'" >
+													<view>
+														<view class="blackTxt">{{item.className}}</view>
+														<view class="redTxt" v-if="item.classEndTime">有效期至:{{$method.timestampToTime(item.classEndTime)}}</view>
+														<view class="redTxt" v-if="item.classEndTime">本班还剩{{$method.GetRTime(item.classEndTime)}}天将结束学习</view>
+													</view>
+												</view>
+											</u-radio>
 										</view>
+										
 									</view>
 								</view>
 							</u-radio-group>

+ 2 - 1
pages2/order/index.vue

@@ -74,7 +74,8 @@ export default {
 	},
 	// onPullDownRefresh() {},
 	onLoad(option) {
-		this.current = option.current || 0;
+		this.current = +option.current || 0;
+		console.log(this.current)
 	},
 	onShow() {
 		this.getOrderList();