公寓详情加收藏和附近学校

This commit is contained in:
A1300399510
2024-04-16 19:12:36 +08:00
parent 3f2f641be0
commit 5a4e6e79cd
8 changed files with 653 additions and 91 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div class="item flexflex" @click="goapArtmentDetails">
<div class="collect-box flexcenter" @click.stop="handleCollect1(item)" v-if="false">
<div class="collect-box flexcenter" @click.stop="handleCollect1(item.uniqid)">
<img v-if="item.iscollect == 0" class="collect-icon" style="width: 30px; height: 30px;" src="@/assets/img/apartmentDetail/collecting-shadows.svg" />
<img v-else class="collect-icon" src="@/assets/img/apartmentDetail/collecting-yellow-shadows.svg" />
</div>
@@ -48,12 +48,16 @@ const props = defineProps({
const emit = defineEmits(["handlecollect"])
const goapArtmentDetails = () => redirectToExternalWebsite(`/apartmentDetail?uniqid=${props["item"].uniqid}`)
const goapArtmentDetails = () => {
let url = `/apartmentDetail?uniqid=${props["item"].uniqid}`
if (props.pitchValue['school']) url += `&school=${props.pitchValue['school']}`
redirectToExternalWebsite(url)
}
// 点击收藏后传过父组件
const handleCollect1 = item => {
emit("handlecollect", item)
}
const handleCollect1 = uniqid => emit("handlecollect", uniqid)
</script>
<style lang="less" scoped>