106 lines
2.0 KiB
Vue
106 lines
2.0 KiB
Vue
<template>
|
|
<view class="fullHeight">
|
|
<!-- <image src="/static/onlineTest_bg.png" class="onlineTest_bg"></image> -->
|
|
<view class="centerBox">
|
|
<image src="/static/aqjy.png" class="aqjyImg"></image>
|
|
<view class="inputContent">
|
|
<input class="inputBox" type="text" v-model="idCard" placeholder="请输入身份证号码" />
|
|
<text class="confirmBtn" @click="verifyFn">开始培训</text>
|
|
</view>
|
|
</view>
|
|
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
idCard:'',
|
|
projectSn:'',
|
|
eduId:''
|
|
}
|
|
},
|
|
onLoad(options) {
|
|
|
|
this.projectSn=JSON.parse(uni.getStorageSync('projectDetail')).projectSn
|
|
this.eduId=options.eduId
|
|
},
|
|
methods: {
|
|
verifyFn(){
|
|
if(this.idCard==''){
|
|
uni.showToast({
|
|
title:'请输入身份证号码'
|
|
})
|
|
return
|
|
}
|
|
this.sendRequest({
|
|
url: "xmgl/safeEducationQuestionAnswer/getAnswerWorkerInfo",
|
|
data: {idCard:this.idCard,projectSn:this.projectSn},
|
|
method: "post",
|
|
success:(res)=> {
|
|
if(res.result){
|
|
uni.showToast({
|
|
title:'验证成功!'
|
|
})
|
|
setTimeout(()=>{
|
|
uni.navigateTo({
|
|
url:'./videoLearning?eduId='+this.eduId+'&workerId='+res.result.id
|
|
})
|
|
},1000)
|
|
}
|
|
|
|
|
|
}
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.onlineTest_bg{
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
.centerBox{
|
|
position: absolute;
|
|
left: 50%;
|
|
top: 50%;
|
|
transform: translate(-50%,-50%);
|
|
text-align: center;
|
|
}
|
|
.aqjyImg{
|
|
width: 240rpx;
|
|
height: 100px;
|
|
margin-bottom: 60rpx;
|
|
}
|
|
.inputContent{
|
|
/* position: fixed;
|
|
bottom: 10%;
|
|
left: 0; */
|
|
width: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
.inputBox{
|
|
background-color: white;
|
|
border-radius: 4px;
|
|
padding: 20rpx 20rpx;
|
|
width: 200px;
|
|
font-size: 30rpx;
|
|
display: inline-block;
|
|
margin-right: 20rpx;
|
|
border: 1px solid rgba(63,83,110,0.5);
|
|
}
|
|
.confirmBtn{
|
|
background-color: #4181FE;
|
|
color: white;
|
|
font-size: 30rpx;
|
|
padding: 20rpx 40rpx;
|
|
border-radius: 4px;
|
|
width: 120rpx;
|
|
}
|
|
</style>
|