maochaoying 2 years ago
parent
commit
09e833078d
  1. 13
      src/common/utils.js
  2. 8
      src/views/Index/components/CaseDetails/index.vue
  3. 1
      src/views/Index/components/CasePictureList/index.vue
  4. 2
      src/views/Index/components/ContactUs/index.vue

13
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)
}
}

8
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 () {

1
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;
}

2
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',

Loading…
Cancel
Save