<!--pages/index/index.wxml-->
<view class="home-container">
  <!-- 标题栏 -->
  <view class="header">
    <view class="header-left">
      <text class="title">首页</text>
    </view>
    <view class="header-right">
      <!-- 可以在这里添加右侧操作按钮 -->
    </view>
  </view>

  <!-- 智能硬件设备区域 -->
  <view class="section card">
    <view class="section-title">智能硬件设备</view>
    <view class="hardware-grid">
      <view 
        class="hardware-item" 
        wx:for="{{hardwareDevices}}" 
        wx:key="id"
        data-type="{{item.type}}"
        bindtap="onHardwareDeviceTap"
      >
        <view class="hardware-icon" style="background-color: {{item.color}}">
          <image class="icon-image" src="{{item.img}}" mode="aspectFit"/>
        </view>
        <text class="hardware-name">{{item.name}}</text>
      </view>
    </view>
  </view>

  <!-- 快捷功能区域 -->
  <view class="section card">
    <view class="section-title">快捷功能</view>
    <view class="other-grid">
      <view 
        class="other-item" 
        wx:for="{{otherFunctions}}" 
        wx:key="id"
        data-type="{{item.type}}"
        bindtap="onOtherFunctionTap"
      >
        <view class="other-icon" style="background-color: {{item.color}}">
          <image class="icon-image" src="{{item.img}}" mode="aspectFit"/>
        </view>
        <text class="other-name">{{item.name}}</text>
      </view>
    </view>
  </view>


</view>
