68 lines
1.2 KiB
Vue
68 lines
1.2 KiB
Vue
<template>
|
|
<!--轮播图-->
|
|
<el-row :gutter="20">
|
|
|
|
<el-col :span="24">
|
|
<div class="h-300px">
|
|
<carousel></carousel>
|
|
</div>
|
|
</el-col>
|
|
</el-row>
|
|
|
|
<div style="padding-top: 20px"></div>
|
|
<!-- 推荐房源列表-->
|
|
<item :get-list=state.getList></item>
|
|
|
|
</template>
|
|
<script setup lang="ts">
|
|
import Carousel from '~/components/front/carousel.vue'
|
|
import Item from '~/components/front/item.vue'
|
|
import { useRouter } from 'vue-router'
|
|
const router = useRouter()
|
|
const state = reactive({
|
|
getList: [],
|
|
commit: [],
|
|
})
|
|
|
|
// frontRequest.get("/api/user/userInfo").then(response =>{
|
|
// user.frontUserInfo = response.data
|
|
// })
|
|
|
|
onMounted(()=>{
|
|
frontRequest.get("/api/item/score").then(res =>{
|
|
state.getList = res.data
|
|
})
|
|
|
|
frontRequest.get("/api/item/commit").then(res =>{
|
|
state.commit = res.data
|
|
})
|
|
})
|
|
/**
|
|
* 跳转
|
|
*/
|
|
const to = (id:number) => {
|
|
router.push(`/info/${id}`)
|
|
}
|
|
|
|
</script>
|
|
<style scoped>
|
|
.hot {
|
|
background-color: rgba(0, 0, 0, 0.2); /* 更浅的黑色 */
|
|
border-radius: 10px; /* 四周圆弧,值可以根据需要调整 */
|
|
}
|
|
:deep(.el-button){
|
|
color: #2e191e;
|
|
font-weight: 700;
|
|
}
|
|
:deep(.el-button:hover) {
|
|
background-color: black;
|
|
}
|
|
</style>
|
|
<route lang="json">
|
|
{
|
|
"meta": {
|
|
"layout": "front"
|
|
}
|
|
}
|
|
</route>
|