2 コミット 838d3bbb2c ... fb9b6ea41e

作者 SHA1 メッセージ 日付
  zhangkang fb9b6ea41e Merge branch 'master' of http://115.29.66.169:10080/GA-ZW/H5 1 ヶ月 前
  zhangkang 78b17c4b7e 111 1 ヶ月 前
共有7 個のファイルを変更した273 個の追加242 個の削除を含む
  1. 49 52
      App.vue
  2. 35 28
      api/map.js
  3. 87 87
      manifest.json
  4. 11 11
      pages/map/index.vue
  5. 4 7
      pages/map/model/adDetail.vue
  6. 78 53
      pages/map/model/hint.vue
  7. 9 4
      pages/map/model/search.vue

+ 49 - 52
App.vue

@@ -1,60 +1,57 @@
-<script> 
-	export default {
-		onLaunch: function() {
-			console.log('App Launch')
-			// const { aplus_queue } = window;
-			// console.log("aplus_queue" , aplus_queue)
-			// aplus_queue.push({
-			// 	action: 'aplus.sendPV',
-			// 	arguments: [{ is_auto: false }]
-			// });
-		},
-		onShow: function() {
-			console.log('App Show')
-		},
-		onHide: function() {
-			console.log('App Hide')
-		},
-		mounted() {
-	 
-		}
-	}
+<script>
+export default {
+  onLaunch: function () {
+    console.log("App Launch");
+    // const { aplus_queue } = window;
+    // console.log("aplus_queue" , aplus_queue)
+    // aplus_queue.push({
+    // 	action: 'aplus.sendPV',
+    // 	arguments: [{ is_auto: false }]
+    // });
+  },
+  onShow: function () {
+    console.log("App Show");
+  },
+  onHide: function () {
+    console.log("App Hide");
+  },
+  mounted() {},
+};
 </script>
 
 <style lang="scss">
-	@import "uview-ui/index.scss";
+@import "uview-ui/index.scss";
 
-	/*每个页面公共css */
-	* {
-		padding: 0;
-		margin: 0;
-		box-sizing: border-box;
-	}
+/*每个页面公共css */
+* {
+  padding: 0;
+  margin: 0;
+  box-sizing: border-box;
+}
 
