<!--pages/MainTest/MainTest.wxml-->
<view class="tab">
  <view class="tab-item" bindtap="changeTab" data-index="0">Recommend</view>
  <view class="tab-item" bindtap="changeTab" data-index="1">Demand</view>
</view>
<view class="content">
  <!-- 根据tab索引值显示不同内容 -->
  <view wx:if="{{currentTab === 0}}">
    <view >
      <!-- 主页面中展示老师上传的信息 -->
      <!-- 搜索框 -->
      <view class="cover">
        <scroll-view>
          <image src="/images/app.png"class="app"/>
        </scroll-view>
      </view>

      <view class="search-wrapper">
        <view class="search-bar">
        <input class="search-input" type="text" placeholder="请输入搜索内容"></input>
        <button class="search-button">搜索</button>
      </view>
    </view>

      <view class="show_information" wx:for="{{teacher}}" wx:key="_id">
        <!-- //当每通过一个教员上传的简历信息则创建一个 -->
        <view class="content-container">
          <image class="image" src="/images/user.png"></image>
            <view class="text-container">
              <text class="title">{{item.name}}</text>
            <view>
              <text class="description">
                电话号码：{{item.phone}}
                email：{{item.email}}
                其他信息：null
              </text>
            </view>
          </view>
        </view>
        <view class="button-container">
            <button bind:tap="navToComments" class="button">评论</button>
            <button bind:tap="contactTeacher" data-item="{{item.phone}}" class="button">联系</button>
        </view>
    </view>     
  <view class="desc">这里是家教帮平台，再也不用担心孩子的学习了</view>
</view>

  </view>
  <!-- 学员发布的要求界面 -->
  <view wx:if="{{currentTab === 1}}">
    <view class="show_information" wx:for="{{[1,2,3,4,5,6]}}">
        <!-- //当每通过一个教员上传的简历信息则创建一个 -->
        <view class="content-container">
            <view class="text-container">
              <text class="title">标题</text>
                <view>
                  <text class="description">描述信息</text>
                </view>
            </view>
        </view>
    </view>  
   
    <view class="page-container">
      <!-- 页面内容 -->
      <view class="popup" hidden="{{!showPopup}}">
        <!-- 弹窗内容 -->
      <view class="container">
        <view class="form-box">
          <view class="form-group">
            <text>需求标题：</text>
            <input type="text" placeholder="请输入需求标题" bindinput="handleInputTitle" />
          </view>
          <view class="form-group">
            <text>需求内容：</text>
            <textarea placeholder="请输入需求内容" bindinput="handleInputContent"></textarea>
          </view>
          <view class="form-group">
            <text>联系方式：</text>
            <input type="text" placeholder="请输入联系方式" bindinput="handleInputContact" />
          </view>
        </view>
        <button class="btn-submit" bindtap="handleSubmit">提交</button>
        <button class="btn-back" bindtap="onBackButtonTap">返回</button>
      </view>
<!-- 弹窗内容 -->
    </view>
  <image src="/images/add.png" class="add-button" bind:tap="onAddButtonTap" />
</view>


  </view>


</view>
