You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
126 lines
2.1 KiB
126 lines
2.1 KiB
<template> |
|
<view class="notbegun"> |
|
<view class="tuichu" @click="tuichu" v-if="lastOne">退出登录</view> |
|
<view class="content"> |
|
<view class="img"> |
|
<image src="../../static/qidai.png" mode=""></image> |
|
</view> |
|
<view class="test"> |
|
<text>考试结束 |
|
</text> |
|
</view> |
|
</view> |
|
|
|
</view> |
|
</template> |
|
|
|
<script> |
|
import { |
|
dradis |
|
} from "../../api/api.js" |
|
export default { |
|
data() { |
|
return { |
|
examinerId: "", |
|
timer1:null, |
|
lastOne:false |
|
} |
|
}, |
|
methods: { |
|
tuichu() { |
|
uni.navigateTo({ |
|
url: '../login/login' |
|
}); |
|
clearInterval(this.timer1) |
|
} |
|
}, |
|
onLoad() { |
|
// 考官id |
|
this.examinerId = uni.getStorageSync("examinerId"); |
|
dradis({ |
|
examinerId: this.examinerId |
|
}).then((res) => { |
|
this.lastOne=res.data.state; |
|
if (res.data.state) { |
|
return |
|
|
|
} else { |
|
|
|
|
|
this.timer1=setInterval(()=>{ |
|
dradis({ |
|
examinerId: this.examinerId |
|
}).then((res)=>{ |
|
this.lastOne=res.data.state; |
|
if(res.data.begin){ |
|
uni.navigateTo({ |
|
url:"../Test1/Test1" |
|
}) |
|
clearInterval(this.timer1) |
|
} |
|
|
|
}) |
|
},5000) |
|
|
|
} |
|
}) |
|
} |
|
} |
|
</script> |
|
|
|
<style lang="scss"> |
|
.tuichu { |
|
position: fixed; |
|
width: 120rpx; |
|
height: 38rpx; |
|
border-radius: 24rpx 24rpx 24rpx 24rpx; |
|
border: 2rpx solid #27C5FF; |
|
box-sizing: border-box; |
|
color: #27C5FF; |
|
display: flex; |
|
align-items: center; |
|
justify-content: center; |
|
margin-right: 20rpx; |
|
right: 40rpx; |
|
top: 30rpx; |
|
} |
|
|
|
page { |
|
// background-color: #F5F7FA; |
|
} |
|
|
|
.notbegun { |
|
width: 100%; |
|
height: 100vh; |
|
|
|
.content { |
|
width: 100%; |
|
height: 100%; |
|
background: #FFFFFF; |
|
box-shadow: 3rpx 0rpx 14rpx 1rpx rgba(0, 0, 0, 0.05); |
|
// border-radius: 19rpx; |
|
margin: 0rpx auto; |
|
margin-top: 20rpx; |
|
display: flex; |
|
justify-content: center; |
|
align-items: center; |
|
flex-direction: column; |
|
|
|
.img { |
|
|
|
image { |
|
width: 260rpx; |
|
height: 260rpx; |
|
|
|
} |
|
} |
|
|
|
.test { |
|
font-size: 24rpx; |
|
font-weight: 400; |
|
color: #333333; |
|
margin-top: 20rpx; |
|
} |
|
} |
|
} |
|
</style>
|
|
|