Explorar o código

pdf样式修改

tanxue hai 2 meses
pai
achega
f1979a396a

+ 9 - 1
common/styles/global/components.scss

@@ -333,7 +333,7 @@ box-shadow: 0 1rpx 3rpx 0 #227ECE;box-sizing: border-box;padding: 4rpx 10rpx 0;}
 		 p{margin: 16rpx 0;padding: 0;}
 	}
 	uni-video{margin: 0 auto;display: block;margin-bottom: 24rpx;}
-	.dljt-pdf-box{}
+	.pdf-container{border: 0;}
 }
 
 /* 分类 */
@@ -370,4 +370,12 @@ box-shadow: 0 1rpx 3rpx 0 #227ECE;box-sizing: border-box;padding: 4rpx 10rpx 0;}
   }
   .table-th-row{background-color: #1a6ac3;color: #fff;text-align:center;}
   .table-td-row{background-color: #fff;color: #333;border-top: 1rpx solid #ccc;}
+}
+
+/* pdf浮层*/
+.dljt-pdf-popup{
+	
+	.pdf-popup-box{height:100vh;padding: 0;margin: 0;z-index: 9;position: relative;}
+	.dljt-pdf-view{margin-top: 86rpx;}
+	.pdf-return-btn{z-index: 4;position: relative;}
 }

+ 1 - 7
common/styles/global/pages.scss

@@ -121,10 +121,4 @@ iframe{z-index: 3;}
 	.xywh-row-content{top: 450rpx;}
 	}
 }
-  
-.pdf-page{
-	.dljt-pdf-box{}
-	
-	// .dljt-detail-box{height:unset;margin-bottom: 24rpx;}
-	.dljt-detail-box{height: calc(100vh - 834rpx);}
-}
+  

+ 4 - 4
components/MtaPDF.vue

@@ -2,10 +2,10 @@
 	<view class="pdf-container" v-if="pdfUrl">
 		<button @click="handleOpen">PDF预览</button>
 	</view>
-	<uni-popup ref="popup" type="bottom" background-color="#fff"  border-radius="10px 10px 0 0" :mask-click="false" :animation="false">
-		<view  style="height:90vh;padding: 0;margin: 0">
-			<uni-nav-bar shadow left-icon="left" title="PDF预览" @clickLeft="handleBack" />
-			<web-view :src="pdfUrl1" v-if="showPdfUrl" class="web-view" style="margin-top: 50px"></web-view>
+	<uni-popup class="dljt-pdf-popup" ref="popup" type="bottom" background-color="#fff" :mask-click="false" :animation="false">
+		<view class="pdf-popup-box">
+			<uni-nav-bar class="pdf-return-btn" shadow left-icon="left" title="PDF预览" @clickLeft="handleBack" />
+			<web-view class="dljt-pdf-view" :src="pdfUrl1" v-if="showPdfUrl" ></web-view>
 		</view>
 	</uni-popup>
 

+ 5 - 6
pages/zsjyWangnianluqufenshu/zsjyWangnianluqufenshu.vue

@@ -1,6 +1,6 @@
 <template>
-	<view class="dljt-page-box pdf-page">
-		<MtaNavbar></MtaNavbar>
+	<view class="dljt-page-box">
+		<MtaNavbar v-if="false"></MtaNavbar>
 		<view class="dljt-container-box">
 			<view class="dljt-page-title">机构设置</view>
 			<view class="dljt-page-content-box">
@@ -14,13 +14,12 @@
 				</view>
 				<view class="dljt-detail-box">
 					<view class="dljt-editor-box">
-
 						<MtaMpHtml class="dljt-editor-box" :content="data.info.content"></MtaMpHtml>
-						
+						<!-- pdf -->
+						<MtaPDFVue v-if="data.info.pdfUrl" :pdfUrl="data.info.pdfUrl"></MtaPDFVue>
 					</view>
 				</view>
-				<!-- pdf -->
-				<MtaPDFVue v-if="data.info.pdfUrl" :pdfUrl="data.info.pdfUrl"></MtaPDFVue>
+				
 			</view>
 		</view>
 		<!-- 底部导航 -->