详情图片按钮显示

This commit is contained in:
2023-07-26 17:31:10 +08:00
parent 9d0fffe982
commit 13dacfe5d3
4 changed files with 39 additions and 18 deletions

View File

@@ -175,7 +175,6 @@ let watchInfo = () => {
onMounted(() => {
imgRef = getCurrentInstance()
let {type}=router.currentRoute.value.query
console.log('type',type)
if(type){
pageType.value=type
}else{

View File

@@ -1,6 +1,6 @@
<template>
<div class="waterfall-box" v-if="itemData.type !== 'adv'"
:class="{ 'waterfall-box-housing': itemData.type === 'housing' }">
:class="{ 'waterfall-box-housing': itemData.type === 'housing' }" @click="watchInfo">
<div class="flexflex pos-r">
<div class="box-tab-type" v-if="itemData.intermediarytext">
{{ itemData.intermediarytext }}
@@ -89,6 +89,7 @@
<script setup>
import { defineProps, reactive } from 'vue'
import store from '../../store/index';
import { useRouter } from 'vue-router'
const props = defineProps({
data: {
type: Object,
@@ -101,6 +102,18 @@ let itemData = props.data
let location=reactive({data:{}})
location.data=store.state.indexData.config.location
let router=useRouter()
let watchInfo=()=>{
console.log(itemData.type)
router.push({
path:itemData.type==='apartment'?'/apartmentDetail':'/detail',
query: {
id: itemData.type=='apartment'?itemData.id:itemData.uniqid,
type:itemData.intermediary=='1'?2:itemData.intermediary=='6'?3:!itemData.intermediary?'':1
}
})
}
let watchAdv=()=>{
}