particularly complete forum function, add point order export and user delete

This commit is contained in:
2024-03-22 01:47:55 +08:00
parent 87df8d5966
commit 932b83ddcd
52 changed files with 2806 additions and 132 deletions

View File

@@ -3,7 +3,7 @@ import { ResponsePointOrder2UserModel } from '@/api/api-models'
import PointOrderCard from '@/components/manage/PointOrderCard.vue'
import { POINT_API_URL } from '@/data/constants'
import { useAuthStore } from '@/store/useAuthStore'
import { NEmpty, useMessage } from 'naive-ui'
import { NEmpty, NSpin, useMessage } from 'naive-ui'
import { onMounted, ref } from 'vue'
const message = useMessage()
@@ -24,8 +24,9 @@ async function getOrders() {
} catch (err) {
console.log(err)
message.error('获取订单失败: ' + err)
} finally {
isLoading.value = false
}
isLoading.value = false
return []
}
@@ -35,6 +36,8 @@ onMounted(async () => {
</script>
<template>
<NEmpty v-if="orders.length == 0" description="暂无订单"></NEmpty>
<PointOrderCard v-else :order="orders" :loading="isLoading" type="user" />
<NSpin :show="isLoading">
<NEmpty v-if="orders.length == 0" description="暂无订单" />
<PointOrderCard v-else :order="orders" :loading="isLoading" type="user" />
</NSpin>
</template>