列表底部组件,和通知弹窗样式

This commit is contained in:
A1300399510
2023-07-13 19:31:51 +08:00
parent 42495d8e5e
commit fbfae2d4fc
9 changed files with 99 additions and 56 deletions

2
package-lock.json generated
View File

@@ -5,7 +5,7 @@
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "zufang", "name": "港校租房",
"version": "0.1.0", "version": "0.1.0",
"dependencies": { "dependencies": {
"axios": "^1.4.0", "axios": "^1.4.0",

View File

@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<!-- <link rel="icon" href="./favicon.ico"> --> <!-- <link rel="icon" href="./favicon.ico"> -->
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title> <title>港校租房</title>
</head> </head>
<body> <body>
<noscript> <noscript>

View File

@@ -1,8 +1,7 @@
<template> <template>
<div class="pop-mask flexcenter" v-if="choicePopState"> <div class="pop-mask flexcenter">
<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" 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">
@@ -49,7 +48,9 @@
<!-- <script> --> <!-- <script> -->
<script setup> <script setup>
import { ref, reactive, onMounted, getCurrentInstance } from 'vue' import { ElLoading } from 'element-plus'
import { ref, reactive, onMounted, getCurrentInstance, defineEmits } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
@@ -57,7 +58,8 @@ const router = useRouter()
let html = `中介账号只能发布“<span style="color: #000; font-weight:650;">中介房源</span>”,如您已上架个人房源或求房源信息,在你确认中介身份后,将会自动下架;` let html = `中介账号只能发布“<span style="color: #000; font-weight:650;">中介房源</span>”,如您已上架个人房源或求房源信息,在你确认中介身份后,将会自动下架;`
let choicePopState = ref(true) // 弹窗的状态 // let choicePopState = ref(true) // 弹窗的状态
const emit = defineEmits(['close'])
let identityList = ref([]) let identityList = ref([])
@@ -83,11 +85,11 @@ onMounted(() => {
}) })
async function init() { async function init() {
// loading = ElLoading.service({ loading = ElLoading.service({
// lock: true, lock: true,
// text: 'Loading', text: 'Loading',
// background: 'rgba(0, 0, 0, 0.7)', background: 'rgba(0, 0, 0, 0.7)',
// }) })
// if (identityList.value > 0) return // if (identityList.value > 0) return
proxy.$post("/tenement/pc/api/publish/checkidentity").then(res => { proxy.$post("/tenement/pc/api/publish/checkidentity").then(res => {
@@ -98,7 +100,7 @@ async function init() {
isintermediary.value = data.isintermediary isintermediary.value = data.isintermediary
if (data['ispopup'] == 0) overallJump() if (data['ispopup'] == 0) overallJump()
}).finally(() => { }).finally(() => {
// loading.close() loading.close()
}) })
} }
@@ -122,9 +124,8 @@ let choiceItem = (key) => {
} }
let overallJump = () => { let overallJump = () => {
choicePopState.value = false
console.log("11", identityKey.value);
router.push(`/edit?intermediary=${identityKey.value}`) router.push(`/edit?intermediary=${identityKey.value}`)
emit('close');
} }
let confirmIntermediary = (isintermediary) => { let confirmIntermediary = (isintermediary) => {
@@ -133,7 +134,7 @@ let confirmIntermediary = (isintermediary) => {
proxy.$post("/tenement/pc/api/publish/submitidentity", { proxy.$post("/tenement/pc/api/publish/submitidentity", {
isintermediary isintermediary
}).then(res => { }).then(res => {
choicePopState.value = false emit('close');
}) })
} }
@@ -142,9 +143,12 @@ let confirmIntermediary = (isintermediary) => {
<style lang="less" scoped> <style lang="less" scoped>
.pop-mask { .pop-mask {
position: fixed;
top: 0;
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
background: rgba(0, 0, 0, 0.117647058823529); background: rgba(0, 0, 0, 0.817647058823529);
z-index: 1000;
} }
.pop-box { .pop-box {

View File

@@ -1,6 +1,6 @@
<template> <template>
<div class="regular-box"> <div class="regular-box">
<div class="btn-s first-bg" @click=""> <div class="btn-s first-bg" @click="choicePopState = true">
<img src="../../assets/homeImage/indexRegularFirst.png" class="first" alt=""> <img src="../../assets/homeImage/indexRegularFirst.png" class="first" alt="">
</div> </div>
<div class="btn-s other-bg mg-t-15"> <div class="btn-s other-bg mg-t-15">
@@ -15,10 +15,14 @@
</div> </div>
</el-badge> </el-badge>
</div> </div>
<!-- 身份弹窗 -->
<choosing-identity v-if="choicePopState" @close="choicePopState = false"></choosing-identity>
</template> </template>
<script setup> <script setup>
import { ref } from 'vue'
import choosingIdentity from '@/components/edit/choosingIdentity.vue'
let choicePopState = ref(false)
</script> </script>
<script> <script>
export default { export default {

View File

@@ -0,0 +1,28 @@
<template>
<!-- 有疑问 -->
<div class="flexcenter" style="padding: 78px 0;">
<el-popover placement="bottom" popper-class="have-questions flexcenter" :width="160" trigger="hover"
popper-style="border-radius: 14px;padding: 20px;">
<template #reference>
<div class="have-questions flexcenter">
<div class="have-questions-text flexacenter">有疑问来找<img class="smiling"
src="@/assets/img/publicImage/smiling.png">寄托方同学</div>
<div class="have-questions-btn flexcenter">
<img class="have-questions-icon" src="@/assets/img/publicImage/QR-code.svg" />扫码加微信
</div>
</div>
</template>
<img class="QR-code" :src="wechat['wechatqrcode']" alt="">
</el-popover>
</div>
</template>
<script setup>
import { toRefs } from 'vue';
import { useStore } from 'vuex';
const store = useStore();
const { wechat } = toRefs(store.state);
</script>
<style lang="less" scoped></style>

View File

@@ -10,13 +10,13 @@
</div> </div>
<!--
<div class="attention flexacenter"> <div class="attention flexacenter">
<div class="attention-text"></div> <div class="attention-text">关注寄托服务号第一时间收到消息通知</div>
<div class="attention-btn"></div> <div class="attention-btn flexcenter">关注</div>
</div> </div>
<div class="list"></div> --> <div class="list"></div>
</div> </div>
</div> </div>
@@ -65,14 +65,31 @@
} }
.attention { .attention {
// margin: 0 auto; margin: -26px auto 0;
// width: 660px; width: 660px;
// height: 50px; height: 50px;
// background-color: rgba(255, 255, 255, 1); background-color: rgba(255, 255, 255, 1);
// border-radius: 230px; border-radius: 230px;
// -moz-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.0784313725490196); -moz-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.0784313725490196);
// -webkit-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.0784313725490196); -webkit-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.0784313725490196);
// box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.0784313725490196); box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.0784313725490196);
font-size: 14px;
color: #7F7F7F;
justify-content: space-between;
padding-left: 16px;
padding-right: 8px;
.attention-btn {
width: 80px;
height: 36px;
background-color: rgba(253, 218, 85, 1);
border-radius: 54px;
font-family: 'PingFangSC-Regular', 'PingFang SC', sans-serif;
font-weight: 400;
font-size: 14px;
color: #000000;
cursor: pointer;
}
} }
} }
</style> </style>

View File

@@ -42,7 +42,8 @@ api.index().then(res => {
store.state.ListSelectBtn = res.data.recommendedTab store.state.ListSelectBtn = res.data.recommendedTab
store.state.user = res.data.user store.state.user = res.data.user
store.state.nav = res.data.nav store.state.nav = res.data.nav
console.log(store.state.seachTypeData) store.state.wechat = res.data.wechat
// console.log(store.state.seachTypeData)
} }
}) })

