From 19804e37592d2250c551fcf5df1d87cdf551f1d1 Mon Sep 17 00:00:00 2001
From: zuoxiao <470321431@qq.com>
Date: 星期一, 12 八月 2024 09:06:39 +0800
Subject: [PATCH] 添加识别二维码切换地址的功能
---
pages/waterIntake/waterIntake.wxml | 86 +++++++++++++++++-------------------------
1 files changed, 35 insertions(+), 51 deletions(-)
diff --git a/pages/waterIntake/waterIntake.wxml b/pages/waterIntake/waterIntake.wxml
index 5b19ea4..bc6680e 100644
--- a/pages/waterIntake/waterIntake.wxml
+++ b/pages/waterIntake/waterIntake.wxml
@@ -1,59 +1,43 @@
-<!--pages/waterIntake/waterIntake.wxml鍙栨按鍙e垪琛�-->
<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="{{commonWaterPoints.length > 0}}" wx:for="{{commonWaterPoints}}" wx:key="index">
- <view class="item">
- <view class="item-left">
- <!-- <image class="item-img" src="/images/pipeline.svg" /> -->
- <text>{{item.intakeNum}}</text>
- <image class="item-img" src="{{item.isOnLine ? '/images/wifi_no.svg' : '/images/wifi_off.svg'}}" />
- </view>
- <text wx:if="{{item.isOnLine}}" class="item-button" bind:tap="choseCard" data-item="{{item}}">閫夋嫨</text>
- </view>
- </block>
- <view wx:if="{{commonWaterPoints.length === 0}}" class="noMore-View">
- <image class="noMore-img" src="/images/no_more.svg" />
- <text class="noMore-text">娌℃湁鏁版嵁</text>
- </view>
- </scroll-view>
- <!-- 鎵�鏈夊彇姘村彛 -->
- <view class="all-waterIntake" wx:else>
+
+
+
+ <view class="all-waterIntake" wx:if="{{currentTab === 0}}">
<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>
+ <input class="search-input" value="{{inputValue}}" placeholder="璇疯緭鍏ュ彇姘村彛缂栫爜鍚庣偣鍑绘悳绱�" bindinput="onInput" />
+ <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:if="{{allWaterPoints.length > 0}}" wx:for="{{allWaterPoints}}" wx:key="index">
- <view class="item">
- <view class="item-left">
- <!-- <image class="item-img" src="/images/pipeline.svg" /> -->
- <text>{{item.intakeNum}}</text>
- <image class="item-img" src="{{item.isOnLine ? '/images/wifi_no.svg' : '/images/wifi_off.svg'}}" />
- </view>
- <text wx:if="{{item.isOnLine}}" class="item-button" bind:tap="choseCard" data-item="{{item}}">閫夋嫨</text>
- </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 class="search-results" wx:if="{{allWaterPoints.length > 0}}" bindtap="closeSearch">
+ <block wx:for="{{allWaterPoints}}" wx:key="index">
+ <view class="result-item" bindtap="choseCard" data-item="{{item}}">
+ <text>{{item.intakeNum}}</text>
</view>
- </scroll-view>
+ </block>
</view>
+ <scroll-view class="list-container" scroll-y="true" refresher-enabled="true" refresher-threshold="50" bindrefresherrefresh="onPullDownRefresh_common" refresher-triggered="{{isRefreshing_common}}">
+ <block wx:for="{{commonWaterPoints}}" wx:key="index">
+ <view class="item">
+ <view class="item-left">
+ <text>{{item.intakeNum}}</text>
+ <image class="item-img" src="{{item.isOnLine ? '/images/wifi_no.svg' : '/images/wifi_off.svg'}}" />
+ </view>
+ <text class="item-button" bindtap="choseCard" data-item="{{item}}">寮�闃�</text>
+ </view>
+ </block>
+ <view wx:if="{{commonWaterPoints.length === 0}}" class="noMore-View">
+ <image class="noMore-img" src="/images/no_more.svg" />
+ <text class="noMore-text">娌℃湁鏁版嵁</text>
+ </view>
+ </scroll-view>
</view>
-</view>
\ No newline at end of file
+
+ <t-dialog class="dialog" visible="{{showConfirm}}" content="纭鎵撳紑{{choseItem.intakeNum}}鍚楋紵" confirm-btn="{{ { content: '纭', variant: 'base', theme: 'danger' } }}" close-on-overlay-click="false" cancel-btn="鍙栨秷" bind:confirm="confirmDialog" bind:cancel="closeDialog" />
+
+ <t-dialog class="error-dialog" title="寮�闃�閿欒" visible="{{showErrorDialog}}" content="{{errorData}}" confirm-btn="{{ confirmBtn }}" bind:confirm="closeErrorDialog" />
+
+ <t-dialog visible="{{showForceConfirm}}" content="褰撳墠铏氭嫙鍗¤鍗犵敤锛屾槸鍚﹀己鍒跺紑闃�锛�" confirm-btn="{{ { content: '寮哄埗寮�闃�', variant: 'base', theme: 'danger' } }}" cancel-btn="鍙栨秷" bind:confirm="confirmForceDialog" bind:cancel="cancelDialog" />
+
+
+</view>
--
Gitblit v1.8.0