chunk-67d349be.353be8c2.js.map 14 KB

1
  1. {"version":3,"sources":["webpack:///./src/views/ppt-view.vue?1a54","webpack:///./src/assets/icon-128.png","webpack:///./src/views/ppt-view.vue","webpack:///src/views/ppt-view.vue","webpack:///./src/views/ppt-view.vue?ad35","webpack:///./src/views/ppt-view.vue?aaab","webpack:///./src/components/pdf/index.vue","webpack:///src/components/pdf/index.vue","webpack:///./src/components/pdf/index.vue?7511","webpack:///./src/components/pdf/index.vue?907a","webpack:///./src/components/pdf/index.vue?440c"],"names":["module","exports","render","_vm","this","_c","_self","ref","staticClass","url","isLogin","attrs","watermark","platform","is_encrypt","_e","staticRenderFns","components","PdfView","Pdf","data","userInfo","mounted","methods","getUserInfo","UserCenterService","component","show","phone","slice","watermarkText","loading","currentRate","model","value","rate","callback","$$v","expression","staticStyle","_v","props","pdfUrl","type","default","loadingEndSize","interval","computed","OSS_URL","clearInterval","window","beforeDestroy","onMessage","setTimeout","console"],"mappings":"kHAAA,W,8CCAAA,EAAOC,QAAU,0lB,2CCAjB,IAAIC,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,IAAI,OAAOC,YAAY,QAAQ,CAAIL,EAAIM,KAAON,EAAIO,QAASL,EAAG,WAAW,CAACM,MAAM,CAAC,iBAAiBR,EAAIS,UAAU,SAAWT,EAAIU,SAAS,KAAOV,EAAIM,IAAI,WAAaN,EAAIW,cAAcX,EAAIY,MAAM,IAEzQC,EAAkB,G,gDCeP,GACfC,YAAAC,eAAAC,YACAC,gBACA,OACAP,cACAH,WACAW,YACAZ,OACAK,aACAF,eAGAU,mBACA,oDAEA,oBAEAC,SACAC,uBAAA,WACAC,uCAAA,aACA,6BACA,oBACA,mBCvCkV,I,wBCQ9UC,EAAY,eACd,EACAxB,EACAc,GACA,EACA,KACA,WACA,MAIa,aAAAU,E,oECnBf,IAAIxB,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,E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AIa,OAAAU,E,2CCnBf","file":"js/chunk-67d349be.353be8c2.js","sourcesContent":["export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ppt-view.vue?vue&type=style&index=0&id=8096d4e8&prod&scoped=true&lang=css&\"","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAAXNSR0IArs4c6QAAAWpJREFUSEvtlU0rRVEUhp83oogMEPkbKN8TP8NAKSNKSZkhw5uRkYEy8C/IwEW4/8PXnbiUkNvSPt2jffdAp7Nvd3RWnTqt9ruf1mq9e4k2h9rMowC2vON/LTWzXmASuJP0kZLMrAeYA7pz0r+AcnqnDywDs8CVJAdIwszSfE5eIruUtOB+fOALMARUJQ17wCowGEMDniWNhMBFYBk4kXTuAV1+NaKln8CRpIsmYGQFmeWFDzO3KutBf0p3gTXgUNKeNzQ7wCbQlfXS4Nw3UJK0H07pG9AHvEvq94BpPicvkdUkDYTAErDeqHDLA7r8BtCZk/gDHEjazmwLM+sA3Jcn6pLqqbCwRZ4W/qvxbTEDLAGnkq69oZkGViLeUreejiXdhFP6CLgX/UnSqAdM8zHVPkgaC4H3wARQkeQWcRJmVgHGY2jAraSpEOiMOd9Ylq8e0OXdiorZ+GeSapl9GFldk7zwYSu7mdz1C65MeR29uOyKAAAAAElFTkSuQmCC\"","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{ref:\"wrap\",staticClass:\"wrap\"},[(!!_vm.url && _vm.isLogin)?_c('pdf-view',{attrs:{\"watermark-text\":_vm.watermark,\"platform\":_vm.platform,\"path\":_vm.url,\"is_encrypt\":_vm.is_encrypt}}):_vm._e()],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!-- 资料-详情 -->\r\n<template>\r\n <div class=\"wrap\" ref=\"wrap\">\r\n\r\n<!-- <Pdf v-if=\"!!url && isLogin\" ref=\"jsPdf\" :pdfUrl=\"url\"/>-->\r\n <pdf-view v-if=\"!!url && isLogin\" :watermark-text=\"watermark\" :platform=\"platform\" :path=\"url\" :is_encrypt='is_encrypt' />\r\n <!-- <iframe v-if=\"!!url && isLogin\" :src=\"`https://view.officeapps.live.com/op/view.aspx?src=${url}`\"></iframe>-->\r\n <!-- <div class=\"watermark\" v-if=\"!!userInfo.phone\">{{ userInfo.phone }}</div>-->\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport Pdf from \"@/components/pdf/index.vue\";\r\nimport {UserCenterService} from \"@/common/service\";\r\nimport watermark from \"@/common/watermark\";\r\nimport PdfView from \"@/components/pdf-view.vue\";\r\n\r\nexport default {\r\n components: {PdfView, Pdf},\r\n data() {\r\n return {\r\n platform: 'h5',\r\n isLogin: false,\r\n userInfo: {},\r\n url: '',\r\n is_encrypt:0,\r\n watermark:''\r\n };\r\n },\r\n mounted() {\r\n this.url = localStorage.getItem('PPT_VIEW_PARAM_URL');\r\n // localStorage.removeItem('PPT_VIEW_PARAM_URL');\r\n this.getUserInfo();\r\n },\r\n methods: {\r\n getUserInfo() {\r\n UserCenterService.getUserInfo().then(({data}) => {\r\n this.watermark=this.userInfo.phone\r\n this.userInfo = data.detail;\r\n this.isLogin = true;\r\n\r\n // watermark.set(this.userInfo.phone, this.$refs['wrap']);\r\n });\r\n },\r\n },\r\n}\r\n</script>\r\n\r\n<style scoped>\r\n.wrap {\r\n width: 100%;\r\n /*height: 100vh;*/\r\n display: flex;\r\n flex-direction: column;\r\n box-sizing: border-box;\r\n /*overflow: hidden;*/\r\n}\r\n.home_wrap{\r\n min-height: 100vh;\r\n}\r\n\r\niframe {\r\n width: 100%;\r\n height: 100vh;\r\n border: none;\r\n}\r\n\r\n.watermark {\r\n position: absolute;\r\n bottom: 50px;\r\n right: 20px;\r\n font-size: 20px;\r\n line-height: 30px;\r\n padding: 0 10px;\r\n border-radius: 15px;\r\n background-color: #F1F1F1;\r\n opacity: 0.8;\r\n pointer-events: none;\r\n z-index: 999999;\r\n}\r\n</style>\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ppt-view.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ppt-view.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ppt-view.vue?vue&type=template&id=8096d4e8&scoped=true&\"\nimport script from \"./ppt-view.vue?vue&type=script&lang=js&\"\nexport * from \"./ppt-view.vue?vue&type=script&lang=js&\"\nimport style0 from \"./ppt-view.vue?vue&type=style&index=0&id=8096d4e8&prod&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"8096d4e8\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"warp\"},[(_vm.show)?_c('iframe',{staticClass:\"box\",attrs:{\"scrolling\":\"no\",\"src\":`./pdf/web/viewer.html?file=${_vm.url}&watermark_text=${\n _vm.userInfo.phone\n ? _vm.userInfo.phone.slice(0, 3) + '****' + _vm.userInfo.phone.slice(7)\n : _vm.watermarkText\n }&is_encrypt=${_vm.is_encrypt}#page=1`}}):_vm._e(),(_vm.loading)?_c('div',{staticClass:\"loading\"},[_c('van-circle',{attrs:{\"rate\":_vm.currentRate,\"speed\":100,\"text\":_vm.currentRate + '%'},model:{value:(_vm.rate),callback:function ($$v) {_vm.rate=$$v},expression:\"rate\"}}),_c('van-loading',{staticStyle:{\"margin-top\":\"10px\"},attrs:{\"size\":\"24px\",\"color\":\"#0094ff\"}},[_vm._v(\"数据加载中...\")])],1):_vm._e()])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div class=\"warp\">\r\n <iframe\r\n v-if=\"show\"\r\n class=\"box\"\r\n scrolling=\"no\"\r\n :src=\"`./pdf/web/viewer.html?file=${url}&watermark_text=${\r\n userInfo.phone\r\n ? userInfo.phone.slice(0, 3) + '****' + userInfo.phone.slice(7)\r\n : watermarkText\r\n }&is_encrypt=${is_encrypt}#page=1`\"\r\n ></iframe>\r\n <div class=\"loading\" v-if=\"loading\">\r\n <van-circle\r\n v-model=\"rate\"\r\n :rate=\"currentRate\"\r\n :speed=\"100\"\r\n :text=\"currentRate + '%'\"\r\n />\r\n <van-loading size=\"24px\" color=\"#0094ff\" style=\"margin-top: 10px\"\r\n >数据加载中...</van-loading\r\n >\r\n </div>\r\n </div>\r\n</template>\r\n<script>\r\nimport { OSS_URL } from \"@/common/config\";\r\n\r\nexport default {\r\n props: {\r\n pdfUrl: {\r\n type: String,\r\n default: \"\",\r\n },\r\n is_encrypt: {\r\n default: 1,\r\n },\r\n platform: {\r\n type: String,\r\n default: \"h5\",\r\n },\r\n watermarkText: {\r\n type: String,\r\n default: \"搞一下\",\r\n },\r\n },\r\n data() {\r\n return {\r\n loading: true,\r\n loadingEndSize: 0,\r\n rate: 10,\r\n currentRate: 0,\r\n interval: null,\r\n userInfo: {},\r\n show: false,\r\n };\r\n },\r\n computed: {\r\n url() {\r\n if (this.is_encrypt) {\r\n return this.pdfUrl;\r\n }\r\n return this.pdfUrl.indexOf(\"http\") > -1\r\n ? this.pdfUrl\r\n : OSS_URL + this.pdfUrl;\r\n },\r\n },\r\n mounted() {\r\n if (this.platform === \"h5\") {\r\n try {\r\n this.userInfo = JSON.parse(localStorage.getItem(\"user_info\") || `{}`);\r\n } catch (e) {\r\n this.userInfo = {};\r\n }\r\n }\r\n this.show = true;\r\n this.interval = setInterval(() => {\r\n const currentRate = parseFloat(\r\n (this.currentRate + Math.random() * 10).toFixed(2)\r\n );\r\n this.currentRate = Math.min(currentRate, 95);\r\n if (this.currentRate >= 95) {\r\n clearInterval(this.interval);\r\n this.interval = null;\r\n }\r\n }, 200);\r\n window.addEventListener(\"message\", this.onMessage);\r\n },\r\n beforeDestroy() {\r\n window.removeEventListener(\"message\", this.onMessage);\r\n },\r\n methods: {\r\n onMessage(e) {\r\n if (e.data === \"encry-pdf-loaded\") {\r\n if (this.interval) {\r\n try {\r\n clearInterval(this.interval);\r\n } catch (e) {}\r\n }\r\n this.currentRate = 100;\r\n setTimeout(() => {\r\n this.loading = false;\r\n if (this.platform === \"ios\") {\r\n try {\r\n window.webkit.messageHandlers.loadFinished.postMessage(\r\n \"h5_pdf_view\"\r\n );\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n }\r\n }, 200);\r\n }\r\n },\r\n },\r\n};\r\n</script>\r\n<style scoped>\r\n.warp {\r\n width: 100vw;\r\n height: 100%;\r\n position: relative;\r\n}\r\n\r\n.box {\r\n width: 100vw;\r\n height: 100%;\r\n border: none;\r\n margin: 0;\r\n padding: 0;\r\n overflow: hidden;\r\n}\r\n\r\n.loading {\r\n width: 100%;\r\n height: 100%;\r\n background: #ffffff;\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n z-index: 999;\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n</style>\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=8be9d728&scoped=true&\"\nimport script from \"./index.vue?vue&type=script&lang=js&\"\nexport * from \"./index.vue?vue&type=script&lang=js&\"\nimport style0 from \"./index.vue?vue&type=style&index=0&id=8be9d728&prod&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"8be9d728\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=style&index=0&id=8be9d728&prod&scoped=true&lang=css&\""],"sourceRoot":""}