代码修改

This commit is contained in:
qiuyuan 2026-02-10 15:15:33 +08:00
parent 36b85fedcd
commit 2f6664b46d
2 changed files with 25 additions and 5 deletions

View File

@ -62,3 +62,7 @@ export const exchangePoint = (params:any) => request.put('/v1/balance/exchange_p
// 提现 // 提现
export const getWithdraw = (params:any) => request.put('/v1/balance/withdraw',params) export const getWithdraw = (params:any) => request.put('/v1/balance/withdraw',params)
// 控制台总览界面
export const hostCaseCollection = () => request.get('/v1/user_home/host_case_collection')

View File

@ -13,16 +13,16 @@
<div class="stats-row"> <div class="stats-row">
<div class="stat-item"> <div class="stat-item">
<div class="stat-label">进行中</div> <div class="stat-label">进行中</div>
<div class="stat-value">0</div> <div class="stat-value">{{ infoMessgae.runingCount }}</div>
</div> </div>
<div class="stat-item"> <div class="stat-item">
<div class="stat-label">即将到期</div> <div class="stat-label">即将到期</div>
<div class="stat-value">0</div> <div class="stat-value">{{ infoMessgae.wellCount }}</div>
</div> </div>
<div class="stat-item"> <div class="stat-item">
<div class="stat-label">自动续费</div> <div class="stat-label">自动续费</div>
<div class="stat-value">0</div> <div class="stat-value">{{ infoMessgae.autoPayCount }}</div>
</div> </div>
</div> </div>
</div> </div>
@ -183,7 +183,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, onBeforeMount } from 'vue' import { ref, onBeforeMount, onMounted } from 'vue'
import { import {
UserOutlined, UserOutlined,
GiftOutlined, GiftOutlined,
@ -200,17 +200,27 @@ import {
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { debounce } from '@/utils/debounce.js' import { debounce } from '@/utils/debounce.js'
import { hostCaseCollection } from '@/apis/admin'
const router = useRouter() const router = useRouter()
// //
const switch1 = ref(true) const switch1 = ref(true)
const switch2 = ref(false) const switch2 = ref(false)
const userInfo = ref<any>({}) const userInfo = ref<any>({})
const infoMessgae = ref<any>({})
// //
const balance = ref<number>(0) // const balance = ref<number>(0) //
const computingPoints = ref<number>(5000) // const computingPoints = ref<number>(5000) //
const availableCoupons = ref<number>(3) // const availableCoupons = ref<number>(3) //
// onMounted(() => {
// userInfo.value = JSON.parse(localStorage.getItem('userInfo') || '{}');
// // API
// fetchUserAssets()
// })
onBeforeMount(() => { onBeforeMount(() => {
userInfo.value = JSON.parse(localStorage.getItem('userInfo') || '{}'); userInfo.value = JSON.parse(localStorage.getItem('userInfo') || '{}');
// API // API
@ -237,13 +247,19 @@ const formatComputingPoints = (points: number): string => {
} }
// //
const fetchUserAssets = () => { const fetchUserAssets = async() => {
// API // API
// //
computingPoints.value = 5000 // 5,000 computingPoints.value = 5000 // 5,000
availableCoupons.value = 3 // 3 availableCoupons.value = 3 // 3
const res = await hostCaseCollection();
infoMessgae.value = {...res}
console.log("======????",res);
} }
// //
const generateInviteLink = () => { const generateInviteLink = () => {
// API // API