This commit is contained in:
A1300399510
2023-07-26 20:01:01 +08:00
parent 676b20981e
commit acf3767e8b
7 changed files with 69 additions and 43 deletions

View File

@@ -50,9 +50,10 @@
</div> </div>
</div> </div>
<div class="tool-btn dis-f jus-x al-item add-btn"> <div class="tool-btn dis-f jus-x al-item add-btn" style="position: relative;">
<img src="../../assets/homeImage/addBtn.png" class="img" alt=""> <img src="../../assets/homeImage/addBtn.png" class="img" alt="">
发布房源 发布房源
<choosing-identity></choosing-identity>
</div> </div>
<el-popover placement="bottom-end" popper-class="consult-popover flexcenter" :width="300" <el-popover placement="bottom-end" popper-class="consult-popover flexcenter" :width="300"
@@ -177,6 +178,7 @@ import { ref, toRefs, watchEffect, reactive, defineProps, nextTick } from 'vue';
import { useStore } from 'vuex'; import { useStore } from 'vuex';
import store from '../../store/index'; import store from '../../store/index';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import choosingIdentity from '@/components/edit/choosingIdentity.vue'
const usestore = useStore(); const usestore = useStore();
const { wechat } = toRefs(usestore.state); const { wechat } = toRefs(usestore.state);

View File

