chenxiong 3 éve
szülő
commit
01c9a7b1bc

+ 8 - 0
common/httpList/course.js

@@ -136,6 +136,14 @@ export default {
 		})
 	},
 	
+	faceCertificationIdCardCompareFace(data) {
+			return myRequest({
+				url: '/face/certification/idCardCompareFace',
+				method: 'post',
+				data:data
+			})
+		},
+	
 	faceCertificationCompareFace(data) {
 		return myRequest({
 			url: '/face/certification/CompareFace',

+ 4 - 4
common/request.js

@@ -4,14 +4,14 @@ import store from '@/store/index.js'
 import api from './api.js'
 var num = 1
 //接口api   
-export const BASE_URL = 'https://api.xyyxt.net'   //release
+// export const BASE_URL = 'https://api.xyyxt.net'   //release
 // export const BASE_URL = 'http://120.79.166.78:19009'   //预发布
-// export const BASE_URL = 'http://42.192.164.187:19005'    //test 
+export const BASE_URL = 'http://42.192.164.187:19005'    //test 
 // export const BASE_URL = 'http://192.168.1.222:5055'    //dev
 
  //图片上传api
-export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
-// export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
+// export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
+export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
 
 // export const socket_url = 'ws://42.192.164.187:19005/webSocket/'  //test
 // export const socket_url = 'ws://120.79.166.78:19009/webSocket/'  //预发布

+ 80 - 2
pages/index/index.vue

@@ -30,8 +30,18 @@
 					<view class="btn" @click="jumpPage">立即查看</view>
 				</view>
 			</view>
-			<view>
+			<view class="my-list">
+				<view class="my-list__item my-list__item--course" @click="go('course')">
+					<image src="../../static/mycourse.png"></image>
+					<text>我的网课</text>
+				</view>
+				<view class="my-list__item my-list__item--bank" @click="go('bank')">
+					<image src="../../static/mybank.png"></image>
+					<text>我的题库</text>
+				</view>
+			</view>
 				<!-- 日历-->
+			<!-- <view>
 				<view class="calendar_card">
 					<view class="card_box">
 						<u-row gutter="16">
@@ -87,7 +97,7 @@
 						</u-row>
 					</view>
 				</view>
-			</view>
+			</view> -->
 			<u-tabs class="tabs" :current="tabCurrent" @change="tab" :list="menu" :activeStyle="{fontSize:'36rpx'}" :inactiveStyle="{color:'#EAEEF1',fontSize:'30rpx'}" sticky></u-tabs>
 			<view class="course-list" v-show="tabCurrent==0">
 				<navigator  hover-class="none" class="item" v-for="(item,index) in list1" :key="index" :url="'/pages3/course/detail?id='+item.goodsId">
@@ -346,6 +356,35 @@ export default {
 		jumpPage(){
 			this.$navTo.togo('/pages2/msg/index')
 		},
+		go(type) {
+			if (!this.$method.isLogin()) {
+				this.$navTo.togo('/pages/login/login');
+			} else {
+				if(type == 'course') {
+					uni.navigateTo({
+						url:'/pages2/wd/class'
+					})
+				} else if(type == 'bank') {
+					this.$api.lockLockStatus({
+					  action:'bank'
+					}).then(res => {
+					  if(res.data.code == 200) { //有其他端在操作,不能学习
+						  uni.showToast({
+							  icon:'none',
+							  title:res.data.msg,
+							  duration:3000,
+						  })
+					  } else if(res.data.code == 500) { //可以学习
+						  
+						uni.navigateTo({
+							url:'/pages2/wd/question_bank'
+						})
+					  }
+					})
+				}
+			}
+			
+		},
 		//课程
 		courseList() {
 			var self = this;
@@ -940,6 +979,45 @@ export default {
 			}
 		}
 	}
+	
+	.my-list {
+		margin-top:16rpx;
+		display:flex;
+		justify-content: space-between;
+		&__item {
+			width:351rpx;
+			height:96rpx;
+			position:relative;
+			padding:25rpx 0 0 25rpx;
+				font-size: 32rpx;
+			
+			&--bank {
+				text {
+					position: relative;
+					z-index: 2;
+					color:#00998A;
+				}
+				
+			}
+			
+			&--course {
+				text {
+					position: relative;
+					z-index: 2;
+					color:#0062D9;
+				}
+			}
+			
+			image {
+				width:100%;
+				height:100%;
+				left:0;
+				top:0;
+				position:absolute;
+				z-index: 1;
+			}
+		}
+	}
 }
 .date_dot {
 	width: 6rpx;

+ 2 - 2
pages/wd/index.vue

@@ -17,7 +17,7 @@
 				<view style="background-color: #F0F1F5;height:80rpx;"></view>
 			</view>
 			<view style="top: 195px;position: relative;padding-bottom: 30rpx;">
-				<navigator  hover-class="none" url="/pages2/plan/index" class="menu_box">
+				<!-- <navigator  hover-class="none" url="/pages2/plan/index" class="menu_box">
 					<view class="box_left">
 						<image src="/static/icon/my_icon1.png" class="my_icon"></image>
 						<view>学习计划</view>
@@ -27,7 +27,7 @@
 						<text>{{ userNums.planSum }}</text>
 						个学习任务
 					</view>
-				</navigator>
+				</navigator> -->
 				<view class="two_menu">
 					<navigator  hover-class="none" url="/pages2/wd/class" class="small_menu">
 						<image src="/static/icon/my_icon3.png" class="my_icon"></image>

+ 8 - 8
pages2/bank/questionBank.vue

@@ -988,13 +988,13 @@ export default {
 							
 							//没选错
 							if(checkboxScore) {
-								
+								checkboxScore = 0;
 								item.ans.forEach((ans,quesIndex) => {
-									//漏选扣一部分
+									//漏选扣一部分,对n题给n X partScore 分
 									if(item.ques) {
 										
-										if(item.ques.indexOf(item.ans[quesIndex]) == -1) {
-											checkboxScore = item.partScore;
+										if(item.ques.indexOf(item.ans[quesIndex]) != -1) {
+											checkboxScore += item.partScore;
 										}
 									} else {
 										checkboxScore = 0;
@@ -1553,13 +1553,13 @@ export default {
 						
 						//没选错
 						if(checkboxScore) {
-							
+							checkboxScore = 0; 
 							item.ans.forEach((ans,quesIndex) => {
-								//漏选扣一部分
+								//漏选扣一部分,对n题给n X partScore 分
 								if(item.ques) {
 									
-									if(item.ques.indexOf(item.ans[quesIndex]) == -1) {
-										checkboxScore = item.partScore;
+									if(item.ques.indexOf(item.ans[quesIndex]) != -1) {
+										checkboxScore += item.partScore;
 									}
 								} else {
 									checkboxScore = 0;

+ 8 - 8
pages2/bank/questionBankContinue.vue

@@ -837,13 +837,13 @@ export default {
 						
 						//没选错
 						if(checkboxScore) {
-							
+							checkboxScore = 0;
 							item.ans.forEach((ans,quesIndex) => {
-								//漏选扣一部分
+								//漏选扣一部分,对n题给n X partScore 分
 								if(item.ques) {
 									
-									if(item.ques.indexOf(item.ans[quesIndex]) == -1) {
-										checkboxScore = item.partScore;
+									if(item.ques.indexOf(item.ans[quesIndex]) != -1) {
+										checkboxScore += item.partScore;
 									}
 								} else {
 									checkboxScore = 0;
@@ -1092,13 +1092,13 @@ export default {
 						
 						//没选错
 						if(checkboxScore) {
-							
+							checkboxScore = 0;
 							item.ans.forEach((ans,quesIndex) => {
-								//漏选扣一部分
+								//漏选扣一部分,对n题给n X partScore 分
 								if(item.ques) {
 									
-									if(item.ques.indexOf(item.ans[quesIndex]) == -1) {
-										checkboxScore = item.partScore;
+									if(item.ques.indexOf(item.ans[quesIndex]) != -1) {
+										checkboxScore += item.partScore;
 									}
 								} else {
 									checkboxScore = 0;

+ 6 - 2
pages2/bank/questionBankExplainDetail.vue

@@ -434,6 +434,7 @@ export default {
 			showDialog:false,
 			bankList: [],
 			collectList:[],
+			orderGoodsId:0,
 			goodsId:'',
 			explain:'1',  	//是否显示答案
 			chapterId:'',
@@ -450,6 +451,7 @@ export default {
 		this.goodsId = option.goodsId;
 		this.chapterId = option.chapterId;
 		this.moduleId = option.moduleId;
+		this.orderGoodsId = option.orderGoodsId;
 		// this.goodsQuestionList();
 		
 		let showDialog = uni.getStorageSync('showDialog');
@@ -493,7 +495,8 @@ export default {
 		examRecordWrongList() {
 			this.$api.examRecordWrongList({
 				examId:this.examId,
-				goodsId:this.goodsId
+				goodsId:this.goodsId,
+				orderGoodsId:this.orderGoodsId
 			}).then(res => {
 				
 				res.data.rows.forEach((item,index) => { 
@@ -589,7 +592,8 @@ export default {
 		examRecordRightList() {
 			this.$api.examRecordRightList({
 				examId:this.examId,
-				goodsId:this.goodsId
+				goodsId:this.goodsId,
+				orderGoodsId:this.orderGoodsId
 			}).then(res => {
 				
 				res.data.rows.forEach((item,index) => { 

+ 3 - 3
pages2/bank/question_statistics.vue

@@ -63,7 +63,7 @@
 												</view>
 											</view>
 										</view>
-										<navigator  hover-class="none" :url="'/pages2/bank/questionBankExplainDetail?goodsId='+id+'&examId='+article.examId">
+										<navigator  hover-class="none" :url="'/pages2/bank/questionBankExplainDetail?orderGoodsId='+orderGoodsId+'&goodsId='+id+'&examId='+article.examId">
 											<view class="btn">详情</view>
 										</navigator>
 									</view>
@@ -96,7 +96,7 @@
 										</view>
 									</view>
 								</view>
-								<navigator  hover-class="none" :url="'/pages2/bank/questionBankExplainDetail?goodsId='+id+'&examId='+article.examId">
+								<navigator  hover-class="none" :url="'/pages2/bank/questionBankExplainDetail?orderGoodsId='+orderGoodsId+'&goodsId='+id+'&examId='+article.examId">
 									<view class="btn">详情</view>
 								</navigator>
 							</view>
@@ -118,7 +118,7 @@
 									</view>
 								</view>
 							</view>
-							<navigator  hover-class="none" :url="'/pages2/bank/questionBankExplainDetail?goodsId='+id+'&examId='+item1.majorId">
+							<navigator  hover-class="none" :url="'/pages2/bank/questionBankExplainDetail?orderGoodsId='+orderGoodsId+'&goodsId='+id+'&examId='+item1.majorId">
 								<view class="btn">详情</view>
 							</navigator>
 						</view>

+ 9 - 8
pages2/class/questionBank.vue

@@ -1092,12 +1092,13 @@ export default {
 						
 						//没选错
 						if(checkboxScore) {
+							checkboxScore = 0;
 							item.ans.forEach((ans,quesIndex) => {
-								//漏选扣一部分
+								//漏选扣一部分,对n题给n X partScore 分
 								if(item.ques) {
 									
-									if(item.ques.indexOf(item.ans[quesIndex]) == -1) {
-										checkboxScore = item.partScore;
+									if(item.ques.indexOf(item.ans[quesIndex]) != -1) {
+										checkboxScore += item.partScore;
 									}
 								} else {
 									checkboxScore = 0;
@@ -1707,17 +1708,17 @@ export default {
 						
 						//没选错
 						if(checkboxScore) {
-							
+							checkboxScore = 0;
 							item.ans.forEach((ans,quesIndex) => {
-								//漏选扣一部分
+								//漏选扣一部分,对n题给n X partScore 分
 								if(item.ques) {
 									
-									if(item.ques.indexOf(item.ans[quesIndex]) == -1) {
-										checkboxScore = item.partScore;
+									if(item.ques.indexOf(item.ans[quesIndex]) != -1) {
+										checkboxScore += item.partScore;
 									}
 								} else {
 									checkboxScore = 0;
-								} 
+								}
 							})
 						}
 						

+ 3 - 4
pages2/verify/input.vue

@@ -643,13 +643,12 @@ export default {
 										  success:(res) => {
 											  let base64 = 'data:image/jpg;base64,' + res.data;
 												let newdata = {
-													idNum:this.veryIdCard,
-													idName:this.veryIdName,
+													urlA:this.form.idcard_face_photo,
 													oneInchPhotos:base64
 												}
 												
-												this.$api.facCertificationImageRecognition(newdata).then(res1 => {
-													if(res1.data.data.sim >= 70) {
+												this.$api.faceCertificationIdCardCompareFace(newdata).then(res1 => {
+													if(res1.data.data >= 70) {
 														var self = this;
 														if (self.remarkStatus) {
 															var arsty = {};

BIN
static/mybank.png


BIN
static/mycourse.png