From ddb2c1b392519fb40086939583bdfad9a43d1ead Mon Sep 17 00:00:00 2001
From: liuyg <liuyg@qq.com>
Date: Wed, 23 Feb 2022 11:25:27 +0800
Subject: [PATCH] +高度

---
 pages/grabOrders/map.vue |   74 ++++++++++++++++++++++++++-----------
 1 files changed, 52 insertions(+), 22 deletions(-)

diff --git a/pages/grabOrders/map.vue b/pages/grabOrders/map.vue
index 2e2bdb7..af3e2f2 100644
--- a/pages/grabOrders/map.vue
+++ b/pages/grabOrders/map.vue
@@ -1,12 +1,12 @@
 <template>
 	<view class="content">
-		<u-top-tips ref="uTips"></u-top-tips>
+		<!-- <u-top-tips ref="uTips"></u-top-tips> -->
 		<!-- <u-button type="info" @click="acc">测试</u-button> -->
 		<!-- <web-view :src="urls" @message="message"></web-view> -->
-		<map :scale='18' id="myMap" style="width: 100%;z-index: 10000;" :style="{height: mapHeight + 'px'}"
-			:markers="markersCom" :longitude="longitude" :latitude="latitude" :circles="circlesCom"
-			:polyline="mypolylinesCom"></map>
-		<cover-view id="Umain">
+		<map :scale='18' id="myMap" style="width: 100%" :style="{height: mapHeight + 'px'}" :markers="markersCom"
+			:longitude="longitude" :latitude="latitude" :circles="circlesCom" :polyline="mypolylinesCom"
+			show-location="true"></map>
+		<view id="Umain">
 			<view class="once-b">
 				任务详情
 			</view>
@@ -86,16 +86,16 @@
 					{{ourData.num==ourData.jnum?"人数已满":'我参与'}}
 				</u-button>
 			</view>
-		<u-popup v-model="showIn" mode="center" border-radius="14" z-index='1000001'>
-			<view class="Info2">
-				<view class="Info4">是否参加活动</view>
-				<view class="Info3">
-					<u-button type="primary" @click="openAPP('oks')">参加</u-button>
-					<u-button type="error" @click="openAPP('nos')">取消</u-button>
+			<u-popup v-model="showIn" mode="center" border-radius="14" z-index='1000001'>
+				<view class="Info2">
+					<view class="Info4">是否参加活动</view>
+					<view class="Info3">
+						<u-button type="primary" @click="openAPP('oks')">参加</u-button>
+						<u-button type="error" @click="openAPP('nos')">取消</u-button>
+					</view>
 				</view>
-			</view>
-		</u-popup>
-		</cover-view>
+			</u-popup>
+		</view>
 	</view>
 </template>
 
@@ -412,6 +412,32 @@
 				//  首次执行
 				checkDom();
 			},
+			showWindow() {
+				return
+				let sub = uni.getSubNVueById("myMap");
+				sub.show('slide-in-left', 200, () => {
+					console.log('subNVue 原生子窗体显示成功');
+				});
+				sub.setStyle({
+					"position": "absolute",
+					"width": "100%",
+					"height": "50%",
+					"left": "0px",
+					"bottom": "0px",
+					"background-color": "#FFF000",
+					"border-top-left-radius": "15px",
+					"border-top-right-radius": "15px"
+				});
+			},
+			sendMsg(data) {
+				uni.$emit('sub', {
+					project: data
+				});
+			},
+			hideWindow() {
+				let sub = uni.getSubNVueById("sub");
+				sub.hide('fade-out', 300)
+			},
 		},
 		computed: {
 			isOnTaskValue() {
@@ -421,13 +447,13 @@
 					return this.$store.state.isOnTaskValue;
 				}
 			},
-			circlesCom(){
+			circlesCom() {
 				return this.circles.slice(0);
 			},
-			markersCom(){
+			markersCom() {
 				return this.markers.slice(0);
 			},
-			mypolylinesCom(){
+			mypolylinesCom() {
 				return this.mypolylines.slice(0);
 			},
 		},
@@ -592,12 +618,15 @@
 			const _this = this;
 			uni.getSystemInfo({
 				success: (res) => {
-					// _this.mapHeight = res.screenHeight - res.statusBarHeight
+					// _this.mapHeight = (res.screenHeight - res.statusBarHeight) /2 
 					// setTimeout(() => {
-					// 	that.getDom('#Umain', data => {
-					console.log(res.screenHeight - res.statusBarHeight - 420)
-					_this.mapHeight = res.screenHeight - res.statusBarHeight - 420
-					_this.mapHeight = _this.mapHeight
+					// that.getDom('#Umain', data => {
+					// console.log(res.statusBarHeight, res.screenHeight, data, 'dat')
+					// console.log(res.screenHeight - data.height + res
+					// 	.statusBarHeight)
+					// _this.mapHeight = res.screenHeight - res.statusBarHeight - 420
+					that.mapHeight = res.screenHeight - res.statusBarHeight - 466
+					that.mapHeight = that.mapHeight
 					// })
 					// }, 1000)
 
@@ -720,6 +749,7 @@
 				arrowLine: false, //带箭头的线 开发者工具暂不支持该属性
 			}
 			console.log(this.mypolylines)
+			this.showWindow();
 			// this.getLocationInfo(data);
 			if (data.butCT == "beginUp" && data.buttype == 0) {
 				this.bye = false;

--
Gitblit v1.9.3