<!--pages/photo/index.wxml-->
<view class="page-body">
  <view class="page-body-wrapper">
    <view class="category" wx:if="{{result.length > 0}}">
      <view class="category-item grid col-2"  wx:for="{{result}}">
        <view class="category-text">{{item.data}}</view>
        <view class="name-text">{{item.name}}</view>
      </view>
    </view>
    <image wx:if="{{src}}" mode="widthFix" src="{{src}}"></image>
    <camera wx:else device-position="back" flash="off" binderror="error"></camera>
    <view class="btn-area">
      <button type="primary" bindtap="takePhoto">
        <text class="cu-btn cuIcon-camera bg-green shadow button-hover"></text>
      </button>
    </view>
    </view>
    <view class="grid col-4 margin-top carma-image text-center margin-xs">
      <image src="../../images/1.jpg"></image>
      <image src="../../images/2.jpg"></image>
      <image src="../../images/3.jpg"></image>
      <image src="../../images/4.jpg"></image>
    </view>
</view>
