Fly il y a 1 mois
Parent
commit
ca1e208a95

Fichier diff supprimé car celui-ci est trop grand
+ 20 - 15
components/tiandituMap/tiandituMap.vue


+ 18 - 14
pages/map/index.vue

@@ -5,14 +5,14 @@
 		<tiandituMap ref="tiandituMapRefs" @handleSearch="$refs.searchRef.onSearchFocus()" @clickMap="handleClickMap"
 			@moveMap="moveMapSearch" @onLoadTianDiTu="initMaps" @onSelect="selectPoint" :apiKey="apiKey"
 			@handleMapSite="handleMapSite" @centre-text-callback="e => centreText = e" :siteListArr='siteListArr'
-			:searchDot="searchDot" />
+			:searchDot="searchDot" @openHint="$refs.HintContentRef.open()" />
 
 
 		<Touchbox ref="TouchboxRef" :maxHeight="0.8" v-if="showMap && siteListArr && siteListArr.length > 0"
 			:zIndex="1001" @currentHeight="e => TouchHeight = e">
 			<template #touchSlot>
 				<!-- v-if="centreText" -->
-				<view class="centre-box"  v-if="centreText">
+				<view class="centre-box" v-if="centreText">
 					<svg t="1734080022350" class="position-icon" viewBox="0 0 1024 1024" version="1.1"
 						xmlns="http://www.w3.org/2000/svg" p-id="4287" xmlns:xlink="http://www.w3.org/1999/xlink">
 						<path d="M512 512m-80 0a80 80 0 1 0 160 0 80 80 0 1 0-160 0Z" p-id="4288"></path>
@@ -26,16 +26,18 @@
 				</view>
 			</template>
 			<template #contentSlot>
-			<!-- <scroll-view :style="{'height': getScrollHeight(TouchHeight , centreText)}" scroll-y="true" -->
-			<scroll-view :style="{'height': TouchHeight + 'px'}" scroll-y="true" :show-scrollbar="false">
-				<template v-for="(item , index) in siteListArr"> 
-					<siteListModel :index="index" :info="item" @checkSiteDetails="handleMapSite" />
-				</template>
-			</scroll-view>
+				<!-- <scroll-view :style="{'height': getScrollHeight(TouchHeight , centreText)}" scroll-y="true" -->
+				<scroll-view :style="{'height': TouchHeight + 'px'}" scroll-y="true" :show-scrollbar="false">
+					<template v-for="(item , index) in siteListArr">
+						<siteListModel :index="index" :info="item" @checkSiteDetails="handleMapSite" />
+					</template>
+				</scroll-view>
 			</template>
 		</Touchbox>
 
 		<siteDetails ref="siteDetailsRef" />
+		<!-- 提示 -->
+		<HintContent ref="HintContentRef" />
 	</view>
 </template>
 <script>
@@ -48,13 +50,15 @@
 	import { EventBus } from "@/utils/vueBus.js"
 	import { getLocation } from "@/utils/tool.js"
 	import serviceCenter from "./model/service-center.vue"
+	import HintContent from "./model/hint.vue"
 	export default {
 		name: 'tdtmap',
 		components: {
 			search,
 			siteListModel,
 			serviceCenter,
-			siteDetails
+			siteDetails,
+			HintContent
 		},
 		data() {
 			return {
@@ -113,7 +117,7 @@
 			}
 		},
 		watch: {
-			 
+
 		},
 		methods: {
 			// 获取地图中心点
@@ -124,7 +128,7 @@
 					const { longitude, latitude, mapTypeIcon } = res || {};
 					this.longitude = longitude;
 					this.latitude = latitude;
-					this.open(longitude, latitude, mapTypeIcon); 
+					this.open(longitude, latitude, mapTypeIcon);
 				}).catch(err => { this.open(null, null) }).finally(() => {
 					uni.hideLoading()
 				})
@@ -245,12 +249,12 @@
 					this.checkSiteDetails(item);
 					this.$refs.tiandituMapRefs.Trenderjs.handleSiteList(this.siteListArr)
 				}
- 
+
 			},
 			// 查看点位详情
-			checkSiteDetails(info) { 
+			checkSiteDetails(info) {
 				if (info) {
-					this.$refs.tiandituMapRefs.Trenderjs.SelectedDot(info, true) 
+					this.$refs.tiandituMapRefs.Trenderjs.SelectedDot(info, true)
 					this.handleClickMap();
 					this.$refs.siteDetailsRef.openDetails(info)
 				}

+ 110 - 0
pages/map/model/hint.vue

@@ -0,0 +1,110 @@
+<template>
+	<uni-popup ref="hintRef" :isMaskClick='true' type="center" border-radius="10px 10px 0 0"
+		maskBackgroundColor='rgba(0, 0, 0, 0.1)'>
+		<view class="hint-box">
+			<view class="hint-title">服务声明</view>
+			<view class="hint-val">
+				尊敬的市民朋友,您好!【武汉公安政务服务地图】正在试运行中,如有任何疑问和建议,欢迎致电武汉公安政务服务专线85395115
+
+			</view>
+			<view class="hint-btns" @click.stop="onClose()">
+				<view class="hint-btn">关闭</view>
+			</view>
+		</view>
+	</uni-popup>
+</template>
+
+<script>
+	import { PhoneCall } from "@/utils/tool.js";
+	export default {
+		data() {
+			return {
+				hintList: []
+			}
+		},
+		created() {
+
+		},
+		mounted() {
+			this.cheackShow();
+		},
+		methods: {
+			cheackShow() {
+				try {
+					const a = uni.getStorageSync('showHint');
+					if (!a) {
+						this.open()
+					}
+				} catch (e) {
+					this.open()
+				}
+			},
+			open() {
+				this.$refs.hintRef.open()
+				try {
+					uni.setStorageSync('showHint', true);
+				} catch (e) {
+					// error
+				}
+			},
+			onPhoneCall(phone) {
+				PhoneCall(phone).then(res => {
+					this.onClose()
+				})
+			},
+			onClose() {
+				this.$refs.hintRef.close()
+				this.hintList = [];
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.uni-popup {
+		z-index: 1002;
+
+		.hint-box {
+			width: 80vw;
+			min-height: 30vh;
+			height: auto;
+			max-height: 70vh;
+			background-color: #fff;
+			border-radius: 20rpx;
+			display: flex;
+			flex-direction: column;
+			// justify-content: center;
+			align-items: center;
+			justify-content: space-between;
+
+			.hint-title {
+				font-size: 36rpx;
+				padding: 20rpx 0;
+			}
+
+			.hint-val {
+				height: 1px;
+				flex: 1;
+				padding: 20rpx 30rpx;
+				color: #6F6F6F;
+
+			}
+
+			.hint-btns {
+				padding: 20rpx 0;
+
+				.hint-btn {
+					width: 260rpx;
+					height: 80rpx;
+					display: flex;
+					justify-content: center;
+					align-items: center;
+					color: #fff;
+					border-radius: 10rpx;
+					background-color: #3291F8;
+				}
+
+			}
+		}
+	}
+</style>

+ 1 - 1
pages/map/model/telList.vue

@@ -61,7 +61,7 @@
 			height: auto;
 			max-height: 70vh;
 			background-color: #fff;
-			border-radius: 40rpx;
+			border-radius: 20rpx;
 			display: flex;
 			flex-direction: column;
 			// justify-content: center;

BIN
static/images/hint.png