更新记录

1.0.0(2025-02-24) 下载此版本

可拓展各类证件拍照


平台兼容性

Vue2 Vue3
× ×
App 快应用 微信小程序 支付宝小程序 百度小程序 字节小程序 QQ小程序
app-nvue × × × × × ×
钉钉小程序 快手小程序 飞书小程序 京东小程序 鸿蒙元服务
× × × × ×
H5-Safari Android Browser 微信浏览器(Android) QQ浏览器(Android) Chrome IE Edge Firefox PC-Safari
× × × × × × × × ×

使用说明

<template>
    <view>
        <zhqCamera @confirm="confirm"></zhqCamera>
    </view>
</template>

<script>
    import zhqCamera from "@/components/zhq-camera/index.nvue"
    export default {
        components:{
            zhqCamera
        },
        data() {     
            return { 

            }
        },
        onLoad() {

        },
        methods: {
            confirm(img){//图片路径
                uni.showLoading({
                    title: '提交中...',
                    mask:true,
                });
                uni.uploadFile({
                    url: "xxxxxxx", //接口地址
                    filePath: img,
                    name: "file",
                    header: {
                        token: 'token123456789',
                    },
                    formData: {//附带传给后端的参数
                        folder: 'goods/img', 
                    },
                    success: (e) => {
                        // 接口返回成功
                        uni.hideLoading();
                    },
                    fail: (e) => {
                        // 接口返回失败
                        uni.hideLoading();
                    }
                })
            }
        }
    }
</script>

<style>

</style>

需创建nvue页面引入插件,图片路径得自己修改

隐私、权限声明

1. 本插件需要申请的系统权限列表:

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

许可协议

MIT协议

使用中有什么不明白的地方,就向插件作者提问吧~ 我要提问