|
@@ -1,19 +1,21 @@
|
|
|
<template>
|
|
|
<div class="pages--home">
|
|
|
<div class="top-search-group flex-c-c center">
|
|
|
+ <div class="centerBox">
|
|
|
<h1>剑鱼文库,上亿级文档资料库</h1>
|
|
|
- <search-input @submit="goSubmit"></search-input>
|
|
|
+ <search-input @submit="goSubmit" :btnText="in_Iframe?'搜 索':''" :leftIconshow="in_Iframe"></search-input>
|
|
|
</div>
|
|
|
-
|
|
|
+ </div>
|
|
|
+ <div class="center-contentbox">
|
|
|
<div class="new-group">
|
|
|
- <div class="flex-r-c">
|
|
|
+ <div class="new-list-group must-bottom">
|
|
|
+ <div class="top-list-group">
|
|
|
+ <div class="flex-r-c">
|
|
|
<div class="title-group flex-r-c center left">
|
|
|
<h5 style="font-size: 24px;line-height: 36px;">热门文档</h5>
|
|
|
<!-- <i class="el-icon-jy-Frame"></i> -->
|
|
|
</div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="new-list-group must-bottom">
|
|
|
+ </div>
|
|
|
<div class="word-model">
|
|
|
<div class="word-model-content" :class="{'launch-alone': !launchActive}">
|
|
|
<div class="word-model-list" @click="onSetWordModel(item)" :class="{'active': item.active}" v-for="(item, index) in wordModel" :key="index">
|
|
@@ -28,16 +30,17 @@
|
|
|
<div class="word-file-main">
|
|
|
<div class="word-file-list" @click="goContent(item)" v-for="(item, index) in wordFileList" :key="index">
|
|
|
<div class="mini-img-group">
|
|
|
- <img :src="item.img" alt="" @error="handleError">
|
|
|
+ <img :src="item.img" alt="" class="mini-img" @error="handleError">
|
|
|
<i class="word-type" :class="'el-icon-jy-' + item.type" ></i>
|
|
|
<span class="type-tag" :class="item.productType === 2 ? 'boutique' : 'free'">{{item.productType === 2 ? '付费精品' : '会员免费'}}</span>
|
|
|
</div>
|
|
|
<div class="word-file-name">{{ item.title }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
<!-- 文库会员广告位 -->
|
|
|
- <div class="word-file-ad" v-if="jyPcDocMember && jyPcDocMember.length">
|
|
|
- <el-carousel height="80px">
|
|
|
+ <div class="word-file-ad" v-if="jyPcDocMember && jyPcDocMember.length" :style="{height: in_Iframe?adHeight:'80px'}">
|
|
|
+ <el-carousel :height="in_Iframe?adHeight:'80px'">
|
|
|
<el-carousel-item v-for="(item, index) in jyPcDocMember" :key="index">
|
|
|
<img @click.prevent="onDocLink(item)" :src="item.s_pic" :alt="item.s_remark">
|
|
|
</el-carousel-item>
|
|
@@ -91,10 +94,13 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="bottom-group">
|
|
|
<selected-recommend
|
|
|
:options="pageData.keep"
|
|
|
@click="goContent"
|
|
|
></selected-recommend>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -105,7 +111,7 @@ import SelectedRecommend from '@/components/SelectedRecommend.vue'
|
|
|
import { getHomeHot, getSearchTag } from '../api/modules/home'
|
|
|
import { getJyAdListApi } from '../api/modules/publicapply'
|
|
|
import { getRecommend } from '../api/modules/search'
|
|
|
-import { recoveryPageData } from '../utils'
|
|
|
+import { recoveryPageData, vw2px, px2viewport } from '../utils'
|
|
|
|
|
|
function checkType (type) {
|
|
|
let typeStr = type
|
|
@@ -174,12 +180,16 @@ export default {
|
|
|
jyPcDocMember: [], // 文库会员广告位
|
|
|
docsWordList: [],
|
|
|
launchActive: false,
|
|
|
- canFold: false
|
|
|
+ canFold: false,
|
|
|
+ in_Iframe: false
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
this.pageData = recoveryPageData('jy-docs-home-page-pc')
|
|
|
this.getHome()
|
|
|
+ if (window.goTemplateData && window.goTemplateData.inIframe) {
|
|
|
+ this.in_Iframe = true
|
|
|
+ }
|
|
|
},
|
|
|
mounted () {
|
|
|
const contentDom = document.querySelector('.word-model-content')
|
|
@@ -206,6 +216,20 @@ export default {
|
|
|
},
|
|
|
hotList2 () {
|
|
|
return this.pageData?.hot && this.pageData?.hot.slice(5)
|
|
|
+ },
|
|
|
+ adHeight () {
|
|
|
+ const setheight = vw2px(px2viewport(80, 'vw', {
|
|
|
+ viewportWidth: 1224,
|
|
|
+ unitPrecision: 3
|
|
|
+ }), 'px', {
|
|
|
+ viewportWidth: document.body.clientWidth,
|
|
|
+ unitPrecision: 3
|
|
|
+ })
|
|
|
+ if (setheight === '0.000px') {
|
|
|
+ return '80px'
|
|
|
+ } else {
|
|
|
+ return setheight
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -328,7 +352,7 @@ export default {
|
|
|
getSearchTag().then(data => {
|
|
|
const res = data.data
|
|
|
if (res && res.error_code === 0) {
|
|
|
- this.wordModel = res.data.map((item, index) => ({ value: item, active: index === 0 ? true : false }))
|
|
|
+ this.wordModel = res.data.map((item, index) => ({ value: item, active: index === 0 }))
|
|
|
this.$nextTick(() => {
|
|
|
this.checkIsOneRow()
|
|
|
})
|
|
@@ -390,6 +414,12 @@ export default {
|
|
|
background-size: 100% 310px;
|
|
|
}
|
|
|
}
|
|
|
+ .page--docs--index.view_index.in-iframe {
|
|
|
+ .page-container {
|
|
|
+ background:rgb(242, 242, 244) !important;
|
|
|
+ background-image: none;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|
|
|
<style scoped lang="scss">
|
|
|
.pages--home {
|
|
@@ -403,7 +433,10 @@ export default {
|
|
|
@include diy-icon('excel', 24);
|
|
|
@include diy-icon('ppt', 24);
|
|
|
@include diy-icon('txt', 24);
|
|
|
-
|
|
|
+ .center-contentbox{
|
|
|
+ padding-top: 1px;
|
|
|
+ margin: auto;
|
|
|
+ }
|
|
|
.list-item {
|
|
|
cursor: pointer;
|
|
|
padding: 18px 0;
|
|
@@ -606,7 +639,7 @@ export default {
|
|
|
font-size: 40px;
|
|
|
line-height: normal;
|
|
|
letter-spacing: 0px;
|
|
|
- text-align: left;
|
|
|
+ text-align: center;
|
|
|
margin: 42px 0 24px;
|
|
|
}
|
|
|
}
|
|
@@ -752,17 +785,89 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .in-app{
|
|
|
- .top-search-group{
|
|
|
- height: 286px;
|
|
|
- }
|
|
|
- .word-recommend-ad-list{
|
|
|
- width: 24%!important;
|
|
|
- }
|
|
|
- .pages--home{
|
|
|
- padding-left: 18px;
|
|
|
- padding-right: 18px;
|
|
|
+ .in-app {
|
|
|
+ .word-file-list{
|
|
|
+ height: auto !important;
|
|
|
+ }
|
|
|
+ .word-recommend-ad{
|
|
|
+ height: auto !important;
|
|
|
+ }
|
|
|
+ .mini-img{
|
|
|
+ height: auto !important;
|
|
|
+ }
|
|
|
+ .top-search-group {
|
|
|
+ height: 136px;
|
|
|
+ // background-image: url("~@/assets/images/wenkuBanner.png");
|
|
|
+ background-image: none;
|
|
|
+ background: linear-gradient(180deg, #B7F0FB 0%, #D5E8FF 100%);
|
|
|
+ background-size: cover;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-position: center;
|
|
|
+ border-radius: 8px;
|
|
|
+ .centerBox{
|
|
|
+ width: 988px;
|
|
|
+ height: 100%;
|
|
|
+ margin: 0 auto;
|
|
|
+ background-image: url("~@/assets/images/wkbg.png");
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-position: center;
|
|
|
+ background-size: contain;
|
|
|
+ ::v-deep{
|
|
|
+ .search-input{
|
|
|
+ width: 530px;
|
|
|
+ }
|
|
|
+ .search-input .el-input__inner{
|
|
|
+ border-radius: 8px 0 0 8px;
|
|
|
+ border: none;
|
|
|
+ }
|
|
|
+ .search-input .el-input-group__append{
|
|
|
+ border-radius: 0 8px 8px 0;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
+ }
|
|
|
+ h1{
|
|
|
+ margin: 22px 0 16px;
|
|
|
+ font-size: 24px;
|
|
|
+ line-height: 36px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .new-group{
|
|
|
+ margin-top: 0;
|
|
|
+ .top-list-group{
|
|
|
+ padding: 24px;
|
|
|
+ margin-top: 24px;
|
|
|
+ background-color: #fff;
|
|
|
+ border-radius: 8px;
|
|
|
+ }
|
|
|
+ .word-file-ad{
|
|
|
+ margin-top: 24px;
|
|
|
+ }
|
|
|
+ .word-recommend-ad{
|
|
|
+ margin-top: 24px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .hot-down-group{
|
|
|
+ margin-top: 24px;
|
|
|
+ }
|
|
|
+ .center-contentbox{
|
|
|
+ }
|
|
|
+ .word-recommend-ad-list {
|
|
|
+ width: 24% !important;
|
|
|
+ }
|
|
|
+ .bottom-group{
|
|
|
+ background-color: #fff;
|
|
|
+ border-radius: 8px;
|
|
|
+ padding: 24px;
|
|
|
+ margin-top: 24px;
|
|
|
+ ::v-deep{
|
|
|
+ .keep-group{
|
|
|
+ margin-top: 0;
|
|
|
+ padding-bottom: 0;
|
|
|
|
|
|
+ }
|
|
|
}
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|