跳转改为打开新页面

This commit is contained in:
2023-08-03 16:08:58 +08:00
parent 3900d5cc49
commit 56fa9e96d1
6 changed files with 47 additions and 26 deletions

View File

@@ -184,12 +184,15 @@ let watchInfo = () => {
store.state.seachSelect['seachPage'][key] = seachData[key] store.state.seachSelect['seachPage'][key] = seachData[key]
} }
} }
router.push({ // console.log(document.location.origin)
path: '/detail', // return
query: { window.open(`${document.location.origin}/detail?id=${data.data.uniqid}`)
id: data.data.uniqid, // router.push({
} // path: '/detail',
}) // query: {
// id: data.data.uniqid,
// }
// })
} }
onMounted(() => { onMounted(() => {

View File

@@ -116,13 +116,15 @@ location.data = store.state.indexData.config.location
let router = useRouter() let router = useRouter()
let watchInfo = () => { let watchInfo = () => {
router.push({ // console.log(router,window.location.href)
path: itemData.type === 'apartment' ? '/apartmentDetail' : '/detail', window.open(`${router,window.location.href}${itemData.type === 'apartment' ? 'apartmentDetail' : 'detail'}?${itemData.type == 'apartment' ? "uniqid" : "id"}=${itemData.type == 'apartment' ? itemData.id : itemData.uniqid}`)
query: { // router.push({
// id: itemData.type=='apartment'?itemData.id:itemData.uniqid, // path: itemData.type === 'apartment' ? '/apartmentDetail' : '/detail',
[itemData.type == 'apartment' ? "uniqid" : "id"]: itemData.type == 'apartment' ? itemData.id : itemData.uniqid // query: {
} // // id: itemData.type=='apartment'?itemData.id:itemData.uniqid,
}) // [itemData.type == 'apartment' ? "uniqid" : "id"]: itemData.type == 'apartment' ? itemData.id : itemData.uniqid
// }
// })
} }
let watchAdv = () => { let watchAdv = () => {

View File

@@ -450,7 +450,7 @@ let getLocationData = (data) => {
//更新当前数据数量 //更新当前数据数量
let setListCount = (item, num) => { let setListCount = (item, num) => {
console.log(item, num) // console.log(item, num)
// console.log(seachKey.key) // console.log(seachKey.key)
if (item.tabType === "intermediary") { if (item.tabType === "intermediary") {
seachKey.key['intermediary']['count'] = num seachKey.key['intermediary']['count'] = num

View File

@@ -120,11 +120,6 @@ const router = createRouter({
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
//导航数据
if (/['needHousing','intermediaryHousing','personHousing']/.test(from.path)) {
store.state.routeList.secondaryIndex.title = from.meta.title
store.state.routeList.secondaryIndex.path = from.meta.path
}
next() next()
let meta = to['meta'] || {} let meta = to['meta'] || {}
let title = meta['title'] let title = meta['title']

View File

@@ -355,7 +355,10 @@ onBeforeUnmount(() => {
}) })
// 公共跳转 // 公共跳转
const publicJump = path => router.push(path) const publicJump = path => {
//router.push(path)
window.open(`${document.location.origin}${path}`)
}
</script> </script>

View File

@@ -514,7 +514,8 @@
<!-- <img src="../assets/img/detail/line.svg" class="line-img" alt=""> --> <!-- <img src="../assets/img/detail/line.svg" class="line-img" alt=""> -->
<div class="dis-f al-item s-w-100" style="position:absolute;"> <div class="dis-f al-item s-w-100" style="position:absolute;">
<div class="line-school-box dis-f al-item" style="justify-content:space-around;"> <div class="line-school-box dis-f al-item" style="justify-content:space-around;">
<div v-for="(item, i) in distanceList" class="box-text" :key="item && item.id"> <div v-for="(item, i) in distanceList" class="box-text" :key="item && item.id"
v-show="i < 9&&item.id">
<div :class="{ 'far-s': item && item.recently_distance > 4 }" <div :class="{ 'far-s': item && item.recently_distance > 4 }"
v-if="item && !item.address" class="text-c"> v-if="item && !item.address" class="text-c">
{{ item && item.recently_distance }}km {{ item && item.recently_distance }}km
@@ -556,10 +557,10 @@
<div class="houseing-info-box dis-f al-item jus-bet"> <div class="houseing-info-box dis-f al-item jus-bet">
<div class="dis-f al-item"> <div class="dis-f al-item">
房源ID : &nbsp<span class="houseing-id" @click="clone(housingInfo['data'] && 房源ID : &nbsp<span class="houseing-id" @click="clone(housingInfo['data'] &&
housingInfo['data'].info.uid)">{{ housingInfo['data'] housingInfo['data'].info.id)">{{ housingInfo['data'] && housingInfo['data'].info.id
&& housingInfo['data'].info.uid }}</span> }}</span>
<span class="browse-box"> <span class="browse-box">
浏览 : <span class="text">{{ housingInfo['data'] && housingInfo['data'].info.count_view 浏览 :<span class="text">{{ housingInfo['data'] && housingInfo['data'].info.count_view
}}</span> }}</span>
</span> </span>
</div> </div>
@@ -1174,8 +1175,10 @@ let clone = (text) => {
document.body.removeChild(textareaEle); document.body.removeChild(textareaEle);
ElMessage({ ElMessage({
message: '复制成功', message: '复制成功',
type: 'success',
center: true, center: true,
offset: 320,
duration:1000,
customClass: 'message-info'
}) })
} }
@@ -2725,7 +2728,7 @@ img {
.show-distance-info-box { .show-distance-info-box {
border-width: 1px; border-width: 1px;
border-style: solid; /* border-style: solid; */
border-color: rgba(235, 235, 235, 1); border-color: rgba(235, 235, 235, 1);
-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);
@@ -2967,4 +2970,19 @@ img {
z-index: 999; z-index: 999;
} }
</style> </style>
<style>
.message-info {
background: #000000;
border-color: #000000;
color: #fff;
.el-message__content {
color: #fff;
}
.el-icon {
display: none;
}
}
</style>