@@ -1,8 +1,6 @@
<template> <template>
<!-- 关于发布弹窗 --> <!-- 关于发布弹窗 -->
<!-- <div class="flexcenter pop-mask" v-if="popState"> --> <div class="flexcenter pop-mask" v-if="popState">
<div class="btn"></div>
<div class="flexcenter pop-mask" v-if="false">
<div class="pop about-pop shadow"> <div class="pop about-pop shadow">
<div class="about-title">关于发布</div> <div class="about-title">关于发布</div>
<div class="about-tab flexacenter"> <div class="about-tab flexacenter">
@@ -72,15 +70,6 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.btn {
width: 100%;
height: 100%;
background-color: antiquewhite;
position: absolute;
top: 0;
left: 0;
}
.close { .close {
height: 50px; height: 50px;
width: 180px; width: 180px;

View File

@@ -1,8 +1,9 @@
<template> <template>
<div class="pop-mask flexcenter"> <div class="btn" v-if="popType == ''" @click="ClickBtn()"></div>
<div class="pop-mask flexcenter" v-else>
<div class="pop-box" :style="{ width: popType == 'choice' ? '520px' : '' }"> <div class="pop-box" :style="{ width: popType == 'choice' ? '520px' : '' }">
<div v-if="popType == 'choice'"> <div v-if="popType == 'choice'">
<img class="close-icon" @click="emit('close')" src="@/assets/img/edit/close-icon.svg" /> <img class="close-icon" @click="popType = ''" src="@/assets/img/edit/close-icon.svg" />
<div class="pop-header flexcenter">发布房源</div> <div class="pop-header flexcenter">发布房源</div>
<div class="please-choose">请选择</div> <div class="please-choose">请选择</div>
<div class="choice-box flexflex flex1"> <div class="choice-box flexflex flex1">
@@ -35,8 +36,6 @@
</div> </div>
</div> </div>
<div class="footer flexcenter"> <div class="footer flexcenter">
<!-- <div class="footer-item flexcenter" @click="backChoice">重新选择</div> -->
<div v-if="popType == 'agent'" class="footer-item flexcenter" @click="backChoice">重新选择</div> <div v-if="popType == 'agent'" class="footer-item flexcenter" @click="backChoice">重新选择</div>
<div v-else class="footer-item flexcenter" @click="confirmIntermediary(-1)">我不是中介</div> <div v-else class="footer-item flexcenter" @click="confirmIntermediary(-1)">我不是中介</div>
<div class="footer-item affirm flexcenter" @click="confirmIntermediary(1)">{{ popType == 'agent' ? <div class="footer-item affirm flexcenter" @click="confirmIntermediary(1)">{{ popType == 'agent' ?
@@ -57,14 +56,9 @@ import { useRouter } from 'vue-router'
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const router = useRouter() const router = useRouter()
let html = `中介账号只能发布“<span style="color: #000; font-weight:650;">中介房源</span>”,如您已上架个人房源或求房源信息,在你确认中介身份后,将会自动下架;`
// let choicePopState = ref(true) // 弹窗的状态
const emit = defineEmits(['close'])
let identityList = ref([]) let identityList = ref([])
let popType = ref('choice') // choice agent: 确认是否是中介(有个人房源) affirmAgent: 确认是否是中介(有中介房源) let popType = ref('') // choice agent: 确认是否是中介(有个人房源) affirmAgent: 确认是否是中介(有中介房源)
let agent = ref([`中介账号发布的房源信息,均展示在“<span style="color: #000; font-weight:650;">中介房源</span>”频道中,即不能发布“<span style="color: #000; font-weight:650;">个人房源</span>”、“<span style="color: #000; font-weight:650;">求房源</span>”;如您已上架个人房源或求房源信息,在你确认中介身份后,将会自动下架`]) let agent = ref([`中介账号发布的房源信息,均展示在“<span style="color: #000; font-weight:650;">中介房源</span>”频道中,即不能发布“<span style="color: #000; font-weight:650;">个人房源</span>”、“<span style="color: #000; font-weight:650;">求房源</span>”;如您已上架个人房源或求房源信息,在你确认中介身份后,将会自动下架`])
@@ -75,15 +69,17 @@ let rulesList = ref([`中介账号(未认证)最多可同时上架 <span sty
let showList = ref([]) //展示的规则 let showList = ref([]) //展示的规则
let identityKey = ref(1) let identityKey = ref(1)
// let identityKey = ref(6)
let housingnum = ref(0) let housingnum = ref(0)
let isintermediary = ref(0) let isintermediary = ref(0)
let loading = ref(null) // 加载 let loading = ref(null) // 加载
onMounted(() => {
init() // 点击按钮
}) const ClickBtn = () => {
if (identityList.value.length == 0) init()
else popType.value = 'choice'
}
async function init() { async function init() {
loading = ElLoading.service({ loading = ElLoading.service({
@@ -92,7 +88,6 @@ async function init() {
background: 'rgba(0, 0, 0, 0.7)', background: 'rgba(0, 0, 0, 0.7)',
}) })
// if (identityList.value > 0) return
proxy.$post("/tenement/pc/api/publish/checkidentity").then(res => { proxy.$post("/tenement/pc/api/publish/checkidentity").then(res => {
if (res.code != 200) return if (res.code != 200) return
let data = res.data let data = res.data
@@ -100,15 +95,15 @@ async function init() {
housingnum.value = data.housingnum housingnum.value = data.housingnum
isintermediary.value = data.isintermediary isintermediary.value = data.isintermediary
if (data['ispopup'] == 0) overallJump() if (data['ispopup'] == 0) overallJump()
else popType.value = 'choice'
}).finally(() => { }).finally(() => {
loading.close() loading.close()
}) })
} }
// 返回选择 重新选择 // 返回选择 重新选择
let backChoice = () => { let backChoice = () => popType.value = "choice"
popType.value = "choice"
}
// 选择身份 // 选择身份
let choiceItem = (key) => { let choiceItem = (key) => {
@@ -126,7 +121,7 @@ let choiceItem = (key) => {
let overallJump = () => { let overallJump = () => {
router.push(`/edit?intermediary=${identityKey.value}`) router.push(`/edit?intermediary=${identityKey.value}`)
emit('close'); popType.value = ''
} }
let confirmIntermediary = (isintermediary) => { let confirmIntermediary = (isintermediary) => {
@@ -135,7 +130,7 @@ let confirmIntermediary = (isintermediary) => {
proxy.$post("/tenement/pc/api/publish/submitidentity", { proxy.$post("/tenement/pc/api/publish/submitidentity", {
isintermediary isintermediary
}).then(res => { }).then(res => {
emit('close'); popType.value = ''
}) })
} }
@@ -143,9 +138,19 @@ let confirmIntermediary = (isintermediary) => {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.btn {
position: absolute;
top: 0;
left: 0;
// background-color: #50e3c2;
width: 100%;
height: 100%;
}
.pop-mask { .pop-mask {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0;
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
background: rgba(0, 0, 0, 0.817647058823529); background: rgba(0, 0, 0, 0.817647058823529);

View File

@@ -13,7 +13,8 @@
</div> </div>
<div class="dis-f al-item pos-r"> <div class="dis-f al-item pos-r">
<el-input v-model="seachAllType.keyword" placeholder="搜索房源或输入房源ID" @keyup.enter='seachList' <el-input v-model="seachAllType.keyword" placeholder="搜索房源或输入房源ID" @keyup.enter='seachList'
@blur="setHistoryShow" @focus="setHistoryShow" style="height:48px;width:460px;background:rgba(246, 246, 246, 1);"></el-input> @blur="setHistoryShow" @focus="setHistoryShow"
style="height:48px;width:460px;background:rgba(246, 246, 246, 1);"></el-input>
<div class="seach-btn dis-f al-item jus-x" @click="seachList"> <div class="seach-btn dis-f al-item jus-x" @click="seachList">
<img src="../../assets/homeImage/seachImg.svg" class="img" alt=""> <img src="../../assets/homeImage/seachImg.svg" class="img" alt="">
搜索 搜索
@@ -49,9 +50,10 @@
<img src="../assets/homeImage/mapImg.png" class="img" alt=""> <img src="../assets/homeImage/mapImg.png" class="img" alt="">
地图找房 地图找房
</div> --> </div> -->
<div class="tool-btn dis-f jus-x al-item add-btn"> <div class="tool-btn dis-f jus-x al-item add-btn" style="position: relative;">
<img src="../../assets/homeImage/addBtn.png" class="img" alt=""> <img src="../../assets/homeImage/addBtn.png" class="img" alt="">
发布房源 发布房源
<choosing-identity></choosing-identity>
</div> </div>
<div class=" dis-f jus-x al-item authentication-btn" v-if="routePath === '/personHousing'"> <div class=" dis-f jus-x al-item authentication-btn" v-if="routePath === '/personHousing'">
<img src="../../assets/homeImage/authenticationBtnImg.png" class="text-img" alt=""> <img src="../../assets/homeImage/authenticationBtnImg.png" class="text-img" alt="">
@@ -91,6 +93,7 @@
import { ref, watchEffect, reactive, defineProps } from 'vue'; import { ref, watchEffect, reactive, defineProps } from 'vue';
import seachInfo from '../indexSeachInfo/indexSeachInfo.vue'; import seachInfo from '../indexSeachInfo/indexSeachInfo.vue';
import selectTabBox from "../selectTabBox/selectTabBox.vue"; import selectTabBox from "../selectTabBox/selectTabBox.vue";
import choosingIdentity from '@/components/edit/choosingIdentity.vue'
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import store from '../../store/index'; import store from '../../store/index';
import api from "../../utils/api"; import api from "../../utils/api";
@@ -164,13 +167,13 @@ let seachList = (item) => {
if (historyArr.data.indexOf(seachAllType.keyword) === -1) { if (historyArr.data.indexOf(seachAllType.keyword) === -1) {
historyArr.data.push(seachAllType.keyword) historyArr.data.push(seachAllType.keyword)
} }
if (string.replace(/\s/g, ""))localStorage.setItem('historyArr', JSON.stringify(historyArr.data)); if (string.replace(/\s/g, "")) localStorage.setItem('historyArr', JSON.stringify(historyArr.data));
route.push({ route.push({
path: '/seachPage', path: '/seachPage',
query: { query: {
keyword: seachAllType.keyword, keyword: seachAllType.keyword,
isNeedHousing:routePath.value === '/needHousing', isNeedHousing: routePath.value === '/needHousing',
houseingPageType:routePath.value === '/needHousing'?6:routePath.value === '/intermediaryHousing'?1:routePath.value === '/personHousing'?0:0 houseingPageType: routePath.value === '/needHousing' ? 6 : routePath.value === '/intermediaryHousing' ? 1 : routePath.value === '/personHousing' ? 0 : 0
} }
}) })
} }
@@ -455,7 +458,8 @@ defineExpose({
} }
} }
} }
::v-deep .el-input__wrapper{
::v-deep .el-input__wrapper {
background: rgba(246, 246, 246, 1); background: rgba(246, 246, 246, 1);
} }
</style> </style>

View File

@@ -29,13 +29,18 @@ const routes = [
path: '/edit', path: '/edit',
name: 'edit', name: 'edit',
component: () => import(/* webpackChunkName: "edit" */ '@/views/edit.vue'), component: () => import(/* webpackChunkName: "edit" */ '@/views/edit.vue'),
meta: {
path:'/edit'
}
}, },
{ {
path: '/user', path: '/user',
name: 'user', name: 'user',
component: () => import(/* webpackChunkName: "user" */ '@/views/user.vue'), component: () => import(/* webpackChunkName: "user" */ '@/views/user.vue'),
meta: { meta: {
title: "我的" title: "我的",
path:'/user'
} }
}, },
{ {

View File

@@ -13,6 +13,8 @@
<empty-duck :hintTextTwo="'建议放宽筛选条件'"></empty-duck> <empty-duck :hintTextTwo="'建议放宽筛选条件'"></empty-duck>
</div> </div>
<div class="bottom-tps" v-if="list.length != 0 && page == 0">- 到底了 -</div>
<have-questions></have-questions> <have-questions></have-questions>
<!-- 页尾 --> <!-- 页尾 -->
@@ -149,4 +151,12 @@ const handleTransfer = (data) => {
justify-content: center; justify-content: center;
margin: 0 auto; margin: 0 auto;
} }
.bottom-tps {
font-weight: 400;
font-size: 14px;
color: #555555;
text-align: center;
padding: 30px 0;
}
</style> </style>

View File

@@ -35,7 +35,7 @@
<img class="operate-icon" src="@/assets/img/publicImage/add-icon.svg"> <img class="operate-icon" src="@/assets/img/publicImage/add-icon.svg">
</div> </div>
<div class="operate-text">发布房源</div> <div class="operate-text">发布房源</div>
<about-pop></about-pop> <choosing-identity></choosing-identity>
</div> </div>
<template v-if="user.identity != 0"> <template v-if="user.identity != 0">
<img class="" src="@/assets/img/publicImage/cut-off-rule.svg"> <img class="" src="@/assets/img/publicImage/cut-off-rule.svg">
@@ -86,6 +86,10 @@
<empty-duck></empty-duck> <empty-duck></empty-duck>
</div> </div>
<div class="bottom-tps"
v-if="(tabState == 'fav' && favData['list'].length != 0 && favData['page'] == 0) || (tabState == 'publish' && publishData['list'].length != 0 && publishData['page'] == 0)">
- 到底了 -</div>
<!-- 有疑问 --> <!-- 有疑问 -->
<have-questions></have-questions> <have-questions></have-questions>
@@ -103,7 +107,7 @@ import haveQuestions from '@/components/public/have-questions.vue'
import pageFooter from '@/components/footer/footer.vue' import pageFooter from '@/components/footer/footer.vue'
import publicListItem from '@/components/public/public-list-item.vue' import publicListItem from '@/components/public/public-list-item.vue'
import emptyDuck from '@/components/public/empty-duck.vue' import emptyDuck from '@/components/public/empty-duck.vue'
import aboutPop from '@/components/edit/about-pop.vue' import choosingIdentity from '@/components/edit/choosingIdentity.vue'
import { ref, reactive, onMounted, onUnmounted, getCurrentInstance, nextTick } from 'vue' import { ref, reactive, onMounted, onUnmounted, getCurrentInstance, nextTick } from 'vue'
import { useRoute, useRouter } from 'vue-router'; import { useRoute, useRouter } from 'vue-router';
@@ -525,4 +529,11 @@ onUnmounted(() => {
align-items: center; align-items: center;
border-radius: 16px; border-radius: 16px;
} }
.bottom-tps {
font-weight: 400;
font-size: 14px;
color: #555555;
text-align: center;
padding: 30px 0;
}
</style> </style>