1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
| <template>
| <view>
| <u-navbar title="地图展示" safeAreaInsetTop fixed placeholder>
| <view class="coreshop-navbar-left-slot" slot="left">
| <u-icon name="arrow-left" size="19" @click="goNavigateBack"></u-icon>
| <u-line direction="column" :hairline="false" length="16" margin="0 8px"></u-line>
| <u-icon name="home" size="22" @click="goHome"></u-icon>
| </view>
| <view slot="right">
| </view>
| </u-navbar>
| <view class="content">
| <map :style="[{height:height+'px'},{width:'100%'}]" id="map" :latitude="lat"
| :longitude="lng"
| :scale="15"
| :enable-3D="true"
| :show-compass="true"
| :enable-overlooking="true"
| :enable-traffic="true"
| :markers="covers">
| </map>
| </view>
| <!-- 登录提示 -->
| <coreshop-login-modal></coreshop-login-modal>
| </view>
| </template>
|
| <script>
| export default {
| data() {
| return {
| id: 0,
| lat: 0,
| lng: 0,
| covers: [],
| height: 0
| }
| },
| onLoad(options) {
| //console.log(options);
| const res = uni.getSystemInfoSync();
| this.height = res.windowHeight;
|
| this.lat = options.latitude;
| this.lng = options.longitude;
| let mark = {
| id: options.id,
| latitude: options.latitude,
| longitude: options.longitude,
| iconPath: '/static/images/map/location.png',
| width: 15,
| height: 23,
| }
| this.covers.push(mark);
| },
| methods: {
|
| }
| }
| </script>
|
| <style lang="scss" scoped>
|
| </style>
|
|