From d42af2e2dc63a001c9c2525451fa882763fc3bfa Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Fri, 22 Aug 2025 18:51:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=97=E8=A1=A8=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=95=B0=E6=8D=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/useList/useList.vue | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pages/useList/useList.vue b/pages/useList/useList.vue index 2542fbc..c8e8991 100644 --- a/pages/useList/useList.vue +++ b/pages/useList/useList.vue @@ -123,10 +123,7 @@ export default { onLoad() { this.fetchUserList() }, - onShow() { - // 页面显示时刷新数据 - this.fetchUserList() - }, + computed: { filteredUsers() { if (!this.searchKeyword) { @@ -140,7 +137,6 @@ export default { methods: { // 获取用户列表 async fetchUserList() { - this.loading = true try { // 构建查询参数 const params = {} @@ -155,9 +151,9 @@ export default { } const response = await getUserList(params) - if (response.code === 200 && response.data && Array.isArray(response.data)) { + if (response.code === 200 && response.rows && Array.isArray(response.rows)) { // 转换API数据格式为页面需要的格式 - this.users = response.data.map(user => ({ + this.users = response.rows.map(user => ({ ...user, isExpanded: false, // 默认收起 // 将orders转换为devices格式