fix(src/views/user): 修复一些问题

duizhaopin_ui
duan 2 years ago
parent 6ab63e1a29
commit 4d2dcfce2f

@ -251,7 +251,7 @@
>
<div>
<div class="face-content">
<img v-if="play" id="video" width="200px" height="200px" :src="play" alt="">
<img v-if="play" id="video" ref="$img" width="200px" height="200px" :src="play" alt="">
</div>
<div class="name">程小红</div>
<div class="code">工号779</div>
@ -437,10 +437,6 @@ export default {
faceStart().then(res => {
setTimeout(() => {
this.play = process.env.VUE_APP_FACE_API + '/face/play/'
}, 200)
})
this.rflag = true
this.dialogFaceVisible = true
this.web_stream = webStream.get(process.env.VUE_APP_FACE_API + '/face/play/', (data) => {
if (data.length > 41) {
const buffer = Buffer.allocUnsafe(data.byteLength - 41)
@ -448,7 +444,7 @@ export default {
this.img_src = buffer.toString('base64')
const count = Math.floor(Math.random() * 10 + 1)
//
if (count < 3) {
if (count < 2) {
this.img_list.push('data:image/png;base64,' + this.img_src)
}
if (this.img_list.length > 10 && this.rflag) {
@ -463,6 +459,10 @@ export default {
}
}
})
this.rflag = true
this.dialogFaceVisible = true
}, 200)
})
},
handleRole(index, row) {
this.roleDialogVisible = true

Loading…
Cancel
Save