<camera device-position="{
{value}}" flash="off" binderror="error" style="width: 90%; height: 300px;"></camera>
<view class="weui-cell__ft">
<switch checked bindchange='switchChange' />
</view>
<button type="primary" bindtap="takePhoto">拍照</button>
<view>预览</view>
<image mode="widthFix" src="{
{src}}"></image>
在js里
Page({
/**
* 页面的初始数据
*/
data: {
value: '',
src: null
},
switchChange: function (e) {
c