沙盘演示系统应用的微信小程序
zuoxiao
2024-10-28 f66a9a2c565966e98720be5e20604c6f75030f82
1.首页添加使用说明。2.修改扫码开阀功能。3.问题反馈功能相关
14个文件已修改
1个文件已添加
389 ■■■■■ 已修改文件
api/config.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app.wxss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
images/info.svg 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/feedback/feedback.js 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/feedback/feedback.wxml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/feedback/feedback.wxss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.js 131 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.wxml 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.wxss 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/openCard/openCard.js 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/rechargeMoney/rechargMoney.js 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/rechargeMoney/rechargMoney.wxss 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/valveList/valveList.js 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/valveList/valveList.wxml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/config.js
@@ -8,8 +8,9 @@
  case 'test':
    // BASEURL = 'https://irrigate.dayuyanjiuyuan.top/'
    // BASEURL = 'https://d4x9787456.vicp.fun/'
    BASEURL = 'http://127.0.0.1:8087/'
    // BASEURL = 'http://127.0.0.1:8087/'
    // BASEURL = 'http://192.168.40.166:8087/'
    BASEURL = 'http://192.168.10.52:8087/'
    break
  default:
    BASEURL = ''
app.wxss
@@ -37,6 +37,7 @@
  overflow-y: auto;
  z-index: 0;
  margin-top: 10rpx;
  margin-bottom: 20rpx;
}
images/info.svg
New file
@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg width="24" height="24" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M24 44C29.5228 44 34.5228 41.7614 38.1421 38.1421C41.7614 34.5228 44 29.5228 44 24C44 18.4772 41.7614 13.4772 38.1421 9.85786C34.5228 6.23858 29.5228 4 24 4C18.4772 4 13.4772 6.23858 9.85786 9.85786C6.23858 13.4772 4 18.4772 4 24C4 29.5228 6.23858 34.5228 9.85786 38.1421C13.4772 41.7614 18.4772 44 24 44Z" fill="none" stroke="#2D8BF7" stroke-width="4" stroke-linejoin="round"/><path fill-rule="evenodd" clip-rule="evenodd" d="M24 11C25.3807 11 26.5 12.1193 26.5 13.5C26.5 14.8807 25.3807 16 24 16C22.6193 16 21.5 14.8807 21.5 13.5C21.5 12.1193 22.6193 11 24 11Z" fill="#2D8BF7"/><path d="M24.5 34V20H23.5H22.5" stroke="#2D8BF7" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M21 34H28" stroke="#2D8BF7" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>
pages/feedback/feedback.js
@@ -3,6 +3,7 @@
const {
  BASEURL
} = require('../../api/config')
const app = getApp()
Page({
  data: {
    isRefreshing: false,
@@ -29,6 +30,7 @@
    contentValue: '', //反馈详情
    accSavePath: '', //上传的音频文件接口返回的地址
    photoSavePath: [] //上传的照片文件返回的地址
  },
  onLoad() {
@@ -98,10 +100,18 @@
    //上传录制的音频到服务器
    wx.uploadFile({
      url: BASEURL + "wx/webFile/upPhone", //接口地址
      name: 'file.acc', //上传文件名
      name: 'file', //上传文件名
      filePath: tempFilePath,
      header: {
        'tag': app.globalData.tag,
        'appId': app.globalData.AppID,
      },
      success: function (res) { //后台返回给前端识别后的文字
        console.log('录音上传成功', res);
      },
      fail: (err) => {
        // 处理上传失败的逻辑
        console.log('录音上传失败', err);
      }
    })
  },
@@ -124,7 +134,7 @@
    this.setData({
      originFiles,
    });
  },
  handleClick(e) {
    console.log("handleClick");
@@ -167,8 +177,12 @@
      url: BASEURL + "wx/webFile/upPhone", // 仅为示例,非真实的接口地址
      filePath: imgPath,
      name: 'file',
      success: () => {
      header: {
        'tag': app.globalData.tag,
        'appId': app.globalData.AppID,
      },
      success: (res) => {
        console.log('图片上传成功', res);
      },
      fail: (err) => {
        // 处理上传失败的逻辑  
@@ -381,6 +395,29 @@
      isShowVoiceView: false,
      voiceTime: 0,
    })
  },
  submit() {
    if (this.data.contentValue !== "" || this.data.photoSavePath.length>0 || this.data.accSavePath !== "") {
      wx.showToast({
        title: '提交成功',
        icon: 'success',
        duration: 2000,
        success() {}
      })
      setTimeout(() => {
        wx.navigateBack({
          delta: 1
        });
      }, 2000);
    } else {
      wx.showToast({
        title: '请输入一项反馈内容',
        icon: 'error',
        duration: 2000,
        success() {}
      })
    }
  }
});
pages/feedback/feedback.wxml
@@ -1,6 +1,6 @@
<view class="container">
  <!-- 顶部 Tabs -->
  <view class="tabs">
  <!-- <view class="tabs">
    <view class="tab" bindtap="switchTab" data-tab="0" id="tab0">
      问题反馈
      <view class="indicator" wx:if="{{currentTab === 0}}"></view>
