Commit 30cb50de authored by shilei's avatar shilei

Merge branch 'dev' of http://101.201.78.203/cfld-front/liyeyun into dev

parents 97eae6a8 ff7b3aac
VITE_BASE_URL=https://prod.api.liyeyun.com
VITE_BASE_USER_URL=https://prod.user.liyeyun.com
VITE_BASE_URL=http://test.api.liyeyun.com
VITE_BASE_USER_URL=http://test.user.liyeyun.com
<template>
<div>
<Teleport to="body">
<div class="fixed right-0 top-1/2 z-[102] h-[145px] -translate-y-1/2">
<div
class="star-contact flex h-[116px] w-10 cursor-pointer items-center justify-center rounded-[4px] bg-[#C0322B] px-3 text-justify text-base font-medium leading-[11px] text-white"
@click="handleContact"
>
立即沟通
</div>
<div
v-if="isShowPhone"
class="star-contact-info absolute right-[50px] top-0 flex h-[145px] w-[328px] rounded bg-white p-5"
>
<div class="flex w-[288px]">
<div class="flex h-[105px] flex-none flex-col">
<div>
<div class="flex h-5 items-center justify-center">
<div
class="flex h-full items-center rounded-sm bg-[#4F4F4F]/[.08] px-1 py-[1px] text-[10px] leading-4 text-[#4F4F4F]"
>
园区对接人
</div>
<div class="ml-1 text-base font-bold leading-5 text-[#1A1A1A]">
{{ detail.contactPerson || '暂无对接人' }}
</div>
</div>
<div class="mt-4 h-6 text-center font-yahei text-base font-bold text-[#C0322B]">
{{ phone }}
</div>
</div>
<div class="mt-5 text-center text-base leading-[22px] text-[#4D4D4D]">联系园区</div>
</div>
<div class="flex h-[105px] flex-1 flex-col items-center">
<img src="@/assets/images/app-contact.png" class="h-[67px] w-[67px]" />
<div class="mt-3 text-base leading-[22px] text-[#4D4D4D]">客服中心</div>
</div>
</div>
</div>
</div>
<div
v-if="isShowPhone"
class="fixed inset-0 z-[101] bg-[#000000]/[.2]"
@click="changeShowPhone(false)"
></div>
</Teleport>
</div>
</template>
<script setup lang="ts">
import { useRequest } from '@/composable/useRequest.ts';
import { useAppStore } from '@/stores/app.ts';
import { RequestUrl } from '@/types/api.ts';
import type { DevelopZoneDetailResp } from '@/types/api/developZoneDetail';
import { UnlockType } from '@/types/enum.ts';
import { computed, ref, watch } from 'vue';
import { useLoginModal } from '../login/login.ts';
const props = withDefaults(
defineProps<{
detail: DevelopZoneDetailResp;
}>(),
{},
);
const { request: queryPhone } = useRequest(
RequestUrl.getPhoneById,
{},
`${props.detail.id}/${UnlockType.develop}`,
);
const isShowPhone = ref(false);
const phone = ref('');
const appStore = useAppStore();
const { open } = useLoginModal();
const isLogin = computed(() => {
return appStore.isLogin;
});
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const noPerson = computed(() => {
return !props.detail.contactPerson;
});
const changeShowPhone = (b: boolean) => {
isShowPhone.value = b;
};
watch(isLogin, (val) => {
if (!val) {
phone.value = '';
changeShowPhone(false);
}
});
const handlePhone = async () => {
try {
const { data, success } = await queryPhone();
if (success) {
phone.value = data as any;
changeShowPhone(true);
}
} catch (error) {
console.log(error);
}
};
const handleContact = () => {
if (!phone.value) {
if (isLogin.value) {
handlePhone();
} else {
open('loginByPhone');
const clear = watch(isLogin, (val) => {
if (val) {
handlePhone();
}
clear();
});
}
}
};
</script>
<style lang="scss">
.star-contact {
writing-mode: vertical-rl;
letter-spacing: 3px;
}
.star-contact-info {
box-shadow: 0px 8px 20px 0px rgba(90, 0, 0, 0.1);
}
</style>
......@@ -71,6 +71,7 @@
></StarInfoCell>
</div>
</DetailInfoCell>
<StarContactInfo :detail="detail"></StarContactInfo>
<ElDialog
v-model="isShowContent"
class="star-content-dialog"
......@@ -104,6 +105,7 @@ import VideoList from './VideoList.vue';
import StarIconCell from './StarIconCell.vue';
import DetailInfoCell from './DetailInfoCell.vue';
import StarInfoCell from './StarInfoCell.vue';
import StarContactInfo from './StarContactInfo.vue';
const props = withDefaults(
defineProps<{
......
......@@ -31,7 +31,10 @@
</div>
</div>
</div>
<div class="mt-[17px] flex items-center font-yahei text-sm leading-5 text-[#4d4d4d]">
<div
v-if="filterAddress(item)"
class="mt-[17px] flex items-center font-yahei text-sm leading-5 text-[#4d4d4d]"
>
<img class="mr-1 h-4 w-4" src="@/assets/images/icon-local.png" alt="" />
<div>
{{ filterAddress(item) }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment