wangxy 1 місяць тому
батько
коміт
1ca350f5a2

+ 144 - 0
api/exam.js

@@ -10,3 +10,147 @@ export function getExamList(data = {}) {
     timeout: 20000
   })
 }
+export function getFileUpload(data = {}) {
+  return request({
+    url: '/app/file/upload',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+
+export function getClientQiepingCheat(data = {}) {
+  return request({
+    url: '/app/qieping/cheat',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+
+export function getClientQiepingTimes(data = {}) {
+  return request({
+    url: '/app/qieping/times',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+
+export function getClientKaoshiBiaoji(data = {}) {
+  return request({
+    url: '/app/kaoshi/biaoji',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+
+export function getClientKsChengjiList(data = {}) {
+  return request({
+    url: '/app/chengji/list',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+
+export function getClientKsChengjiView(data = {}) {
+  return request({
+    url: '/app/chengji/view',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+
+export function getClientKsSave(data = {}) {
+  return request({
+    url: '/app/kaoshi/save',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+
+export function getClientKsStart(data = {}) {
+  return request({
+    url: '/app/kaoshi/start',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+
+export function getClientKsSubmit(data = {}) {
+  return request({
+    url: '/app/kaoshi/submit',
+    headers: {
+      isToken: true
+    },
+	isLoading:true,
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+
+export function getClientUserInfo(data = {}) {
+  return request({
+    url: '/app/kaoshi/user/info',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+
+export function getClientZhuaPaiUpdate(data = {}) {
+  return request({
+    url: '/app/kaoshi/zhuapai',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+
+export function getClientKaoshiInfo(data = {}) {
+  return request({
+    url: '/app/kaoshi/info',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}

+ 1 - 1
components/zhuapaiConfirm/qieping.vue

@@ -11,7 +11,7 @@
 	} from "vue";
 	import {
 		getClientQiepingCheat,getClientQiepingTimes
-	} from "@/api/kaoshi.js"
+	} from "@/api/exam.js"
 	import {
 		useZhuapaiStore
 	} from "@/store/zhuapai.js"

+ 1 - 1
components/zhuapaiConfirm/useCamera.js

@@ -334,7 +334,7 @@ import {
 	nextTick
 } from "vue"
 import {useZhuapaiStore} from "@/store/zhuapai.js"
-import {getFileUpload} from "@/api/kaoshi.js"
+import {getFileUpload} from "@/api/exam.js"
 
 // H5 播放抓拍功能
 export function useH5Camera({

+ 4 - 4
components/zhuapaiConfirm/zhuapai.vue

@@ -27,7 +27,7 @@
 	import {
 		useH5Camera
 	} from "@/components/zhuapaiConfirm/useCamera";
-	import * as ksApi from "@/api/kaoshi.js"
+	import * as ksApi from "@/api/exam.js"
 	import {
 		getStaticUrl
 	} from "@/utils/common.js"
@@ -223,7 +223,7 @@
 	})
 </script>
 
-<style lang="scss">
+<style lang="scss" scoped>
 	.zhuapai-drop-container {
 		width: 180rpx;
 		height: 400rpx;
@@ -277,7 +277,7 @@
 			left: 0;
 
 			i {
-				background-image: url("@/static/images/exam/video-close-icon.svg");
+				// background-image: url("@/static/images/exam/video-close-icon.svg");
 				margin: 6rpx auto 6rpx 6rpx;
 			}
 		}
@@ -289,7 +289,7 @@
 			right: 0;
 
 			i {
-				background-image: url("@/static/images/exam/video-play-icon.svg");
+				// background-image: url("@/static/images/exam/video-play-icon.svg");
 			}
 		}
 	}

+ 6 - 6
pages/exam/exam.vue

@@ -81,23 +81,23 @@
 			</view>
 		</uni-popup>
 		<!-- 摄像头确认 -->
-		<zhuapaiConfirm ref="zhuapaiConfirmRef" @success="zpConfirmSuccess" @error="zpConfirmError" 
-			@cancel="zpConfirmCancel" key="1"></zhuapaiConfirm>
+	<!-- 	<zhuapaiConfirm ref="zhuapaiConfirmRef" @success="zpConfirmSuccess" @error="zpConfirmError" 
+			@cancel="zpConfirmCancel" key="1"></zhuapaiConfirm> -->
 		<template v-if="data.zhuapai && data.zhuapai > 0">
 			<!-- 抓拍 -->
-			<zhuapaiVue ref="zhuapaiRef" @error="zpError" @success="zpSuccess" key="2" @progress="onProgress"></zhuapaiVue>
+			<!-- <zhuapaiVue ref="zhuapaiRef" @error="zpError" @success="zpSuccess" key="2" @progress="onProgress"></zhuapaiVue> -->
 		</template>
 	
 		<!-- 切屏 -->
-		<qiepingVue ref="qiepingRef" @zhuapai="qpZhuapai" @forceSubmit="forceSubmit" @qiepingToast="qiepingToast"
-			key="3"></qiepingVue>
+	<!-- 	<qiepingVue ref="qiepingRef" @zhuapai="qpZhuapai" @forceSubmit="forceSubmit" @qiepingToast="qiepingToast"
+			key="3"></qiepingVue> -->
 		<!-- 交卷确认 -->
 		<answerQueren ref="answerQrRef" @confirm="handleQuerenConfirm"></answerQueren>
 		<!-- 考试得分 -->
 		<submitScoreVue ref="subScoreRef" @confirm="handleScoreConfirm" @close="handleScoreClose"></submitScoreVue>
 		
 		<!-- 切屏确认弹窗 -->
-		<qiepingDlVue ref="qiepingDlRef" :content="messageContent" title="注意" okBtn="知道了"></qiepingDlVue>
+		<!-- <qiepingDlVue ref="qiepingDlRef" :content="messageContent" title="注意" okBtn="知道了"></qiepingDlVue> -->
 	</view>
 </template>
 

+ 3 - 1
pages/exam/index.vue

@@ -31,7 +31,9 @@
 	]
 	
 	function handleClick(data) {
-		console.log('ddd',data)
+		uni.redirectTo({
+			url: '/pages/exam/exam'
+		})
 	}
 </script>
 

+ 15 - 1
utils/common.js

@@ -35,4 +35,18 @@ export function tansParams(params) {
   let result = ''
   // FIXME   拼接参数 
   return result
-}
+}
+
+export function getStaticUrl(url) {
+	let result = '';
+	// #ifdef H5
+	result = `/mdist/${url}`
+	// #endif
+	
+	// #ifdef APP-PLUS
+	result = url
+	// #endif
+	
+	return result;
+}
+