修改背景bug

This commit is contained in:
A1300399510
2023-07-12 19:07:15 +08:00
parent 773be0659b
commit 5dcf49533d
3 changed files with 245 additions and 226 deletions

View File

@@ -1,17 +1,14 @@
<template>
<div class="pop-mask flexcenter">
<div class="pop-box">
<div class="pop-mask flexcenter" v-if="choicePopState">
<div class="pop-box" :style="{ width: popType == 'choice' ? '520px' : '' }">
<div v-if="popType == 'choice'">
<img class="close-icon" src="@/assets/img/edit/close-icon.svg" />
<div class="pop-header flexcenter">发布房源</div>
<div class="please-choose">请选择</div>
<div class="choice-box flexflex flex1">
<div v-for="(item, index) in identityList" :key="index">
<!-- return index === items.length - 1 && index % 2 !== 0; -->
<!-- <div v-if="index != identityList.length - 1" class="choice-item" @click="choiceItem(item.key)"> -->
<div v-if="index == identityList.length - 1 && index % 2 !== 0"
class="choice-long-item flexacenter" @click="choiceItem(item.key)">
<div v-if="index == identityList.length - 1 && index % 2 !== 1" class="choice-long-item flexacenter"
@click="choiceItem(item.key)">
<div class="choice-long-left">
<div class="choice-name">{{ item.value }}</div>
<div class="choice-explain">{{ item.desc }}</div>
@@ -32,14 +29,18 @@
<div class="affirm-hint affirm-a-hint" v-if="popType == 'agent'">确认中介身份后将不能更改</div>
<div class="affirm-hint affirm-b-hint" v-else>由于您上架的房源信息中包括了中介房源系统需要确认您是否属于中介身份</div>
<div class="rules-box">
<div class="rules-item flexflex" v-for="item in 2" :key="item">
<div class="rules-item flexflex" v-for="(item, index) in showList" :key="index">
<img class="rules-icon" src="@/assets/img/edit/green-arrow.svg" alt="">
<div class="rules-text" v-html="html"></div>
<div class="rules-text" v-html="item"></div>
</div>
</div>
<div class="footer flexcenter">
<div class="footer-item flexcenter" @click="backChoice">重新选择</div>
<div class="footer-item affirm flexcenter">确认并继续</div>
<!-- <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' ?
'确认并继续' : '我是中介' }}</div>
</div>
</div>
</div>
@@ -49,81 +50,49 @@
<!-- <script> -->
<script setup>
import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
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) // 弹窗的状态
let identityList = ref([])
let popType = ref('choice') // choice agent: 确认是否是中介(有个人房源) affirmAgent: 确认是否是中介(有中介房源)
let agent = ref([{
content: `中介账号发布的房源信息,均展示在“<span style="color: #000; font-weight:650;">中介房源</span>”频道中,即不能发布“<span style="color: #000; font-weight:650;">个人房源</span>”、“<span style="color: #000; font-weight:650;">求房源</span>”;如您已上架个人房源或求房源信息,在你确认中介身份后,将会自动下架`,
type: 1,
}])
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 affirmAgent = ref([{
content: `个人账号只能发布“<span style="color: #000; font-weight:650;">个人房源</span>”、“<span style="color: #000; font-weight:650;">求房源</span>”,在您确认不是中介身份后,将会自动下架您的中介房源;`,
type: 1,
}, {
content: `中介账号只能发布“<span style="color: #000; font-weight:650;">中介房源</span>”,如您已上架个人房源或求房源信息,在你确认中介身份后,将会自动下架;`,
type: 1,
}])
let affirmAgent = 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 rulesList = ref([{
content: `中介账号(未认证)最多可同时上架 <span style="color: #000; font-weight:650;">3</span> 条房源信息`,
type: 1,
}, {
content: `中介账号(有认证)最多可同时上架 <span style="color: #000; font-weight:650;">20</span> 条房源信息`,
type: 1,
}, {
content: `中介帐号(有认证)拥有搜索、过滤“<span style="color: #000; font-weight:650;">求房源</span>”信息的功能`,
type: 1,
}])
let rulesList = ref([`中介账号(未认证)最多可同时上架 <span style="color: #000; font-weight:650;">3</span> 条房源信息`, `中介账号(有认证)最多可同时上架 <span style="color: #000; font-weight:650;">20</span> 条房源信息`, `中介帐号(有认证)拥有搜索、过滤“<span style="color: #000; font-weight:650;">求房源</span>”信息的功能`,])
let showList = ref([]) //展示的规则
// let identityKey = ref(1)
let identityKey = ref(6)
let housingnum = ref(0)
let isintermediary = ref(0)
onMounted(() => {
init()
})
async function init() {
// if (identityList.value > 0) return
proxy.$post("/tenement/pc/api/publish/checkidentity").then(res => {
if (res.code != 200) return
let data = res.data
console.log("data", data);
// identityList.value = data.data
identityList.value = [
{
"key": 3,
"value": "我是房东",
"desc": "出租自有物业"
},
{
"key": 1,
"value": "我是中介",
"desc": "持有房产代理牌照"
},
{
"key": 4,
"value": "有房招室友",
"desc": "我已租房,需要招室友"
},
{
"key": 5,
"value": "其他",
"desc": "二房东、物业租赁公司等"
}
]
// if (data['ispopup'] == 1) {
// }
identityList.value = data.data
housingnum.value = data.housingnum || 10
isintermediary.value = data.isintermediary
if (data['ispopup'] == 1) overallJump()
});
}
// 返回选择 重新选择
let backChoice = () => {
popType.value = "choice"
@@ -131,51 +100,35 @@ let backChoice = () => {
// 选择身份
let choiceItem = (key) => {
console.log(key, "key");
identityKey.value = key
if (key == 1) {
popType.value = "agent"
showList.value = [...agent.value, ...rulesList.value]
} else {
showList.value = [...affirmAgent.value, ...rulesList.value]
if (housingnum.value == 0) overallJump()
else popType.value = "affirmAgent"
}
}
// /tenement/pc/api/publish/checkidentity
// export default {
// name: 'GterFangChoosingIdentity',
let overallJump = () => {
choicePopState.value = false
router.push(`/edit?intermediary=${identityKey.value}`)
}
// data() {
// return {
// visible: false,
// choiceTypeState: true,
// popType: "choice", //
// identityList: [{
// desc: "出租自有物业",
// key: 3,
// value: "我是房东",
// }, {
// desc: "持有房产代理牌照",
// key: 1,
// value: "我是中介",
// }, {
// desc: "我已租房,需要招室友",
// key: 4,
// value: "有房招室友",
// }, {
// desc: "二房东、物业租赁公司等",
// key: 5,
// value: "其他",
// }, {
// desc: "发布找房源的需求",
// key: 6,
// value: "求房源",
// }]
// };
// },
let confirmIntermediary = (isintermediary) => {
identityKey = 1
overallJump()
// mounted() {
// },
// methods: {
// },
// };
proxy.$post("/tenement/pc/api/publish/submitidentity", {
isintermediary
}).then(res => {
choicePopState.value = false
console.log(res);
})
}
</script>
@@ -193,7 +146,8 @@ let choiceItem = (key) => {
border-radius: 16px;
padding-top: 48px;
background-color: #ffffff;
width: 520px;
// width: 520px;
width: 640px;
-moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.117647058823529);
-webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.117647058823529);
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.117647058823529);
@@ -308,22 +262,21 @@ let choiceItem = (key) => {
color: #333333;
margin: 0 auto;
text-align: left;
padding: 0 30px;
}
.affirm-a-hint {
font-size: 15px;
text-align: center;
margin-top: 20px;
}
.affirm-b-hint {
font-size: 27px;
margin: 36px auto 0;
}
.rules-box {
background: rgba(246, 246, 246, 1);
margin: 20px;
margin: 30px;
border-radius: 10px;
padding: 15px;
@@ -336,13 +289,14 @@ let choiceItem = (key) => {
.rules-text {
padding: 20px 0;
font-size: 15px;
}
}
.rules-icon {
width: 20px;
height: 20px;
margin-top: 23px;
width: 15px;
height: 15px;
margin-top: 25px;
margin-right: 12px;
}
}
@@ -353,7 +307,7 @@ let choiceItem = (key) => {
border-top: 1px solid #ebebeb;
.footer-item {
width: 180px;
width: 200px;
height: 50px;
border-radius: 40px;
font-size: 20px;
@@ -370,7 +324,6 @@ let choiceItem = (key) => {
border: none;
background-color: rgba(98, 177, 255, 1);
color: #ffffff;
font-size: 22px;
font-weight: 650;
}