当前位置: 首页 > news >正文

官方网站建设的目的乌兰察布盟建设银行网站

官方网站建设的目的,乌兰察布盟建设银行网站,邹平县seo网页优化外包,用jsp做网站一般会用到什么uni-app使用live-pusher简单模拟人脸识别页面样式 实现想法调起手机摄像头设置圆形 实现想法 公司的需求是模拟一个人脸识别#xff0c;不用第三发插件#xff0c;简单模拟样式即可。 基本思路是调起手机前置摄像头#xff0c;再设置一个圆形的样式来达到一个基本样式 调起… uni-app使用live-pusher简单模拟人脸识别页面样式 实现想法调起手机摄像头设置圆形 实现想法 公司的需求是模拟一个人脸识别不用第三发插件简单模拟样式即可。 基本思路是调起手机前置摄像头再设置一个圆形的样式来达到一个基本样式 调起手机摄像头 看了官方的媒体组件只有camera和live-pusher比较合适 camera不支持App并且需要触发调用不合符需求 所以只剩下live-pusher一个选择 引入组件并基础设置后 live-pusher idpusherId refpusherRef classlivePusher aspect1:1 // 宽高比例:whiteness1 // 美白:beauty1 // 美颜/我们在页面上可以看见效果 不过这里需要注意一下如果你是 nvue 页面还需要手动调起一下摄像头 onMounted(() {const instance getCurrentInstance() as ComponentInternalInstance;const pusherContext uni.createLivePusherContext(pusherId, instance.ctx)pusherContext.startPreview() })官方文档中写默认摄像头为前置但此时显示的是后置摄像头并且设置的默认前置也是不生效的需要手动翻转一下 onMounted(() {// 获取当前组件实例const instance getCurrentInstance() as ComponentInternalInstance;// 获取live-pusher上下文对象const pusherContext uni.createLivePusherContext(pusherId, instance.ctx)// 翻转摄像头pusherContext.switchCamera() })设置圆形 这是一个令人头疼的问题 组件设置宽高为正方形后设置了圆角属性不生效 尝试了nvue页面在父级元素画圆后设置溢出隐藏也无济于事 最后添加了cover-img标签用一张圆形的图片盖住四角达到的效果 templatediv classfaceview拿起手机眨眨眼/viewdiv classpushContentlive-pusher idpusherId refpusherRef classlivePusher aspect1:1 :whiteness1 :beauty1 device-positionfront/cover-image classpusherImg src/static/images/faceRadio.png alt/cover-image/div/div/templatescript langts setupimport { onMounted, ref, getCurrentInstance, type ComponentInternalInstance } from vue;const pusherRef ref({} as UniHelper.LivePusherInstance)onMounted(() {const instance getCurrentInstance() as ComponentInternalInstance;const pusherContext uni.createLivePusherContext(pusherId, instance.ctx)pusherContext.switchCamera()// pusherContext.startPreview({}) // nvue 页面吊起摄像头}) /script stylepage{background-color: #FFF !important;}/stylestyle langscss scoped.face{padding: 46rpx 45rpx;text-align: center;display: flex;justify-content: center;flex-direction: column;align-items: center;.pushContent{position: relative;width: 300rpx;height: 300rpx;border-radius: 250rpx;overflow: hidden;margin: 50rpx auto;.livePusher{width: 300rpx;height: 300rpx;border-radius: 50%;}.pusherImg{position: absolute;top: 0;left: 0;bottom: 0;right: 0;width: 300rpx;height: 300rpx;}}}/style看下最终效果先这样吧。 有别的好的方法请路过留言万分感谢
http://www.hkea.cn/news/14294059/

相关文章:

  • 简述网站规划的主要内容建设一个怎样的自己的网站
  • 网站更换域名需要重新备案吗保定哪里做网站
  • 怎样加入装修接单网站wordpress主题对应的插件
  • 医院网站建设计划四川 网站建设
  • 做承兑 汇票一般会用哪些网站wordpress个人网站模板
  • 建设个人网站步骤wordpress国内主机推荐
  • 有心学做网站青岛公司网站建设公司排名
  • 如何知道网站流量云集网站哪个公司做的
  • 青岛网站设计企业罗湖网站(建设深圳信科)
  • 一般网站怎么做推广企业在网站推广
  • 上海响应式网站建设费用做电工的有接单的网站吗
  • wordpress 水墨主题博客程序seo
  • 搭建单位网站php做的网站怎么运行
  • 招聘网站的简历可以做几份苏南建设集团网站
  • 云南网站建设哪家便宜瑞安网站网站建设
  • 婚纱网站策划书鄞州区建设局网站
  • 网站开发的过程中遇到的难题网络营销软文范例大全800
  • 爱站网注册人查询html5网站开发语言的有点
  • 门户网站包括哪些潜江资讯网 手机版免费生活资讯
  • 网络营销seo优化南昌网站建设方案优化
  • 南宁网站设计方法做网站 用 云主机
  • 邀请码网站怎么做莱芜都市网下载
  • 网站视频主持人网s001网站建设公司
  • 《网站建设与维护》讲义广州个人网页制作
  • 萍乡网站seo重庆十大室内设计师
  • 无需域名网站建设酒店微网站建设
  • 怎么创一个网站如何做网站的页面
  • 自建外贸网站如何推广wordpress 段间距
  • phpcms 视频网站模板下载如何做网站运营呢
  • 如何影响网站排名西安正规网站建设报价