管灌系统农户端微信小程序(嘉峪关应用)
zuoxiao
2024-05-27 dc01187c6ca2cf46fef268e84a7ac7fc171f2ebb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!--pages/waterIntake/waterIntake.wxml取水口列表-->
<view class="container">
  <!-- 顶部 Tabs -->
  <view class="tabs">
    <view class="tab" bindtap="switchTab" data-tab="0" id="tab0">
      常用取水口
      <view class="indicator" wx:if="{{currentTab === 0}}"></view>
    </view>
    <view class="tab" bindtap="switchTab" data-tab="1" id="tab1">
      所有取水口
      <view class="indicator" wx:if="{{currentTab === 1}}"></view>
    </view>
  </view>
 
  <!-- 常用取水口 -->
  <scroll-view class="list-container" wx:if="{{currentTab === 0}}" scroll-y="true" scroll-x="false">
    <block wx:for="{{commonWaterPoints}}" wx:key="index">
      <view class="item">
        <view class="item-left">
          <!-- <image class="item-img" src="/images/pipeline.svg" /> -->
          <text>{{item}}</text>
          <image class="item-img" src="/images/wifi_no.svg" />
        </view>
        <text class="item-button" bind:tap="choseCard"  data-item="{{item}}">选择</text>
      </view>
    </block>
  </scroll-view>
 
  <!-- 所有取水口 -->
  <view class="all-waterIntake" wx:else>
    <view class="search-container">
      <input class="search-input" placeholder="请输入取水口编码后点击搜索" bindinput="onInput" />
      <!-- <text class="search-button" >搜索</text> -->
      <t-button  class="search-button" theme="primary" size="large" icon="search" shape="square" aria-label="搜索" bindtap="onSearch" style="background-color: #1890FF; border: none;  height: 80rpx;"></t-button>
    </view>
    <view>
      <scroll-view class="list-container" scroll-y="true" scroll-x="false">
        <block wx:for="{{allWaterPoints}}" wx:key="index">
          <view class="item">
            <view class="item-left">
              <!-- <image class="item-img" src="/images/pipeline.svg" /> -->
              <text>{{item}}</text>
              <image class="item-img" src="/images/wifi_no.svg" />
            </view>
            <text class="item-button" bind:tap="choseCard"  data-item="{{item}}">选择</text>
          </view>
        </block>
      </scroll-view>
    </view>
  </view>
</view>