-	.one-row {
-		display: inline-block;
-		white-space: nowrap;
-		overflow: hidden;
-		text-overflow: ellipsis;
-	}
+.one-row {
+  display: inline-block;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
 
-	.tdt-label {
-		// display: block;
-		// min-width: 100rpx;
-		// width: 1;
-		min-width: 300rpx;
-		max-width: 500rpx;
-		border-radius: 14rpx;
-		padding: 15rpx !important;
-		line-height: 1.3 !important;
-		white-space: pre-wrap !important;
-		text-align: center;
-		// transform: translateX(-50%) !important;
-	}
+.tdt-label {
+  // display: block;
+  // min-width: 100rpx;
+  // width: 1;
+  min-width: 300rpx;
+  max-width: 500rpx;
+  border-radius: 14rpx;
+  padding: 15rpx !important;
+  line-height: 1.3 !important;
+  white-space: pre-wrap !important;
+  text-align: center;
+  // transform: translateX(-50%) !important;
+}
 
-	.map-label {
-		// white-space: pre-wrap; 
-		display: block;
-
-	}
+.map-label {
+  // white-space: pre-wrap;
+  display: block;
+}
 </style>

+ 35 - 28
api/map.js

@@ -1,47 +1,54 @@
 import http from "@/utils/request.js";
 
 // 获取地图中心点
-export const getMapCenterPoint_Api = () => http.get('/h5/biz/map/getCenterPoint')
-
+export const getMapCenterPoint_Api = () =>
+  http.get("/h5/biz/map/getCenterPoint");
 
 // 获取地图列表
-export const getMapList_Api = (params) => http.get('/h5/biz/map/list', {
-	params: params
-})
-
+export const getMapList_Api = (params) =>
+  http.get("/h5/biz/map/list", {
+    params: params,
+  });
 
 // 获取地图类型
-export const getMaptypeList_Api = (params) => http.get('/h5/biz/maptype/list', {
-	params: params
-})
-
+export const getMaptypeList_Api = (params) =>
+  http.get("/h5/biz/maptype/list", {
+    params: params,
+  });
 
 // 获取地图点位服务
-export const getMapMatterList_Api = (params) => http.get('/h5/biz/map/matterList', {
-	params: params
-})
+export const getMapMatterList_Api = (params) =>
+  http.get("/h5/biz/map/matterList", {
+    params: params,
+  });
 // 获取地图点位服务
 export const getMapMatterListH6_Api = (params) =>
-	http.get("/h6/biz/map/matterList", {
-		params: params
-	});
+  http.get("/h6/biz/map/matterList", {
+    params: params,
+  });
 
 // 获取地图广告服务
 export const getMapAdList_Api = (params) =>
-	http.get("/h5/biz/ad/list", {
-		params: params
-	});
+  http.get("/h5/biz/ad/list", {
+    params: params,
+  });
 
 //获取广告详情
 export const getMapAdDetail_Api = (params) =>
-	http.get("/h5/biz/ad/detail", {
-		params: params
-	});
+  http.get("/h5/biz/ad/detail", {
+    params: params,
+  });
 //根据事项ud获取广告绑定的事项详情
 export const getMapMatterDetail_Api = (params) =>
-	http.get("/h6/biz/map/h6MatterDetail", {
-		params: params
-	});
-
-
-export const getVisituvpv_Api = (data) => -http.post('/h5/biz/visituvpv/add', data)
+  http.get("/h6/biz/map/h6MatterDetail", {
+    params: params,
+  });
+
+//获取地图配置
+export const getMapConfig_Api = (params) =>
+  http.get("/h5/biz/mapprompt/detail", {
+    params: params,
+  });
+
+export const getVisituvpv_Api = (data) =>
+  -http.post("/h5/biz/visituvpv/add", data);

+ 87 - 87
manifest.json

@@ -1,88 +1,88 @@
 {
-	"sassImplementationName": "node-sass",
-	"name": "H5",
-	"appid": "__UNI__E384BDC",
-	"description": "",
-	"versionName": "1.0.0",
-	"versionCode": "100",
-	"transformPx": false,
-	/* 5+App特有相关 */
-	"app-plus": {
-		"usingComponents": true,
-		"nvueStyleCompiler": "uni-app",
-		"compilerVersion": 3,
-		"splashscreen": {
-			"alwaysShowBeforeRender": true,
-			"waiting": true,
-			"autoclose": true,
-			"delay": 0
-		},
-		/* 模块配置 */
-		"modules": {},
-		/* 应用发布信息 */
-		"distribute": {
-			/* android打包配置 */
-			"android": {
-				"permissions": [
-					"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
-					"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-					"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
-					"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
-					"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
-					"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.CAMERA\"/>",
-					"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
-					"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-					"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-					"<uses-feature android:name=\"android.hardware.camera\"/>",
-					"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
-				]
-			},
-			/* ios打包配置 */
-			"ios": {},
-			/* SDK配置 */
-			"sdkConfigs": {}
-		}
-	},
-	/* 快应用特有相关 */
-	"quickapp": {},
-	/* 小程序特有相关 */
-	"mp-weixin": {
-		"appid": "",
-		"setting": {
-			"urlCheck": false
-		},
-		"usingComponents": true
-	},
-	"mp-alipay": {
-		"usingComponents": true
-	},
-	"mp-baidu": {
-		"usingComponents": true
-	},
-	"mp-toutiao": {
-		"usingComponents": true
-	},
-	"uniStatistics": {
-		"enable": false
-	},
-	"vueVersion": "2",
-	"h5": {
-		"title": "政务地图",
-		"template": "index.html",
-		"sdkConfigs": {
-			"maps": {}
-		},
-		"router": {
-			"base": "/h5/"
-		},
-		"optimization": {
-			"treeShaking": {
-				"enable": false
-			}
-		}
-	}
-}
+    "sassImplementationName" : "node-sass",
+    "name" : "H5",
+    "appid" : "__UNI__715A34D",
+    "description" : "",
+    "versionName" : "1.0.0",
+    "versionCode" : "100",
+    "transformPx" : false,
+    /* 5+App特有相关 */
+    "app-plus" : {
+        "usingComponents" : true,
+        "nvueStyleCompiler" : "uni-app",
+        "compilerVersion" : 3,
+        "splashscreen" : {
+            "alwaysShowBeforeRender" : true,
+            "waiting" : true,
+            "autoclose" : true,
+            "delay" : 0
+        },
+        /* 模块配置 */
+        "modules" : {},
+        /* 应用发布信息 */
+        "distribute" : {
+            /* android打包配置 */
+            "android" : {
+                "permissions" : [
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                ]
+            },
+            /* ios打包配置 */
+            "ios" : {},
+            /* SDK配置 */
+            "sdkConfigs" : {}
+        }
+    },
+    /* 快应用特有相关 */
+    "quickapp" : {},
+    /* 小程序特有相关 */
+    "mp-weixin" : {
+        "appid" : "",
+        "setting" : {
+            "urlCheck" : false
+        },
+        "usingComponents" : true
+    },
+    "mp-alipay" : {
+        "usingComponents" : true
+    },
+    "mp-baidu" : {
+        "usingComponents" : true
+    },
+    "mp-toutiao" : {
+        "usingComponents" : true
+    },
+    "uniStatistics" : {
+        "enable" : false
+    },
+    "vueVersion" : "2",
+    "h5" : {
+        "title" : "政务地图",
+        "template" : "index.html",
+        "sdkConfigs" : {
+            "maps" : {}
+        },
+        "router" : {
+            "base" : "/h5/"
+        },
+        "optimization" : {
+            "treeShaking" : {
+                "enable" : false
+            }
+        }
+    }
+}

