heyang 1 年間 前
コミット
392ee5334c
共有2 個のファイルを変更した18 個の追加67 個の削除を含む
  1. 7 33
      pages/views/pupilPage/pupilMine.vue
  2. 11 34
      pages/views/teacherPage/teacherMine.vue

+ 7 - 33
pages/views/pupilPage/pupilMine.vue

@@ -58,13 +58,13 @@
 			<view class="button-big-box" @click="goPage('identityAuthenticationPupil')">
 				<img class="left-img" src="@/pages/images/newImage/icon_wd_sfyz@1x.png">
 				<view class="left-text-p">身份验证</view>
-				<view class="right-text-p"></view>
+				<view class="right-text-p" :class="faceImg?'color-D':''" >{{!faceImg?'未上传':'已上传'}}</view>
 				<img class="right-img" src="@/pages/images/newImage/icon_wd_gd@1x.png">
 			</view>
 			<view class="button-big-box" @click="goPage('electronicSignaturePupil')">
 				<img class="left-img" src="@/pages/images/newImage/icon_wd_dzqm@1x.png">
 				<view class="left-text-p">电子签名</view>
-				<view class="right-text-p" :class="isUpload?'color-D':''">{{!isUpload?'未上传':'已上传'}}</view>
+				<view class="right-text-p" :class="signatureUrl?'color-D':''" >{{!signatureUrl?'未上传':'已上传'}}</view>
 				<img class="right-img" src="@/pages/images/newImage/icon_wd_gd@1x.png">
 			</view>
 		</view>
@@ -84,9 +84,6 @@
 		examPointsRecordGetMyPointsLogInfo,
 	} from '@/pages/api/index.js'
 	import {
-		querySignature,
-	} from '@/pages_basics/api/index.js'
-	import {
 		pageRestrictVerify
 	} from '@/utils/index'
 	import {
@@ -103,8 +100,7 @@
 				userData: {},
 				bonusPoints: null,
 				creditScore: null,
-				ifFaceFeature: false,
-				isUpload: false,
+				faceImg: '',
 				signatureUrl: '',
 
 			}
@@ -114,22 +110,10 @@
 		},
 		mounted() {
 			this.systemUserProfile();
-			this.studentinfoFacemy();
-			this.querySignature();
 			this.examPointsRecordGetMyPointsLogInfo();
 		},
 		methods: {
-			//查询用户电子签名
-			async querySignature() {
-				let self = this;
-				const {
-					data
-				} = await querySignature();
-				if (data.code == 200) {
-					self.isUpload = data.data.isUpload;
-					self.signatureUrl = data.data.signature;
-				}
-			},
+		
 			scanCode() {
 				uni.scanCode({
 					onlyFromCamera: true,
@@ -196,6 +180,8 @@
 				} = await systemUserProfile();
 				if (data.code == 200) {
 					this.$set(this, 'userData', data.data)
+					this.faceImg=data.data.faceImg;
+					this.signatureUrl=data.data.signature
 					uni.setStorageSync('faceImg', data.data.faceImg);
 				}
 			},
@@ -209,19 +195,7 @@
 					this.creditScore = data.data.creditScore;
 				}
 			},
-			//获取当前身份人脸验证状态与学生卡上传状态
-			async studentinfoFacemy() {
-				let obj = {
-					studentsId: uni.getStorageSync('userId')
-				}
-				const {
-					data
-				} = await studentinfoFacemy(obj)
-				if (data.code == 200) {
-					this.certification = data.data;
-					this.ifFaceFeature = data.data.ifFaceFeature;
-				}
-			},
+		
 			//退出按钮
 			clickOut() {
 				let self = this;

+ 11 - 34
pages/views/teacherPage/teacherMine.vue

@@ -69,13 +69,13 @@
 			<view class="button-big-box" @click="goPage('identityAuthentication')">
 				<img class="left-img" src="@/pages/images/newImage/icon_wd_sfyz@1x.png">
 				<view class="left-text-p">身份验证</view>
-				<view class="right-text-p"></view>
+				<view class="right-text-p" :class="faceImg?'color-D':''" >{{!faceImg?'未上传':'已上传'}}</view>
 				<img class="right-img" src="@/pages/images/newImage/icon_wd_gd@1x.png">
 			</view>
 			<view class="button-big-box" @click="goPage('electronicSignature')">
 				<img class="left-img" src="@/pages/images/newImage/icon_wd_dzqm@1x.png">
 				<view class="left-text-p">电子签名</view>
-				<view class="right-text-p" :class="isUpload?'color-D':''" >{{!isUpload?'未上传':'已上传'}}</view>
+				<view class="right-text-p" :class="signatureUrl?'color-D':''" >{{!signatureUrl?'未上传':'已上传'}}</view>
 				<img class="right-img" src="@/pages/images/newImage/icon_wd_gd@1x.png">
 			</view>
 		</view>
@@ -94,9 +94,7 @@
 		studentinfoFacemy,
 		examPointsRecordGetMyPointsLogInfo,
 	} from '@/pages/api/index.js'
-	import {
-		querySignature,
-	} from '@/pages_basics/api/index.js'
+
 	import {
 		pageRestrictVerify
 	} from '@/utils/index'
@@ -113,9 +111,8 @@
 				userData: {},
 				bonusPoints: null,
 				creditScore: null,
-				ifFaceFeature: false,
-				isUpload: false,
-				signatureUrl: '',
+				faceImg:'',
+				signatureUrl:'',
 			}
 		},
 		created() {
@@ -123,22 +120,10 @@
 		},
 		mounted() {
 			this.systemUserProfile();
-			this.studentinfoFacemy();
-			this.querySignature();
 			this.examPointsRecordGetMyPointsLogInfo();
 		},
 		methods: {
-			//查询用户电子签名
-			async querySignature() {
-				let self = this;
-				const {
-					data
-				} = await querySignature();
-				if (data.code == 200) {
-					self.isUpload = data.data.isUpload;
-					self.signatureUrl = data.data.signature;
-				}
-			},
+		
 			scanCode() {
 				uni.scanCode({
 					onlyFromCamera: true,
@@ -214,8 +199,12 @@
 					data
 				} = await systemUserProfile();
 				if (data.code == 200) {
+					console.log(data.data)
 					this.$set(this, 'userData', data.data)
+					this.faceImg=data.data.faceImg;
+					this.signatureUrl=data.data.signature
 					uni.setStorageSync('faceImg', data.data.faceImg);
+					
 				}
 			},
 			//查询学生-信用分/奖励分
@@ -228,19 +217,7 @@
 					this.creditScore = data.data.creditScore;
 				}
 			},
-			//获取当前身份人脸验证状态与学生卡上传状态
-			async studentinfoFacemy() {
-				let obj = {
-					studentsId: uni.getStorageSync('userId')
-				}
-				const {
-					data
-				} = await studentinfoFacemy(obj)
-				if (data.code == 200) {
-					this.certification = data.data;
-					this.ifFaceFeature = data.data.ifFaceFeature;
-				}
-			},
+			
 			//退出按钮
 			clickOut() {
 				let self = this;