Browse Source

上传

master
前端-胡立永 6 months ago
parent
commit
9391f3f82e
3 changed files with 16 additions and 10 deletions
  1. +4
    -7
      components/tourGuide/locations.vue
  2. +1
    -1
      manifest.json
  3. +11
    -2
      store/store.js

+ 4
- 7
components/tourGuide/locations.vue View File

@ -163,13 +163,10 @@
//
markertap(e) {
console.log("===你点击了标记点===", e)
this.spotGuideMarkers.forEach(n => {
if(n.id == e.detail.markerId){
uni.openLocation({
latitude: n.latitude,
longitude: n.longitude,
})
}
let spot = this.spotGuideMarkers[e.markerId]
uni.openLocation({
latitude: spot.latitude,
longitude: spot.longitude,
})
},
openLocation(n){


+ 1
- 1
manifest.json View File

@ -1,5 +1,5 @@
{
"name" : "遗产里的景徳镇",
"name" : "unapp模板",
"appid" : "__UNI__197A38F",
"description" : "",
"versionName" : "1.0.0",


+ 11
- 2
store/store.js View File

@ -58,14 +58,23 @@ const store = new Vuex.Store({
spotGuideMarkers(state){
let list = []
state.spotList.forEach(n => {
state.spotList.forEach((n, index) => {
if(state.spotGuideIndex != n.categoryId){
return
}
if(state.areaId != n.areaId){
return
}
list.push({
latitude: n.spotLatitude,
longitude: n.spotLongitude,
width: 20, //图标icon 宽度
height: 28 ,//图标icon 高度
iconPath: `/static/image/tourGuide/${n.categoryId}.png`, //图标
id: n.id,
id: index,
})
})


Loading…
Cancel
Save