+ 11 - 11
pages/map/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="map-box">
-		<search ref="searchRef" @handleSearch="handleSearch" v-show="showMap" />
+		<search ref="searchRef" :mapConfig="mapConfig" @handleSearch="handleSearch" v-show="showMap" />
 
 		<tiandituMap ref="tiandituMapRefs" @handleSearch="$refs.searchRef.onSearchFocus()" @clickMap="handleClickMap"
 			@moveMap="moveMapSearch" @onLoadTianDiTu="initMaps" @onSelect="selectPoint" :apiKey="apiKey"
@@ -41,7 +41,7 @@
 
 		<siteDetails ref="siteDetailsRef" />
 		<!-- 提示 -->
-		<HintContent ref="HintContentRef" />
+		<HintContent ref="HintContentRef" :mapConfig="mapConfig" />
 	</view>
 </template>
 <script>
@@ -51,6 +51,7 @@
 	import {
 		getMapCenterPoint_Api,
 		getMapList_Api,
+		getMapConfig_Api,
 		getVisituvpv_Api
 	} from "@/api/map.js"
 	import siteDetails from "./model/siteDetails.vue"
@@ -82,14 +83,6 @@
 				// 是否显示地图
 				showMap: false,
 				SearchText: '',
-
-
-
-
-
-
-
-
 				longitude: '114.28944',
 				latitude: '30.66195',
 				apiKey: $config.tianKey,
@@ -108,7 +101,8 @@
 				centreTextHeight: uni.upx2px(80),
 
 
