|
|
@@ -5,8 +5,8 @@
|
|
|
<view style="width: 1200px;margin: auto;">{{paper.title}}</view>
|
|
|
</view>
|
|
|
|
|
|
- <view class="video-box" id="video-box" @click="takePhoto">
|
|
|
- <video id="video" style="width: 100%;height: 100%;" :autoplay="true" :controls="true" :show-center-play-btn="false"></video>
|
|
|
+ <view class="video-box" id="video-box" @click="takePhoto" v-show="showVideo">
|
|
|
+ <video id="video" style="width: 100%;height: 100%;" :autoplay="true" :controls="false" :show-center-play-btn="false"></video>
|
|
|
<canvas id="canvas" style="width: 100%;height: 100%;" canvas-id="canvas"></canvas>
|
|
|
</view>
|
|
|
<img :src="imgUrl" ></img>
|
|
|
@@ -195,7 +195,6 @@
|
|
|
isGoBack: false,
|
|
|
isShowView: false,
|
|
|
|
|
|
- isClearLogin:true,//是否离开页面清除缓存
|
|
|
|
|
|
result:null,//考试结果
|
|
|
|
|
|
@@ -203,7 +202,8 @@
|
|
|
video:{src:null},
|
|
|
canvas:null,
|
|
|
ctx:null,
|
|
|
- imgUrl:null
|
|
|
+ imgUrl:null,
|
|
|
+ showVideo:false
|
|
|
}
|
|
|
},
|
|
|
onReady() {},
|
|
|
@@ -215,10 +215,10 @@
|
|
|
await this.getQuests();
|
|
|
|
|
|
// 摄像头
|
|
|
- const query = uni.createSelectorQuery().in(this);
|
|
|
- this.video = query.select('#video')
|
|
|
- this.canvas = query.select('#canvas');
|
|
|
- this.test()
|
|
|
+ // const query = uni.createSelectorQuery().in(this);
|
|
|
+ // this.video = query.select('#video')
|
|
|
+ // this.canvas = query.select('#canvas');
|
|
|
+ // this.test()
|
|
|
|
|
|
|
|
|
// 考生信息
|
|
|
@@ -228,7 +228,6 @@
|
|
|
// this.getQuests();
|
|
|
},
|
|
|
onUnload() {
|
|
|
- if(this.isClearLogin)
|
|
|
uni.clearStorageSync();
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -304,6 +303,22 @@
|
|
|
}
|
|
|
_ts.quests = quests;
|
|
|
r()
|
|
|
+ }else{
|
|
|
+ uni.showModal({
|
|
|
+ title:'提示',
|
|
|
+ content:'您已参加过该考试',
|
|
|
+ showCancel:false,
|
|
|
+ success(res) {
|
|
|
+ if(res.confirm){
|
|
|
+ uni.reLaunch({
|
|
|
+ url:'/pages/login/login',
|
|
|
+ success() {
|
|
|
+ console.log('您已参加过该考试')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
@@ -558,7 +573,6 @@
|
|
|
dataP,
|
|
|
res => {
|
|
|
if (!_ts.paper.isScore) {//手动阅卷
|
|
|
- _ts.isClearLogin = false
|
|
|
uni.redirectTo({
|
|
|
url:'/pages/scoreQuery/scoreQuery?paperId='+ _ts.paperId+'&admissionNo='+_ts.userInfo.admissionNo
|
|
|
})
|
|
|
@@ -701,6 +715,7 @@
|
|
|
that.video.src = window.URL && window.URL.createObjectURL(stream) || stream
|
|
|
}
|
|
|
video.play();
|
|
|
+ that.showVideo = true
|
|
|
}).catch(function (err) {
|
|
|
console.log(err)
|
|
|
uni.showModal({
|