Browse Source

【新增】 发现好产品页商品列表价格回显

【优化】 发现好产品页地图marker回显数据不会被清除的问题
master
邓平艺 4 years ago
parent
commit
1006621e9d
  1. 38
      pages/shopmap/index.vue

38
pages/shopmap/index.vue

@ -51,24 +51,29 @@
<image style="width: 90rpx;height: 90rpx;border-radius: 10rpx;" :src="item.picture" mode="aspectFill"></image> <image style="width: 90rpx;height: 90rpx;border-radius: 10rpx;" :src="item.picture" mode="aspectFill"></image>
</view> </view>
<view class="lf-flex-column"> <view class="lf-flex-column">
<view class="lf-font-28 lf-color-222 lf-line-1" style="max-width: 460rpx;">{{item.title}}</view>
<view class="lf-font-24 lf-color-999 lf-flex lf-m-t-18" >
<view>
<text class="lf-iconfont lf-icon-dingwei1" style="font-size: 10px!important;"></text>
<view class="lf-font-28 lf-color-222 lf-line-1" style="width: 576rpx;">{{item.title}}</view>
<view style="width: 100%; display: flex; justify-content: space-between; align-items: flex-end;">
<view class="lf-font-24 lf-color-999 lf-flex lf-m-t-18" style="width: 440rpx;">
<view>
<text class="lf-iconfont lf-icon-dingwei1" style="font-size: 10px!important;"></text>
</view>
<view class="lf-line-2 lf-m-l-10" style="max-width: 440rpx;">
<block v-if="item.address">
<text>{{ item.address }}</text>
<text class="lf-m-l-10 lf-m-r-10">|</text>
</block>
<text>{{item.distance_m | kmUnit}}</text>
</view>
</view> </view>
<view class="lf-line-2 lf-m-l-10" style="max-width: 440rpx;">
<block v-if="item.address">
<text>{{ item.address }}</text>
<text class="lf-m-l-10 lf-m-r-10">|</text>
</block>
<text>{{item.distance_m | kmUnit}}</text>
<view style="width: 134rpx;">
<view @click="openMap(item.address,item.latitude,item.logitude)" style="display: flex; justify-content: flex-end;">
<text class="lf-iconfont lf-icon-daohang"></text>
</view>
<view class="lf-font-24 lf-color-price lf-text-right">{{ item.price }}</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view @click="openMap(item.address,item.latitude,item.logitude)">
<text class="lf-iconfont lf-icon-daohang"></text>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -252,6 +257,7 @@
tab_item.loadingClass = true; tab_item.loadingClass = true;
tab_item.loadingText = '正在加载中'; tab_item.loadingText = '正在加载中';
tab_item.list = []; tab_item.list = [];
this.markers_list = [];
}, },
getCategory(options = {}) { getCategory(options = {}) {
this.$http(this.API.API_CATEGORYLIST).then(res => { this.$http(this.API.API_CATEGORYLIST).then(res => {
@ -353,8 +359,8 @@
tab_item.list.push(...res.data.data); tab_item.list.push(...res.data.data);
} }
console.log("res", res); console.log("res", res);
let res_list = res.data.data || [];
this.createMarkers(res_list);
// let res_list = res.data.data || [];
this.createMarkers(tab_item.list);
}).catch(err => { }).catch(err => {
}) })
@ -415,7 +421,7 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 0rpx 28rpx;
// padding: 0rpx 28rpx;
} }
.lf-map-height { .lf-map-height {
width: 100%; width: 100%;

Loading…
Cancel
Save