rk
2025-12-16 2cfceadff437135a255990ab9698788a48adb636
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<template>
    <view class="map">
        <!-- 头部 -->
        <view class="container_h">
            <view class="container_head" :style="{height: navHeight + 'px', marginTop: statusbarHeight + 'px'}">
                <view class="container_head_input" :style="{height : height + 'px'}">
                    <uni-icons type="search" size="18" color="#999999"></uni-icons>
                    <input type="text" placeholder="你想去哪里" placeholder-style="color: #999999; font-size: 28rpx; font-weight: 500;" />
                </view>
            </view>
        </view>
        <!-- 地图 -->
        <view class="map_box">
            <map></map>
        </view>
        <!-- 底部 -->
        <view class="map_popule">
            <view class="map_popule_icon" @click="open">
                <uni-icons type="top" size="20" v-if="!isOpen"></uni-icons>
                <uni-icons type="bottom" size="20" v-if="isOpen"></uni-icons>
            </view>
            <view class="map_popule_text">
                <text>当前区域商户列表</text>
            </view>
            <scroll-view scroll-y class="map_popule_list" v-if="isOpen">
                <view class="map_popule_list_item" v-for="(item, index) in 1" :key="index" @click="toStroe">
                    <image src="@/static/uni.png" mode="widthFix"></image>
                    <view class="map_popule_list_item_info">
                        <view class="title">珈琲光景</view>
                        <view class="divide">
                            <uni-rate size="18" :value="5" color="#bbb" active-color="red" />
                            <text>5.0</text>
                        </view>
                        <view class="address">瑞金一路179号</view>
                        <view class="isbusiness">营业中</view>
                    </view>
                </view>
            </scroll-view>
        </view>
    </view>
</template>
 
<script>
    import { mapState } from 'vuex'
    export default {
        data() {
            return {
                isOpen: false
            }
        },
        computed: {
            ...mapState(['statusbarHeight', 'navHeight', 'height'])
        },
        methods: {
            open() {
                this.isOpen = !this.isOpen
            },
            toStroe() {
                uni.navigateTo({
                    url: '/pages/storeDetails/index'
                });
            }
        }
    }
</script>
 
<style lang="scss" scoped>
    .map {
        width: 100%;
        .container_h {
            width: 100%;
            height: auto;
            position: fixed;
            top: 0;
            left: 0;
            z-index: 9;
            .container_head {
                width: 100%;
                padding: 0 32rpx;
                box-sizing: border-box;
                display: flex;
                align-items: center;
                justify-content: flex-start;
                .container_head_input {
                    width: 488rpx;
                    background: rgba(255,255,255,0.5);
                    border-radius: 32rpx;
                    display: flex;
                    align-items: center;
                    padding: 0 28rpx;
                    box-sizing: border-box;
                    input {
                        flex: 1;
                        height: 100%;
                        font-size: 28rpx;
                        font-family: PingFang SC-Medium, PingFang SC;
                        font-weight: 500;
                        color: #000000;
                        margin-left: 12rpx;
                    }
                }
            }
        }
        .map_box {
            width: 100vw;
            height: 100vh;
            map {
                width: 100%;
                height: 100%;
            }
        }
        .map_popule {
            position: fixed;
            bottom: 0;
            left: 0;
            z-index: 9999;
            width: 100%;
            max-height: 776rpx;
            background-color: #ffffff;
            border-radius: 25rpx 25rpx 0 0;
            padding: 20rpx 32rpx;
            box-sizing: border-box;
            .map_popule_icon {
                width: 100%;
                text-align: center;
            }
            .map_popule_text {
                text {
                    font-size: 36rpx;
                    font-family: PingFang SC-Semibold, PingFang SC;
                    font-weight: 600;
                    color: #333333;
                }
            }
            .map_popule_list {
                width: 100%;
                height: auto;
                max-height: 620rpx;
                transition: .5s;
                display: flex;
                flex-direction: column;
                margin-top: 24rpx;
                .active {
                    border: 2rpx solid #D20A0A;
                    border-radius: 12rpx;
                }
                .map_popule_list_item {
                    padding: 20rpx;
                    background-color: #ffffff;
                    display: flex;
                    align-items: center;
                    justify-content: space-between;
                    margin-top: 24rpx;
                    &:first-child {
                        margin-top: 0 !important;
                    }
                    image {
                        flex-shrink: 0;
                        width: 172rpx;
                        height: 172rpx;
                        margin-right: 16rpx;
                    }
                    .map_popule_list_item_info {
                        flex: 1;
                        height: 172rpx;
                        display: flex;
                        flex-direction: column;
                        justify-content: space-between;
                        .title {
                            font-size: 28rpx;
                            font-family: PingFang SC-Semibold, PingFang SC;
                            font-weight: 600;
                            color: #333333;
                        }
                        .divide {
                            display: flex;
                            align-items: center;
                            text {
                                margin-left: 10rpx;
                                font-size: 24rpx;
                                font-family: PingFang SC-Regular, PingFang SC;
                                font-weight: 400;
                                color: #D20A0A;
                            }
                        }
                        .address {
                            font-size: 24rpx;
                            font-family: PingFang SC-Regular, PingFang SC;
                            font-weight: 400;
                            color: #999999;
                        }
                        .isbusiness {
                            font-size: 22rpx;
                            font-family: PingFang SC-Regular, PingFang SC;
                            font-weight: 400;
                            color: #D20A0A;
                        }
                    }
                }
            }
        }
    }
</style>