|
@@ -2,7 +2,9 @@
|
|
|
<div class="relic-list">
|
|
|
<button
|
|
|
class="return"
|
|
|
- @click="fakeBack"
|
|
|
+ @click="() => fakeBack({
|
|
|
+ hideIntroVideo: 1
|
|
|
+ })"
|
|
|
/>
|
|
|
<el-cascader
|
|
|
v-model="cascaderValue"
|
|
@@ -62,7 +64,7 @@
|
|
|
class="name"
|
|
|
:class="{
|
|
|
wide: item['名称'].length > 9,
|
|
|
- smallFontSize: item['名称'].length > 18,
|
|
|
+ smallFontSize: item['名称'].length > 17,
|
|
|
}"
|
|
|
:title="item['名称']"
|
|
|
v-html="item['名称']"
|
|
@@ -77,7 +79,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div style="height: 100vh;" />
|
|
|
+ <div :style="{height: `${clientHeight}px`}" />
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
@@ -97,6 +99,7 @@ const SCROLL_KEY = 'relicListScrollLeft'
|
|
|
const route = useRoute()
|
|
|
const router = useRouter()
|
|
|
const store = useStore()
|
|
|
+const clientHeight = document.body.clientHeight
|
|
|
|
|
|
const { height: windowHeight } = useWindowSize()
|
|
|
|
|
@@ -251,12 +254,20 @@ onMounted(() => {
|
|
|
const handleScroll = debounce(() => {
|
|
|
listEl.value && localStorage.setItem(SCROLL_KEY, listEl.value.scrollLeft)
|
|
|
}, 100)
|
|
|
+
|
|
|
+const {
|
|
|
+ windowSizeInCssForRef,
|
|
|
+ windowSizeWhenDesignForRef,
|
|
|
+} = useSizeAdapt(1920, 968)
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
@page-height-design-px: 970;
|
|
|
|
|
|
.relic-list {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: flex-end;
|
|
|
height: 100vh;
|
|
|
background-image: url(@/assets/images/relic-list-bg.jpg);
|
|
|
background-size: cover;
|
|
@@ -267,8 +278,8 @@ const handleScroll = debounce(() => {
|
|
|
position: absolute;
|
|
|
left: calc(42 / 970* 100vh);
|
|
|
top: calc(5 / 970* 100vh);
|
|
|
- width: calc(110 / 970* 100vh);
|
|
|
- height: calc(110 / 970* 100vh);
|
|
|
+ width: calc(110 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ height: calc(110 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
background-image: url(@/assets/images/btn-return.png);
|
|
|
background-size: contain;
|
|
|
background-repeat: no-repeat;
|
|
@@ -278,10 +289,10 @@ const handleScroll = debounce(() => {
|
|
|
:deep {
|
|
|
.el-cascader {
|
|
|
position: absolute;
|
|
|
- width: calc(250 / @page-height-design-px * 100vh);
|
|
|
- height: calc(70 / @page-height-design-px * 100vh);
|
|
|
+ width: calc(250 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ height: calc(70 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
left: calc(190 / @page-height-design-px * 100vh);
|
|
|
- top: calc(26 / @page-height-design-px * 100vh);
|
|
|
+ top: calc(26 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
z-index: 1;
|
|
|
|
|
|
.el-input {
|
|
@@ -309,7 +320,7 @@ const handleScroll = debounce(() => {
|
|
|
}
|
|
|
.icon-arrow-down {
|
|
|
font-size: calc(24 / @page-height-design-px * 100vh);
|
|
|
- margin-top: calc(10 / @page-height-design-px * 100vh);
|
|
|
+ margin-top: calc(10 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -321,35 +332,35 @@ const handleScroll = debounce(() => {
|
|
|
|
|
|
>.search-ui {
|
|
|
position: absolute;
|
|
|
- top: calc(26 / @page-height-design-px * 100vh);
|
|
|
+ top: calc(26 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
right: calc(27 / @page-height-design-px * 100vh);
|
|
|
+ padding: calc(10 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef')) 0;
|
|
|
width: calc(502 / @page-height-design-px * 100vh);
|
|
|
- height: calc(70 / @page-height-design-px * 100vh);
|
|
|
+ height: calc(70 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
background-image: url(@/assets/images/search-bg.png);
|
|
|
background-size: cover;
|
|
|
background-repeat: no-repeat;
|
|
|
background-position: center center;
|
|
|
z-index: 1;
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
|
>input {
|
|
|
position: absolute;
|
|
|
left: 50px;
|
|
|
top: 50%;
|
|
|
transform: translateY(-50%);
|
|
|
- height: calc(35 / @page-height-design-px * 100vh);
|
|
|
- width: calc(350 / @page-height-design-px * 100vh);
|
|
|
- font-size: calc(30 / @page-height-design-px * 100vh);
|
|
|
+ height: 100%;
|
|
|
+ width: calc(350 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ font-size: calc(30 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
|
font-weight: 400;
|
|
|
color: rgba(255, 255, 255, 0.7);
|
|
|
- line-height: calc(28 / @page-height-design-px * 100vh);
|
|
|
|
|
|
&::placeholder {
|
|
|
- font-size: calc(30 / @page-height-design-px * 100vh);
|
|
|
+ font-size: calc(30 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
|
font-weight: 400;
|
|
|
color: rgba(255, 255, 255, 0.3);
|
|
|
- line-height: calc(28 / @page-height-design-px * 100vh);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -371,14 +382,12 @@ const handleScroll = debounce(() => {
|
|
|
>.the-list {
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
- top: 55%;
|
|
|
- transform: translateY(-50%);
|
|
|
+ bottom: 0;
|
|
|
width: 100%;
|
|
|
- height: calc(650 / @page-height-design-px * 100vh);
|
|
|
+ height: calc(850 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
background-size: auto 100%;
|
|
|
background-repeat: no-repeat;
|
|
|
background-position: left center;
|
|
|
- padding-left: calc(54 / @page-height-design-px * 100vh);
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
&.scene1 {
|
|
@@ -528,19 +537,13 @@ const handleScroll = debounce(() => {
|
|
|
|
|
|
@media screen and (max-height: 480px) {
|
|
|
.relic-list > .the-list {
|
|
|
- top: unset;
|
|
|
- bottom: 0;
|
|
|
- padding-left: 0;
|
|
|
- height: calc(850 / 970* 100vh);
|
|
|
- transform: unset;
|
|
|
-
|
|
|
.content-wrap {
|
|
|
margin-top: 0;
|
|
|
height: inherit;
|
|
|
|
|
|
.first-item,
|
|
|
.relic-item {
|
|
|
- width: calc(450 / 970* 100vh* 0.83);
|
|
|
+ width: calc(450 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
height: inherit;
|
|
|
}
|
|
|
.relic-item {
|
|
@@ -561,10 +564,10 @@ const handleScroll = debounce(() => {
|
|
|
}
|
|
|
}
|
|
|
&.isOdd > img {
|
|
|
- bottom: calc(425 / 970* 100vh* 0.83);
|
|
|
+ bottom: calc(340 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
}
|
|
|
&.isEven > img {
|
|
|
- bottom: calc(215 / 970* 100vh* 0.83);
|
|
|
+ bottom: calc(140 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
}
|
|
|
}
|
|
|
}
|