feat: 个人中心评估次数
This commit is contained in:
parent
d9c6150ae1
commit
17a7da123d
@ -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 }),
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user