小修改

This commit is contained in:
A1300399510
2023-08-04 12:28:10 +08:00
parent 4387c10703
commit 63b09af190
5 changed files with 32 additions and 9 deletions

View File

@@ -40,7 +40,7 @@ const props = defineProps({
item: Object,
});
const goapArtmentDetails = () => redirectToExternalWebsite(`${location.origin}/apartmentDetail?uniqid=${props['item'].uniqid}`)
const goapArtmentDetails = () => redirectToExternalWebsite(`/apartmentDetail?uniqid=${props['item'].uniqid}`)
// router.push(`/apartmentDetail?uniqid=${props['item'].uniqid}`)

View File

@@ -120,7 +120,7 @@
import { ref, watch, defineProps, reactive, defineEmits, onMounted, getCurrentInstance } from "vue";
import { useRoute, useRouter } from 'vue-router';
import { ElMessage, ElMessageBox } from 'element-plus'
import { redirectToExternalWebsite } from '@/utils/util.js'
import store from '../../store/index';
const { proxy } = getCurrentInstance()
@@ -191,7 +191,8 @@ const cancelCollection = token => emit('cancelCollection', { token, index: props
// 点击跳转详情页
const goDetail = status => {
if (status == 1) router.push(`/detail?id=${data.uniqid}`)
console.log("location.origin",location.origin);
if (status == 1) redirectToExternalWebsite(`/detail?id=${data.uniqid}`)
else ElMessage("该房源信息已出租或已失效")
}

View File

@@ -44,13 +44,16 @@ const popperOptions = ref({
{
name: 'offset',
options: {
offset: [38, 0] // 设置左偏移为20px右偏移为0px
// offset: [38, 0] // 设置左偏移为20px右偏移为0px
offset: [142, 10] // 设置左偏移为20px右偏移为0px
}
}
]
});
if (props['type'] == 'housingTop') popperOptions.value['modifiers'][0]['options']['offset'][0] = 14
if (props['type'] == 'housing') popperOptions.value['modifiers'][0]['options']['offset'][0] = 38
// console.log("newValue", props['type']);
watch(() => props.concatType, (newValue, oldValue) => {
@@ -67,7 +70,13 @@ let url = location.href
const copy = () => {
copyToClipboard(`${props['title']} - ${url}`).then(() => {
ElMessage.success("复制成功!!!")
ElMessage({
message: '复制成功',
center: true,
offset: 320,
duration: 1000,
customClass: 'message-info'
})
})
}
@@ -189,4 +198,19 @@ const copy = () => {
cursor: pointer;
color: #000;
}
</style>
<style lang="less">
.message-info {
background: #000000;
border-color: #000000;
color: #fff;
.el-message__content {
color: #fff;
}
.el-icon {
display: none;
}
}
</style>