前言:在某些情况下当需要隔一定时间抓拍一张照片传给服务器识别
代码:
<template>
<view class="container">
<view class="check-img">
<!-- 视频组件 -->
<camera device-position="back" class="img" flash="off" @error="error" style="width: 100vw; height: 60vh;">
</camera>
<!-- 对准框 -->
<div class="camera2" :style="{ 'background-image': `url(${kuankuan})` }"></div>
<!-- 扫描动画 -->
<view class="check-await"></view>
</view>
</view>
</template>
<script>
import {
codeDecodeAPI
} from '@/api/myApi.js'
//
export default {
data() {<