自定义拍照界面
发布于 6 年前 作者 xiuyingsun 12456 次浏览 来自 问答

怎么自定义拍照界面呀?

我用了 这个cover-view和wx.createCameraContext()这个后  结果还没调用拍照 就显示在页面了。拍照界面还是没有

3 回复

我的方法是从A页面跳转到camera页面

–A.wxml----

<view style=" color: white; background-color: #FBC966;text-align:center;"  >

  <navigator url="/pages/camera/camera" hover-class=“navigator-hover” >模仿拍摄</navigator>

</view> 

这个还是不行呀 我一进入就来拍照页面了  我想的是我点击拍照后 才出现 上面你写的代码

<camera device-position=“back” flash=“off” binderror=“error” style=“width:100%;height:100%;position:fixed;left:0;top:0;”>

<cover-view style=“width:100%;height:100%;position:fixed;left:0;top:0;z-index:99999;”>

<cover-image class=“img” src=http://otwf1il9v.bkt.clouddn.com/baby_20170815_1.jpg?imageView2/2/w/100 style=“width:15%;height:15%;position:fixed;left:0;top:0;” />

<cover-view  bindtap=“takePhoto” style=“position:fixed;bottom:0px;left:40%;width:20%;background-color: #0f0;color: #000;justify-content: center;”>拍照</cover-view>

</cover-view>

</camera>

回到顶部