Newer
Older
miniCreditFactory / pages / camera / camera.wxml
bello on 29 May 2020 876 bytes init
<view class="camera-container">

  <camera  flash="{{flash}}" device-position="{{position}}" resolution="high" binderror="error"  wx:if="{{type==1||type==2}}" style="height: {{maxHeight}}px" />

  <view class="take-layout">
    <button type="primary" bindtap="takePhoto" wx:if="{{type==1}}">拍照</button>
    <view wx:if="{{type==2}}">
        <view class="run-time" wx:if="{{doing}}">{{autoTime}}</view>
        <button type="warn"  bindtap="stopVideo"  wx:if="{{doing}}">结束录像</button>
        <button type="primary"  bindtap="takeVideo"  wx:else>开始录像</button>
    </view>
    <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>