修改
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
<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 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="please-choose">请选择:</div>
|
||||
<div class="choice-box flexflex flex1">
|
||||
@@ -35,8 +36,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<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-else class="footer-item flexcenter" @click="confirmIntermediary(-1)">我不是中介</div>
|
||||
<div class="footer-item affirm flexcenter" @click="confirmIntermediary(1)">{{ popType == 'agent' ?
|
||||
@@ -57,14 +56,9 @@ import { useRouter } from 'vue-router'
|
||||
const { proxy } = getCurrentInstance()
|
||||
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 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>”;如您已上架个人房源或求房源信息,在你确认中介身份后,将会自动下架`])
|
||||
|
||||
@@ -75,15 +69,17 @@ let rulesList = ref([`中介账号(未认证)最多可同时上架 <span sty
|
||||
let showList = ref([]) //展示的规则
|
||||
|
||||
let identityKey = ref(1)
|
||||
// let identityKey = ref(6)
|
||||
|
||||
let housingnum = ref(0)
|
||||
let isintermediary = ref(0)
|
||||
let loading = ref(null) // 加载
|
||||
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
|
||||
// 点击按钮
|
||||
const ClickBtn = () => {
|
||||
if (identityList.value.length == 0) init()
|
||||
else popType.value = 'choice'
|
||||
}
|
||||
|
||||
async function init() {
|
||||
loading = ElLoading.service({
|
||||
@@ -92,7 +88,6 @@ async function init() {
|
||||
background: 'rgba(0, 0, 0, 0.7)',
|
||||
})
|
||||
|
||||
// if (identityList.value > 0) return
|
||||
proxy.$post("/tenement/pc/api/publish/checkidentity").then(res => {
|
||||
if (res.code != 200) return
|
||||
let data = res.data
|
||||
@@ -100,15 +95,15 @@ async function init() {
|
||||
housingnum.value = data.housingnum
|
||||
isintermediary.value = data.isintermediary
|
||||
if (data['ispopup'] == 0) overallJump()
|
||||
else popType.value = 'choice'
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
}
|
||||
|
||||
// 返回选择 重新选择
|
||||
let backChoice = () => {
|
||||
popType.value = "choice"
|
||||
}
|
||||
let backChoice = () => popType.value = "choice"
|
||||
|
||||
|
||||
// 选择身份
|
||||
let choiceItem = (key) => {
|
||||
@@ -126,7 +121,7 @@ let choiceItem = (key) => {
|
||||
|
||||
let overallJump = () => {
|
||||
router.push(`/edit?intermediary=${identityKey.value}`)
|
||||
emit('close');
|
||||
popType.value = ''
|
||||
}
|
||||
|
||||
let confirmIntermediary = (isintermediary) => {
|
||||
@@ -135,7 +130,7 @@ let confirmIntermediary = (isintermediary) => {
|
||||
proxy.$post("/tenement/pc/api/publish/submitidentity", {
|
||||
isintermediary
|
||||
}).then(res => {
|
||||
emit('close');
|
||||
popType.value = ''
|
||||
})
|
||||
|
||||
}
|
||||
@@ -143,9 +138,19 @@ let confirmIntermediary = (isintermediary) => {
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.btn {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
// background-color: #50e3c2;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.pop-mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: rgba(0, 0, 0, 0.817647058823529);
|
||||
|
||||
Reference in New Issue
Block a user