用户列表获取数据修改

This commit is contained in:
WindowBird 2025-08-22 18:51:23 +08:00
parent 6508a93726
commit d42af2e2dc

View File

@ -123,10 +123,7 @@ export default {
onLoad() { onLoad() {
this.fetchUserList() this.fetchUserList()
}, },
onShow() {
//
this.fetchUserList()
},
computed: { computed: {
filteredUsers() { filteredUsers() {
if (!this.searchKeyword) { if (!this.searchKeyword) {
@ -140,7 +137,6 @@ export default {
methods: { methods: {
// //
async fetchUserList() { async fetchUserList() {
this.loading = true
try { try {
// //
const params = {} const params = {}
@ -155,9 +151,9 @@ export default {
} }
const response = await getUserList(params) 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 // API
this.users = response.data.map(user => ({ this.users = response.rows.map(user => ({
...user, ...user,
isExpanded: false, // isExpanded: false, //
// ordersdevices // ordersdevices