Ver código fonte

证书查询,分数查询

xionghaojie 3 anos atrás
pai
commit
6f1708fee7

+ 88 - 58
pages/certificateDetail/certificateDetail.vue

@@ -8,7 +8,7 @@
 		<view class="project-content ddflex">
 			<!-- 成绩区域 -->
 			<view class="test-box">
-				<view class="test-title">二手车鉴定评估师证书查询结果</view>
+				<view class="test-title">{{info.cateName}}证书查询结果</view>
 				<!-- 表格 -->
 				<view class="ddflex border table" style="">
 					<!-- 左边 -->
@@ -27,43 +27,43 @@
 					<view class="fflex">
 						<view class="dflex" style="align-items: stretch;">
 							<view>
-								<view class="height56 ddflex-jc border border-right-none border-top-none">李田</view>
+								<view class="height56 ddflex padding-left border border-right-none border-top-none">{{info.userName?info.userName:'*'}}</view>
 								<view>
 									<view class="ddflex">
-										<view class="height56 ddflex-jc width200 border border-bottom-none border-right-none border-top-none">男</view>
+										<view class="height56 ddflex padding-left width200 border border-bottom-none border-right-none border-top-none">{{info.sex==1?'':info.sex==2?'女':'*'}}</view>
 										<view class="height56 ddflex-jc width140 bg-color border border-bottom-none border-right-none border-top-none">出生日期</view>
-										<view class="height56 ddflex-jc width140 border border-bottom-none border-right-none border-top-none">1998-05-26</view>
+										<view class="height56 ddflex-jc width140 border border-bottom-none border-right-none border-top-none">{{info.birthday?info.birthday:'*'}}</view>
 									</view>
 									<view class="ddflex">
-										<view class="height56 ddflex-jc width200 border border-bottom-none border-right-none">430981199805268500</view>
+										<view class="height56 ddflex-jc width200 border border-bottom-none border-right-none">{{info.idNumber?info.idNumber:'*'}}</view>
 										<view class="height56 ddflex-jc width140 bg-color border border-bottom-none border-right-none">培训时间</view>
-										<view class="height56 ddflex-jc width140 border border-bottom-none border-right-none">2021-03-10</view>
+										<view class="height56 ddflex-jc width140 border border-bottom-none border-right-none">{{info.trainingDate?info.trainingDate:'*'}}</view>
 									</view>
 									<view class="ddflex">
-										<view class="height56 ddflex-jc width200 border border-right-none">二手车鉴定评估师</view>
+										<view class="height56 ddflex padding-left width200 border border-right-none">{{info.cateName?info.cateName:'*'}}</view>
 										<view class="height56 ddflex-jc width140 bg-color border border-right-none">培训等级</view>
-										<view class="height56 ddflex-jc width140 border border-right-none">高</view>
+										<view class="height56 ddflex padding-left width140 border border-right-none">{{info.trainingLevel?info.trainingLevel:'*'}}</view>
 									</view>
 								</view>
 							</view>
 							<view class="border fflex border-right-none border-top-none" style="box-sizing: border-box;padding: 20px;">
-								<image style="width: 100%;" src="https://img.tongyu99.com/IMAGE-198/20230106/5a473e98b1c643c385558c7ecf8871b1.png" mode="widthFix"></image>
+								<image style="width: 100%;" :src="info.avatar" mode="widthFix"></image>
 							</view>
 						</view>
 						<view class="height56 border ddflex border-top-none border-right-none padding-left">
 							湖南现代职业培训学校
 						</view>
 						<view class="height56 border ddflex border-top-none border-right-none padding-left">
-							1800003000182
+							{{info.schoolNo?info.schoolNo:'*'}}
 						</view>
 						<view class="height56 border ddflex border-top-none border-right-none padding-left">
-							210318546464654
+							{{info.certificateNo?info.certificateNo:'*'}}
 						</view>
 						<view class="height56 border ddflex border-top-none border-right-none padding-left">
-							成绩合格
+							{{info.conclusion==0?'培训中':info.conclusion==1?'成绩不合格':info.conclusion==2?'成绩合格':'*'}}
 						</view>
 						<view class="height56 border ddflex border-top-none border-right-none padding-left border-bottom-none">
-							2022-09-07
+							{{info.issueDate?info.issueDate:'*'}}
 						</view>
 					</view>
 				</view>
@@ -84,13 +84,8 @@
 						<view>网站提醒</view>
 					</view>
 					<view>
