首先创建camera.xml
<camera device-position="{{show}}" flash="off" binderror="error" style="width: 100%; height: 400px;"></camera>
<button type="primary" bindtap="takePhoto" class='btn'>刷脸登录</button>
<view class='weui-cell__ft switch'>
<switch checked bindchange='switch1Change'></switch>
</view><camera device-position="{{sho