|
@@ -37,7 +37,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="middles">
|
|
|
+ <div class="middles" :class="{'actives':buyed == 0, 'actives1':lineShow == 1}">
|
|
|
<h3>摘要</h3>
|
|
|
<p>{{datas.docSummary}}</p>
|
|
|
<div class="continue" v-show="buyed == 0">全文共{{datas.docPageSize}}页,<span @click="continued">继续阅读<i class="el-icon-arrow-down"></i></span></div>
|
|
@@ -79,14 +79,16 @@
|
|
|
<img :src="item.s_pic">
|
|
|
</a>
|
|
|
</div>
|
|
|
+ <v-recommend :recomes="recomes"></v-recommend>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { Button, Tooltip, Divider, Message } from 'element-ui'
|
|
|
-import { getDetails, getShow, getDown, getAdverse, getCoin, getAdd, getRemove } from '../api/modules/detail'
|
|
|
+import { getDetails, getShow, getRecommend, getDown, getAdverse, getCoin, getAdd, getRemove } from '../api/modules/detail'
|
|
|
import { formatSize, dateFormatter } from '@/utils/'
|
|
|
+import vRecommend from '@/components/recommend'
|
|
|
const pdfjsLib = require('pdfjs-dist/build/pdf.js')
|
|
|
const pdfjsViewer = require('pdfjs-dist/web/pdf_viewer.js')
|
|
|
export default {
|
|
@@ -94,7 +96,8 @@ export default {
|
|
|
[Button.name]: Button,
|
|
|
[Tooltip.name]: Tooltip,
|
|
|
[Divider.name]: Divider,
|
|
|
- [Message.name]: Message
|
|
|
+ [Message.name]: Message,
|
|
|
+ vRecommend
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
@@ -103,6 +106,7 @@ export default {
|
|
|
datas: [],
|
|
|
conts: [],
|
|
|
adsUrl: [],
|
|
|
+ recomes: [],
|
|
|
coinNum: 0,
|
|
|
btnName: '',
|
|
|
buyed: 0,
|
|
@@ -235,6 +239,14 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ recommend (str) {
|
|
|
+ getRecommend({ docTag: str, docId: this.docIds, num: 3 }).then(res => {
|
|
|
+ res.data.data.forEach(v => {
|
|
|
+ v.docFileSize = formatSize(v.docFileSize)
|
|
|
+ this.recomes.push(v)
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
details () {
|
|
|
getDetails({ docId: this.docIds, from: this.$route.query.from }).then(res => {
|
|
|
if (res.data.error_code === 0) {
|
|
@@ -245,6 +257,7 @@ export default {
|
|
|
this.datas.tags = this.datas.tags.split(',')
|
|
|
this.buyed = res.data.data.status
|
|
|
this.coined()
|
|
|
+ this.recommend(res.data.data.detail.tags)
|
|
|
if (res.data.data.status === 1) {
|
|
|
this.buyShow()
|
|
|
}
|
|
@@ -468,6 +481,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.middles {
|
|
|
+ height: 316px;
|
|
|
padding: 24px 40px;
|
|
|
background: #fff;
|
|
|
border-radius: 4px;
|
|
@@ -498,6 +512,12 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .actives {
|
|
|
+ height: 530px;
|
|
|
+ }
|
|
|
+ .actives1 {
|
|
|
+ height: 552px;
|
|
|
+ }
|
|
|
.head-tip {
|
|
|
width: 920px;
|
|
|
height: 42px;
|