diff --git a/src/views/user/index.vue b/src/views/user/index.vue index f472358..0f94333 100644 --- a/src/views/user/index.vue +++ b/src/views/user/index.vue @@ -444,10 +444,10 @@ export default { this.img_src = buffer.toString('base64') const count = Math.floor(Math.random() * 10 + 1) // 随机抽样 - if (count < 7) { + if (count < 3) { this.img_list.push('data:image/png;base64,' + this.img_src) } - if (this.img_list.length > 200 && this.rflag) { + if (this.img_list.length > 10 && this.rflag) { const data = { 'images': this.img_list, 'user_id': row.user_id @@ -553,17 +553,6 @@ export default { this.play = null this.rflag = false this.dialogFaceVisible = false - this.videoObj.srcObject.getTracks()[0].stop() - }, - // 成功显示 - success(stream) { - this.videoObj.srcObject = stream - this.videoObj.play() - }, - // 失败抛出错误,可能用户电脑没有摄像头,或者摄像头权限没有打开 - error(error) { - // 可以在这里面提示用户 - console.log(`访问用户媒体设备失败${error.name}, ${error.message}`) } } }