添加身份弹窗

This commit is contained in:
A1300399510 2023-07-13 11:38:29 +08:00
parent 6ad28c4f0a
commit 93e55767c5
7 changed files with 59 additions and 34 deletions

View File

@ -1,19 +1,11 @@
<template>
<router-view />
</template>
<script>
<script setup>
import { useRouter } from 'vue-router'
const router = useRouter()
export default ({
setup() {
},
data() {
return {
};
},
})
// router.push(`/edit-choosing`)
</script>
<style>

View File

@ -2,7 +2,7 @@
<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" />
<!-- <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">
@ -51,6 +51,7 @@
<script setup>
import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
import { useRouter } from 'vue-router'
import { ElLoading } from 'element-plus'
const { proxy } = getCurrentInstance()
const router = useRouter()
@ -71,17 +72,24 @@ let rulesList = ref([`中介账号(未认证)最多可同时上架 <span sty
let showList = ref([]) //
// let identityKey = ref(1)
let identityKey = ref(6)
let identityKey = ref(1)
// let identityKey = ref(6)
let housingnum = ref(0)
let isintermediary = ref(0)
let loading = ref(null) //
onMounted(() => {
init()
})
async function init() {
loading = ElLoading.service({
lock: true,
text: 'Loading',
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
@ -89,8 +97,10 @@ async function init() {
identityList.value = data.data
housingnum.value = data.housingnum || 10
isintermediary.value = data.isintermediary
if (data['ispopup'] == 1) overallJump()
});
if (data['ispopup'] == 0) overallJump()
}).finally(() => {
loading.close()
})
}
//
@ -114,18 +124,17 @@ let choiceItem = (key) => {
let overallJump = () => {
choicePopState.value = false
console.log("11",identityKey.value);
router.push(`/edit?intermediary=${identityKey.value}`)
}
let confirmIntermediary = (isintermediary) => {
identityKey = 1
if (isintermediary == 1) identityKey.value = 1
overallJump()
proxy.$post("/tenement/pc/api/publish/submitidentity", {
isintermediary
}).then(res => {
choicePopState.value = false
console.log(res);
})
}
@ -144,7 +153,7 @@ let confirmIntermediary = (isintermediary) => {
z-index: 1111;
box-sizing: border-box;
border-radius: 16px;
padding-top: 48px;
padding-top: 39px;
background-color: #ffffff;
// width: 520px;
width: 640px;
@ -163,6 +172,7 @@ let confirmIntermediary = (isintermediary) => {
.please-choose {
color: #555555;
font-size: 14px;
margin-top: 26px;
margin-bottom: 24px;
padding-left: 35px;
}

View File

@ -1,9 +1,8 @@
<template>
<header class="container-header flexflex">
<nav class="header-nav flexacenter">
<div class="header-nav-item" :class="{ pitch: index == 3 }" v-for="(item, index) in navList" :key="index">
{{ item }}</div>
<img class="header-nav-item header-user-img" src="">
<div class="header-nav-item" :class="{ pitch: index == 3 }" v-for="(item, index) in navList" :key="index">{{ item }}</div>
<img class="header-nav-item header-user-img" :src="user.avatar">
</nav>
<div class="logo-box flexacenter">
<img class="logo-icon" src="@/assets/img/edit/logo.png" />
@ -40,7 +39,8 @@ const props = defineProps({
isNoTabList: {
type: Boolean,
default: false
}
},
user: Object,
});
const navList = ["寄托首页", "论坛", "Offer榜", "港校租房", "院校库", "兑换店", "搜索", "招生官", "中外合办院校"]

View File

@ -11,21 +11,28 @@ const routes = [
path: '/about',
name: 'about',
component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
}, {
path: '/choosing-identity',
name: 'edit-choosing',
component: () => import(/* webpackChunkName: "edit-choosing" */ '@/views/edit-choosing.vue')
},
{
path: '/edit',
name: 'edit',
component: () => import(/* webpackChunkName: "about" */ '../views/edit.vue')
component: () => import(/* webpackChunkName: "edit" */ '@/views/edit.vue')
},
{
path: '/user',
name: 'user',
component: () => import(/* webpackChunkName: "about" */ '../views/user.vue')
component: () => import(/* webpackChunkName: "user" */ '@/views/user.vue')
}
]
const router = createRouter({
history: createWebHistory(process.env.BASE_URL),
// history: createWebHistory("/"),
mode: "hash",
// base: process.env.BASE_URL,
routes
})

View File

@ -0,0 +1,9 @@
<template>
<!-- 临时的 -->
<choosing-identity v-if="true"></choosing-identity>
</template>
<script setup>
import choosingIdentity from '@/components/edit/choosingIdentity.vue'
</script>
<style lang="less" scoped></style>

View File

@ -1,7 +1,6 @@
<template>
<header-nav :isNoTabList="true"></header-nav>
<header-nav :isNoTabList="true" :user="user"></header-nav>
<map-component v-if="mapComponentState" :info="info" @choosingLocation="choosingLocation" />
<choosing-identity v-if="false"></choosing-identity>
<div class="content-box flexflex">
<!-- 左边的信息盒子 -->
<user-box :user="user" :type="type" :time="{ timestamp, updatetime, offshelftime }" :status="status"
@ -586,7 +585,7 @@
<div class="flexcenter pop-mask" @click="succeedPopState = 0" v-if="succeedPopState == 1">
<div class="pop succeed-box shadow radius16 flexflex"
:style="{ backgroundImage: `url(${require('@/assets/img/edit/succeed-pop-bj2.svg')})` }" @click.stop="">
<a class="pop-close" :href="skipUrl" style="position: static;">
<a class="pop-close" :href="skipUrl" style="position: static;">
<img class="pop-close" src="@/assets/img/edit/close-icon.svg" />
</a>
<div class="succeed-title flexacenter" style="margin-bottom: 95px;">
@ -665,7 +664,6 @@
<script>
import aboutPop from '@/components/edit/about-pop.vue'
import mapComponent from '@/components/edit/map.vue'
import choosingIdentity from '@/components/edit/choosingIdentity.vue'
import pageFooter from '@/components/footer/footer.vue'
import how from '@/components/edit/how-pop.vue'
import failPop from '@/components/edit/fail-pop.vue'
@ -799,7 +797,6 @@ export default {
components: {
aboutPop,
mapComponent,
choosingIdentity,
pageFooter,
how,
failPop,
@ -1545,6 +1542,15 @@ export default {
padding: 0 20px;
cursor: pointer;
&.pitch {
/deep/ .el-input {
.el-input__inner {
color: #62B1FF;
}
}
}
.el-icon-date:before {
content: "";
}
@ -1567,8 +1573,8 @@ export default {
height: 100%;
border: none;
font-size: 16px;
// color: #555;
color: #62B1FF;
color: #555;
// color: #62B1FF;
padding-left: 0;
/* 修改 FireFox 内核浏览器的输入框提示文本样式 */

View File

@ -2,6 +2,7 @@ const { defineConfig } = require('@vue/cli-service')
const path = require('path')
module.exports = defineConfig({
publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
configureWebpack: {
resolve: {
alias: {