ezhizao_zx 11 månader sedan
förälder
incheckning
aa6136a5c5
2 ändrade filer med 26 tillägg och 23 borttagningar
  1. 3 3
      api/base/path.js
  2. 23 20
      pages/pdfviewer/index.vue

+ 3 - 3
api/base/path.js

@@ -10,19 +10,19 @@ export const path = reactive({
 	updateAppURL: 'http://120.46.159.163:401/ezhizao-dms-production',
 	// furnaceNoURL: 'http://192.168.31.152:8099',
 	furnaceNoURL: 'http://120.46.159.163:7002',
-	pdfAppURL: 'http://120.46.159.163:401/ezhizao-dms-ezhizao-dms-sys',
+	pdfAppURL: 'http://120.46.159.163:401/ezhizao-dms-sys',
 
 	// 内网
 	// innerURL: 'http://192.168.31.151:8099',
 	innerURL: 'http://120.46.159.163:7004',
 	innerUpdateAppURL: 'http://120.46.159.163:401/ezhizao-dms-production',
-	innerPdfAppURL: 'http://120.46.159.163:401/ezhizao-dms-ezhizao-dms-sys',
+	innerPdfAppURL: 'http://120.46.159.163:401/ezhizao-dms-sys',
 	innerFurnaceNoURL: 'http://120.46.159.163:7002',
 
 	// 外网
 	publicURL: 'http://36.129.132.128:8099',
 	outUpdateAppURL: 'http://36.129.132.128:401/ezhizao-dms-production',
-	outPdfAppURL: 'http://36.129.132.128:401/ezhizao-dms-ezhizao-dms-sys',
+	outPdfAppURL: 'http://36.129.132.128:401/ezhizao-dms-sys',
 	outFurnaceNoURL: 'http://36.129.132.128:401/ezhizao-dms-p2'
 })
 

+ 23 - 20
pages/pdfviewer/index.vue

@@ -1,50 +1,53 @@
 <template>
-	<view  style="height: 1100rpx;">
-		<web-view :src="url" ></web-view>
-    <!-- <iframe width="100%" height="800rpx" :src="url"></iframe> -->
+	<view style="height: 1100rpx;">
+		<web-view :src="url"></web-view>
+		<!-- <iframe width="100%" height="800rpx" :src="url"></iframe> -->
 	</view>
 </template>
 
 <script setup>
-	import {onMounted,computed,ref} from 'vue';
-	import {onLoad,} from '@dcloudio/uni-app';
-	import { store } from '../../store';
-	
-	const urlList = uni.getStorageSync('baseUrl')
+	import {
+		onMounted,
+		computed,
+		ref
+	} from 'vue';
+	import {
+		onLoad,
+	} from '@dcloudio/uni-app';
+	import {
+		store
+	} from '../../store';
+
+	const urlList = JSON.parse(uni.getStorageSync('baseUrl'))
 	const url = ref("")
 	const pdfUrl = ref("")
 	const webHost = ref(urlList.pdfAppURL)
 	const fileUrl = ref("")
 	const pdfjs = ref("/static/hybrid/html/web/viewer.html")
-	const totalPage=ref(0) //总页码
+	const totalPage = ref(0) //总页码
 	const currentReadPage = ref(0) //当前页码
 	onLoad((options) => {
-		
+		console.log(urlList)
 		pdfUrl.value = options.param1
-		fileUrl.value =webHost.value + pdfUrl.value 
+		fileUrl.value = webHost.value + pdfUrl.value
 		console.log(webHost.value)
 		uni.setNavigationBarTitle({
 			title: ""
 		});
 		console.log(fileUrl.value)
 		init();
-		
+
 	});
 
 
 	function init() {
 		console.log(fileUrl.value)
-		url.value =pdfjs.value + '?file=' +encodeURIComponent(fileUrl.value);
-		
+		url.value = pdfjs.value + '?file=' + encodeURIComponent(fileUrl.value);
+
 		console.log(11, url.value)
 	}
-	
-	
-	
-	
-	
 </script>
 
 <style>
 
-</style>
+</style>