feat: 开始评估前判断剩余评估次数
This commit is contained in:
parent
de8c4e9cab
commit
01cdcec0b4
@ -1,15 +1,17 @@
|
||||
<template>
|
||||
<div class="home-container">
|
||||
<AppHeader />
|
||||
|
||||
|
||||
<div class="content-wrapper">
|
||||
<div class="glass-card">
|
||||
<div class="card-logo">
|
||||
<img src="@/assets/images/logo.png" alt="logo" />
|
||||
</div>
|
||||
<h1 class="main-title">非遗IP价值评估系统</h1>
|
||||
<p class="subtitle">基于深度学习算法的智能评估系统,为您的知识产权和非物质文化遗产提供专业的价值评估服务</p>
|
||||
|
||||
<p class="subtitle">
|
||||
基于深度学习算法的智能评估系统,为您的知识产权和非物质文化遗产提供专业的价值评估服务
|
||||
</p>
|
||||
|
||||
<div class="action-section">
|
||||
<button class="start-btn" @click="handleStartEvaluation">
|
||||
开始评估
|
||||
@ -24,11 +26,21 @@
|
||||
<script setup>
|
||||
import { useRouter } from 'vue-router'
|
||||
import AppHeader from '@/components/AppHeader.vue'
|
||||
import api from '@/api'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
function handleStartEvaluation() {
|
||||
router.push('/pages')
|
||||
async function handleStartEvaluation() {
|
||||
try {
|
||||
const res = await api.userQuota()
|
||||
if (res && res.data && res.data.remaining_count > 0) {
|
||||
router.push('/pages')
|
||||
} else {
|
||||
$message.error('剩余评估次数不足!')
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -46,7 +58,6 @@ function handleStartEvaluation() {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
.content-wrapper {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
@ -97,7 +108,7 @@ function handleStartEvaluation() {
|
||||
}
|
||||
|
||||
.start-btn {
|
||||
background: linear-gradient(90deg, #880C22 0%, #B81C36 100%);
|
||||
background: linear-gradient(90deg, #880c22 0%, #b81c36 100%);
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 12px 40px;
|
||||
@ -134,7 +145,7 @@ function handleStartEvaluation() {
|
||||
.subtitle {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
|
||||
.header {
|
||||
padding: 15px 20px;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user