Fly 4 달 전
부모
커밋
feddbdee7e
5개의 변경된 파일49개의 추가작업 그리고 12개의 파일을 삭제
  1. 1 1
      config/index.js
  2. 1 1
      manifest.json
  3. 21 0
      pages/map/map.js
  4. 18 8
      pages/map/model/siteDetails.vue
  5. 8 2
      pages/map/model/siteList.vue

+ 1 - 1
config/index.js

@@ -12,5 +12,5 @@ export default {
 	// 天地图
 	tianKey:'1edd9c001a8425cb93631398109d5ab2',
 	
-	type:'H5' , // h5 / h6,  web端打包需要修改 manifest.json web配置的基础运行路径
+	type:'H6' , // h5 / h6,  web端打包需要修改 manifest.json web配置的基础运行路径
 }

+ 1 - 1
manifest.json

@@ -76,7 +76,7 @@
             "maps" : {}
         },
         "router" : {
-            "base" : "/h5/"
+            "base" : "/h6/"
         }
     }
 }

+ 21 - 0
pages/map/map.js

@@ -0,0 +1,21 @@
+export default {
+	data() {
+		return {};
+	},
+	methods: {
+		getVal(val) {
+			const all = (val.split('周六') || []).map((el, index) => {
+				if (index === 0) {
+					if (val.indexOf('周六') === 0) {
+						el = `周六${el}`
+					}
+				} else {
+					el = `周六${el}`
+				}
+				return el
+			})
+			console.log('all === ', all)
+			return all
+		},
+	}
+};

+ 18 - 8
pages/map/model/siteDetails.vue

@@ -13,14 +13,22 @@
 							<view class="site-distance">距离{{getDistance(info.distance)}}</view>
 							<view class="site-time">
 								<text class="time-lable">办公时间</text>
-								<text class="site-time-val">{{info.workTimeRemark}}</text>
+								<!-- <text class="site-time-val">{{getVal(info.workTimeRemark)}}</text> -->
+								<view class="site-time-val">
+									<view class=""  v-for="item in getVal(info.workTimeRemark)">
+										{{ item }}
+									</view>
+								</view>
+								<!-- <text class="site-time-val">{{info.workTimeRemark}}</text> -->
 							</view>
-						</view> 
+						</view>
 						<view class="sever-box" :style="{'height':serveH  +'px' }">
-							<template v-if="serveH"> 
-								<siteServe v-if="$config.type === 'H5'" :height="serveH" :mapLocationId="info.mapLocationId" />
-								
-								<siteServeH6 v-if="$config.type === 'H6'" :height="serveH" :mapLocationId="info.mapLocationId" />
+							<template v-if="serveH">
+								<siteServe v-if="$config.type === 'H5'" :height="serveH"
+									:mapLocationId="info.mapLocationId" />
+
+								<siteServeH6 v-if="$config.type === 'H6'" :height="serveH"
+									:mapLocationId="info.mapLocationId" />
 							</template>
 						</view>
 					</template>
@@ -64,7 +72,9 @@
 	import telList from "./telList.vue"
 	import siteServe from "./siteServe.vue"
 	import siteServeH6 from "./siteServeH6.vue"
+	import map from "./../map.js"
 	export default {
+		mixins: [map],
 		data() {
 			return {
 				contentH: 0,
@@ -72,7 +82,7 @@
 				info: null,
 			}
 		},
-		components: { telList, siteServe , siteServeH6 },
+		components: { telList, siteServe, siteServeH6 },
 		created() {
 
 		},
@@ -161,7 +171,7 @@
 				openMap({ name, code: code, type: "baidu" })
 			},
 			openDetails(res) {
-				console.log('openDetails = ' , res)
+				console.log('openDetails = ', res)
 				this.info = res;
 				this.serveH = 0;
 				this.contentH = 0;

+ 8 - 2
pages/map/model/siteList.vue

@@ -35,7 +35,11 @@
 		</view>
 		<view class="site-time">
 			<text class="time-lable">办公时间</text>
-			<text class="site-time-val">{{info.workTimeRemark}}</text>
+			<view class="site-time-val">
+				<view class=""  v-for="item in getVal(info.workTimeRemark)">
+					{{ item }}
+				</view>
+			</view>
 		</view>
 		<telList ref="telListRef" />
 	</view>
@@ -46,7 +50,9 @@
 	import { openMap } from "@/utils/openApp.js"
 	import { EventBus } from "@/utils/vueBus.js"
 	import telList from "./telList.vue"
+	import map from "./../map.js"
 	export default {
+		mixins: [map],
 		props: {
 			info: {
 				type: Object,
@@ -68,7 +74,7 @@
 				return distanceCalculate(num)
 			},
 			getPhoneCall(tel) {
-				this.$refs.telListRef.open({tel})
+				this.$refs.telListRef.open({ tel })
 			},
 			openLocation(info) {
 				const { areaCode, cityCode, provinceCode, provinceName, cityName, areaName, address } = info