用户列表获取数据修改

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() {
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, //
// ordersdevices