|
|
@@ -21,7 +21,7 @@
|
|
|
></van-image>
|
|
|
<div class="text1" :class="{ text3: isLogin }">{{ companyInfo.name }}</div>
|
|
|
</div>
|
|
|
- <div class="welcom" v-else>
|
|
|
+ <div class="welcom" v-else-if="theme === 'theme1' || theme === 'theme2'">
|
|
|
<div class="left">
|
|
|
<div class="text1">WELCOME</div>
|
|
|
<div class="text2" :class="{ text3: isLogin }">{{ companyInfo.name }}</div>
|
|
|
@@ -33,22 +33,47 @@
|
|
|
:src="companyInfo.logo || require('@assets/img_default_photo.png')"
|
|
|
></van-image>
|
|
|
</div>
|
|
|
+ <template v-if="theme === 'theme1' || theme === 'theme2' || theme === 'theme3'">
|
|
|
+ <swiper
|
|
|
+ pagination
|
|
|
+ @slideChange="changeMySwiper"
|
|
|
+ :space-between="theme === 'theme2' || theme === 'theme3' ? 8 : 16"
|
|
|
+ class="mySwiper"
|
|
|
+ :class="[`swiper-${theme}`]"
|
|
|
+ :autoplay="{ delay: 5000, disableOnInteraction: false }"
|
|
|
+ v-if="banners.length > 0"
|
|
|
+ slidesPerView="auto"
|
|
|
+ centeredSlides
|
|
|
+ >
|
|
|
+ <swiper-slide v-for="item in banners" :key="item.id">
|
|
|
+ <product-small :info="item"></product-small>
|
|
|
+ </swiper-slide>
|
|
|
+ </swiper>
|
|
|
+ </template>
|
|
|
+ <div class="large-logo" v-else>
|
|
|
+ <van-image
|
|
|
+ width="100%"
|
|
|
+ height="100%"
|
|
|
+ radius="12"
|
|
|
+ fit="cover"
|
|
|
+ :src="companyInfo.logo || require('@assets/img_default_photo.png')"
|
|
|
+ ></van-image>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="home-title" @click="goNews">
|
|
|
+ <span>新闻公告</span>
|
|
|
+
|
|
|
+ <div class="title-more">
|
|
|
+ <span>更多</span>
|
|
|
+ <van-icon name="icon-icon_inter" class-prefix="font_family" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="newsList">
|
|
|
+ <news-large v-for="(item, index) in news" :key="index" v-model:info="news[index].obj"></news-large>
|
|
|
+ </div>
|
|
|
|
|
|
- <swiper
|
|
|
- pagination
|
|
|
- @slideChange="changeMySwiper"
|
|
|
- :space-between="theme === 'theme2' || theme === 'theme3' ? 8 : 16"
|
|
|
- class="mySwiper"
|
|
|
- :class="[`swiper-${theme}`]"
|
|
|
- :autoplay="{ delay: 5000, disableOnInteraction: false }"
|
|
|
- v-if="banners.length > 0"
|
|
|
- slidesPerView="auto"
|
|
|
- centeredSlides
|
|
|
- >
|
|
|
- <swiper-slide v-for="item in banners" :key="item.id">
|
|
|
- <product-small :info="item"></product-small>
|
|
|
- </swiper-slide>
|
|
|
- </swiper>
|
|
|
+ <div class="home-title">数字艺术品</div>
|
|
|
|
|
|
<!-- <div class="tabs" v-if="!empty">
|
|
|
<div class="tab" :class="{ active: active === 0 }" @click="active = 0">数字藏品</div>
|
|
|
@@ -96,6 +121,7 @@ SwiperCore.use([Pagination, Autoplay]);
|
|
|
|
|
|
import banner from '../mixins/banner';
|
|
|
import ProductLarge from '../components/product/productLarge.vue';
|
|
|
+import NewsLarge from '../components/product/NewsLarge.vue';
|
|
|
import ProductSmall from '../components/product/productSmall.vue';
|
|
|
import { mapState } from 'vuex';
|
|
|
|
|
|
@@ -107,7 +133,8 @@ export default {
|
|
|
Swiper,
|
|
|
SwiperSlide,
|
|
|
ProductLarge,
|
|
|
- ProductSmall
|
|
|
+ ProductSmall,
|
|
|
+ NewsLarge
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['userInfo', 'theme', 'companyId', 'companyInfo']),
|
|
|
@@ -176,6 +203,11 @@ export default {
|
|
|
// });
|
|
|
},
|
|
|
methods: {
|
|
|
+ goNews() {
|
|
|
+ this.$router.push({
|
|
|
+ name: 'newsList'
|
|
|
+ });
|
|
|
+ },
|
|
|
changeSwiper() {
|
|
|
console.log(this.swiperRef.activeIndex);
|
|
|
this.active = this.swiperRef.activeIndex;
|
|
|
@@ -257,7 +289,6 @@ export default {
|
|
|
// let show = window.sessionStorage.getItem('riskShow')
|
|
|
// ? JSON.parse(window.sessionStorage.getItem('riskShow'))
|
|
|
// : false;
|
|
|
-
|
|
|
// if (!show) {
|
|
|
// this.riskShow = true;
|
|
|
// window.sessionStorage.setItem('riskShow', JSON.stringify(true));
|
|
|
@@ -274,9 +305,11 @@ export default {
|
|
|
this.products = res.filter(item => {
|
|
|
return item.type === 'collection';
|
|
|
});
|
|
|
- this.news = res.filter(item => {
|
|
|
- return item.type === 'news';
|
|
|
- });
|
|
|
+ this.news = res
|
|
|
+ .filter(item => {
|
|
|
+ return item.type === 'news';
|
|
|
+ })
|
|
|
+ .slice(0, 3);
|
|
|
})
|
|
|
]).then(() => {
|
|
|
this.$toast.clear();
|
|
|
@@ -434,7 +467,7 @@ export default {
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
.darkBg {
|
|
|
- background-color: #181818;
|
|
|
+ background-color: var(--bg);
|
|
|
}
|
|
|
.theme2-bg {
|
|
|
width: 221px;
|
|
|
@@ -455,7 +488,7 @@ export default {
|
|
|
.top {
|
|
|
display: flex;
|
|
|
padding: 9px 16px;
|
|
|
- background-color: @bg;
|
|
|
+ background-color: var(--bg);
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
.logo {
|
|
|
@@ -486,7 +519,7 @@ export default {
|
|
|
// background-color: @bg3;
|
|
|
position: relative;
|
|
|
z-index: 1;
|
|
|
- background-color: #272b2e;
|
|
|
+ background-color: var(--bg2);
|
|
|
padding-top: var(--safe-top);
|
|
|
}
|
|
|
|
|
|
@@ -540,6 +573,20 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+::v-deep(.swiper-theme4),
|
|
|
+::v-deep(.swiper-theme5) {
|
|
|
+ padding: 20px 0 16px;
|
|
|
+ .swiper-slide {
|
|
|
+ height: 42.67vw;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.large-logo {
|
|
|
+ padding: 20px 16px 16px;
|
|
|
+ height: 42.67vw;
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
// .swiper-slide {
|
|
|
// width: 255px;
|
|
|
// }
|
|
|
@@ -722,4 +769,29 @@ export default {
|
|
|
border-radius: 8px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.home-title {
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: var(--color1);
|
|
|
+ line-height: 24px;
|
|
|
+ padding: 10px 16px 8px;
|
|
|
+ .flex();
|
|
|
+
|
|
|
+ span {
|
|
|
+ flex-grow: 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ .title-more {
|
|
|
+ .flex();
|
|
|
+ font-size: 12px;
|
|
|
+ color: #939599;
|
|
|
+ .font_family {
|
|
|
+ font-weight: normal;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.newsList {
|
|
|
+ padding-bottom: 8px;
|
|
|
+}
|
|
|
</style>
|