瀏覽代碼

Signed-off-by: 1004749546@qq.com <1004749546@qq.com>
首页修改

1004749546@qq.com 4 年之前
父節點
當前提交
1812a15c23
共有 1 個文件被更改,包括 10 次插入2 次删除
  1. 10 2
      pages/index/index.vue

+ 10 - 2
pages/index/index.vue

@@ -76,7 +76,7 @@
 						name: '洗车机',
 						latitude: '34.29318',
 						longitude: '118.94712',
-						status: 1
+						status: 2
 					},
 					{
 						id: '11',
@@ -229,8 +229,16 @@
 			createMarker(point) {
 				let latitude = point.latitude;
 				let longitude = point.longitude;
+				let iconPath = ''
+				if (point.status===0) {
+					iconPath = '/static/img/store-dky.png'
+				} else if (point.status===1) {
+					iconPath = '/static/img/store.png'
+				} else {
+					iconPath = '/static/img/store-zt.png'
+				}
 				let marker = {
-					iconPath: point.status ? "/static/img/store.png": '/static/img/store-zt.png',
+					iconPath: iconPath,
 					id: point.id || 0,
 					name: point.name || '',
 					latitude: latitude,