feat: 个人中心评估次数

This commit is contained in:
hhm54322幽幽 2025-11-24 14:44:29 +08:00
parent d9c6150ae1
commit 17a7da123d
2 changed files with 13 additions and 9 deletions

View File

@ -8,6 +8,8 @@ export default {
// 手机号
registerPhone: (data) => request.post('/app-user/register', data, { noNeedToken: true }),
loginPhone: (data) => request.post('/app-user/login', data, { noNeedToken: true }),
// 估值次数
userQuota: () => request.get('/app-user/quota'),
// 短信验证码
sendVerifyCode: (data) => request.post('/sms/send-code', data, { noNeedToken: true }),
loginWithVerifyCode: (data) => request.post('/sms/login', data, { noNeedToken: true }),

View File

@ -25,7 +25,7 @@
</div> -->
<!-- 子路由视图 -->
<router-view
<router-view
:asset-list="assetList"
:invoice-list="invoiceList"
@return-home="handleBackToHome"
@ -42,7 +42,7 @@ import api from '@/api'
import AppHeader from '@/components/AppHeader.vue'
import UserSidebar from './components/UserSidebar.vue'
const router = useRouter()
const router = useRouter()
const route = useRoute()
//
@ -64,7 +64,7 @@ const assetList = ref([])
//
const invoiceList = ref([
{ id: 1, name: '某某公司', status: '待审' },
{ id: 2, name: '某某公司', status: '待审' }
{ id: 2, name: '某某公司', status: '待审' },
])
//
@ -80,8 +80,7 @@ const menuList = ref([
{
id: 'invoice',
label: '抬头管理',
}
},
])
//
@ -108,6 +107,10 @@ async function loadData() {
assetList.value = res.results
valuationCount.value = res.results.length
}
const res2 = await api.userQuota()
if (res2 && res2.data) {
valuationCount.value = res2.data.remaining_count
}
} catch (error) {
console.error('加载估值记录失败:', error)
$message.error('加载估值记录失败,请稍后重试')
@ -122,12 +125,11 @@ onMounted(() => {
<style scoped>
.user-center-container {
min-height: 100vh;
background: #F5F7FA;
background: #f5f7fa;
display: flex;
flex-direction: column;
}
/* Main Container Styles */
.main-container {
width: 1200px;
@ -166,7 +168,7 @@ onMounted(() => {
}
.back-button:hover {
color: #A30113;
color: #a30113;
}
@media (max-width: 1200px) {
@ -179,7 +181,7 @@ onMounted(() => {
.main-container {
flex-direction: column;
}
.header {
padding: 10px 20px;
}