|
|
|
|
@ -2,13 +2,13 @@
|
|
|
|
|
<div class="wrap">
|
|
|
|
|
<div class="map">
|
|
|
|
|
<movable-area style="width:100vw;height:100vh" class="bg" scale-area>
|
|
|
|
|
<movable-view :x="area.x" :style="{ 'height': '100vh', 'width': area.w +'rpx' }" :scale="true"
|
|
|
|
|
<movable-view :x="area.x" :style="{ 'height': '100vh', 'width': area.w +40+'px' }" :scale="true"
|
|
|
|
|
out-of-bounds direction="all">
|
|
|
|
|
<view class="map-wrap">
|
|
|
|
|
<view class="map-wrap" :style="{ 'height': '100vh', 'width': area.w+'px','margin':'0 auto' }">
|
|
|
|
|
<img style="height:100vh;display:block;margin:0 auto" mode="heightFix" ref="image"
|
|
|
|
|
:src="require('@/static/map-map.png')" alt="">
|
|
|
|
|
:src="require('@/static/map-map.png')" alt="" @load="load">
|
|
|
|
|
<view v-for="item in pointers">
|
|
|
|
|
<view class="map-item" @click="toDetail(item)" :style="{'top':item.y+'%','left':item.x+'%'}">
|
|
|
|
|
<view class="map-item" @click="toDetail(item)" :style="{'top':item.y+'%','left':item.x+'%'}" >
|
|
|
|
|
<image class="map-item-flag" v-if="item.has_answer > 0" :src="require('@/static/map-flag.png')"></image>
|
|
|
|
|
<image class="map-item-points" :src="require('@/static/map-point.png')"></image>
|
|
|
|
|
<view class="map-item-title">
|
|
|
|
|
@ -105,7 +105,12 @@
|
|
|
|
|
pointers: []
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
methods: {
|
|
|
|
|
load(){
|
|
|
|
|
this.area.w = this.$refs['image'].getBoundingClientRect().width
|
|
|
|
|
this.area.h = this.$refs['image'].getBoundingClientRect().height
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
async getPoints() {
|
|
|
|
|
this.pointers = []
|
|
|
|
|
const res = await this.$u.api.getPoints()
|
|
|
|
|
|