个人房源

This commit is contained in:
2023-07-13 15:45:55 +08:00
parent fdec30ad9c
commit 348057a649
4 changed files with 101 additions and 24 deletions

View File

@@ -5,10 +5,8 @@
<!-- 顶部导航 --> <!-- 顶部导航 -->
<div class="dis-f jus-x al-item index-top-navigation-box"> <div class="dis-f jus-x al-item index-top-navigation-box">
<div class="index-top-navigation dis-f al-item body-maxWidth"> <div class="index-top-navigation dis-f al-item body-maxWidth">
<div class="navigation-text" <div class="navigation-text" @click="topTabSelect(i, item)"
@click="topTabSelect(i,item)" :class="{ 'navigation-text-click': item.key === topTabNum }" v-for="(item, i) in topTab.data" :key="i">
:class="{ 'navigation-text-click': item.key === topTabNum }"
v-for="(item, i) in topTab.data" :key="i">
{{ {{
item.name }}</div> item.name }}</div>
<img src="" class="user-img" alt=""> <img src="" class="user-img" alt="">
@@ -33,8 +31,8 @@
</div> </div>
<div class="btm-seach-btn-box dis-f al-item jus-x"> <div class="btm-seach-btn-box dis-f al-item jus-x">
<div class="body-maxWidth dis-f" style="height:48px;"> <div class="body-maxWidth dis-f" style="height:48px;">
<div class="tab-btn dis-f al-item jus-x" :class="{ 'tab-btn-click': i === 0 }" v-for="(item, i) in seachTab.data" <div class="tab-btn dis-f al-item jus-x" :class="{ 'tab-btn-click': i === 0 }"
:key="i"> v-for="(item, i) in seachTab.data" :key="i">
<el-badge :value="12"> <el-badge :value="12">
<div style="padding:0 10px;"> <div style="padding:0 10px;">
{{ item.name }} {{ item.name }}
@@ -49,26 +47,19 @@
</template> </template>
<script setup> <script setup>
import { defineProps, reactive, watchEffect, ref } from "vue"; import store from '../../store/index';
const props=defineProps({ import { reactive, watchEffect, ref } from "vue";
tabMens:{
type:Object,
default:function(){
return {}
}
}
})
//组件数据 //组件数据
let topTab=reactive({data:[]}) let topTab = reactive({ data: [] })
let seachTab = reactive({data:[]}) let seachTab = reactive({ data: [] })
watchEffect(()=>{ watchEffect(() => {
seachTab.data=props.tabMens.menu seachTab.data = store.state.indexData.menu
topTab.data=props.tabMens.nav topTab.data = store.state.indexData.nav
}) })
//顶部导航跳转 //顶部导航跳转
let topTabNum=ref('fang') let topTabNum = ref('fang')
let topTabSelect=(type,item)=>{ let topTabSelect = (type, item) => {
// topTabNum.value=type // topTabNum.value=type
window.open(item.url) window.open(item.url)
} }
@@ -97,6 +88,7 @@ let topTabSelect=(type,item)=>{
.body-maxWidth { .body-maxWidth {
width: 1200px; width: 1200px;
min-width: 1200px;
} }
.s-w-100 { .s-w-100 {
@@ -219,5 +211,45 @@ let topTabSelect=(type,item)=>{
width: 660px; width: 660px;
height: 280px; height: 280px;
} }
/deep/.el-carousel__arrow {
border: 2px solid #545454;
width: 50px;
height: 50px;
}
/deep/.el-icon {
font-size: 20px;
}
/deep/.el-carousel__indicator--horizontal {
padding: var(--el-carousel-indicator-padding-vertical) 2px;
}
/deep/ .el-carousel__button {
width: 8px;
height: 8px;
border-radius: 4px;
}
/deep/ .is-active button {
background: #62b1ff;
}
/deep/ .el-input__wrapper {
background: inherit;
background-color: rgba(246, 246, 246, 1);
border-right: 0px;
border-radius: 8px 0 0 8px;
}
/deep/ .el-input__inner {
font-family: 'PingFangSC-Regular', 'PingFang SC', sans-serif;
font-weight: 400;
font-style: normal;
font-size: 16px;
color: #7F7F7F;
text-align: left;
}
</style> </style>

View File

@@ -35,6 +35,10 @@ const routes = [
meta: { meta: {
title: "我的" title: "我的"
} }
},
{//个人房源
path:'/personHousing',
component:()=> import(/* webpackChunkName: "housing" */ '@/views/housingView/person.vue')
} }
] ]

View File

@@ -1,6 +1,6 @@
<template> <template>
<div class="home"> <div class="home">
<pageTopBar :tabMens="indexData.data"></pageTopBar> <pageTopBar></pageTopBar>
<!-- <headerNavigation></headerNavigation> --> <!-- <headerNavigation></headerNavigation> -->
<!-- 搜索模块 --> <!-- 搜索模块 -->
<seachModule :list="seachTypeData.data" :hotList="indexData.data.hotSearcheWords"></seachModule> <seachModule :list="seachTypeData.data" :hotList="indexData.data.hotSearcheWords"></seachModule>
@@ -246,7 +246,7 @@ let loadMore = ref(true)
//瀑布流数据 //瀑布流数据
let getRecommendList = () => { let getRecommendList = () => {
api.recommendList({ api.recommendList({
page: pages, page: pages.value,
limit: 30, limit: 30,
type: ListSelectBtn.selectType type: ListSelectBtn.selectType
}).then(res => { }).then(res => {

View File

@@ -0,0 +1,41 @@
<template>
<div>
<pageTopBar></pageTopBar>
</div>
</template>
<script setup>
import pageTopBar from '../../components/pageTopBar/pageTopBar.vue';
</script>
<style scoped>
img {
object-fit: contain;
}
.dis-f {
display: flex;
}
.jus-x {
justify-content: center;
}
.al-item {
align-items: center;
}
.pos-r {
position: relative;
}
.body-maxWidth {
width: 1200px;
min-width: 1200px;
}
.s-w-100 {
width: 100%;
}
</style>