소스 검색

客户页面

wangxy 1 주 전
부모
커밋
1d25fe38f1
2개의 변경된 파일10개의 추가작업 그리고 12개의 파일을 삭제
  1. 2 6
      pages/admin/Hetong/Hetong.vue
  2. 8 6
      pages/admin/Hetong/HetongInfo.vue

+ 2 - 6
pages/admin/Hetong/Hetong.vue

@@ -43,7 +43,6 @@
 	import writeSign from "@/components/writeSign/index.vue"
   import {throttleAdvanced} from "@/utils/common.js"
 
-	const pdfUrl1 = ref('');
 	const info = ref({})
 	const show = ref(false)
 	const popupRef = ref(null)
@@ -65,11 +64,8 @@
 			return;
 		}
 		
-		httpApi.getHetongLast({id}).then(res => {
+		httpApi.getHetongInfo({id}).then(res => {
 			info.value = res.data;
-			// pdfUrl1.value = `/hybrid/html/web/viewer.html?file=${encodeURIComponent(res.data.pdfUrl)}`;
-			// let pdfUrl2 = `https://mozilla.github.io/pdf.js/web/viewer.html?file=${encodeURIComponent(res.data.pdfUrl)}`
-			// console.log('info', info.value)
 			imgList.value = res.data.base64List;
 			setTimeout(() => {
 				console.log('xianshi')
@@ -97,7 +93,7 @@
 
     httpApi.getHetongQianming({
       id: info.value.id,
-      fuzeren: img.replace(/^data:image\/\w+;base64,/, '')
+      yifangBase64: img.replace(/^data:image\/\w+;base64,/, ''), // 当前接口,只有唯一yifangBase64 + id
     }).then(res => {
       if (res.data) {
         uni.showToast({

+ 8 - 6
pages/admin/Hetong/HetongInfo.vue

@@ -6,9 +6,11 @@
       </view>
 
       <template v-if="tId">
-		  <view class="pdf-box"> pdf展示 </view>
-        <!-- 	<web-view class="dljt-pdf-view" :src="pdfUrl1" v-if="show"
-          webview-styles="height: 50vh;margin-top: 75px"></web-view> -->
+		  <view class="pdf-box">
+        <view class="pdf-box">
+          <image v-for="item in imgList" :mode="item.mode" :src="`data:image/png;base64,${item}`"></image>
+        </view>
+      </view>
       </template>
 	  
 	  <view class="hetong-tip-box" v-if="tId && info.status == 0">
@@ -41,11 +43,11 @@ import writeSign from "@/components/writeSign/index.vue"
 import {throttleAdvanced} from "@/utils/common.js"
 
 const tId = ref(null)
-const pdfUrl1 = ref(null)
 
 const info = ref({})
 const show = ref(false)
 const popupRef = ref(null)
+const imgList = ref([])
 
 onLoad((options) => {
   tId.value = options.id;
@@ -59,7 +61,7 @@ function handleQianming() {
 function init() {
   httpApi.getHetongInfo({id: tId.value}).then(res => {
 	info.value = res.data;
-    pdfUrl1.value = res.data.pdfUrl;
+  imgList.value = res.data.base64List;
   })
 }
 
@@ -75,7 +77,7 @@ const  handleQM = throttleAdvanced((img) => {
 
   httpApi.getHetongQianming({
     id: tId.value,
-    fuzeren: img.replace(/^data:image\/\w+;base64,/,'')
+    yifangBase64: img.replace(/^data:image\/\w+;base64,/,'')
   }).then(res => {
     if (res.data) {
       uni.showToast({