Content.vue 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420
  1. <template>
  2. <div class="detail-main">
  3. <div class="c-details">
  4. <div class="d-left" v-loading="loading">
  5. <div class="tops">
  6. <h1>
  7. <div>
  8. <i :class="'el-icon-jy-' + fileType(datas.docFileType)"></i>
  9. </div>
  10. {{ datas.docName }}
  11. </h1>
  12. <div class="cd-tips">
  13. <ul>
  14. <li class="li-tags" v-for="item in getContentTags" :key="item">{{ item }}</li>
  15. <li class="type-tag" :class="datas.productType === 2 ? 'boutique' : 'free'">{{ datas.productType === 2 ? '付费精品' : '会员免费' }}</li>
  16. <li>{{ datas.viewTimes || 0 }}次浏览<el-divider direction="vertical"></el-divider></li>
  17. <li>{{ datas.downTimes || 0 }}次下载<el-divider direction="vertical"></el-divider></li>
  18. <li>共{{ datas.docPageSize }}页<el-divider direction="vertical"></el-divider></li>
  19. <li>{{ datas.docFileSize }}<el-divider direction="vertical"></el-divider></li>
  20. <li class="no-line">{{ datas.uploadDate }}上传</li>
  21. </ul>
  22. <!-- <div class="coin"><i class="el-icon-jy-iconJianYu"></i><span>{{ datas.price }}</span></div> -->
  23. </div>
  24. <el-divider class="heng-line" v-if="lineShow"></el-divider>
  25. </div>
  26. <div class="middles middles-summary" :class="{ 'actives': buyed == 0}" v-if=" buyed == 0 && datas.source === 1 && !islogin">
  27. <h3>摘要</h3>
  28. <p>{{ datas.docSummary }}</p>
  29. <div class="continue" v-if="buyed == 0">全文共{{ datas.docPageSize }}页,<span @click="continued">阅读全文<i
  30. class="el-icon-arrow-down"></i></span></div>
  31. </div>
  32. <div class="middles preview-page" v-if="buyed === 0 && (islogin || (!islogin && datas.source === 2))">
  33. <div class="preview-content">
  34. <!--剑鱼文档全为PDF-->
  35. <div v-if="datas.source === 1 ">
  36. <div class="cont-p" id="previewPdfPage"></div>
  37. </div>
  38. <div class="file-content file-word-docx" v-else>
  39. <img v-for="(iUrl, ind) in previewConfig.docinImg" :key="'iUrl_' + ind" :src="iUrl" alt="预览">
  40. </div>
  41. </div>
  42. <div class="continue" v-if="unreadPage > 0 && datas.docPageSize > 1 && guideText">
  43. 剩余{{ unreadPage }}页未读,<span @click="continued">{{ guideText }}
  44. <i class="el-icon-arrow-down"></i></span>
  45. </div>
  46. </div>
  47. <div class="head-tip" id="fixedTop" :class="{ 'is-fixed': fixed }">
  48. <h3 v-show="fixed">
  49. <i :class="'el-icon-jy-' + fileType(datas.docFileType)"></i>
  50. <span>{{ datas.docName }}</span>
  51. </h3>
  52. <span v-if="page_count" class="pages"><i>{{ page_num }}</i> / <i>{{ page_count }}</i></span>
  53. </div>
  54. <!-- 豆丁的文档渲染错误后,需要处理成最多预览5页图片-->
  55. <div class="bottoms-preview" v-if="docLoadError && buyed === 1">
  56. <div class="preview-content">
  57. <!--剑鱼文档全为PDF-->
  58. <div class="file-content">
  59. <img v-for="(iUrl, ind) in previewConfig.docinImg" :key="'iUrl_' + ind" :src="iUrl" alt="预览">
  60. </div>
  61. <div class="continue" v-if="unreadPage > 0 && datas.docPageSize > 1 && guideText">
  62. 剩余{{ unreadPage }}页未读,<span @click="continued">{{ guideText }}
  63. <i class="el-icon-arrow-down"></i></span>
  64. </div>
  65. </div>
  66. </div>
  67. <div class="bottoms" id="colWidth">
  68. <div class="page" v-show="!docLoadError">
  69. <div class="cont-p" v-show="fileTypeThis !== 'docx' && fileTypeThis !== 'xlsx'" id="pdfPage"></div>
  70. <div class="file-content file-word-docx" id="docxPage" v-if="fileTypeThis === 'docx'">
  71. <vue-office-docx
  72. :src="fileSrc.docSrc"
  73. style="margin-bottom: 24px; height: 100vh;"
  74. @rendered="rendered"
  75. @error="errorHandler()"
  76. />
  77. </div>
  78. <div class="file-content file-word-docx" id="xlsxPage" v-if="fileTypeThis === 'xlsx' || fileTypeThis === 'xls'">
  79. <vue-office-excel
  80. :src="fileSrc.excelSrc"
  81. :options="excelOptions"
  82. style="margin-bottom: 24px; height: 100vh"
  83. @rendered="rendered"
  84. @error="errorHandler"
  85. />
  86. </div>
  87. </div>
  88. <div class="foot-tip tops" id="footp">
  89. <div class="member-time-tip" v-if="redShow && islogin">
  90. <span class="warn-icon">i</span>
  91. <span>您的文库会员将于{{ surplusDay }}到期,续费即享下载特权!</span>
  92. <span @click="goRenew" style="color: #2ABED1;cursor: pointer;">请点击前往续费></span>
  93. <span @click="redShow = false" class="time-tip-close el-icon-close"></span>
  94. </div>
  95. <div class="doc-detail-ad" v-else-if="!redShow && jyPcDocmemberDetail && jyPcDocmemberDetail.length">
  96. <div class="doc-detail-ad-img">
  97. <a :href="jyPcDocmemberDetail[0].s_link || 'javascript:;'">
  98. <img :src="jyPcDocmemberDetail[0].s_pic" :alt="jyPcDocmemberDetail[0].s_remark" />
  99. </a>
  100. </div>
  101. <span @click="jyPcDocmemberDetail = []" class="time-tip-close el-icon-close"></span>
  102. </div>
  103. <div class="load-doc">
  104. <div class="icons">
  105. <el-tooltip placement="bottom" effect="light" popper-class="f-share">
  106. <span class="spa1"><i class="el-icon-jy-share"></i>分享</span>
  107. <div slot="content">
  108. <img :src="locaHref + '/jydocs/share/img?docId=' + docIds" width="110" height="108">
  109. <p style="color: #686868;font-size: 14px;text-align:center;">微信扫码分享</p>
  110. </div>
  111. </el-tooltip>
  112. <span class="spa1 spa2" @click="shoucang"><i
  113. :class="collectd == 1 ? 'el-icon-jy-guanzhu' : 'el-icon-jy-weiguanzhu'"></i>{{ collectd == 1 ? '已收藏' :
  114. '收藏' }}</span>
  115. <el-tooltip content="如果您发现此内容有侵权行为,请联系客服400-108-6670进行投诉" placement="top" effect="dark">
  116. <span class="spa1"><i class="el-icon-jy-jubao"></i>投诉举报</span>
  117. </el-tooltip>
  118. </div>
  119. <div class="file-action">
  120. <!-- 会员免费文档 -->
  121. <div class="file-action-content member-free" v-if="datas.productType === 1">
  122. <div class="coin before-coin" v-if="buyed !== 1 && docsInfo.freeDownload !== 1">原价:<i class="el-icon-jy-iconJianYu"></i><span style="text-decoration: line-through;">{{ datas.price }}</span></div>
  123. <div class="member-mark" v-if="buyed !== 1 && docsInfo.docStatus > 0">会员免费</div>
  124. <el-button class="prime-cost origin-cost" type="primary" @click="primeLoadFile" v-if="showCostBtn">
  125. <i class="el-icon-jy-iconJianYu"></i>
  126. <span>{{ datas.price }}</span>
  127. <span>原价下载</span>
  128. </el-button>
  129. <el-button class="prime-cost" @click="downLoadFreeEvent" v-if="islogin && buyed !== 1 && !docsInfo.docStatus && docsInfo.freeDownload !== 1">
  130. <span>使用免费下载特权</span>
  131. <span>(1次机会)</span>
  132. </el-button>
  133. <div class="file-download" v-if="buyed === 1">
  134. 您已下载过该文档,可再次下载
  135. </div>
  136. <el-button type="primary" @click="loadFile">{{ btnName }}</el-button>
  137. </div>
  138. <!-- 精品文档 -->
  139. <div class="file-action-content member-pay" v-else>
  140. <el-button class="prime-cost origin-cost" type="primary" @click="primeLoadFile" v-if="!docsInfo.docStatus && buyed === 0">
  141. <i class="el-icon-jy-iconJianYu"></i>
  142. <span>{{ datas.price }}</span>
  143. <span>原价下载</span>
  144. </el-button>
  145. <div class="coin before-coin" v-if="docsInfo.docStatus > 0 && buyed === 0">
  146. 原价:<i class="el-icon-jy-iconJianYu"></i>
  147. <span style="text-decoration: line-through;">{{ datas.price }}</span>
  148. </div>
  149. <div class="coin after-coin" v-if="docsInfo.docStatus > 0 && buyed === 0">
  150. 会员价:<i class="el-icon-jy-iconJianYu"></i>
  151. <span style="color: #FF3A20;font-size: 24px;">{{ datas.docMemberPrice }}</span>
  152. </div>
  153. <div class="file-download" v-if="buyed === 1">
  154. 您已下载过该文档,可再次下载
  155. </div>
  156. <el-button type="primary" @click="loadFile">{{ btnName }}</el-button>
  157. </div>
  158. </div>
  159. </div>
  160. </div>
  161. <div class="transition-dom" ref="transitionDom"></div>
  162. </div>
  163. </div>
  164. <collect-info ref="collectRef"></collect-info>
  165. <common-dialog
  166. width="386px"
  167. @confirm="dialogConfirm"
  168. @cancel="dialogCancel"
  169. :confirm-text="dialogInfo.confirmText"
  170. :show-footer="true"
  171. :cancel-text="dialogInfo.cancelText"
  172. :title="dialogInfo.title"
  173. :show-cancel="dialogInfo.showCancel"
  174. :visible="dialogInfo.visible">
  175. <div class="dialog-content" style="text-align: center" v-html="dialogInfo.content"></div>
  176. <span slot="footText">{{ dialogInfo.footText }}</span>
  177. </common-dialog>
  178. <div class="d-right">
  179. <div class="r-tops">
  180. <a :href="item.s_link ? item.s_link : 'javascript:;'" v-for="item in adsUrl" :key="item.s_pic">
  181. <img :src="item.s_pic">
  182. </a>
  183. </div>
  184. <v-recommend :recomes="recomes"></v-recommend>
  185. </div>
  186. </div>
  187. </div>
  188. </template>
  189. <script>
  190. import { Button, Tooltip, Divider, Message } from 'element-ui'
  191. import { getDetails, getShow, getRecommend, getDown, getCoin, getAdd, getRemove, getSimpleData } from '../api/modules/detail'
  192. import { formatSize, dateFormatter, recoveryPageData } from '@/utils/'
  193. import vRecommend from '@/components/recommend'
  194. import CollectInfo from '@/components/collect-info/CollectInfo'
  195. import commonDialog from '@/components/dialog/Dialog'
  196. import { getSearchTag } from '../api/modules/home'
  197. import { getDocPays } from '../api/modules/purchase'
  198. import { getJyAdListApi } from '../api/modules/publicapply'
  199. import { mapState } from 'vuex'
  200. // 引入VueOfficeDocx组件
  201. import VueOfficeDocx from '@vue-office/docx'
  202. import VueOfficeExcel from '@vue-office/excel'
  203. // 引入相关样式
  204. import '@vue-office/docx/lib/index.css'
  205. import '@vue-office/excel/lib/index.css'
  206. export default {
  207. components: {
  208. [Button.name]: Button,
  209. [Tooltip.name]: Tooltip,
  210. [Divider.name]: Divider,
  211. [Message.name]: Message,
  212. vRecommend,
  213. commonDialog,
  214. CollectInfo,
  215. VueOfficeDocx,
  216. VueOfficeExcel
  217. },
  218. data () {
  219. return {
  220. loading: false,
  221. docIds: '',
  222. locaHref: '',
  223. datas: [],
  224. conts: [],
  225. adsUrl: [],
  226. recomes: [],
  227. coinNum: 0,
  228. btnName: '',
  229. buyed: 0,
  230. downloadStatus: 0,
  231. collectd: 0,
  232. offsetTop: 0,
  233. offsetWidth: 0,
  234. colWidth: 0,
  235. page_num: 0,
  236. page_count: 0,
  237. redShow: false,
  238. lineShow: false,
  239. fixed: false,
  240. pdfh5: null,
  241. pdfDocument: null,
  242. config: {
  243. PAGE_TO_VIEW: 0,
  244. SCALE: 1.0,
  245. CMAP_URL: 'https://cdn.jsdelivr.net/npm/pdfjs-dist@2.1.266/cmaps/',
  246. CMAP_PACKED: true,
  247. workerSrc: 'https://cdn.jsdelivr.net/npm/pdfjs-dist@2.1.266/build/pdf.worker.min.js'
  248. },
  249. pData: {
  250. heightList: []
  251. },
  252. tabs: [],
  253. islogin: false,
  254. // userMemberInfo: {},
  255. dialogInfo: {
  256. visible: false,
  257. title: '文档下载成功',
  258. content: `已添加到您的文库中,您可前往<span class="high-light">【工作台-服务-我的文库】</span>查看。`,
  259. footText: '会员免费文档下载特权:消耗1篇 | 今日还剩余99篇',
  260. showCancel: false,
  261. confirmText: '我知道了'
  262. },
  263. jyPcDocmemberDetail: [],
  264. docsInfo: {
  265. docStatus: 0,
  266. endDate: 0,
  267. freeDownload: 0,
  268. startDate: 0
  269. },
  270. surplusDay: 0, // 剩余多少天到期
  271. fileSrc: {
  272. docSrc: '',
  273. excelSrc: ''
  274. },
  275. fileTypeThis: '', // 当前文件类型
  276. excelOptions: {
  277. xls: false
  278. },
  279. previewConfig: {
  280. pageNums: 1,
  281. docinImg: []
  282. },
  283. // 文档加载失败
  284. docLoadError: false,
  285. }
  286. },
  287. created () {
  288. window.loginCallback = this.loginCallback
  289. this.docIds = this.$route.params.id
  290. this.locaHref = window.location.origin
  291. this.getSimpleData_()
  292. this.setTop()
  293. this.adverse()
  294. },
  295. beforeCreate () {
  296. $('.docs-app').addClass('page-content')
  297. },
  298. mounted () {
  299. this.details()
  300. window.addEventListener('scroll', this.initHeight)
  301. },
  302. beforeMount () {
  303. this.tabs = recoveryPageData('jy-docs-search-tags-pc')
  304. this.getTags()
  305. },
  306. destroyed () { // 移除监听
  307. window.removeEventListener('scroll', this.initHeight)
  308. },
  309. computed: {
  310. ...mapState('user', ['userMemberInfo']),
  311. getContentTags () {
  312. const a = new Set(this.datas.tags)
  313. const b = new Set(this.tabs.map(v => v.type))
  314. const arr = Array.from(new Set([...b].filter(x => a.has(x))))
  315. const oldArr = Array.from(a)
  316. arr.forEach(v => {
  317. oldArr.splice(oldArr.indexOf(v), 1)
  318. })
  319. const nArr = arr.concat(oldArr)
  320. return nArr.splice(0, 3)
  321. },
  322. showCostBtn () {
  323. return (this.buyed !== 1 && !this.docsInfo.docStatus && this.docsInfo.freeDownload === 1 && this.downloadStatus !== 1) || !this.islogin
  324. },
  325. // 未购买预览时,未读页码; 或者豆丁渲染错误,
  326. unreadPage () {
  327. return this.datas.docPageSize - this.previewConfig.pageNums
  328. },
  329. // P620需求:1、未购买预览时,引流文案
  330. // 或者,购买豆丁文件加载时错误后,最多预览5页,最后的引流文案
  331. guideText () {
  332. let btnText = '下载文档阅读全文'
  333. if (!this.islogin) {
  334. return '开通文库会员免费阅读全文'
  335. }
  336. if(this.docLoadError) {
  337. return '下载文档阅读全文'
  338. }
  339. // 会员
  340. if (this.docsInfo?.docStatus > 0 || (this.buyed === 1 && this.datas.source === 2 && this.datas.docFileType !== 2)) {
  341. btnText = '下载文档阅读全文'
  342. } else if (this.docsInfo?.docStatus <= 0 && this.buyed === 0) {
  343. if (this.datas.productType === 2) {
  344. btnText = `开通文库会员${this.datas.docMemberDiscount}折下载文档阅读全文`
  345. } else {
  346. btnText = '开通文库会员免费阅读全文'
  347. }
  348. }
  349. // 会员免费文档+未下载+不是会员+未使用1次免费下载特权
  350. if (this.islogin && this.datas.productType === 1 && this.buyed === 0 && !this.docsInfo.docStatus && this.docsInfo.freeDownload !== 1) {
  351. btnText = '使用免费下载特权阅读全文'
  352. }
  353. if (this.buyed === 1 && this.datas.docFileType === 2) {
  354. btnText = ''
  355. }
  356. return btnText
  357. }
  358. },
  359. watch: {
  360. userMemberInfo: {
  361. handler (val) {
  362. if (val && val.docsInfo) {
  363. this.docsInfo = val.docsInfo
  364. const date = parseInt(new Date().getTime() / 1000)
  365. const sevenDay = 60 * 60 * 24 * 7
  366. const oneDay = 60 * 60 * 24
  367. const surplus = parseInt(val.docsInfo?.endDate - date)
  368. if (surplus <= sevenDay && val.docsInfo.docStatus === 1) {
  369. this.redShow = true
  370. this.surplusDay = (surplus / oneDay)
  371. // 如果剩余天数不到1天,则显示今天到期
  372. if (this.surplusDay < 1) {
  373. this.surplusDay = '今天'
  374. } else {
  375. this.surplusDay = this.surplusDay.toFixed(0) + '天后'
  376. }
  377. }
  378. }
  379. },
  380. immediate: true
  381. }
  382. },
  383. methods: {
  384. rendered () {
  385. console.log('渲染完成')
  386. },
  387. errorHandler () {
  388. this.ddErrorPreview()
  389. console.log('渲染失败')
  390. },
  391. // 使用免费下载特权
  392. downLoadFreeEvent () {
  393. if (this.docsInfo?.freeDownload === 0) {
  394. // 未留资,去留资
  395. try {
  396. this.$refs.collectRef.noCallApiFn('pc_library_details_free', true)
  397. } catch (error) {
  398. console.log(error)
  399. }
  400. } else if (this.docsInfo?.freeDownload === 2) {
  401. // 已留资,未使用特权,可以下载
  402. getDocPays({ docId: this.datas.docId, payType: 2 }).then((res) => {
  403. if (res.data.error_code === 0) {
  404. const params = {
  405. visible: true,
  406. title: '文档下载成功',
  407. content: `已添加到您的文库中,您可前往<span class="high-light">【工作台-服务-我的文库】</span>查看。`,
  408. footText: '',
  409. showCancel: false,
  410. confirmText: '我知道了'
  411. }
  412. this.dialogInfo = params
  413. this.buyed = 1
  414. this.getDocInfo()
  415. }
  416. })
  417. }
  418. },
  419. dialogConfirm () {
  420. const text = this.dialogInfo.confirmText
  421. if (text === '立即充值') {
  422. window.location.href = '/swordfish/integral/index/recharge?id=' + this.datas.docId
  423. } else if (text === '明日再来' || text === '我知道了') {
  424. if (this.dialogInfo.title === '文档下载成功') {
  425. // 加载文档内容,刷新页面
  426. location.reload()
  427. } else {
  428. this.dialogInfo.visible = false
  429. }
  430. }
  431. },
  432. dialogCancel () {
  433. const text = this.dialogInfo.cancelText
  434. if (text === '原价下载') {
  435. this.dialogInfo.visible = false
  436. this.primeLoadFile()
  437. } else {
  438. this.dialogInfo.visible = false
  439. }
  440. },
  441. async getDocInfo () {
  442. if (this.docsInfo?.docStatus > 0 || this.buyed === 1) {
  443. this.btnName = '下载文档'
  444. } else {
  445. if (this.datas.productType === 2) {
  446. this.btnName = `开通文库会员,享${this.datas.docMemberDiscount}折下载`
  447. } else {
  448. this.btnName = '开通文库会员免费下载'
  449. }
  450. }
  451. },
  452. loginCallback () {
  453. this.islogin = true
  454. this.adverse()
  455. this.tabs = recoveryPageData('jy-docs-search-tags-pc')
  456. this.getTags()
  457. },
  458. getSimpleData_ () {
  459. getSimpleData({ t: new Date().getTime() }).then((res) => {
  460. if (!res.data.error) {
  461. this.islogin = true
  462. }
  463. })
  464. },
  465. // 前往续费
  466. goRenew () {
  467. window.location.href = '/swordfish/page_big_pc/order/doc-member'
  468. },
  469. setTop () {
  470. this.$nextTick(() => {
  471. // 获取到达页面顶端的值
  472. const heights = document.getElementById('fixedTop')
  473. this.offsetTop = heights.getBoundingClientRect().top
  474. const headerNav = document.getElementById('public-nav')
  475. if (headerNav) {
  476. const headerTop = headerNav.offsetHeight
  477. heights.style.top = headerTop + 'px'
  478. }
  479. })
  480. },
  481. initHeight () {
  482. // 获取页面滚动距离
  483. const scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
  484. this.fixed = !!(scrollTop > this.offsetTop && this.buyed)
  485. this.watchPage()
  486. let t = document.getElementById('pdfPage')
  487. if (this.fileTypeThis === 'docx') {
  488. t = document.getElementById('docxPage')
  489. } else if (this.fileTypeThis === 'xlsx' || this.fileTypeThis === 'xls') {
  490. t = document.getElementById('xlsxPage')
  491. }
  492. const targetElement = this.$refs.transitionDom
  493. const rect = targetElement.getBoundingClientRect()
  494. const innerHeight = window.innerHeight
  495. const b = t.getBoundingClientRect().bottom
  496. const dom = document.getElementById('footp')
  497. if (b < 500 || rect.top < innerHeight) {
  498. dom.style.position = 'unset'
  499. } else {
  500. dom.style.position = 'fixed'
  501. dom.style.bottom = '0px'
  502. dom.style.zIndex = '99'
  503. }
  504. },
  505. updateText ({ type, value = '' }) {
  506. switch (type) {
  507. case 'count': {
  508. this.page_count = value
  509. break
  510. }
  511. case 'num': {
  512. this.page_num = value
  513. break
  514. }
  515. }
  516. },
  517. renders (type) {
  518. let container = document.getElementById('pdfPage')
  519. if (type === 'preview') {
  520. container = document.getElementById('previewPdfPage')
  521. }
  522. return this.pdfDocument.getPage(this.config.PAGE_TO_VIEW).then((pdfPage) => {
  523. var pdfPageView = new pdfjsViewer.PDFPageView({
  524. container: container,
  525. id: this.config.PAGE_TO_VIEW,
  526. scale: this.config.SCALE,
  527. defaultViewport: pdfPage.getViewport({ scale: this.config.SCALE }),
  528. eventBus: new pdfjsViewer.EventBus(),
  529. annotationLayerFactory: new pdfjsViewer.DefaultAnnotationLayerFactory()
  530. })
  531. pdfPageView.setPdfPage(pdfPage)
  532. this.pData.heightList.push(pdfPageView.viewport.height)
  533. return pdfPageView.draw()
  534. })
  535. },
  536. init (type) {
  537. pdfjsLib.GlobalWorkerOptions.workerSrc = this.config.workerSrc
  538. const loadingTask = pdfjsLib.getDocument({
  539. url: this.conts.data,
  540. cMapUrl: this.config.CMAP_URL,
  541. cMapPacked: this.config.CMAP_PACKED
  542. })
  543. loadingTask.promise.then((pdfDocument) => {
  544. this.pdfDocument = pdfDocument
  545. this.updateText({ type: 'count', value: this.pdfDocument.numPages })
  546. this.updateText({ type: 'num', value: 1 })
  547. const numPages = type === 'preview' ? this.previewConfig.pageNums : this.pdfDocument.numPages
  548. for (let i = 0; i < numPages; i++) {
  549. this.config.PAGE_TO_VIEW++
  550. this.renders(type)
  551. }
  552. this.loading = false
  553. }).catch((e) => {
  554. console.log('-------加载错误了------')
  555. console.warn(e)
  556. this.loading = false
  557. // 文档加载失败
  558. if (this.datas.source === 2) {
  559. this.ddErrorPreview()
  560. }
  561. })
  562. },
  563. watchPage () {
  564. const top = window.scrollY
  565. let base = 0
  566. for (let i = 0; i < this.pData.heightList.length; i++) {
  567. base += this.pData.heightList[i]
  568. if (top <= base) {
  569. this.updateText({ type: 'num', value: i + 1 })
  570. break
  571. }
  572. }
  573. },
  574. buyShow (type) {
  575. this.loading = true
  576. getShow({ docId: this.docIds }).then(res => {
  577. if (res.data.error_code === 0) {
  578. this.conts = res.data
  579. let FileIndex = 0
  580. const fileExtensions = ['doc', 'docx', 'pdf', 'xls', 'xlsx', 'ppt', 'txt']
  581. fileExtensions.forEach((v, index) => {
  582. if (this.conts.data.indexOf(v) > -1){
  583. FileIndex = index
  584. }
  585. })
  586. this.fileTypeThis = fileExtensions[FileIndex]
  587. if (fileExtensions[FileIndex] === 'docx' || fileExtensions[FileIndex] === 'xlsx' || fileExtensions[FileIndex] === 'xls') {
  588. this.loading = false
  589. }
  590. switch (fileExtensions[FileIndex]) {
  591. case 'docx':
  592. // this.fileSrc.docSrc = res.data.data
  593. this.ddErrorPreview()
  594. break
  595. case 'xlsx':
  596. this.excelOptions.xls = false
  597. this.fileSrc.excelSrc = res.data.data
  598. break
  599. case 'xls':
  600. this.excelOptions.xls = true
  601. this.fileSrc.excelSrc = res.data.data
  602. default:
  603. this.init(type)
  604. break
  605. }
  606. } else {
  607. this.loading = false
  608. Message({
  609. message: res.data.error_msg,
  610. type: 'warning'
  611. })
  612. }
  613. }).catch(() => {
  614. this.loading = false
  615. })
  616. },
  617. coined () {
  618. getCoin({ B: true }).then(res => {
  619. if (res.data.error_code === 0) {
  620. this.coinNum = res.data.data.points.balance
  621. // if (this.buyed === 1) {
  622. // this.btnName = '下载文档'
  623. // this.lineShow = false
  624. // } else {
  625. // if (this.coinNum < this.datas.price) {
  626. // this.btnName = '立即充值'
  627. // this.redShow = true
  628. // } else {
  629. // this.btnName = '下载文档'
  630. // this.redShow = false
  631. // this.lineShow = true
  632. // }
  633. // }
  634. }
  635. })
  636. },
  637. recommend (str) {
  638. this.recomes = []
  639. getRecommend({ docTag: str, docId: this.docIds, num: 3 }).then(res => {
  640. res.data.data.forEach(v => {
  641. v.docFileSize = formatSize(v.docFileSize)
  642. this.recomes.push(v)
  643. })
  644. })
  645. },
  646. getTags () {
  647. getSearchTag().then(res => {
  648. if (!res.data.error_msg.length) {
  649. this.tabs = res.data.data.map(v => {
  650. return {
  651. type: v,
  652. label: v
  653. }
  654. })
  655. sessionStorage.setItem('jy-docs-search-tags-pc', JSON.stringify(this.tabs))
  656. }
  657. })
  658. },
  659. details () {
  660. getDetails({ docId: this.docIds, from: this.$route.query.from }).then(data => {
  661. const res = data.data
  662. if (res.error_code === 0) {
  663. this.recommend(res.data.detail.tags)
  664. this.datas = res.data.detail
  665. this.datas.docFileSize = formatSize(this.datas.docFileSize)
  666. this.datas.uploadDate = dateFormatter(this.datas.uploadDate.replace(/-/g, '/'), 'yyyy/MM/dd')
  667. if (this.datas.docSummary) {
  668. this.datas.docSummary = this.datas.docSummary.split('').length >= 500 ? this.datas.docSummary + '...' : this.datas.docSummary
  669. } else {
  670. this.datas.docSummary = ''
  671. }
  672. this.datas.tags = this.datas.tags.split(',')
  673. this.buyed = res.data.status
  674. this.downloadStatus = res.data.downloadStatus
  675. if (this.buyed === 1) {
  676. document.getElementById('fixedTop').style.display = 'block'
  677. document.getElementById('footp').style.position = 'fixed'
  678. document.getElementById('footp').style.bottom = '0'
  679. } else {
  680. document.getElementById('fixedTop').style.display = 'none'
  681. // 处理预览展示
  682. this.disposePreviewContent(this.datas)
  683. }
  684. this.getDocInfo()
  685. this.coined()
  686. // 已经下载过,显示文档内容
  687. if (res.data.status === 1) {
  688. this.buyShow()
  689. }
  690. this.collectd = res.data.collect
  691. // 监听滚轮
  692. setTimeout(() => {
  693. this.initHeight()
  694. }, 500)
  695. } else {
  696. Message({
  697. message: res.error_msg,
  698. type: 'warning'
  699. })
  700. }
  701. })
  702. },
  703. // 处理预览展示
  704. disposePreviewContent (details) {
  705. this.previewConfig.docinImg = []
  706. // P620需求 总页数≥3页:最多预览2页;总页数≤2页:最多预览1页。
  707. // 预览页数
  708. this.previewConfig.pageNums = details.docPageSize >= 3 ? 2 : 1
  709. // 豆丁预览图片
  710. // source 2豆丁 1 剑鱼
  711. if (details.source === 2) {
  712. for (let i = 1; i <= this.previewConfig.pageNums; i++) {
  713. const ddUrl = `https://docimg1.docin.com/docinviewpic.jsp?file=${details.imgId}&width=920&pageno=${i}&sview=1&clogo=1`
  714. this.previewConfig.docinImg.push(ddUrl)
  715. }
  716. } else {
  717. // 剑鱼文档,返回的格式全部为pdf
  718. if (this.islogin) {
  719. this.buyShow('preview')
  720. }
  721. }
  722. },
  723. // 豆丁预览(如果购买后的全文加载失败,则走预览逻辑,PDF)
  724. ddErrorPreview () {
  725. this.docLoadError = true
  726. this.fixed = true
  727. this.previewConfig.docinImg = []
  728. this.previewConfig.pageNums = this.datas.docPageSize >= 5 ? 5 : this.datas.docPageSize
  729. for (let i = 1; i <= this.previewConfig.pageNums; i++) {
  730. const ddUrl = `https://docimg1.docin.com/docinviewpic.jsp?file=${this.datas.imgId}&width=920&pageno=${i}&sview=1&clogo=1`
  731. this.previewConfig.docinImg.push(ddUrl)
  732. }
  733. },
  734. adverse () {
  735. // 获取广告信息
  736. getJyAdListApi({ codes: ['jydoc-content-right', 'jy-pc-docmember-detail'] }).then(res => {
  737. const resData = res.data
  738. if (resData && resData.error_code === 0) {
  739. this.jyPcDocmemberDetail = resData.data['jy-pc-docmember-detail']
  740. this.adsUrl = resData.data['jydoc-content-right']
  741. }
  742. })
  743. },
  744. shoucang () {
  745. if (!this.islogin) {
  746. try {
  747. window.openLoginDig(false, 'reload')
  748. } catch (e) {
  749. console.log(e)
  750. }
  751. return
  752. }
  753. if (this.collectd === 0) {
  754. getAdd({ docId: this.docIds }).then(res => {
  755. if (res.data.error_code === 0) {
  756. this.collectd = 1
  757. Message({
  758. message: '收藏成功',
  759. type: 'success'
  760. })
  761. }
  762. })
  763. } else {
  764. getRemove({ docId: this.docIds }).then(res => {
  765. if (res.data.error_code === 0) {
  766. this.collectd = 0
  767. Message({
  768. message: '取消收藏',
  769. type: 'warning'
  770. })
  771. }
  772. })
  773. }
  774. },
  775. continued () {
  776. if (!this.islogin) {
  777. try {
  778. window.openLoginDig(false, 'reload')
  779. } catch (e) {
  780. console.log(e)
  781. }
  782. return
  783. }
  784. if (this.buyed !== 1 && !this.docsInfo.docStatus && this.docsInfo.freeDownload !== 1 && this.datas.productType === 1) {
  785. this.downLoadFreeEvent()
  786. } else {
  787. this.loadFile()
  788. }
  789. },
  790. loadFile () {
  791. if (!this.islogin) {
  792. try {
  793. window.openLoginDig(false, 'reload')
  794. } catch (e) {
  795. console.log(e)
  796. }
  797. return
  798. }
  799. // 已下载,点击“下载文档”,调起浏览器进行文档下载。
  800. if (this.buyed === 1) {
  801. getDown({ docId: this.datas.docId }).then(res => {
  802. if (res.data.error_code === 0) {
  803. window.location.href = res.data.data
  804. }
  805. })
  806. return
  807. }
  808. // 判断是否是会员:不是会员进入开通剑鱼文库会员页面
  809. if (!this.docsInfo.docStatus > 0) {
  810. window.location.href = '/swordfish/page_big_pc/order/doc-member'
  811. } else {
  812. // 判断文档类型:1:会员免费文档,2:精品文档
  813. if (this.datas.productType === 1) {
  814. getDocPays({ docId: this.datas.docId, payType: 0 }).then((res) => {
  815. if (res.data.error_code === 0) {
  816. let params = {}
  817. // 下载特权已用尽
  818. if (res.data.data.status === 1) {
  819. params = {
  820. visible: true,
  821. title: '今日会员免费文档下载特权已用尽',
  822. content: '建议您明日享受会员特权进行免费下载。',
  823. footText: '',
  824. showCancel: false,
  825. confirmText: '我知道了'
  826. }
  827. } else if (res.data.data.status === 0) {
  828. // 下载成功,显示下载成功弹窗
  829. params = {
  830. visible: true,
  831. title: '文档下载成功',
  832. content: `已添加到您的文库中,您可前往<span class="high-light">【工作台-服务-我的文库】</span>查看。`,
  833. footText: `会员免费文档下载特权:消耗1篇 | 今日还剩余${res.data.data.surplus}篇`,
  834. showCancel: false,
  835. confirmText: '我知道了'
  836. }
  837. this.buyed = 1
  838. this.buyShow()
  839. }
  840. this.dialogInfo = params
  841. } else {
  842. Message({
  843. message: res.data.error_msg,
  844. type: 'warning'
  845. })
  846. }
  847. })
  848. } else {
  849. // 点击“下载文档”,剑鱼币余额不足,弹窗提示:
  850. if (this.coinNum < this.datas.price) {
  851. // 剑鱼币余额不足
  852. const params = {
  853. visible: true,
  854. title: '剑鱼币余额不足',
  855. content: `现有 ${this.coinNum} 剑鱼币,还需 ${this.datas.docMemberPrice - this.coinNum} 剑鱼币,请先充值`,
  856. footText: '',
  857. showCancel: true,
  858. confirmText: '立即充值',
  859. cancelText: '我再想想'
  860. }
  861. this.dialogInfo = params
  862. } else {
  863. // 点击“下载文档”,剑鱼币余额充足,进入“剑鱼币文档兑换”页,“价值剑鱼币”按照会员价进行展示兑换。
  864. this.$router.push('/purchase/' + this.datas.docId)
  865. }
  866. }
  867. }
  868. },
  869. // 原价下载
  870. primeLoadFile () {
  871. if (!this.islogin) {
  872. try {
  873. window.openLoginDig(false, 'reload')
  874. } catch (e) {
  875. console.log(e)
  876. }
  877. return
  878. }
  879. if (this.coinNum < this.datas.price) {
  880. // 剑鱼币余额不足
  881. const params = {
  882. visible: true,
  883. title: '剑鱼币余额不足',
  884. content: `现有 <span class="high-light">${this.coinNum}</span> 剑鱼币,还需 <span class="high-light">${this.datas.price - this.coinNum}</span> 剑鱼币,请先充值`,
  885. footText: '',
  886. showCancel: true,
  887. confirmText: '立即充值',
  888. cancelText: '我再想想'
  889. }
  890. this.dialogInfo = params
  891. } else {
  892. // 进入剑鱼币文档兑换页
  893. this.$router.push(`/purchase/${this.datas.docId}?payType=1`)
  894. }
  895. },
  896. fileType (val) {
  897. if (val === 1) {
  898. return 'word'
  899. } else if (val === 2) {
  900. return 'pdf'
  901. } else if (val === 3) {
  902. return 'excel'
  903. } else if (val === 4) {
  904. return 'ppt'
  905. } else if (val === 5) {
  906. return 'txt'
  907. } else {
  908. return ''
  909. }
  910. }
  911. }
  912. }
  913. </script>
  914. <style lang="scss">
  915. .high-light{
  916. color: #2ABED1;
  917. }
  918. .cont-p {
  919. .page, .canvasWrapper, canvas {
  920. width: 100%!important;
  921. height: auto;
  922. }
  923. }
  924. </style>
  925. <style lang="scss" scoped>
  926. @include diy-icon('pdf', 24);
  927. @include diy-icon('word', 24);
  928. @include diy-icon('excel', 24);
  929. @include diy-icon('ppt', 24);
  930. @include diy-icon('txt', 24);
  931. @include diy-icon('share', 18);
  932. @include diy-icon('jubao', 18);
  933. @include diy-icon('weiguanzhu', 18);
  934. @include diy-icon('guanzhu', 18);
  935. @include diy-icon('iconJianYu', 24);
  936. .detail-main{
  937. width: 100%;
  938. background: #F2F2F4;
  939. }
  940. .c-details {
  941. position: relative;
  942. width: 1200px;
  943. display: flex;
  944. flex-direction: initial;
  945. margin: 32px auto;
  946. padding-bottom: 60px;
  947. color: #1D1D1D;
  948. .d-left {
  949. width: 920px;
  950. .tops {
  951. background: #fff;
  952. padding: 32px 40px;
  953. border-radius: 4px;
  954. h1 {
  955. display: flex;
  956. flex-direction: initial;
  957. color: #1d1d1d;
  958. font-weight: 500;
  959. font-size: 24px;
  960. line-height: 36px;
  961. margin: 0;
  962. i {
  963. display: inline-flex;
  964. margin-right: 8px;
  965. margin-top: 5px;
  966. }
  967. }
  968. .cd-tips {
  969. display: flex;
  970. justify-content: space-between;
  971. padding: 12px 0;
  972. margin-top: 8px;
  973. ul {
  974. display: flex;
  975. flex-direction: initial;
  976. align-items: center;
  977. margin: 0;
  978. padding: 0;
  979. li {
  980. display: flex;
  981. list-style-type: none;
  982. align-items: center;
  983. color: #686868;
  984. font-size: 14px;
  985. line-height: 24px;
  986. }
  987. .li-tags {
  988. padding: 2px 8px;
  989. border-radius: 4px;
  990. background: rgba(44, 167, 227, 0.08);
  991. color: #2cb7ca;
  992. font-size: 12px;
  993. line-height: 20px;
  994. text-align: center;
  995. margin-right: 8px;
  996. }
  997. .no-line {
  998. border-right: none !important;
  999. }
  1000. }
  1001. .type-tag {
  1002. padding: 1px 8px 1px 8px;
  1003. font-size: 12px;
  1004. line-height: 18px;
  1005. text-align: center;
  1006. margin-right: 8px;
  1007. border-radius: 4px;
  1008. &.free {
  1009. background: linear-gradient(98deg, #FFA674 0%, #F01212 100%);
  1010. color: #fff;
  1011. }
  1012. &.boutique{
  1013. background: linear-gradient(270deg, #F1D090 0%, #FAE7CA 100%);
  1014. color: #B1700E;
  1015. }
  1016. }
  1017. .coin {
  1018. display: flex;
  1019. align-items: center;
  1020. span {
  1021. font-size: 20px;
  1022. color: #FF3A20;
  1023. }
  1024. }
  1025. }
  1026. .buyed {
  1027. height: 24px;
  1028. color: #2CB7CA;
  1029. background: rgba(44, 183, 202, 0.05);
  1030. font-size: 12px;
  1031. line-height: 24px;
  1032. text-align: center;
  1033. border-radius: 4px;
  1034. margin: 10px 0 8px 0;
  1035. }
  1036. .no-buyed {
  1037. background: rgba(255, 58, 32, 0.05) !important;
  1038. color: rgb(255, 58, 32) !important;
  1039. }
  1040. .heng-line {
  1041. margin: 8px 0;
  1042. background-color: #ECECEC;
  1043. }
  1044. .load-doc {
  1045. height: 69px;
  1046. display: flex;
  1047. justify-content: space-between;
  1048. align-items: center;
  1049. ::v-deep .el-button {
  1050. min-width: 180px;
  1051. height: 46px;
  1052. // padding: 7px 34px 8px 34px;
  1053. border-radius: 8px;
  1054. background-color: #2CB7CA;
  1055. border-color: #2CB7CA;
  1056. &.prime-cost{
  1057. padding: 0;
  1058. background-color: #fff;
  1059. &>span{
  1060. display: flex;
  1061. flex-direction: column;
  1062. font-size: 16px;
  1063. &>span{
  1064. line-height: 24px;
  1065. color: #2ABED1;
  1066. }
  1067. &>span:last-child {
  1068. font-size: 14px;
  1069. line-height: 18px;
  1070. }
  1071. }
  1072. &.origin-cost{
  1073. &>span{
  1074. flex-direction: row;
  1075. justify-content: center;
  1076. align-items: center;
  1077. &>span{
  1078. font-size: 18px;
  1079. color: #FF3A20;
  1080. }
  1081. &>span:last-child {
  1082. margin-left: 12px;
  1083. font-size: 16px;
  1084. color: #2ABED1;
  1085. }
  1086. }
  1087. }
  1088. }
  1089. span {
  1090. color: #fff;
  1091. font-size: 16px;
  1092. }
  1093. }
  1094. .file-action{
  1095. &-content{
  1096. display: flex;
  1097. align-items: center;
  1098. .file-download{
  1099. font-size: 16px;
  1100. color: #2ABED1;
  1101. }
  1102. .coin{
  1103. display: flex;
  1104. align-items: center;
  1105. color: #999999;
  1106. font-size: 14px;
  1107. &.after-coin {
  1108. margin-left: 16px;
  1109. font-size: 14px;
  1110. color: #1D1D1D;
  1111. .el-icon-jy-iconJianYu{
  1112. width: 26px;
  1113. height: 26px;
  1114. }
  1115. }
  1116. }
  1117. .member-mark{
  1118. margin-left: 16px;
  1119. font-size: 24px;
  1120. color: #FF3A20;
  1121. }
  1122. }
  1123. }
  1124. .icons {
  1125. color: rgba(104, 104, 104, 1);
  1126. font-size: 14px;
  1127. span {
  1128. display: inline-flex;
  1129. align-items: center;
  1130. }
  1131. .spa2 {
  1132. margin-left: 16px;
  1133. margin-right: 16px;
  1134. cursor: pointer;
  1135. }
  1136. .spa1 {
  1137. i {
  1138. height: 18px;
  1139. margin-right: 5px;
  1140. }
  1141. }
  1142. }
  1143. }
  1144. }
  1145. .middles, .bottoms-preview {
  1146. padding: 24px 0;
  1147. background: #fff;
  1148. border-radius: 4px;
  1149. margin: 16px 0;
  1150. position: relative;
  1151. h3 {
  1152. font-size: 18px;
  1153. line-height: 28px;
  1154. font-weight: 500;
  1155. }
  1156. p {
  1157. color: #686868;
  1158. font-size: 14px;
  1159. line-height: 22px;
  1160. margin-top: 16px;
  1161. text-align: justify;
  1162. }
  1163. .continue {
  1164. position: absolute;
  1165. width: 100%;
  1166. height: 400px;
  1167. color: #686868;
  1168. font-size: 16px;
  1169. line-height: 24px;
  1170. display: flex;
  1171. align-items: flex-end;
  1172. justify-content: center;
  1173. padding-bottom: 27px;
  1174. background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 75%);
  1175. bottom: 24px;
  1176. left:0;
  1177. span {
  1178. color: #2CB7CA;
  1179. cursor: pointer;
  1180. i {
  1181. margin-left: 7px;
  1182. }
  1183. }
  1184. }
  1185. }
  1186. .middles.middles-summary{
  1187. padding: 24px 40px;
  1188. .continue {
  1189. position: unset;
  1190. height: unset;
  1191. color: #686868;
  1192. margin-top: 36px;
  1193. }
  1194. }
  1195. .actives {
  1196. // height: 656px;
  1197. padding: 24px 40px 48px;
  1198. }
  1199. .actives1 {
  1200. height: 680px;
  1201. }
  1202. .head-tip {
  1203. width: auto;
  1204. height: 42px;
  1205. line-height: 42px;
  1206. background: #fcfcfc;
  1207. padding: 0 40px;
  1208. border-bottom: 1px solid #F2F2F4;
  1209. h3 {
  1210. float: left;
  1211. line-height: 42px;
  1212. span {
  1213. width: 700px;
  1214. color: #686868;
  1215. font-weight: 500;
  1216. font-size: 16px;
  1217. overflow: hidden;
  1218. text-overflow: ellipsis;
  1219. white-space: nowrap;
  1220. }
  1221. i {
  1222. margin-right: 8px;
  1223. vertical-align: middle;
  1224. }
  1225. }
  1226. .pages {
  1227. float: right;
  1228. color: #686868;
  1229. font-size: 14px;
  1230. i:first-child {
  1231. display: inline-block;
  1232. font-style: normal;
  1233. width: 22px;
  1234. height: 22px;
  1235. line-height: 24px;
  1236. text-align: center;
  1237. border-radius: 2px;
  1238. background: #FFFFFF;
  1239. border: 1px solid #ECECEC;
  1240. }
  1241. }
  1242. }
  1243. .is-fixed {
  1244. position: fixed;
  1245. top: 0;
  1246. width: 920px;
  1247. }
  1248. .bottoms-preview{
  1249. padding: 24px 0;
  1250. background: #fff;
  1251. border-radius: 4px;
  1252. margin: 16px 0;
  1253. }
  1254. .bottoms {
  1255. // position: fixed;
  1256. // bottom: 0;
  1257. display: flex;
  1258. flex-direction: column;
  1259. .page {
  1260. .cont-p {
  1261. display: flex;
  1262. flex-direction: column;
  1263. align-items: center;
  1264. background: #fff;
  1265. // padding: 24px 40px 32px;
  1266. }
  1267. ::v-deep {
  1268. .docx-wrapper {
  1269. padding: 0;
  1270. background: #fff;
  1271. }
  1272. .vue-office-docx .docx-wrapper>section.docx{
  1273. width: 100%!important;
  1274. }
  1275. }
  1276. }
  1277. .foot-tip {
  1278. width: 920px;
  1279. height: auto;
  1280. background: #FFFFFF;
  1281. box-shadow: 0px 0px 28px 0px rgba(0, 0, 0, 0.08);
  1282. padding: 0;
  1283. border-radius: 0;
  1284. z-index: 99;
  1285. .member-time-tip{
  1286. position: relative;
  1287. display: flex;
  1288. align-items: center;
  1289. padding: 9px 0 9px 24px;
  1290. font-size: 14px;
  1291. color: #FF3A20;
  1292. line-height: 22px;
  1293. background-color: #FFECE9;
  1294. .warn-icon{
  1295. display: flex;
  1296. justify-content: center;
  1297. align-items: center;
  1298. margin-right: 8px;
  1299. width: 20px;
  1300. height: 20px;
  1301. border-radius: 50%;
  1302. font-size: 14px;
  1303. color: #fff;
  1304. background: #F56500;
  1305. }
  1306. }
  1307. .time-tip-close{
  1308. position: absolute;
  1309. right: 24px;
  1310. top: 11px;
  1311. cursor: pointer;
  1312. font-size: 18px;
  1313. color: #AAAAAA;
  1314. }
  1315. .doc-detail-ad{
  1316. position: relative;
  1317. width: 920px;
  1318. height: 64px;
  1319. .doc-detail-ad-img{
  1320. height: 100%;
  1321. }
  1322. img{
  1323. width: 100%;
  1324. height: 100%;
  1325. }
  1326. .time-tip-close{
  1327. color: #fff;
  1328. }
  1329. }
  1330. .load-doc {
  1331. height: 68px;
  1332. padding: 0 40px;
  1333. // justify-content: flex-end;
  1334. .spa2 {
  1335. cursor: pointer;
  1336. }
  1337. button {
  1338. margin-left: 24px;
  1339. }
  1340. }
  1341. }
  1342. }
  1343. }
  1344. .d-right {
  1345. width: 264px;
  1346. height: 904px;
  1347. margin-left: 16px;
  1348. // position: fixed;
  1349. .r-tops {
  1350. overflow: hidden;
  1351. min-height: 456px;
  1352. border-radius: 4px;
  1353. img {
  1354. width: 100%;
  1355. cursor: pointer;
  1356. }
  1357. img:not(:last-child) {
  1358. margin-bottom: 5px;
  1359. }
  1360. }
  1361. }
  1362. }
  1363. ::v-deep {
  1364. .page:not(:first-of-type) {
  1365. border-top: 6px solid #f2f2f2;
  1366. }
  1367. }
  1368. .preview-content {
  1369. img:not(:first-of-type) {
  1370. border-top: 6px solid #f2f2f2;
  1371. }
  1372. }
  1373. </style>