-				searchContent: null
+				searchContent: null,
+				mapConfig: {},
 			}
 		},
 		created() {
@@ -117,6 +111,7 @@
 			// this.getMapCenterPoint()
 		},
 		mounted() {
+			this.getMapConfig()
 			const userLabel = getUUID();
 			const refererStr = document.referrer;
 			getVisituvpv_Api({
@@ -146,6 +141,11 @@
 
 		},
 		methods: {
+			async getMapConfig() {
+				const res = await getMapConfig_Api()
+				console.log('地图配置',res)
+				this.mapConfig = res || {}
+			},
 			async initMaps() {
 				console.warn('--------天地图加载完成--------');
 				this.$emit('onLoad') 

+ 4 - 7
pages/map/model/adDetail.vue

@@ -4,7 +4,7 @@
     <view class="adTime">{{ adDetail.createTime }}</view>
     <rich-text :nodes="adDetail.description" class="adContent"></rich-text>
     <view v-if="adDetail.jumpType == 1 && adDetail.videoUrl" class="adVideo">
-      <video :src="adVideoUrl" controls class="video-player"></video>
+      <video :src="adDetail.videoUrl" controls class="video-player"></video>
     </view>
   </view>
 </template>
@@ -15,23 +15,18 @@ export default {
   data() {
     return {
       adDetail: {},
+      adVideoUrl: "",
       params: {
         adId: "",
       },
     };
   },
-  computed: {
-    adVideoUrl() {
-      return `${$Config.baseURL}/dev/file/download?id=${this.adDetail.videoUrl}`
-    },
-  },
   watch: {
     "adDetail.description": {
       //富文本图片预览
       handler(newV, oldV) {
         this.$nextTick(() => {
           let imgArr = document.getElementsByTagName("img");
-          console.log(111, imgArr);
           if (imgArr) {
             for (let i = 0; i < imgArr.length; i++) {
               imgArr[i].addEventListener("click", (e) => {
@@ -55,6 +50,8 @@ export default {
     getDetails() {
       getMapAdDetail_Api(this.params).then((res) => {
         this.adDetail = res;
+      }).catch((err) => {
+        console.log('err',err);
       });
     },
   },

+ 78 - 53
pages/map/model/hint.vue

@@ -8,11 +8,15 @@
   >
     <view class="hint-box">
       <view class="hint-title">服务声明</view>
-      <view class="hint-val">
-        {{ warningText }}
-      </view>
-      <view class="hint-btns" @click.stop="onClose()">
-        <view class="hint-btn">关闭</view>
+      <div v-html="mapConfig.prompt" class="hint-val"></div>
+      <view class="hint-btns">
+        <view
+          v-if="mapConfig.outsideAddress"
+          class="hint-btn"
+          @click.stop="openWindow(mapConfig.outsideAddress)"
+          >查看详情</view
+        >
+        <view class="hint-btn plain" @click.stop="onClose()">关闭</view>
       </view>
     </view>
   </uni-popup>
@@ -22,6 +26,12 @@
 import { PhoneCall } from "@/utils/tool.js";
 import { getConfigByKey } from "@/api/feedback.js";
 export default {
+  props: {
+    mapConfig: {
+      type: Object,
+      default: () => {},
+    },
+  },
   data() {
     return {
       hintList: [],
@@ -46,6 +56,10 @@ export default {
         this.open();
       }
     },
+    openWindow(url) {
+      console.log(url);
+      window.open(url);
+    },
     open() {
       this.$refs.hintRef.open();
       try {
@@ -71,59 +85,70 @@ export default {
 .uni-popup {
   z-index: 1002;
 
-		.hint-box {
-			width: 80vw;
-			background-color: #fff;
-			border-radius: 20rpx;
-			// display: flex;
-			// flex-direction: column;
-			// justify-content: center;
-			// align-items: center;
-			// justify-content: space-between;
-
-			.hint-title {
-				text-align: center;
-				font-size: 36rpx;
-				height: 80rpx;
-				line-height: 80rpx;
-			}
+  .hint-box {
+    width: 80vw;
+    background-color: #fff;
+    border-radius: 20rpx;
+    padding: 20rpx 0;
+    // display: flex;
+    // flex-direction: column;
+    // justify-content: center;
+    // align-items: center;
+    // justify-content: space-between;
 
-			.hint-val {
-				// height: calc(100% - 76rpx - 130rpx);
-				padding: 20rpx 30rpx;
-				color: #6F6F6F;
+    .hint-title {
+      text-align: center;
+      font-size: 36rpx;
+      height: 80rpx;
+      line-height: 80rpx;
+    }
 
-				.hint-content {
-					height: auto;
-					min-height: 20rpx;
-					max-height: 65vh;
-				}
+    .hint-val {
+      // height: calc(100% - 76rpx - 130rpx);
+      padding: 20rpx 30rpx;
+      color: #6f6f6f;
+      ::v-deep p {
+        line-height: 1.25;
+        margin: 0 0 1em 0;
+      }
 
-				.paragraph-item {
-					text-indent: 2em;
+      .hint-content {
+        height: auto;
+        min-height: 20rpx;
+        max-height: 65vh;
+      }
 
-					.item-sing {
-						font-weight: bold;
-					}
-				}
-			}
+      .paragraph-item {
+        text-indent: 2em;
 
-			.hint-btns {
-				padding: 20rpx 0;
+        .item-sing {
+          font-weight: bold;
+        }
+      }
+    }
 
-				.hint-btn {
-					margin: 0 auto;
-					width: 260rpx;
-					height: 80rpx;
-					display: flex;
-					justify-content: center;
-					align-items: center;
-					color: #fff;
-					border-radius: 10rpx;
-					background-color: #3291F8;
-				}
+    .hint-btns {
+      display: flex;
+      padding: 20rpx 0;
+      gap: 30rpx;
 
-			}
-		}
-	}
+      .hint-btn {
+        margin: 0 auto;
+        width: 240rpx;
+        height: 74rpx;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        color: #fff;
+        border-radius: 10rpx;
+        background-color: #3291f8;
+      }
+      .plain {
+        background-color: transparent;
+        color: #3291f8;
+        border: 1rpx solid #3291f8;
+      }
+    }
+  }
+}
 </style>

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

@@ -49,10 +49,8 @@
             size="14"
           ></u-icon>
         </view>
-        <view class="select-item" @click.stop="$refs.mapAdRef.open()">
-          <text class="item-text one-row">{{
-            params.typeName || "高频事项指引"
-          }}</text>
+        <view v-if="mapConfig.navigationName" class="select-item" @click.stop="$refs.mapAdRef.open()">
+          <text class="item-text one-row">{{mapConfig.navigationName}}</text>
           <u-icon
             name="arrow-down-fill"
             :color="downFillColor"
@@ -89,6 +87,13 @@ import { getLocation } from "@/utils/tool.js";
 import $confog from "@/config/index.js";
 import { getMapMatterDetail_Api } from "@/api/map.js";
 export default {
+  props: {
+    mapConfig: {
+      type: Object,
+      default: () => {},
+    },
+  },
+
   data() {
     return {
       locationPower: false,