mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 17:33:27 +08:00
【新增】微信小程序端门店列表增加【导航线路规划】功能。
This commit is contained in:
@@ -268,7 +268,13 @@
|
||||
"navigationBarTitleText": "门店列表"
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
"plugins": {
|
||||
"routePlan": {
|
||||
"version": "1.0.18",
|
||||
"provider": "wx50b5593e81dd937a"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"root": "pages/search",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.content { width: 100%; }
|
||||
.map-body { width: 100%; height: 350px; position: relative; }
|
||||
.store-list { background-color: #fff; height: calc(100vh - 44px - 350px);
|
||||
.coreshop-list-item { height: 80px;
|
||||
.coreshop-list-item { height: 100px;
|
||||
.action { width: 65px; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,9 +37,14 @@
|
||||
</view>
|
||||
<view class="action" @click="goMarkers(item.latitude,item.longitude)">
|
||||
<view class="coreshop-text-grey coreshop-font-xs coreshop-margin-bottom-10">{{item.distanceStr|| ''}}</view>
|
||||
<view class="coreshop-width-fit-content">
|
||||
<u-button text="点击查看" type="success" size="mini" />
|
||||
<view class="coreshop-width-fit-content coreshop-margin-bottom-10">
|
||||
<u-button text="上图定位" type="success" size="mini" />
|
||||
</view>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="coreshop-width-fit-content" @tap="goShopMap(item.address,item.latitude,item.longitude)">
|
||||
<u-button text="地图导航" type="success" size="mini" />
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -152,6 +157,25 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//查看所在坐标地图位置
|
||||
goShopMap(address,latitude, longitude) {
|
||||
let plugin = requirePlugin('routePlan');
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
const txMapkey = this.$store.state.config.qqMapKey; //使用在腾讯位置服务申请的key
|
||||
const referer = this.$store.state.config.shopName; //调用插件的app的名称
|
||||
let endPoint = JSON.stringify({ //终点
|
||||
'name': address,
|
||||
'latitude': latitude,
|
||||
'longitude': longitude
|
||||
});
|
||||
|
||||
wx.navigateTo({
|
||||
url: 'plugin://routePlan/index?key=' + txMapkey + '&referer=' + referer + '&endPoint=' + endPoint
|
||||
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
doPhoneCall(phome) {
|
||||
if (phome != 0) {
|
||||
uni.makePhoneCall({
|
||||
|
||||
@@ -355,7 +355,7 @@ u-icon { line-height: 0; }
|
||||
|
||||
/*通用列表样式*/
|
||||
.coreshop-list {
|
||||
& + .coreshop-list { margin-top: 15px; }
|
||||
/*& + .coreshop-list { margin-top: 15px; }*/
|
||||
& > .coreshop-list-item { transition: all .6s ease-in-out 0s; transform: translateX(0px);
|
||||
&.move-cur { transform: translateX(-130px); }
|
||||
.move { position: absolute; right: 0; display: flex; width: 130px; height: 100%; transform: translateX(100%);
|
||||
|
||||
@@ -355,7 +355,7 @@ u-icon { line-height: 0; }
|
||||
|
||||
/*通用列表样式*/
|
||||
.coreshop-list {
|
||||
& + .coreshop-list { margin-top: 15px; }
|
||||
/*& + .coreshop-list { margin-top: 15px; }*/
|
||||
& > .coreshop-list-item { transition: all .6s ease-in-out 0s; transform: translateX(0px);
|
||||
&.move-cur { transform: translateX(-130px); }
|
||||
.move { position: absolute; right: 0; display: flex; width: 130px; height: 100%; transform: translateX(100%);
|
||||
|
||||
Reference in New Issue
Block a user