@@ -9,7 +9,7 @@
      已提问题
      <view class="indicator" wx:if="{{currentTab === 1}}"></view>
    </view>
  </view>
  </view> -->
  <view class="container-feedBack" wx:if="{{currentTab === 0}}">
    <view class="container-item">
      <text class="fb-text">反馈详情:</text>
@@ -39,10 +39,10 @@
    </view>
    <!-- 录音中 -->
    <view wx:if="{{isShowVoiceMask}}" class="voice_starting">录音中{{contDownTime}}秒</view>
    <button class="fb-submit">提交</button>
    <button class="fb-submit" bind:tap="submit">提交</button>
  </view>
  <scroll-view class="container-scroll" wx:if="{{currentTab === 1}}" scroll-y="true" refresher-enabled="true" refresher-threshold="50" bindrefresherrefresh="onPullDownRefresh" refresher-triggered="{{isRefreshing}}">
  <!-- <scroll-view class="container-scroll" wx:if="{{currentTab === 1}}" scroll-y="true" refresher-enabled="true" refresher-threshold="50" bindrefresherrefresh="onPullDownRefresh" refresher-triggered="{{isRefreshing}}">
    <block wx:for="{{feedBackList}}" wx:key="index">
      <view class="item">
        <view class="item-data">
@@ -59,7 +59,7 @@
      <image class="noMore-img" src="/images/no_more.svg" />
      <text class="noMore-text">没有数据</text>
    </view>
  </scroll-view>
  </scroll-view> -->
