Commit 35db713cd7fb09e3a3f4862e28bd939fcd26d350

Authored by wangfan
1 parent 4b93fe98

c端预定

... ... @@ -28,6 +28,7 @@ Page({
sellers:[],
multiArray: [['不确定'].concat(renNum()), ['全部菜系'].concat(DA.caixi)],
multiIndex: [6, 0],
scrollIntoView:'',
},
transverseViewHeight:170,//横向滚动高度
//qqmapsdk:null,
... ... @@ -227,17 +228,20 @@ Page({
},
markertap(e){
console.log(e)
let seller = {
id: e.markerId
};
this.sellers.forEach(se => {
if (se.id == seller.id) {
seller = se;
return false;
}
// let seller = {
// id: e.markerId
// };
// this.sellers.forEach(se => {
// if (se.id == seller.id) {
// seller = se;
// return false;
// }
// })
//this.selectComponent('#seller-box').show(seller);
//wx.hideTabBar();
this.setData({
scrollIntoView:'seller-'+e.markerId
})
this.selectComponent('#seller-box').show(seller);
wx.hideTabBar();
},
getMarkers(){
let cmap=this.data.map;
... ... @@ -249,6 +253,7 @@ Page({
},300)
}
let markers = [];
let sellers=[];
App.Reserve.SellerList({
lat: cmap.latitude,
lng: cmap.longitude,
... ... @@ -266,8 +271,10 @@ Page({
return;
}
this.sellersIds=sellersIds;
this.sellers = res.data;
res.data.forEach(seller => {
sellers=res.data;
this.sellers = sellers;
sellers.forEach(seller => {
if(this.mapData.scale<13){
markers.push({
id: seller.id,
... ... @@ -329,7 +336,7 @@ Page({
}
this.setData({
markers: markers,
sellers:this.sellers,
sellers:sellers,
})
})
... ...
... ... @@ -14,6 +14,10 @@
enable-rotate
show-compass
style="width: 100%; height: {{map.height}}px;"></map>
<cover-view class="searchAddr flex-ll">
<cover-image class="icon" src="http://qn.colorcun.com/custom/lite-online/image/search.png"></cover-image>
请输入位置
</cover-view>
</view>
<view class="transverse-view">
<cover-view class="transverse-view-top"></cover-view>
... ... @@ -35,9 +39,10 @@
<scroll-view
scroll-x
class="scroll-view_H"
scroll-into-view="{{scrollIntoView}}"
>
<view class="flex-ll">
<view class="seller" wx:for="{{sellers}}" wx:key="{{sellers.key}}">
<view class="seller" wx:for="{{sellers}}" wx:key="{{sellers.key}}" id="seller-{{item.id}}">
<sb-tr seller="{{item}}"></sb-tr>
</view>
<view wx:if="{{sellers.length>1}}" style="min-width: 2rpx;min-height: 40rpx;"> </view>
... ...
... ... @@ -36,18 +36,19 @@
background-color: #fefefe;
}
.transverse-view-top{
border-radius: 20rpx 20rpx 0 0;
border-radius: 20rpx 20rpx 0rpx 0rpx;
background-color: #fefefe;
position: absolute;
top:-20rpx;
left: 0;
width: 100%;
height: 20rpx;
height: 0rpx;
}
.transverse-search{
background-color: #fefefe;
height: 60rpx;
width: 100%;
padding-top: 20rpx;
}
.transverse-list{
background-color: #fefefe;
... ... @@ -55,7 +56,7 @@
width: 100%;
}
.transverse-list .seller{
margin: 16rpx 20rpx 12rpx;
margin: 16rpx 20rpx 0rpx;
box-sizing: content-box;
min-width: 710rpx;
width: 100%;
... ... @@ -84,4 +85,23 @@
width: 24rpx;
height: 12rpx;
min-width:24rpx;
}
.searchAddr {
position: fixed;
top: 50rpx;
left: 38rpx;
width: 500rpx;
height: 60rpx;
background-color: #fefefe;
border-radius: 30rpx;
line-height: 60rpx;
color:#999999;
line-height: 60rpx;
font-size: 28rpx;
}
.searchAddr .icon{
width: 42rpx;
height: 40rpx;
margin: 0 20rpx;
}
\ No newline at end of file
... ...