Browse Source

地图标记等

master
石可 4 years ago
parent
commit
9f7b7a3296
  1. 18
      common/styles/iconfont.css
  2. 62
      pages/shopmap/index.vue

18
common/styles/iconfont.css

@ -1,8 +1,8 @@
@font-face {
font-family: "lf-iconfont"; /* Project id 2651793 */
src: url('//at.alicdn.com/t/font_2651793_o7fen3k0lq.woff2?t=1634315157253') format('woff2'),
url('//at.alicdn.com/t/font_2651793_o7fen3k0lq.woff?t=1634315157253') format('woff'),
url('//at.alicdn.com/t/font_2651793_o7fen3k0lq.ttf?t=1634315157253') format('truetype');
src: url('//at.alicdn.com/t/font_2651793_0s2r3bnbfn8.woff2?t=1634456623686') format('woff2'),
url('//at.alicdn.com/t/font_2651793_0s2r3bnbfn8.woff?t=1634456623686') format('woff'),
url('//at.alicdn.com/t/font_2651793_0s2r3bnbfn8.ttf?t=1634456623686') format('truetype');
}
.lf-iconfont {
@ -13,6 +13,18 @@
-moz-osx-font-smoothing: grayscale;
}
.lf-icon-dingwei1:before {
content: "\e61e";
}
.lf-icon-daohang:before {
content: "\e88a";
}
.lf-icon-ditu:before {
content: "\e8ad";
}
.lf-icon-dingwei:before {
content: "\ec32";
}

62
pages/shopmap/index.vue

@ -22,15 +22,15 @@
<u-icon name="arrow-down" style="font-size: 20rpx;" :class="sort==0?'lf-color-blue':''"></u-icon>
</view>
</view>
<swiper :style="{height: '600rpx', width: '750rpx'}" :current="current" @change="swiperChange">
<swiper :style="{height: 'calc('+ windowHeight +'px - 110rpx)', width: '100%'}" :current="current" @change="swiperChange">
<swiper-item v-for="(tabItem, tabIndex) in tab_list" :key="tabIndex">
<scroll-view class="com" :scroll-y="true" :refresher-enabled="true" :refresher-triggered="tabItem.isRefresher" @scrolltolower="onScrolltolower" @refresherrefresh="onRefresherrefresh">
<view class="lf-m-t-20"></view>
<view>
<!-- 活动列表 -->
<view class="content">
<view class="item" v-for="(item,index) of tabItem.list" :key="index" @click="$url('/pages/goodsDetail/index?goods_id='+item.id)">
<view class="cover">
<view class="item" v-for="(item,index) of tabItem.list" :key="index">
<!-- <view class="cover">
<image :src="item.picture" class="lf-w-100 lf-h-100" mode="aspectFill"></image>
</view>
<view style="width: 420rpx;">
@ -40,6 +40,27 @@
<lf-price :price="item.price"></lf-price>
<text class="lf-font-24 lf-color-gray lf-line-through lf-m-l-15">¥{{item.original_price}}</text>
</view>
</view> -->
<view class="lf-row-between lf-m-t-40">
<view class="lf-row-between">
<view class="lf-m-r-20">
<image style="width: 46rpx;height: 46rpx;" :src="item.picture" mode="aspectFill"></image>
</view>
<view class="lf-flex-column">
<view class="lf-font-28 lf-color-222 lf-line-1" style="max-width: 510rpx;">{{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>
<view class="lf-line-2 lf-m-l-10" style="max-width: 480rpx;">
瑞希开发
</view>
</view>
</view>
</view>
<view>
<text class="lf-iconfont lf-icon-daohang"></text>
</view>
</view>
</view>
</view>
@ -48,12 +69,12 @@
<text v-if="tabItem.list.length" :class="{'loading-more-text': loadingClass}">{{ loadingText }}</text>
<lf-nocontent v-else></lf-nocontent>
</view>
<!-- 回到顶部 -->
<u-back-top :scroll-top="pageScrollTop" :custom-style="{background: 'rgba(51, 51 51, 0.3)'}"></u-back-top>
</view>
</scroll-view>
</swiper-item>
</swiper>
<!-- 回到顶部 -->
<u-back-top :scroll-top="pageScrollTop" :custom-style="{background: 'rgba(51, 51 51, 0.3)'}"></u-back-top>
</view>
</view>
</template>ß
@ -88,7 +109,8 @@
loadingClass: true,
loadingText: '正在加载中',
page: 1,
isPage: true
isPage: true,
type: 1
},
{
id: 2,
@ -98,7 +120,8 @@
loadingClass: true,
loadingText: '正在加载中',
page: 1,
isPage: true
isPage: true,
type: 4
},
{
id: 4,
@ -108,7 +131,8 @@
loadingClass: true,
loadingText: '正在加载中',
page: 1,
isPage: true
isPage: true,
type: 3
},
],
current: 0,
@ -117,7 +141,6 @@
page: 1,
isPage: true,
pageSize: 20,
isRefresher: false,
sort: 0,
}
},
@ -153,7 +176,7 @@
}
},
clearTabItem(){
let tab_item = this.tab_list_father[this.current];
let tab_item = this.tab_list[this.current];
tab_item.page = 1;
tab_item.isPage = true;
tab_item.isRefresher = true;
@ -193,7 +216,7 @@
})
},
clicksort(index) {
if(index == 3) {
if(index == 2) {
if(this.sort == 0) {
this.sort = 1
}else {
@ -221,7 +244,7 @@
},
// scroll-view
onRefresherrefresh(){
this.tab_list_father[this.current].isRefresher = true;
this.tab_list[this.current].isRefresher = true;
this.$u.throttle(() => {
this.clearTabItem();
this.getActivityList();
@ -229,7 +252,7 @@
},
//
onScrolltolower(){
let tab_item = this.tab_list_father[this.current];
let tab_item = this.tab_list[this.current];
if(tab_item.isPage){
tab_item.page = tab_item.page + 1;
this.getActivityList();
@ -237,16 +260,19 @@
},
getActivityList(){
let tab_item = this.tab_list_father[this.current_father];
let sort_type = this.tab_list[this.current].type;
console.log('页数',tab_item.id)
if(this.$shared.isValueType(tab_item) == 'undefined') return;
this.$http(this.API.API_ADVICELIST,{page: tab_item.page,category_id: tab_item.id}).then(res => {
this.$http(this.API.API_ADVICELIST,{page: tab_item.page,category_id: tab_item.id,type: sort_type,by: this.sort}).then(res => {
let isPage = res.data.next_page_url == null?false:true;
tab_item.isPage = isPage;
if(!isPage){
tab_item.loadingClass = false;
tab_item.loadingText = '没有更多数据啦~';
}
tab_item.isRefresher = false;
this.tab_list[this.current].isRefresher = false;
console.log(this.tab_list[this.current].isRefresher )
console.log(this.tab_list[this.current])
if(tab_item.page == 1){
tab_item.list = res.data.data;
}else{
@ -261,6 +287,12 @@
</script>
<style lang="scss" scoped>
.com{
width: 100%;
height: 100%;
box-sizing: border-box;
padding: 0rpx 28rpx;
}
.lf-map-height {
width: 100%;
height: 500rpx;

Loading…
Cancel
Save