Explorar el Código

地图高度问题修复

Fly hace 4 meses
padre
commit
1a0fb6c6fa
Se han modificado 4 ficheros con 22 adiciones y 15 borrados
  1. 1 1
      manifest.json
  2. 5 5
      pages.json
  3. 9 4
      pages/map/model/siteDetails.vue
  4. 7 5
      pages/map/model/siteServe.vue

+ 1 - 1
manifest.json

@@ -70,7 +70,7 @@
     },
     "vueVersion" : "2",
     "h5" : {
-        "title" : "武汉公安政务服务",
+        "title" : "政务地图",
         "template" : "",
         "sdkConfigs" : {
             "maps" : {}

+ 5 - 5
pages.json

@@ -7,25 +7,25 @@
 		{
 			"path": "pages/map/index",
 			"style": {
-				"navigationBarTitleText": "武汉公安务服务地图"
+				"navigationBarTitleText": "政务地图"
 			}
 		},
 		{
 			"path": "pages/map/matterDetails",
 			"style": {
-				"navigationBarTitleText": "事项详情"
+				"navigationBarTitleText": "政务地图"
 			}
 		},
 		{
 			"path": "pages/index/index",
 			"style": {
-				"navigationBarTitleText": "武汉公安政务服务"
+				"navigationBarTitleText": "政务地图"
 			}
 		},
 		{
 			"path": "pages/map/cs",
 			"style": {
-				"navigationBarTitleText": "武汉公安政务服务"
+				"navigationBarTitleText": "政务地图"
 			}
 		}
 
@@ -34,7 +34,7 @@
 	"globalStyle": {
 		"navigationStyle": "custom",
 		"navigationBarTextStyle": "black",
-		"navigationBarTitleText": "武汉公安政务服务",
+		"navigationBarTitleText": "政务地图",
 		"navigationBarBackgroundColor": "#F8F8F8",
 		"backgroundColor": "#F8F8F8"
 	},

+ 9 - 4
pages/map/model/siteDetails.vue

@@ -15,9 +15,11 @@
 								<text class="time-lable">办公时间</text>
 								<text class="site-time-val">{{info.workTimeRemark}}</text>
 							</view>
-						</view>
+						</view> 
 						<view class="sever-box" :style="{'height':serveH  +'px' }">
-							<siteServe :height="serveH" :mapLocationId="info.mapLocationId" />
+							<template v-if="serveH">
+								<siteServe :height="serveH" :mapLocationId="info.mapLocationId" />
+							</template>
 						</view>
 					</template>
 				</view>
@@ -132,7 +134,7 @@
 							.select(".site-info")
 							.boundingClientRect((data) => {
 								const { height } = data || {};
-								const h = this.contentH - height;
+								const h = this.contentH - height - 10;
 								this.serveH = h;
 							})
 							.exec();
@@ -156,7 +158,10 @@
 				openMap({ name, code: code, type: "baidu" })
 			},
 			openDetails(res) {
+				console.log('openDetails = ' , res)
 				this.info = res;
+				// this.serveH = 0;
+				// this.contentH = 0;
 				this.$refs.siteDetailsPopupRef.open()
 				this.calculateHeight()
 			},
@@ -167,7 +172,7 @@
 						query
 							.select(".details-box")
 							.boundingClientRect((data) => {
-								if(data){
+								if (data) {
 									this.contentH = data.height - uni.upx2px(150);
 								}
 							})

+ 7 - 5
pages/map/model/siteServe.vue

@@ -23,15 +23,16 @@
 					<view class="val-content" :id="`service_${index}`">
 						<view class="val-name">{{key}}</view>
 						<template v-for="item in (value || [])">
-							<view class="val" @click.stop="LookMatterDetails(item)">
+							<!-- @click.stop="LookMatterDetails(item)" -->
+							<view class="val" >
 								<text class="val-text one-row">{{ item.name }}</text>
-								<svg t="1734508422065" class="val-icon" viewBox="0 0 1024 1024" version="1.1"
+								<!-- <svg t="1734508422065" class="val-icon" viewBox="0 0 1024 1024" version="1.1"
 									xmlns="http://www.w3.org/2000/svg" p-id="4279"
 									xmlns:xlink="http://www.w3.org/1999/xlink">
 									<path
 										d="M492.675886 904.817574L885.696074 511.797385 492.675886 118.777197c-12.258185-12.258185-12.432147-32.892131 0.187265-45.51052 12.707416-12.707416 32.995485-12.703323 45.511543-0.187265l411.660734 411.660734c7.120165 7.120165 10.163477 17.065677 8.990768 26.624381 1.500167 9.755178-1.5104 20.010753-8.990768 27.491121L538.374694 950.515359c-12.258185 12.258185-32.892131 12.432147-45.511543-0.187265-12.707416-12.707416-12.703323-32.995485-0.187265-45.51052z"
 										p-id="4280"></path>
-								</svg>
+								</svg> -->
 							</view>
 						</template>
 					</view>
@@ -240,6 +241,7 @@
 
 		.serve {
 			width: 100%;
+			overflow: hidden;
 			display: flex;
 			align-items: stretch;
 
@@ -248,9 +250,9 @@
 
 				.lable {
 					width: 100%;
-					height: 60rpx;
+					height: 80rpx;
 					font-size: 30rpx;
-					line-height: 60rpx;
+					line-height: 80rpx;
 					text-align: center;
 					border-left: 6rpx solid transparent;
 					padding: 0 10rpx;