Newer
Older
miniprogram / pages / camera / camera.wxml
bello on 5 Mar 2020 734 bytes Initial Commit
<view class="camera-container">

  <camera flash="{{flash}}" device-position="{{position}}" binderror="error"
  wx:if="{{type==1||type==2}}" />

  <view class="take-layout">
    <button type="primary" bindtap="takePhoto" wx:if="{{type==1}}">拍照</button>
    <button type="primary" wx:if="{{type==2}}">
      <view bindtap="stopVideo"  wx:if="{{doing}}">结束录像</view>
      <view bindtap="takeVideo" wx:else>开始录像</view>
    </button>
    <button type="primary" bindtap="takeRecord" wx:if="{{type==3}}">
      <view bindtap="stopRecord"  wx:if="{{doing}}">结束录音</view>
      <view bindtap="takeRecord" wx:else>开始录音</view>
    </button>
  </view>
  

  <view wx:if="{{src}}">
    {{src}}
  </view>
</view>