浏览代码

成绩查询

xionghaojie 3 年之前
父节点
当前提交
a93dada76b
共有 3 个文件被更改,包括 22 次插入7 次删除
  1. 10 0
      pages/login/login.vue
  2. 5 5
      pages/scoreQuery/scoreQuery.vue
  3. 7 2
      pages/test/test.vue

+ 10 - 0
pages/login/login.vue

@@ -214,6 +214,16 @@ export default {
 						url:'/pages/scoreQuery/scoreQuery?paperId='+ this.paperId+'&admissionNo='+this.testNumber
 					})
 			});
+			// req.postRequest('/api/admission/login', formP, data => {
+			// 	if(data){
+			// 		req.setStorage('userInfo', data);
+			// 		req.getRequest('/api/v3/exam/user/manager/result', formP, res => {
+			// 				uni.navigateTo({
+			// 					url:'/pages/scoreQuery/scoreQuery?paperId='+ this.paperId+'&admissionNo='+this.testNumber
+			// 				})
+			// 		});
+			// 	}
+			// });
 		},
 		// 验证提交
 		yanzhengSubmit(){

+ 5 - 5
pages/scoreQuery/scoreQuery.vue

@@ -14,7 +14,7 @@
 					<text>{{examResult.createDate}}</text>
 				</view>
 				<!--  用户考试状态 0未交卷 1已交卷 2阅卷中 3缺考 4 阅卷完成 -->
-				<view v-if="examResult.isPapers!=4">
+				<view v-if="examResult.state!=4">
 					<image class="yj-icon" src="/static/images/yuejuan.png"></image>
 					<view class="yj-label">
 						<block v-if="examResult.state==0">未交卷</block>
@@ -48,19 +48,19 @@
 			<!-- 答题卡区域 -->
 			<view class="test-info ddflex">
 				<view class="test-people ddflex">
-					<image :src="userInfo.avatar"></image>
+					<image :src="examResult.avatar"></image>
 					<view class="test-people-info ddflex">
 						<view class="ddflex">
 							<view class="test-people-label">考生姓名</view>
-							<view class="fflex">{{userInfo.userName}}</view>
+							<view class="fflex">{{examResult.userName}}</view>
 						</view>
 						<view class="ddflex">
 							<view class="test-people-label">准考证号</view>
-							<view class="fflex" style="word-break: break-all;">{{userInfo.admissionNo}}</view>
+							<view class="fflex" style="word-break: break-all;">{{examResult.admissionNo}}</view>
 						</view>
 						<view class="ddflex">
 							<view class="test-people-label">考试科目</view>
-							<view class="fflex">{{userInfo.cateName}}</view>
+							<view class="fflex">{{examResult.title}}</view>
 						</view>
 					</view>
 				</view>

+ 7 - 2
pages/test/test.vue

@@ -131,7 +131,7 @@
 			<view class="popup-box" v-if="state==2">
 				<view class="popup-top ddflex">
 					<view>考试结果</view>
-					<image src="/static/images/close.png" @click="close()"></image>
+					<image src="/static/images/close.png" @click="close(true)"></image>
 				</view>
 				<view class="popup-content" style="margin-top: 23px;">
 					<view class="chufen-title">{{result.title}}</view>
@@ -578,8 +578,13 @@
 			open() {
 				this.$refs.popup.open('center')
 			},
-			close() {
+			close(back) {
 				this.$refs.popup.close()
+				if(back){
+					uni.reLaunch({
+						url:'pages/login/login'
+					})
+				}
 			},