</view>
pages/feedback/feedback.wxss
@@ -27,7 +27,7 @@
  background-color: #fff;
  padding-left: 40rpx;
  padding-right: 40rpx;
  padding-top: 1rpx;
  padding-top: 40rpx;
  padding-bottom: 1rpx;
}
pages/home/home.js
@@ -31,6 +31,8 @@
    showForceConfirm: false, //是否强制开阀
    lastIntakeName: "",
    isLogin: false, //是否已经登录
    showInfoDialog: false,
  },
  openValve: function (e) {
@@ -44,7 +46,6 @@
        icon: 'error'
      })
    }
  },
  calculateScrollViewHeight: function () {
    wx.createSelectorQuery().selectAll('.list-item').boundingClientRect((rects) => {
@@ -55,7 +56,7 @@
    }).exec();
  },
  startPullDownRefresh() {
    if(this.data.isLogin){
    if (this.data.isLogin) {
      if (!this.data.isWXRefreshing) {
        var self = this;
        console.log(this.data.isRefreshing);
@@ -64,14 +65,12 @@
        });
        this.getOpenList();
      }
    }else{
    } else {
      wx.showToast({
        title: '请先登录',
        icon: 'error'
      })
    }
  },
  //获取用户数据
  getUserData() {
@@ -115,6 +114,9 @@
      const app = getApp();
      storage.getItem('sessionId').then((data) => {
        app.globalData.sessionId = data;
        this.setData({
          isLogin: true
        })
        if (app.globalData.sessionId) {
          this.getOpenList();
          this.getUserDataBySession();
@@ -324,32 +326,44 @@
   * 获取为关阀记录
   */
  getOpenList() {
    const app = getApp();
    const params = {
      url: 'wx/valve/get',
      data: {
        operator: app.globalData.sessionId
      }
    };
    get(params).then(data => {
      this.setData({
        listData: data.content,
        isRefreshing: false, // 将triggered属性设置为false,表示下拉刷新已完成
        isWXRefreshing: false, // 将triggered属性设置为false,表示下拉刷新已完成
      })
      this.updateDisplayText();
    }).catch(err => {
      // 错误回调
      this.setData({
        isRefreshing: false, // 将triggered属性设置为false,表示下拉刷新已完成
        isWXRefreshing: false, // 将triggered属性设置为false,表示下拉刷新已完成
      })
    if (this.data.isLogin) {
      const app = getApp();
      const params = {
        url: 'wx/valve/get',
        data: {
          operator: app.globalData.sessionId
        }
      };
      get(params).then(data => {
        this.setData({
          listData: data.content,
          isRefreshing: false, // 将triggered属性设置为false,表示下拉刷新已完成
          isWXRefreshing: false, // 将triggered属性设置为false,表示下拉刷新已完成
        })
        this.updateDisplayText();
      }).catch(err => {
        // 错误回调
        this.setData({
          isRefreshing: false, // 将triggered属性设置为false,表示下拉刷新已完成
          isWXRefreshing: false, // 将triggered属性设置为false,表示下拉刷新已完成
        })
        wx.showToast({
          title: err.msg,
          icon: 'error',
          duration: 3000
        })
      });
    } else {
      wx.showToast({
        title: err.msg,
        icon: 'error',
        duration: 3000
        title: '请先登录',
        icon: 'error'
      })
    });
      this.setData({
        isRefreshing: false, // 将triggered属性设置为false,表示下拉刷新已完成
        isWXRefreshing: false, // 将triggered属性设置为false,表示下拉刷新已完成
      })
    }
  },
  /**
   * 确认关闭回调
@@ -403,25 +417,36 @@
   * 扫码开阀
   */
  scenCode() {
    const that = this;
    wx.scanCode({
      success(res) {
        console.log(res.result); // 当且仅当扫码为非微信二维码时,会返回result
        if (res.result.startsWith("content://")) {
          let jsonStr = res.result.replace("content://", "")
          try {
            that.saveData(jsonStr)
          } catch (error) {
            console.error('Error parsing JSON:', error);
    if (this.data.isLogin) {
      const that = this;
      wx.scanCode({
        success(res) {
          console.log(res.result); // 当且仅当扫码为非微信二维码时,会返回result
          if (res.result.startsWith("content://")) {
            let jsonStr = res.result.replace("content://", "")
            try {
              that.saveData(jsonStr)
            } catch (error) {
              console.error('Error parsing JSON:', error);
            }
          } else {
            wx.navigateTo({
              url: '/pages/openCard/openCard?intakeName=' + res.result,
            })
            // that.postOppenValva()
          }
        } else {
          that.postOppenValva(res.result)
        },
        fail(err) {
          console.error(err);
        }
      },
      fail(err) {
        console.error(err);
      }
    })
      })
    } else {
      wx.showToast({
        title: '请先登录',
        icon: 'error'
      })
    }
  },
  confirmForceDialog() {
    console.log("confirmForceDialog");
@@ -594,7 +619,7 @@
        userPhone: "请登录",
        userName: "未登录",
        listData: [],
        isLogin:false
        isLogin: false
      })
      app.globalData.sessionId = "";
      app.globalData.clientId = ""
@@ -611,5 +636,17 @@
      // 处理错误响应
      console.error('请求失败:', error);
    });
  },
  //点击提示按钮
  infoShow() {
    this.setData({
      showInfoDialog: true
    })
  },
  //提示窗确认按钮
  confirmBtnInfoDialog() {
    this.setData({
      showInfoDialog: false
    })
  }
})
pages/home/home.json
@@ -4,7 +4,8 @@
    "t-avatar": "tdesign-miniprogram/avatar/avatar",
    "t-switch": "tdesign-miniprogram/switch/switch",
    "t-dialog": "tdesign-miniprogram/dialog/dialog",
    "t-swipe-cell": "tdesign-miniprogram/swipe-cell/swipe-cell"
    "t-swipe-cell": "tdesign-miniprogram/swipe-cell/swipe-cell",
    "t-button": "tdesign-miniprogram/button/button"
  },
  "navigationBarTitleText": "大禹节水",
  "navigationBarTextStyle": "white",