-						<view class="note-item ddflex">
-							<view class="note-item-content">谨防证书售假骗局</view>
-							<!-- <view class="note-item-date">2022-08-25</view> -->
-						</view>
-						<view class="note-item ddflex">
-							<view class="note-item-content">获取证书没有捷径,防止上当受骗</view>
-							<!-- <view class="note-item-date">2022-08-25</view> -->
+						<view class="note-item ddflex" v-for="item,index in wztxList" :key="index" @click="jumpUrl('/pages/contentDetail/contentDetail?id='+item.id)">
+							<view class="note-item-content">{{item.title}}</view>
 						</view>
 					</view>
 				</view>
@@ -101,25 +96,8 @@
 						<view>学习资料</view>
 					</view>
 					<view>
-						<view class="note-item ddflex">
-							<view class="note-item-content">二手车评估师考试题库</view>
-							<!-- <view class="note-item-date">2022-08-25</view> -->
-						</view>
-						<view class="note-item ddflex">
-							<view class="note-item-content">中国汽车保值率研究报告</view>
-							<!-- <view class="note-item-date">2022-08-25</view> -->
-						</view>
-						<view class="note-item ddflex">
-							<view class="note-item-content">关于《职业技能等级标准开发指南(征求意</view>
-							<!-- <view class="note-item-date">2022-08-25</view> -->
-						</view>
-						<view class="note-item ddflex">
-							<view class="note-item-content">提升学历选哪个专业好?选错了专业后悔一</view>
-							<!-- <view class="note-item-date">2022-08-25</view> -->
-						</view>
-						<view class="note-item ddflex">
-							<view class="note-item-content">怎样鉴别事故车?教你几招快速鉴定</view>
-							<!-- <view class="note-item-date">2022-08-25</view> -->
+						<view class="note-item ddflex" v-for="item,index in xxzlList" :key="index" @click="jumpUrl('/pages/contentDetail/contentDetail?id='+item.id)">
+							<view class="note-item-content">{{item.title}}</view>
 						</view>
 					</view>
 				</view>
@@ -130,25 +108,8 @@
 						<view>常见问题</view>
 					</view>
 					<view>
-						<view class="note-item ddflex">
-							<view class="note-item-content">哪种电工证比较重要?</view>
-							<!-- <view class="note-item-date">2022-08-25</view> -->
-						</view>
-						<view class="note-item ddflex">
-							<view class="note-item-content">二手车评估师怎么考?考什么内容?</view>
-							<!-- <view class="note-item-date">2022-08-25</view> -->
-						</view>
-						<view class="note-item ddflex">
-							<view class="note-item-content">汽车维修工证书怎么考?</view>
-							<!-- <view class="note-item-date">2022-08-25</view> -->
-						</view>
-						<view class="note-item ddflex">
-							<view class="note-item-content">零基础考电工证要多久?电工证难考吗?</view>
-							<!-- <view class="note-item-date">2022-08-25</view> -->
-						</view>
-						<view class="note-item ddflex">
-							<view class="note-item-content">二手车鉴定评估师是哪里颁发证书</view>
-							<!-- <view class="note-item-date">2022-08-25</view> -->
+						<view class="note-item ddflex" v-for="item,index in cjwtList" :key="index" @click="jumpUrl('/pages/contentDetail/contentDetail?id='+item.id)">
+							<view class="note-item-content">{{item.title}}</view>
 						</view>
 					</view>
 				</view>
@@ -161,13 +122,82 @@
 
 
 <script>
+	const app = getApp();
+	const req = require('../../utils/request.js');
+	const utils = require('../../utils/util.js');
+	const api = require('../../utils/api.js')
 	export default {
 		data() {
 			return {
+				options:{},
+				info:{},
+				wztxList:[],
+				xxzlList:[],
+				cjwtList:[],
 			}
 		},
 		onReady() {},
+		onLoad() {
+			if(!req.getStorage('options')){
+				uni.reLaunch({
+					url:'/pages/certificateQuery/certificateQuery'
+				})
+				return false
+			}
+			this.options = req.getStorage('options')
+			this.getDetail()
+			
+			this.getTextwztxInfo()
+			this.getTextxxzlInfo()
+			this.getTextcjwtInfo()
+		},
+		onUnload() {
+			req.removeStorage('options')
+		},
 		methods: {
+			jumpUrl(url){
+				uni.navigateTo({
+					url:url
+				})
+			},
+			getDetail(){
+				req.getRequest('/api/v3/exam/user/manager/certificate',this.options,res=>{
+					this.info = res
+				})
+			},
+			// 网站提醒
+			getTextwztxInfo(){
+				let form={
+					code:req.public.wztxCode,
+					page:1,
+					limit:5
+				}
+				req.getRequest('/api/content/list',form,res=>{
+					this.wztxList = res
+				})
+			},
+			// 学习资料
+			getTextxxzlInfo(){
+				let form={
+					code:req.public.xxzlCode,
+					page:1,
+					limit:5
+				}
+				req.getRequest('/api/content/list',form,res=>{
+					this.xxzlList = res
+				})
+			},
+			// 常见问题
+			getTextcjwtInfo(){
+				let form={
+					code:req.public.cjwtCode,
+					page:1,
+					limit:5
+				}
+				req.getRequest('/api/content/list',form,res=>{
+					this.cjwtList = res
+				})
+			},
 		}
 	}
 

+ 18 - 5
pages/certificateQuery/certificateQuery.vue

@@ -9,19 +9,19 @@
 				<view class="ddflex re-item">
 					<view class="re-label">姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名</view>
 					<view class="re-li dflex">
-						<input v-model="testNumber" type="number" placeholder="姓名" maxlength="11" placeholder-class="placeholder" class="re-ipt flex" />
+						<input v-model="name" placeholder="姓名" maxlength="-1" placeholder-class="placeholder" class="re-ipt flex" />
 					</view>
 				</view>
 				<view class="ddflex re-item">
 					<view class="re-label">证书编号</view>
 					<view class="re-li dflex">
-						<input v-model="testNumber" type="number" placeholder="证书编号" maxlength="11" placeholder-class="placeholder" class="re-ipt flex" />
+						<input v-model="certificateNo" placeholder="证书编号" maxlength="-1" placeholder-class="placeholder" class="re-ipt flex" />
 					</view>
 				</view>
 				<view class="ddflex re-item">
 					<view class="re-label">身份证号</view>
 					<view class="re-li dflex">
-						<input v-model="testNumber" type="number" placeholder="身份证号" maxlength="11" placeholder-class="placeholder" class="re-ipt flex" />
+						<input v-model="idNumber" placeholder="身份证号" maxlength="-1" placeholder-class="placeholder" class="re-ipt flex" />
 					</view>
 				</view>
 				<view class="note ddflex">
@@ -50,15 +50,28 @@
 </template>
 
 <script>
+	const app = getApp();
+	const req = require('../../utils/request.js');
+	const utils = require('../../utils/util.js');
+	const api = require('../../utils/api.js')
 	export default {
 		data() {
 			return {
+				name:'',
+				idNumber:'',
+				certificateNo:''
 			}
 		},
 		methods: {
 			query(){
-				uni.navigateTo({
-					url:'/pages/certificateDetail/certificateDetail'
+				let ql = [this.name,this.idNumber,this.certificateNo]
+				if(ql.filter(item=>{return item}).length<2) return req.msg('请填写两项内容查询')
+				
+				req.getRequest('/api/v3/exam/user/manager/certificate',{name:this.name,idNumber:this.idNumber,certificateNo:this.certificateNo},res=>{
+					req.setStorage('options',{name:this.name,idNumber:this.idNumber,certificateNo:this.certificateNo})
+					uni.navigateTo({
+						url:'/pages/certificateDetail/certificateDetail'
+					})
 				})
 			}
 		}

+ 0 - 7
pages/scoreQuery/scoreQuery.vue

@@ -102,7 +102,6 @@
 	export default {
 		data() {
 			return {
-				userInfo:{},
 				paperId:null,
 				admissionNo:null,
 				paper: '', //试卷详情
@@ -117,7 +116,6 @@
 			this.paperId = options.paperId;
 			this.admissionNo = options.admissionNo;
 			
-			this.getUserInfo()
 			this.getPaper()
 			this.getTextOtherInfo()
 			this.getTextNoteInfo()
@@ -128,11 +126,6 @@
 					url:url
 				})
 			},
-			getUserInfo(){
-				req.getRequest('/api/v3/exam/user/manager/info',{},res=>{
-					this.userInfo = res
-				})
-			},
 			//获取考试对象
 			getPaper() {
 				var _ts = this;

+ 5 - 2
utils/request.js

@@ -43,8 +43,11 @@ const publicss = {
 	//信息发布code
 	'zwtz': 'zwtz_2', //政务通知
 	
-	'ksggCode':'003',//考试公告
-	'zysxCode':'005'//注意事项
+	'ksggCode':'009',//考试公告
+	'zysxCode':'010',//注意事项
+	'wztxCode':'011',//网站提醒
+	'xxzlCode':'012',//学习资料
+	'cjwtCode':'013',//常见问题
 
 }
 /*