View File

@@ -5,8 +5,9 @@ export default createStore({
seachTypeData: [], seachTypeData: [],
indexData: [], indexData: [],
ListSelectBtn: [], ListSelectBtn: [],
user:{}, user: {}, // 我的信息数据
nav:[], wechat: {}, // 微信号 二维码等数据
nav: [], // 顶部的导航数据
}, },
getters: { getters: {

View File

@@ -39,7 +39,7 @@
</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">
<el-popover placement="bottom" :width="360" trigger="click" :show-arrow="false" <el-popover placement="bottom" :width="360" trigger="hover" :show-arrow="false"
popper-style="background: transparent;padding:0;box-shadow: none;border: none;"> popper-style="background: transparent;padding:0;box-shadow: none;border: none;">
<template #reference> <template #reference>
<div class="operate-item flexcenter identity"> <div class="operate-item flexcenter identity">
@@ -65,23 +65,9 @@
</div> </div>
<!-- 有疑问 --> <!-- 有疑问 -->
<div class="flexcenter" style="padding: 78px 0;"> <have-questions></have-questions>
<el-popover placement="bottom" popper-class="have-questions flexcenter" :width="160" trigger="hover"
popper-style="border-radius: 14px;padding: 20px;"> <page-footer></page-footer>
<template #reference>
<div class="have-questions flexcenter">
<div class="have-questions-text flexacenter">有疑问来找<img class="smiling"
src="@/assets/img/publicImage/smiling.png">寄托方同学</div>
<div class="have-questions-btn flexcenter">
<img class="have-questions-icon" src="@/assets/img/publicImage/QR-code.svg" />扫码加微信
</div>
</div>
</template>
<img class="QR-code"
src="https://oss.gter.net/Zvt57TuJSUvkyhw-xG7Y2l-S_J8rcn3qqsgFptxhXa6RWi26P-BuTQQWELrL49kb8MVYZjQ0Mjk~"
alt="">
</el-popover>
</div>
<!-- 系统通知弹窗 --> <!-- 系统通知弹窗 -->
<systematic-notification-pop></systematic-notification-pop> <systematic-notification-pop></systematic-notification-pop>
@@ -90,6 +76,8 @@
<script setup> <script setup>
import headerNav from '@/components/public/head.vue' import headerNav from '@/components/public/head.vue'
import systematicNotificationPop from '@/components/user/systematic-notification-pop.vue' import systematicNotificationPop from '@/components/user/systematic-notification-pop.vue'
import haveQuestions from '@/components/public/have-questions.vue'
import pageFooter from '@/components/footer/footer.vue'
import { ref, reactive, onMounted, getCurrentInstance } from 'vue' import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
@@ -113,7 +101,7 @@ async function init() {
proxy.$post("/tenement/v2/api/user").then(res => { proxy.$post("/tenement/v2/api/user").then(res => {
if (res.code != 200) return if (res.code != 200) return
let data = res.data let data = res.data
data.user['identity'] = -1 // data.user['identity'] = 1
user.value = data.user user.value = data.user
count.value = data.count count.value = data.count
newmessagenum.value = data.newmessagenum newmessagenum.value = data.newmessagenum