From 09e833078d6ce1ff20f6da6c2fe5b161dada2b17 Mon Sep 17 00:00:00 2001 From: maochaoying <925670706@qq.com> Date: Fri, 7 Apr 2023 11:56:06 +0800 Subject: [PATCH] 123 --- src/common/utils.js | 13 ++++++++++--- src/views/Index/components/CaseDetails/index.vue | 8 ++++++-- src/views/Index/components/CasePictureList/index.vue | 1 - src/views/Index/components/ContactUs/index.vue | 2 -- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/common/utils.js b/src/common/utils.js index b4dc058..e14d7ad 100644 --- a/src/common/utils.js +++ b/src/common/utils.js @@ -11,7 +11,11 @@ const scaleFunc = (showEmpty, id, origin, scale, isLow) => { showEmpty.value = false } else { if (isLow) { - showEmpty.value = false + if (['#case_detail_container'].includes(id)) { + showEmpty.value = true + } else { + showEmpty.value = false + } } else { showEmpty.value = true } @@ -22,10 +26,13 @@ export const handleScreenAuto = (showEmpty, id, origin) => { const clientHeight = document.documentElement.clientHeight const clientWidth = document.documentElement.clientWidth if (clientHeight < 1080) { - const scale = (clientHeight / 1080).toFixed(3) + let scale = (clientHeight / 1080).toFixed(3) scaleFunc(showEmpty, id, origin, scale, true) } else { - const scale = ((clientHeight - 300) / 1080).toFixed(3) + let scale = ((clientHeight - 300) / 1080).toFixed(3) + if (['#case_picture', '#hardware_picture_list'].includes(id)) { + scale = ((clientHeight - 300) / 1170).toFixed(3) + } scaleFunc(showEmpty, id, 'center 0', scale, false) } } diff --git a/src/views/Index/components/CaseDetails/index.vue b/src/views/Index/components/CaseDetails/index.vue index bb743ea..c2f3f60 100644 --- a/src/views/Index/components/CaseDetails/index.vue +++ b/src/views/Index/components/CaseDetails/index.vue @@ -99,8 +99,12 @@ const detailStore = useDetailStore() const swiperStore = useSwiperStore() const { industry_id, example_id } = storeToRefs(detailStore) onMounted(() => { - handleScreenAuto(showEmpty, '#case_detail_container') - window.onresize = handleScreenAuto(showEmpty, '#case_detail_container') + handleScreenAuto(showEmpty, '#case_detail_container', 'center 0') + window.onresize = handleScreenAuto( + showEmpty, + '#case_detail_container', + 'center 0', + ) }) const mouseover = function () { diff --git a/src/views/Index/components/CasePictureList/index.vue b/src/views/Index/components/CasePictureList/index.vue index 8be62c9..e627f4a 100644 --- a/src/views/Index/components/CasePictureList/index.vue +++ b/src/views/Index/components/CasePictureList/index.vue @@ -162,7 +162,6 @@ const showEmpty = ref(false) .case_picture_list_container { width: 100%; height: 100%; - // background: $common_bg; .empty { min-height: 90px; } diff --git a/src/views/Index/components/ContactUs/index.vue b/src/views/Index/components/ContactUs/index.vue index 0556c55..6057316 100644 --- a/src/views/Index/components/ContactUs/index.vue +++ b/src/views/Index/components/ContactUs/index.vue @@ -105,8 +105,6 @@ const showEmpty = ref(false) onMounted(() => { handleScreenAuto(showEmpty, '#contactus_main_content', 'center 0') handleScreenAuto(showEmpty, '#contact_title_container', '0 0') - handleScreenAuto(showEmpty, '#contact_hand', '0 bottom') - handleScreenAuto(showEmpty, '#contact_circle', '0 bottom') window.onresize = handleScreenAuto( showEmpty, '#contactus_main_content',