134 lines
3.1 KiB
Vue
134 lines
3.1 KiB
Vue
<template>
|
|
<div id="home">
|
|
<div class="header-wrap-box">
|
|
<div class="header-wrap">
|
|
<div class="flex-vcenter left-wrap">
|
|
<img @click="jumpPage('/home')" class="logo" src="@/assets/images/pc/logo.png" />
|
|
</div>
|
|
<div class="right-list">
|
|
<div class="item" @click="jumpPage('/business')">
|
|
<img class="search" src="@/assets/images/pc/business.png" />
|
|
<p>商务合作</p>
|
|
</div>
|
|
<div class="official" @click="jumpPage('/contact')">联系官方</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<router-view></router-view>
|
|
<pc-footer></pc-footer>
|
|
<!-- <Mask @closeMaskPop="setAdvPopup"/> -->
|
|
<!-- 弹窗广告 -->
|
|
<!-- v-if="isShowAdvPopup" -->
|
|
<HomePopupAdv v-if="isShowAdvPopup" :advList="getAdItem(9).reverse()" @close="closeHomePopupAdv" />
|
|
</div>
|
|
</template>
|
|
<script setup lang="ts">
|
|
import { computed } from 'vue'
|
|
import { getAdItem } from '@/utils/getConfig'
|
|
import Mask from './mask.vue';
|
|
import { useRouter } from 'vue-router';
|
|
import { useGlobalStore } from '@/stores/global';
|
|
|
|
const globalStore = useGlobalStore();
|
|
const router = useRouter();
|
|
|
|
// const isShowAdvPopup = ref(false)
|
|
|
|
// const setAdvPopup = () => {
|
|
// isShowAdvPopup.value = !globalStore.homeAdvFirst && getAdItem(9)?.length > 0 && !!sessionStorage.getItem('maskPop');
|
|
// }
|
|
// 首页弹窗广告
|
|
const isShowAdvPopup = computed(() => {
|
|
return getAdItem(9)?.length > 0;
|
|
});
|
|
const closeHomePopupAdv = () => {
|
|
globalStore.setHomeAdvFirst();
|
|
};
|
|
const jumpPage = (path: string) => {
|
|
router.push(path)
|
|
}
|
|
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
@media (min-width: 768px) {
|
|
#home {
|
|
min-width: 1280px;
|
|
height: 100vh;
|
|
overflow: auto;
|
|
background-color: #000;
|
|
}
|
|
.header-wrap-box {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 100;
|
|
}
|
|
.header-wrap {
|
|
width: 100%;
|
|
height: 72px;
|
|
background: #1A1C22;
|
|
@include flexCenter;
|
|
.left-wrap {
|
|
min-width: 900px;
|
|
margin-right: 3vw;
|
|
}
|
|
.logo {
|
|
width: 100px;
|
|
height: 32px;
|
|
cursor: pointer;
|
|
}
|
|
.logo:hover {
|
|
transform: scale(1.02);
|
|
}
|
|
.right-list {
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
.item {
|
|
color: rgba(255, 255, 255, 0.8);
|
|
font-size: 12px;
|
|
font-weight: 400;
|
|
text-align: center;
|
|
padding-left: 30px;
|
|
cursor: pointer;
|
|
white-space: nowrap;
|
|
img {
|
|
width: 32px;
|
|
height: 32px;
|
|
}
|
|
}
|
|
.item:hover {
|
|
color: #fff;
|
|
}
|
|
|
|
.official {
|
|
width: 87px;
|
|
height: 36px;
|
|
border-radius: 4px;
|
|
border: 1px solid #fff;
|
|
color: #fff;
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
@include flexCenter;
|
|
cursor: pointer;
|
|
}
|
|
.official:hover {
|
|
color: #FFC303;
|
|
}
|
|
}
|
|
}
|
|
|
|
:deep() {
|
|
.imgBox {
|
|
width: 474px !important;
|
|
height: 664px !important;
|
|
.closeIcon {
|
|
top: 23px !important;
|
|
right: 29px !important;
|
|
width: 52px !important;
|
|
height: 52px !important;
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style> |