| 123456789101112131415161718192021222324252627282930313233343536373839 |
- <import src="../../../common/head.wxml" />
- <import src="../../../common/foot.wxml" />
- <view class="container">
- <template is="head" data="{{title: 'camera'}}"/>
- <view class="page-body">
- <view class="page-body-wrapper">
- <camera
- flash="off"
- device-position="{{position}}"
- binderror="error"
- >
- </camera>
- <view class="btn-area first-btn">
- <button type="primary" bindtap="togglePosition">切换摄像头</button>
- </view>
- <view class="btn-area">
- <button type="primary" bindtap="takePhoto">拍照</button>
- </view>
- <view class="btn-area">
- <button type="primary" bindtap="startRecord">开始录像</button>
- </view>
- <view class="btn-area">
- <button type="primary" bindtap="stopRecord">结束录像</button>
- </view>
- <view class="btn-area">
- <navigator url="/page/component/pages/camera-scan-code/camera-scan-code">
- <button type="primary">扫描一维码</button>
- </navigator>
- </view>
- <view class="preview-tips">预览</view>
- <image wx:if="{{src}}" mode="widthFix" class="photo" src="{{src}}"></image>
- <video wx:if="{{videoSrc}}" class="video" src="{{videoSrc}}"></video>
- </view>
- </view>
- <template is="foot" />
- </view>
|