邓洁 page: 地图
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
<template>
|
||||
<view class="slide">
|
||||
<view class="mask" @click.self="quitSlide">
|
||||
<view class="mask" @click="quitSlide">
|
||||
<view class="content" @click.stop>
|
||||
<view class="container">
|
||||
<view class="content-1" @click="enterTransfer">
|
||||
<image src="/static/publish/fb_icon_dpzr.png" mode="aspectFit" class="selecter"></image>
|
||||
<text class="text">店铺转让</text>
|
||||
</view>
|
||||
<view class="content-1" @click="enterAddress">
|
||||
<image src="/static/publish/fb_icon_zdxz.png" mode="aspectFit" class="selecter"></image>
|
||||
<text class="text">找店选址</text>
|
||||
</view>
|
||||
<view class="content-1" @click="enterRent">
|
||||
<image src="/static/publish/fb_icon_dpcz.png" mode="aspectFit" class="selecter"></image>
|
||||
<text class="text">店铺出租</text>
|
||||
</view>
|
||||
<view class="content-1" @click="enterInvestment">
|
||||
<image src="/static/publish/fb_icon_xmzs.png" mode="aspectFit" class="selecter"></image>
|
||||
<text class="text">项目招商</text>
|
||||
</view>
|
||||
<view class="content-1" @click="enterTransfer">
|
||||
<image src="/static/publish/fb_icon_dpzr.png" mode="aspectFit" class="selecter"></image>
|
||||
<text class="text">店铺转让</text>
|
||||
</view>
|
||||
<view class="content-1" @click="enterAddress">
|
||||
<image src="/static/publish/fb_icon_zdxz.png" mode="aspectFit" class="selecter"></image>
|
||||
<text class="text">找店选址</text>
|
||||
</view>
|
||||
<view class="content-1" @click="enterRent">
|
||||
<image src="/static/publish/fb_icon_dpcz.png" mode="aspectFit" class="selecter"></image>
|
||||
<text class="text">店铺出租</text>
|
||||
</view>
|
||||
<view class="content-1" @click="enterInvestment">
|
||||
<image src="/static/publish/fb_icon_xmzs.png" mode="aspectFit" class="selecter"></image>
|
||||
<text class="text">项目招商</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -26,34 +26,34 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default{
|
||||
data(){
|
||||
return{
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
quitSlide(){
|
||||
methods: {
|
||||
quitSlide() {
|
||||
this.$emit("quitSlide")
|
||||
},
|
||||
enterTransfer(){
|
||||
enterTransfer() {
|
||||
uni.navigateTo({
|
||||
url:'/pages/publish/publishTransfer/publishTransfer'
|
||||
url: '/pages/publish/publishTransfer/publishTransfer'
|
||||
})
|
||||
},
|
||||
enterAddress(){
|
||||
enterAddress() {
|
||||
uni.navigateTo({
|
||||
url:'/pages/publish/publishAddress/publishAddress'
|
||||
url: '/pages/publish/publishAddress/publishAddress'
|
||||
})
|
||||
},
|
||||
enterRent(){
|
||||
enterRent() {
|
||||
uni.navigateTo({
|
||||
url:'/pages/publish/publishRent/publishRent'
|
||||
url: '/pages/publish/publishRent/publishRent'
|
||||
})
|
||||
},
|
||||
enterInvestment(){
|
||||
enterInvestment() {
|
||||
uni.navigateTo({
|
||||
url:'/pages/publish/publishInvestment/publishInvestment'
|
||||
url: '/pages/publish/publishInvestment/publishInvestment'
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -61,60 +61,65 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.mask{
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #000000;
|
||||
// opacity: 0.2;
|
||||
// backdrop-filter:saturate(150%) blur(8px);模糊
|
||||
-webkit-backdrop-filter:saturate(150%) blur(8px);
|
||||
background-color:rgba(0,0,0,.3);
|
||||
z-index: 20;
|
||||
|
||||
}
|
||||
.content{
|
||||
position: fixed;
|
||||
transform: translate(-50%, -50%);
|
||||
left: 50%; top: 40%;
|
||||
height: 25%;
|
||||
width: 90%;
|
||||
background-color: #fff;
|
||||
z-index: 40;
|
||||
border-radius: 29rpx;
|
||||
|
||||
}
|
||||
.container{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
z-index: 50;
|
||||
}
|
||||
.content-1{
|
||||
// vertical-align: middle;
|
||||
height: auto;
|
||||
width: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.selecter{
|
||||
width: 49px;
|
||||
height: 49px;
|
||||
z-index: 50;
|
||||
// background-color: red;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
// background-color: red;
|
||||
}
|
||||
.text{
|
||||
font-size: 28rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #000000;
|
||||
// opacity: 0.2;
|
||||
// backdrop-filter:saturate(150%) blur(8px);模糊
|
||||
-webkit-backdrop-filter: saturate(150%) blur(8px);
|
||||
background-color: rgba(0, 0, 0, .3);
|
||||
z-index: 20;
|
||||
|
||||
}
|
||||
|
||||
.content {
|
||||
position: fixed;
|
||||
transform: translate(-50%, -50%);
|
||||
left: 50%;
|
||||
top: 40%;
|
||||
height: 25%;
|
||||
width: 90%;
|
||||
background-color: #fff;
|
||||
z-index: 40;
|
||||
border-radius: 29rpx;
|
||||
|
||||
}
|
||||
|
||||
.container {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
z-index: 50;
|
||||
}
|
||||
|
||||
.content-1 {
|
||||
// vertical-align: middle;
|
||||
height: auto;
|
||||
width: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.selecter {
|
||||
width: 49px;
|
||||
height: 49px;
|
||||
z-index: 50;
|
||||
// background-color: red;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
// background-color: red;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 28rpx;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
12
pages.json
12
pages.json
@@ -8,7 +8,7 @@
|
||||
}
|
||||
},
|
||||
"pages": [
|
||||
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||
//pages数组中第一项表示应用启动页
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
@@ -21,6 +21,15 @@
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/map/map",
|
||||
"style": {
|
||||
"navigationBarTitleText": "速配地图",
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#339967",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/shopTransfer/shopTransfer",
|
||||
"style": {
|
||||
@@ -30,7 +39,6 @@
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
//+
|
||||
{
|
||||
"path": "pages/shopAddress/shopAddress",
|
||||
"style": {
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
<TabBar :current-page="0"></TabBar>
|
||||
<HomeNavCard></HomeNavCard>
|
||||
<view class="news-box">
|
||||
<u-notice-bar :text="newsTextLists" :bg-color="$uni-bg-color"></u-notice-bar>
|
||||
<u-notice-bar :text="newsText" bg-color="#ffffff"></u-notice-bar>
|
||||
</view>
|
||||
|
||||
|
||||
<ShowShopList></ShowShopList>
|
||||
</view>
|
||||
</template>
|
||||
@@ -18,12 +18,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
newsTextLists: [
|
||||
'寒雨连江夜入吴',
|
||||
'平明送客楚山孤',
|
||||
'洛阳亲友如相问',
|
||||
'一片冰心在玉壶'
|
||||
],
|
||||
newsText: '寒雨连江夜入吴'
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@@ -40,5 +35,4 @@
|
||||
background-color: $uni-bg-color-grey;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
</style>
|
||||
102
pages/index/map/map.vue
Normal file
102
pages/index/map/map.vue
Normal file
@@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="search-box">
|
||||
<view class="search-box-input">
|
||||
<u-input placeholder="热门店铺" placeholder-style="color: #888888" prefixIcon="search"
|
||||
prefixIconStyle="font-size: 24px;color: #888888;" border="true">
|
||||
</u-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<map id="map" @markertap="markerClick" class="map" :markers="marker" :show-location="true" :latitude="lat"
|
||||
:longitude="lng"></map>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
lat: '30.57',
|
||||
lng: '104.07',
|
||||
marker: []
|
||||
}
|
||||
},
|
||||
async onShow() {
|
||||
// await this.getLifeTypeList();
|
||||
// await this.getStatusCode()
|
||||
// if (!this.lat && !this.lng) {
|
||||
// await this.chooseSpot()
|
||||
// } else {
|
||||
// if (this.isGd) {
|
||||
// await this.getPoiAround();
|
||||
// } else {
|
||||
// await this.getPoiPage();
|
||||
// }
|
||||
// }
|
||||
// 地图
|
||||
this._mapContext = uni.createMapContext("map", this);
|
||||
this._mapContext.initMarkerCluster({
|
||||
enableDefaultStyle: false,
|
||||
zoomOnClick: true,
|
||||
gridSize: 60,
|
||||
complete(res) {
|
||||
console.log('initMarkerCluster', res)
|
||||
}
|
||||
});
|
||||
this._mapContext.on("markerClusterCreate", (e) => {
|
||||
console.log("markerClusterCreate", e);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 图标点击
|
||||
markerClick(e) {
|
||||
console.log('图标点击', e);
|
||||
// let markerId = e.markerId;
|
||||
// this.marker.forEach(item => {
|
||||
// if (markerId === item.id) {
|
||||
// if (this.isGd) {
|
||||
// uni.navigateTo({
|
||||
// url: `/pages/communityLive/details?data=${item.label}&type=gd&name=${this.name}`
|
||||
// })
|
||||
// } else {
|
||||
// uni.navigateTo({
|
||||
// url: `/pages/communityLive/details?id=${item.id}&name=${this.name}&type=fgd`
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.search-box {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
top: 20rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
|
||||
.search-box-input {
|
||||
width: 580rpx;
|
||||
height: 62rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
opacity: 0.85;
|
||||
}
|
||||
}
|
||||
|
||||
// 地图
|
||||
.content {
|
||||
width: 100%;
|
||||
height: 460rpx;
|
||||
}
|
||||
|
||||
.map {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
}
|
||||
</style>
|
||||
BIN
static/map/sp_icon_dw.png
Normal file
BIN
static/map/sp_icon_dw.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
BIN
static/map/sp_icon_hdw.png
Normal file
BIN
static/map/sp_icon_hdw.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.8 KiB |
Reference in New Issue
Block a user