chunk-33739166.68c31f6f.js.map 12 KB

1
  1. {"version":3,"sources":["webpack:///./src/assets/icon-128.png","webpack:///./src/views/pdf/index.vue","webpack:///src/views/pdf/index.vue","webpack:///./src/views/pdf/index.vue?3f0f","webpack:///./src/views/pdf/index.vue?3ce5","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/views/pdf/index.vue?e98e","webpack:///./src/components/pdf/index.vue?440c"],"names":["module","exports","render","_vm","this","_c","_self","staticClass","path","ref","attrs","platform","watermark","is_encrypt","_e","staticRenderFns","components","PdfView","Pdf","data","mounted","component","show","url","userInfo","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","methods","onMessage","setTimeout","console"],"mappings":"4HAAAA,EAAOC,QAAU,0lB,yCCAjB,IAAIC,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,YAAY,WAAW,CAAEJ,EAAIK,KAAMH,EAAG,MAAM,CAACI,IAAI,QAAQC,MAAM,CAAC,OAASP,EAAIK,KAAK,SAAWL,EAAIQ,SAAS,iBAAiBR,EAAIS,UAAU,WAAaT,EAAIU,cAAcV,EAAIW,MAAM,IAE3PC,EAAkB,G,wBCOP,GACfC,YACAC,eACAC,YAEAC,gBACA,OACAX,QACAG,cACAC,gBACAC,eAIAO,mBACA,wBACA,oBACA,wCACA,2CACA,4CC5B8V,I,wBCQ1VC,EAAY,eACd,EACAnB,EACAa,GACA,EACA,KACA,WACA,MAIa,aAAAM,E,sECnBf,IAAInB,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,YAAY,QAAQ,CAAEJ,EAAImB,KAAMjB,EAAG,SAAS,CAACE,YAAY,MAAMG,MAAM,CAAC,UAAY,KAAK,IAAK,qCAA+BP,EAAIoB,IAAG,2BACzMpB,EAAIqB,SAASC,MACTtB,EAAIqB,SAASC,MAAMC,MAAM,EAAG,GAAK,OAASvB,EAAIqB,SAASC,MAAMC,MAAM,GACnEvB,EAAIwB,cAAa,uBACRxB,EAAIU,WAAU,cAAaV,EAAIW,KAAMX,EAAIyB,QAASvB,EAAG,MAAM,CAACE,YAAY,WAAW,CAACF,EAAG,aAAa,CAACK,MAAM,CAAC,KAAOP,EAAI0B,YAAY,MAAQ,IAAI,KAAO1B,EAAI0B,YAAc,KAAKC,MAAM,CAACC,MAAO5B,EAAI6B,KAAMC,SAAS,SAAUC,GAAM/B,EAAI6B,KAAKE,GAAKC,WAAW,UAAU9B,EAAG,cAAc,CAAC+B,YAAY,CAAC,aAAa,QAAQ1B,MAAM,CAAC,KAAO,OAAO,MAAQ,YAAY,CAACP,EAAIkC,GAAG,eAAe,GAAGlC,EAAIW,QAE3YC,EAAkB,G,wBCsBP,GACfuB,OACAC,QACAC,YACAC,YAEA5B,YACA4B,WAEA9B,UACA6B,YACAC,cAEAd,eACAa,YACAC,gBAGAtB,gBACA,OACAS,WACAc,iBACAV,QACAH,cACAc,cACAnB,YACAF,UAGAsB,UACArB,eACA,wBAGA,+BAFA,YAIAsB,qBAGAzB,mBAAA,WACA,wBACA,IACA,kEACA,SACA,iBAGA,aACA,sCACA,kBACA,4CAEA,6BACA,oBACA0B,0BACA,mBAEA,KACAC,mDAEAC,yBACAD,sDAEAE,SACAC,sBAAA,WACA,gCACA,iBACA,IACAJ,6BACA,UAEA,qBACAK,uBAEA,GADA,aACA,mBACA,IACAJ,uDACA,eAEA,SACAK,oBAGA,SC/G8V,I,wBCQ1V/B,EAAY,eACd,EACAnB,EACAa,GACA,EACA,KACA,WACA,MAIa,OAAAM,E,2CCnBf,W,kCCAA","file":"js/chunk-33739166.68c31f6f.js","sourcesContent":["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',{staticClass:\"pdf-box\"},[(_vm.path)?_c('Pdf',{ref:\"jsPdf\",attrs:{\"pdfUrl\":_vm.path,\"platform\":_vm.platform,\"watermark-text\":_vm.watermark,\"is_encrypt\":_vm.is_encrypt}}):_vm._e()],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div class=\"pdf-box\">\r\n <Pdf v-if=\"path\" ref=\"jsPdf\" :pdfUrl=\"path\" :platform=\"platform\" :watermark-text=\"watermark\" :is_encrypt=\"is_encrypt\"/>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport Pdf from \"@/components/pdf/index.vue\";\r\nimport PdfView from \"@/components/pdf-view.vue\";\r\nexport default {\r\n components: {\r\n PdfView,\r\n Pdf,\r\n },\r\n data() {\r\n return {\r\n path:'',\r\n platform: 'h5',\r\n watermark: '搞一下',\r\n is_encrypt: 1,\r\n };\r\n },\r\n\r\n mounted() {\r\n const option = this.$route.query;\r\n this.path = option.url || '';\r\n this.platform = option.platform || this.platform;\r\n this.watermark = option.watermark || this.watermark;\r\n this.is_encrypt = parseInt(option.is_encrypt || 1);\r\n },\r\n};\r\n</script>\r\n<style scoped>\r\n.pdf-box {\r\n height: 100vh;\r\n overflow: hidden;\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=05902606&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=05902606&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 \"05902606\",\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=05902606&prod&scoped=true&lang=css&\"","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":""}