瀏覽代碼

Merge branch '大连交通技师学院' of https://gogs.mtavip.com/wangguoyu/uniProject into 大连交通技师学院

tanxue 2 月之前
父節點
當前提交
7cc8ddce49
共有 2 個文件被更改,包括 6 次插入11 次删除
  1. 3 1
      pages/demo/richDemo.vue
  2. 3 10
      pages/dqgzDangjiangongzuoInfo/dqgzDangjiangongzuoInfo.vue

+ 3 - 1
pages/demo/richDemo.vue

@@ -37,7 +37,9 @@
 		zhaoshengZhaopinInfo({}).then(res => {
 			console.log('res', res);
 			content.value = res.data.content
-			pdfUrl.value = res.data.pdfUrl
+			
+			pdfUrl.value = `https://mozilla.github.io/pdf.js/web/viewer.html?file=${encodeURIComponent(res.data.pdfUrl)}`
+		//	pdfUrl.value = res.data.pdfUrl
 
 		})
 	}

+ 3 - 10
pages/dqgzDangjiangongzuoInfo/dqgzDangjiangongzuoInfo.vue

@@ -9,16 +9,11 @@
 		<!-- 时间 -->
 		<view>{{formatDate.join('-') }}</view>
 		<!-- 富文本 -->
-<!--		<mp-html @fullscreenchange="handleFullscreen" :content="data.info.content" />-->
 		<MtaMpHtml :content="data.info.content" ></MtaMpHtml>
 		
 		<view @click="handleDownFile">文件下载</view>
 		<!-- PDF -->
-<!-- 		<web-view
-		      v-if="pdfUrl" 
-		      :src="pdfUrl" 
-		      class="web-view"
-		    ></web-view> -->
+		<MtaPDFVue :pdfUrl="pdfUrl"></MtaPDFVue>
 	</view>
 </template>
 
@@ -36,6 +31,7 @@
 	import * as httpApi from "@/api/common.js"
 	import {formatDateToYearMonthDay } from "@/utils/common.js"
   import MtaMpHtml from "@/components/MTAMpHtml/MtaMpHtml.vue"
+  import MtaPDFVue from "@/components/MtaPDF.vue";
 
 	const data = reactive({
 		info: null,
@@ -99,8 +95,5 @@
 </script>
 
 <style lang="scss">
-.web-view {
-	height: 200px;
-	margin-top: 20px
-}
+
 </style>