deviceData.wxml 1.01 KB
<view class="deviceData_main">
  <view class="{{['device_item', index===1 || index === 0 ? 'deviceOne':'', index===3 || index === 2 ? 'deviceTwo':'',index===5 || index === 4 ? 'deviceThree':'' , index===0 || index === 2|| index === 4?'marginRight':'' ]}}"  wx:for="{{deviceDataList}}" wx:key="index" wx:for-item="item" wx:for-index="index">
    <view class="device_type">
      <view class="device_name">
        {{item.type}}
      </view>
      <image  class="image_box" alt="" src="{{item.imgUrl}}" />
    </view>
    <view class="data_two deviceMargin">
      <text class="left">{{item.dayNumName}}</text>
      <text class="right">
        <text class="right_num">{{item.dayNum}}</text>
        <text class="right_unit">{{item.unit}}</text>
      </text>
    </view>
    <view class="data_two">
      <text class="left">{{item.totalNumName}}</text>
      <text class="right">
        <text class="right_num">{{item.totalNum}}</text>
        <text class="right_unit">{{item.unit}}</text>
      </text>
    </view>
  </view>
</view>