|
@@ -242,9 +242,9 @@ export default {
|
|
|
config: {
|
|
|
PAGE_TO_VIEW: 0,
|
|
|
SCALE: 1.0,
|
|
|
- CMAP_URL: 'https://cdn.jsdelivr.net/npm/pdfjs-dist@2.1.266/cmaps/',
|
|
|
+ CMAP_URL: 'https://cdn-common.jianyu360.com/cdn/lib/pdfjs-dist/2.1.266/cmaps/',
|
|
|
CMAP_PACKED: true,
|
|
|
- workerSrc: 'https://cdn.jsdelivr.net/npm/pdfjs-dist@2.1.266/build/pdf.worker.min.js'
|
|
|
+ workerSrc: 'https://cdn-common.jianyu360.com/cdn/lib/pdfjs-dist/2.1.266/build/pdf.worker.min.js'
|
|
|
},
|
|
|
pData: {
|
|
|
heightList: []
|
|
@@ -320,8 +320,11 @@ export default {
|
|
|
const nArr = arr.concat(oldArr)
|
|
|
return nArr.splice(0, 3)
|
|
|
},
|
|
|
+ isDocVip () {
|
|
|
+ return this.docsInfo.docStatus > 0
|
|
|
+ },
|
|
|
showCostBtn () {
|
|
|
- return (this.buyed !== 1 && !this.docsInfo.docStatus && this.docsInfo.freeDownload === 1 && this.downloadStatus !== 1) || !this.islogin
|
|
|
+ return (this.buyed !== 1 && !this.isDocVip && this.docsInfo.freeDownload === 1 && this.downloadStatus !== 1) || !this.islogin
|
|
|
},
|
|
|
// 未购买预览时,未读页码; 或者豆丁渲染错误,
|
|
|
unreadPage () {
|
|
@@ -356,7 +359,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
// 会员免费文档+未下载+不是会员+未使用1次免费下载特权
|
|
|
- if (this.islogin && this.datas.productType === 1 && this.buyed === 0 && !this.docsInfo.docStatus && this.docsInfo.freeDownload !== 1) {
|
|
|
+ if (this.islogin && this.datas.productType === 1 && this.buyed === 0 && !this.isDocVip && this.docsInfo.freeDownload !== 1) {
|
|
|
btnText = '使用免费下载特权阅读全文'
|
|
|
}
|
|
|
if (this.buyed === 1 && this.datas.docFileType === 2) {
|
|
@@ -799,7 +802,7 @@ export default {
|
|
|
}
|
|
|
return
|
|
|
}
|
|
|
- if (this.buyed !== 1 && !this.docsInfo.docStatus && this.docsInfo.freeDownload !== 1 && this.datas.productType === 1) {
|
|
|
+ if (this.buyed !== 1 && !this.isDocVip && this.docsInfo.freeDownload !== 1 && this.datas.productType === 1) {
|
|
|
this.downLoadFreeEvent()
|
|
|
} else {
|
|
|
this.loadFile()
|