|
@@ -41,6 +41,8 @@ import { Icon, Toast, GoodsAction, GoodsActionIcon, GoodsActionButton } from 'va
|
|
|
import Recharge from '@/components/Recharge.vue'
|
|
|
import sharePop from '@/components/SharePopup.vue'
|
|
|
import { MixinTop } from '@/utils/mixin-top'
|
|
|
+const pdfjsLib = require('pdfjs-dist/build/pdf.js')
|
|
|
+const pdfjsViewer = require('pdfjs-dist/web/pdf_viewer.js')
|
|
|
|
|
|
@Component({
|
|
|
name: 'details-p',
|
|
@@ -152,22 +154,22 @@ export default class extends Vue {
|
|
|
// })
|
|
|
// }
|
|
|
|
|
|
- // init () {
|
|
|
- // console.log(this.conts)
|
|
|
- // const loadingTask = pdfjsLib.getDocument({
|
|
|
- // url: this.conts
|
|
|
- // })
|
|
|
- // loadingTask.promise.then((pdfDocument: any) => {
|
|
|
- // this.pdfDocument = pdfDocument
|
|
|
- // console.log(this.pdfDocument.numPages)
|
|
|
- // // this.updateText({type: 'count', value: this.pdfDocument.numPages})
|
|
|
- // // this.updateText({type: 'num', value: 1})
|
|
|
- // for (let i = 0; i < this.pdfDocument.numPages; i++) {
|
|
|
- // this.config.PAGE_TO_VIEW++
|
|
|
- // this.renders()
|
|
|
- // }
|
|
|
- // })
|
|
|
- // }
|
|
|
+ init () {
|
|
|
+ console.log(this.conts)
|
|
|
+ const loadingTask = pdfjsLib.getDocument({
|
|
|
+ url: this.conts
|
|
|
+ })
|
|
|
+ loadingTask.promise.then((pdfDocument: any) => {
|
|
|
+ this.pdfDocument = pdfDocument
|
|
|
+ console.log(this.pdfDocument.numPages)
|
|
|
+ // this.updateText({type: 'count', value: this.pdfDocument.numPages})
|
|
|
+ // this.updateText({type: 'num', value: 1})
|
|
|
+ for (let i = 0; i < this.pdfDocument.numPages; i++) {
|
|
|
+ this.config.PAGE_TO_VIEW++
|
|
|
+ // this.renders()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
watchPage () {
|
|
|
const top = window.scrollY
|