管灌系统农户端微信小程序(嘉峪关应用)
zuoxiao
2024-06-13 5dc54a59184b305a85aaad31dd4cce01b31a8a2d
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
52
53
54
55
56
57
58
59
60
61
62
63
64
<!--pages/rechargeCard/rechargeCard.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:if="{{allCardPoints.length > 0}}" wx:for="{{allCardPoints}}" wx:key="index">
      <view class="{{item.inUse===0?'item':'item-gray'}}">
        <view class="item-card">
          <text class="item-card-text">卡编号:</text>
          <text class="item-card-text">{{item.vcNum}}</text>
          <text wx:if="{{item.inUse==1}}" class="item-card-state">使用中</text>
        </view>
        <view class="item-bottom">
          <image class="item-balance-img" src="/images/balance.svg" />
          <view class="item-balance">
            <text class="item-balance-text">{{item.money}}</text>
            <text class="item-balance-text-yuan">元</text>
          </view>
          <view class="button-view">
            <text wx:if="{{item.inUse==0}}" class="ruinCard" bind:tap="ruinCard">销卡</text>
            <text wx:if="{{item.inUse==0}}" class="recharge" bind:tap="rechargeCard">充值</text>
          </view>
        </view>
      </view>
    </block>
    
    <view wx:if="{{allCardPoints.length === 0}}" class="noMore-View">
      <image class="noMore-img" src="/images/no_more.svg" />
      <text class="noMore-text">没有数据</text>
    </view>
    <t-dialog visible="{{showDialog}}" content="您还有余额未使用,如需销卡,请先使用完或退款后才可操作。" confirm-btn="{{ confirmBtn }}" bind:confirm="closeDialog" />
  </scroll-view>
 
  <!-- 水卡 -->
  <view class="all-waterIntake" wx:else>
    <scroll-view class="list-container" scroll-y="true" scroll-x="false">
      <block wx:if="{{allWaterPoints.length > 0}}" wx:for="{{allWaterPoints}}" wx:key="index">
        <view class="item">
          <view class="item-card">
            <text class="item-card-text">卡编号:</text>
            <text class="item-card-text">{{item.vcNum}}</text>
            <text class="waterIntake-recharge">充值</text>
          </view>
        </view>
      </block>
      <view wx:if="{{allWaterPoints.length === 0}}" class="noMore-View">
        <image class="noMore-img" src="/images/no_more.svg" />
        <text class="noMore-text">没有数据</text>
      </view>
    </scroll-view>
 
  </view>
</view>