代码修改

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 hostCaseCollection = () => request.get('/v1/user_home/host_case_collection')

View File

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