pages/home/home.wxml
@@ -41,8 +41,12 @@
  <view class="bottom-title">
    <text class="bottom-title-text">快速关阀</text>
    <text  class="refresh-button" bind:tap="startPullDownRefresh">刷新</text>
    <view class="title-center">
      <text class="bottom-title-text">快速关阀</text>
      <image class="info-img" bind:tap="infoShow" src="/images/info.svg"></image>
    </view>
    <text class="refresh-button" bind:tap="startPullDownRefresh">刷新</text>
  </view>
  <view class="divider"></view>
  <!-- refresher-enabled="true" refresher-threshold="50" -->
@@ -56,23 +60,23 @@
    <view class="scroll-bg">
      <view wx:if="{{listData.length > 0}}" class="list-item" wx:for="{{listData}}" wx:key="index">
        <t-swipe-cell style="width: 100%;" class="swipe-cell-base">
        <view class="swipe-cell" >
           <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>
        <view>
          <!-- <t-switch  class="switch" data-item="{{item}}" bindchange="handleChange" value="{{true}}" label="{{['开', '关']}}" slot="note" /> -->
          <text class="item-button" bind:tap="handleChange" data-item="{{item}}">关阀</text>
        </view>
        </view>
        <view slot="right" class="delete-btn" bind:tap="onDelete" data-item="{{item}}">{{item.displayText}}</view>
      </t-swipe-cell>
          <view class="swipe-cell">
            <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>
            <view>
              <!-- <t-switch  class="switch" data-item="{{item}}" bindchange="handleChange" value="{{true}}" label="{{['开', '关']}}" slot="note" /> -->
              <text class="item-button" bind:tap="handleChange" data-item="{{item}}">关阀</text>
            </view>
          </view>
          <view slot="right" class="delete-btn" bind:tap="onDelete" data-item="{{item}}">{{item.displayText}}</view>
        </t-swipe-cell>
      </view>
    </view>
    <view wx:if="{{listData.length === 0}}" class="noMore-View-home">
      <image class="noMore-img" src="/images/no_more.svg" />
      <text class="noMore-text">没有开泵记录</text>
@@ -82,5 +86,15 @@
  <t-dialog class="dialog" visible="{{showConfirm}}" content="确认关闭{{waterIntakeName}}吗?" confirm-btn="{{ { content: '确认', variant: 'base', theme: 'danger' } }}" close-on-overlay-click="false" cancel-btn="取消" bind:confirm="confirmDialog" bind:cancel="cancelDialog" />
  <t-dialog class="error-dialog" title="{{errorDialogTitle}}" visible="{{showErrorDialog}}" content="{{errorData}}" confirm-btn="{{ confirmBtn }}" bind:confirm="closeDialog" />
  <t-dialog visible="{{showForceConfirm}}" content="当前虚拟卡被占用,是否强制开阀?" confirm-btn="{{ { content: '强制开阀', variant: 'base', theme: 'danger' } }}" cancel-btn="取消" bind:confirm="confirmForceDialog" bind:cancel="cancelDialog" />
  <t-dialog visible="{{showInfoDialog}}" title="友情提示" confirm-btn="{{ confirmBtn  }}" bind:confirm="confirmBtnInfoDialog">
    <!-- 适配skyline,增加type="list" -->
    <scroll-view slot="content" type="list" scroll-y class="long-content">
      <view class="content-container">
      1.网络等不可抗力因素可能导致设备状态显示延迟或错误。
      2.当提示您操作失败后您可稍后尝试重新操作。
      3.在定时或定量开阀的预约式开阀过程中,系统仅显示取消状态。当用户点击取消时,程序会尝试执行取消操作,但可能因网络等不可抗力因素而失败。
      4.我们诚挚地邀请您通过意见反馈渠道提出宝贵的建议或意见。
      </view>
    </scroll-view>
  </t-dialog>
