소스 검색

no message

Fly 2 주 전
부모
커밋
67d39de95b
4개의 변경된 파일39개의 추가작업 그리고 21개의 파일을 삭제
  1. 4 1
      App.vue
  2. 8 8
      api/map.js
  3. 17 10
      pages/map/index.vue
  4. 10 2
      utils/tool.js

+ 4 - 1
App.vue

@@ -1,4 +1,4 @@
-<script>
+<script> 
 	export default {
 		onLaunch: function() {
 			console.log('App Launch')
@@ -14,6 +14,9 @@
 		},
 		onHide: function() {
 			console.log('App Hide')
+		},
+		mounted() {
+	 
 		}
 	}
 </script>

+ 8 - 8
api/map.js

@@ -2,19 +2,19 @@ import http from "@/utils/request.js";
 
 // 获取地图中心点
 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})
-
-
+export const getMapMatterListH6_Api = (params) => http.get('/h6/biz/map/matterList', { params: params })
+//  pv uv新增
+export const getVisituvpv_Api = (data) => http.post('/h5/biz/visituvpv/add', data)

+ 17 - 10
pages/map/index.vue

@@ -5,13 +5,13 @@
 		<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" @openHint="$refs.HintContentRef.open()" @openFeedback="goPages('feedback')"/>
+			:searchDot="searchDot" @openHint="$refs.HintContentRef.open()" @openFeedback="goPages('feedback')" />
 
 
 		<Touchbox ref="TouchboxRef" :maxHeight="0.8" v-if="showMap && siteListArr && siteListArr.length > 0"
 			:zIndex="1001" @currentHeight="e => TouchHeight = e">
-			<template #touchSlot> 
-			<!-- 	<view class="centre-box" v-if="SearchText">
+			<template #touchSlot>
+				<!-- 	<view class="centre-box" v-if="SearchText">
 					<text class="text">为您展示</text>
 					<text class="text-val one-row">{{SearchText}}</text>
 					<text class="text">相关的大厅</text>
@@ -48,13 +48,14 @@
 	import search from "./model/search.vue"
 	import siteListModel from "./model/siteList.vue";
 	import tools from '@/components/tiandituMap/tools.js'
-	import { getMapCenterPoint_Api, getMapList_Api } from "@/api/map.js"
+	import { getMapCenterPoint_Api, getMapList_Api, getVisituvpv_Api } from "@/api/map.js"
 	import siteDetails from "./model/siteDetails.vue"
 	import $config from "@/config/index.js"
 	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" 
+	import HintContent from "./model/hint.vue"
+	import { getUUID } from "@/utils/tool.js";
 	export default {
 		name: 'tdtmap',
 		components: {
@@ -62,7 +63,7 @@
 			siteListModel,
 			serviceCenter,
 			siteDetails,
-			HintContent, 
+			HintContent,
 		},
 		data() {
 			return {
@@ -70,7 +71,7 @@
 				searchDot: false,
 				// 是否显示地图
 				showMap: false,
-				SearchText:'',
+				SearchText: '',
 
 
 
@@ -106,6 +107,12 @@
 			this.getMapCenterPoint()
 		},
 		mounted() {
+			const userLabel = getUUID();
+			const refererStr = document.referrer;
+			getVisituvpv_Api({
+				userLabel,
+				refererStr,
+			})
 			// setTimeout(() => {
 			// 	console.log("this.$refs.SelectMapNavigationRef = " , this.$refs.SelectMapNavigationRef)
 			// 	this.$refs.SelectMapNavigationRef.open()
@@ -427,12 +434,12 @@
 				//最大高度
 				this.scrollMaxHeight = val;
 			},
-			
+
 			// 页面跳转
-			goPages(){
+			goPages() {
 				// 'feedback'
 				uni.navigateTo({
-					url:"/pages/feedback/feedback"
+					url: "/pages/feedback/feedback"
 				})
 			}
 

+ 10 - 2
utils/tool.js

@@ -74,13 +74,13 @@ export const getLocation = () => {
 
 
 
-export const uploadImage = (num = 1, type = 'img' , extension = ['.png','.jpg']) => {
+export const uploadImage = (num = 1, type = 'img', extension = ['.png', '.jpg']) => {
 	return new Promise(async (resolve, reject) => {
 		uni.chooseImage({
 			count: num,
 			sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
 			sourceType: ['album'], //从相册选择
-			extension:extension,
+			extension: extension,
 			// crop: {
 			// 	quality: 100, // 图片裁剪质量
 			// 	width: 100, // 裁剪的宽度
@@ -172,4 +172,12 @@ export const SingleFileUpload = (file, showLoading = false) => {
 			}
 		})
 	})
+}
+
+export const getUUID = () => {
+	return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
+		return (c === "x" ? (Math.random() * 16) | 0 : "r&0x3" | "0x8").toString(
+			16
+		);
+	});
 }