</view>
pages/home/home.wxss
@@ -199,16 +199,10 @@
}
.bottom-title-text {
  position: absolute;
  /* 绝对定位 */
  left: 50%;
  /* 移动到容器的中间 */
  transform: translateX(-50%);
  /* 通过平移自身宽度的一半来实现真正的居中 */
  font-size: 16px;
  /* 字体大小 */
  color: #333;
  /* 字体颜色 */
  margin-right: 10rpx; /* 给文本和图标之间添加一些间距 */
  font-size: 16px; /* 字体大小 */
  color: #333; /* 字体颜色 */
}
.refresh-button {
@@ -386,3 +380,29 @@
  margin-bottom: 2rpx;
  width: 100wh;
}
.info-img{
  width: 50rpx;
  height: 50rpx;
}
.title-center{
  position: absolute;
  /* 绝对定位 */
  left: 50%;
  /* 移动到容器的中间 */
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between; /* 使子元素在主轴上均匀分布 */
  align-items: center; /* 垂直居中对齐 */
}
.content-container{
  white-space: pre-line;
  word-wrap: break-word; /* 防止长单词无法换行 */
}
.long-content {
  height: 450rpx;
  margin-top: 16rpx;
  font-size: 32rpx;
  color: #888;
}
pages/openCard/openCard.js
@@ -38,7 +38,8 @@
    costiomTime: "", //自定义灌溉时间
    waterAmount: 0, //定量开阀的水量
    costiomWater: "", //输入的自定义水量
    isWXRefreshing:false,
    isWXRefreshing: false,
    intakeName: "" //扫码开阀从首页传来的取水口名称
  },
  openValva(event) {
    const {
@@ -47,14 +48,20 @@
    if (item.isAlarmValue === true) {
      //金额报警
      wx.navigateTo({
        url: '/pages/rechargeMoney/rechargMoney?vcId=' + item.vcId,
        url: '/pages/rechargeMoney/rechargMoney?vcId=' + item.id,
      })
    } else if (item.inUse === false) {
      // 选择虚拟卡后
      this.initDialogData();
      this.setData({
        vcId: item.id,
      })
      if (this.data.intakeName === "") {
        // 选择虚拟卡后
        this.initDialogData();
      } else {
        //扫码开阀逻辑
        this.postOpenValva(false);
      }
    }
  },
  handleAutoIrrigation() {},
@@ -64,10 +71,12 @@
   */
  onLoad(options) {
    const {
      intakeId
      intakeId,
      intakeName
    } = options;
    this.setData({
      intakeId: intakeId
      intakeId: intakeId,
      intakeName: intakeName
    })
    console.log('intakeId:' + this.data.intakeId);
    this.getCardList();
@@ -169,7 +178,7 @@
    // 更新列表数据
    this.setData({
      allCardPoints: updatedList,
      isWXRefreshing:false
      isWXRefreshing: false
    });
  },
  handleClost() {
@@ -319,6 +328,7 @@
    const data = {
      intakeId: this.data.intakeId, //取水口ID
      vcId: this.data.vcId, //虚拟卡ID
      intakeName: this.data.intakeName, //取水口名称
      operator: app.globalData.sessionId, //操作员
      forceOpen: !!isforce // 使用逻辑非操作符 !! 来确保 isForce 是布尔值  
    };
pages/rechargeMoney/rechargMoney.js
@@ -67,9 +67,9 @@
   */
  onPullDownRefresh() {
    this.setData({
      pageCurr: 1
      pageCurr: 1,
    })
    this.getRechargList()
    this.getRechargList(true)
  },
  /**
@@ -136,7 +136,13 @@
        signType: data.content.signType,
        paySign: data.content.paySign,
        success(res) {
          wx.showToast({
            title: "充值成功",
            icon: 'success',
            duration: 3000
          })
          console.log('支付成功', res);
          this. getRechargList(true);
        },
        fail(err) {
          console.log('支付失败', err);
@@ -151,7 +157,7 @@
    });
  },
  //获取充值记录
  getRechargList() {
  getRechargList(isRefresh) {
    const params = {
      url: 'wx/virtual_card/getVcRechargeRecords',
      data: {
@@ -162,10 +168,10 @@
    };
    get(params).then(data => {
      this.setData({
        allRechargeList:this.data.allRechargeList.concat( data.content.obj),
        allRechargeList: isRefresh ? data.content.obj : this.data.allRechargeList.concat(data.content.obj),
        isWXRefreshing: false, // 将triggered属性设置为false,表示下拉刷新已完成
        loading: false,
        hasMore: !data.content.obj.pageTotal === this.data.pageCurr
        hasMore: this.data.pageCurr < data.content.pageTotal
      })
      this.updateDisplayText();
    }).catch(err => {
@@ -181,12 +187,7 @@
      })
    });
  },
  // 生成支付签名的函数
  generatePaySign(params) {
    const sortedKeys = Object.keys(params).sort();
    const stringToSign = sortedKeys.map(key => `${key}=${params[key]}`).join('&') + `&key=your-mch-key`;
    return md5(stringToSign).toUpperCase();
  },
  //加载更多
  loadMore() {
    if (this.data.hasMore && !this.data.loading) {
pages/rechargeMoney/rechargMoney.wxss
@@ -128,6 +128,7 @@
  width: 100%;
  flex-direction: column;
  margin-top: 10rpx;
  overflow: hidden; /* 确保不超出父元素 */
}
.rechage {
@@ -184,4 +185,9 @@
.loading {
  text-align: center;
  padding: 20px;
}
.list-container {
  flex: 1;
  overflow-y: auto;
  z-index: 0;
}
pages/valveList/valveList.js
@@ -10,33 +10,7 @@
   * 页面的初始数据
   */
  data: {
    listVirtualData: [{
      intakeNum: "1023356646612",
      watername: "测试",
      startTime: "2024.10.15 12:23",
      endTime: "2024.10.15 16:23"
    }, {
      intakeNum: "1023356646612",
      watername: "测试1",
      startTime: "2024.10.15 12:23",
      endTime: "2024.10.15 16:23"
    }, {
      intakeNum: "1023356646612",
      watername: "测试2",
      startTime: "2024.10.15 12:23",
      endTime: "2024.10.15 16:23"
    }, {
      intakeNum: "1023356646612",
      watername: "测试3",
      startTime: "2024.10.15 12:23",
      endTime: "2024.10.15 16:23"
    }, {
      intakeNum: "1023356646612",
      watername: "测试4",
      startTime: "2024.10.15 12:23",
      endTime: "2024.10.15 16:23"
    }],
    listVirtualData: [],
    listPhysicalData: [],
    currentTab: 0,
    isVirtualRefreshing: false, //虚拟卡刷新中
@@ -118,7 +92,7 @@
    this.setData({
      isVirtualRefreshing: true,
    })
    this.getVirtualListData();
    this.getVirtualListData(true);
  },
  //实体卡刷新
  onPullPhysicalDownRefresh() {
@@ -128,7 +102,7 @@
    this.getPhysicalListData();
  },
  //获取实体卡列表
  getPhysicalListData() {
  getPhysicalListData(isRefresh) {
    get({
        url: 'wx/intake/getCardOpenClose',
        data: {
@@ -143,10 +117,10 @@
          physicalIsLoding: false
        });
        if (data.success && data.code === "0001") {
          const filteredData = data.content.obj.filter(item => item.openTime !== null && item.closeTime !== null);
          this.setData({
            listPhysicalData: data.content.obj,
            physicalHasMore: !data.content.obj.pageTotal === this.data.physicalPageCurr,
            listPhysicalData: isRefresh ? filteredData : this.data.listPhysicalData.concat(filteredData),
            physicalHasMore: this.data.physicalPageCurr < data.content.pageTotal,
          });
        } else {
          wx.showToast({
@@ -163,7 +137,7 @@
      });
  },
  //获取虚拟卡开关阀记录
  getVirtualListData() {
  getVirtualListData(isRefresh) {
    get({
        url: 'wx/intake/getVcCardOpenClose',
        data: {
@@ -178,10 +152,10 @@
          virtualIsLoding: false
        });
        if (data.success && data.code === "0001") {
          const filteredData = data.content.obj.filter(item => item.openTime !== null && item.closeTime !== null);
          this.setData({
            listPhysicalData: data.content.obj,
            physicalHasMore: !data.content.obj.pageTotal === this.data.virtualPageCurr,
            listVirtualData: isRefresh ?filteredData : this.data.listVirtualData.concat(filteredData),
            virtualhasMore: this.data.virtualPageCurr < data.content.pageTotal,
          });
        } else {
          wx.showToast({
pages/valveList/valveList.wxml
@@ -34,7 +34,7 @@
      </view>
    </block>
    <view wx:if="{{listData.length === 0}}" class="noMore-View">
    <view wx:if="{{listVirtualData.length === 0}}" class="noMore-View">
      <image class="noMore-img" src="/images/no_more.svg" />
      <text class="noMore-text">没有数据</text>
    </view>
@@ -64,7 +64,7 @@
      </view>
    </block>
    <view wx:if="{{listData.length === 0}}" class="noMore-View">
    <view wx:if="{{listPhysicalData.length === 0}}" class="noMore-View">
      <image class="noMore-img" src="/images/no_more.svg" />
      <text class="noMore-text">没有数据</text>
    </view>