首页滚动修改 订单修改
This commit is contained in:
parent
86df2a2950
commit
a3c032b3e4
@ -64,21 +64,30 @@
|
|||||||
|
|
||||||
<!-- tab导航 -->
|
<!-- tab导航 -->
|
||||||
<view class="tabs" v-if="showTab" :style="{top:'calc(98rpx + var(--status-bar-height))'}">
|
<view class="tabs" v-if="showTab" :style="{top:'calc(98rpx + var(--status-bar-height))'}">
|
||||||
<block v-for="(item,indx) in tabsArr" :key="indx">
|
<view class="tabs-wrap">
|
||||||
<view v-if="indx>0" style="width: 3rpx;height: 36rpx;background-color: #ccc;"></view>
|
<block v-for="(item,indx) in tabsArr" :key="indx">
|
||||||
<view :class="{'tabs-item-active':item.val==currTabs}" class="tabs-item" @click="changeTab(item.val)">
|
<view v-if="indx>0" style="width: 3rpx;height: 36rpx;background-color: #ccc;"></view>
|
||||||
<view class="tabs-item-main">{{item.name}}</view>
|
<view :class="{'tabs-item-active':item.val==currTabs}" class="tabs-item"
|
||||||
<view class="tabs-item-sub">{{item.desc}}</view>
|
@click="changeTab(item.val)">
|
||||||
</view>
|
<view class="tabs-item-main">{{item.name}}</view>
|
||||||
</block>
|
<view class="tabs-item-sub">{{item.desc}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
</block>
|
||||||
<view class='recommendList' :class="indexP?'on':''">
|
</view>
|
||||||
<view class="loadingicon acea-row row-center-wrapper"
|
<view class="loadingicon acea-row row-center-wrapper tabs-loading"
|
||||||
|
:style="{height:((!hostProduct || hostProduct.length == 0 || loading) && isShow)?'80rpx':'0rpx'}"
|
||||||
v-if="!hostProduct || hostProduct.length == 0 || loading">
|
v-if="!hostProduct || hostProduct.length == 0 || loading">
|
||||||
<text class="loading iconfont icon-jiazai loading-flex"></text>
|
<text class="loading iconfont icon-jiazai loading-flex"></text>
|
||||||
{{ hotTitle }}
|
{{ hotTitle }}
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class='recommendList' :class="indexP?'on':''">
|
||||||
|
<!-- <view class="loadingicon acea-row row-center-wrapper"
|
||||||
|
v-if="!hostProduct || hostProduct.length == 0 || loading">
|
||||||
|
<text class="loading iconfont icon-jiazai loading-flex"></text>
|
||||||
|
{{ hotTitle }}
|
||||||
|
</view> -->
|
||||||
<WaterfallsFlow v-if="hostProduct.length>0" :wfList='hostProduct' @itemTap="goDetail" :type="0"
|
<WaterfallsFlow v-if="hostProduct.length>0" :wfList='hostProduct' @itemTap="goDetail" :type="0"
|
||||||
:sale_type="sale_type" />
|
:sale_type="sale_type" />
|
||||||
<view class='pictrue' v-if="!loading && hostProduct.length==0">
|
<view class='pictrue' v-if="!loading && hostProduct.length==0">
|
||||||
@ -171,11 +180,19 @@
|
|||||||
}],
|
}],
|
||||||
currTabs: 1,
|
currTabs: 1,
|
||||||
list: [],
|
list: [],
|
||||||
tabsTop: ''
|
tabsTop: '',
|
||||||
|
isShow: true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getArticleList();
|
this.getArticleList();
|
||||||
|
uni.$on('scroll', res => {
|
||||||
|
if (res.scrollTop > this.tabsTop) {
|
||||||
|
this.isShow = false;
|
||||||
|
} else {
|
||||||
|
this.isShow = true;
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
@ -197,16 +214,17 @@
|
|||||||
limit: 10
|
limit: 10
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.list = res.data.list;
|
this.list = res.data.list;
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.getDom(this, '.tabs', res => {
|
this.$util.getDom(this, '.tabs', res => {
|
||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
this.tabsTop = res.top + 10;
|
this.tabsTop = res.top - 10;
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
this.tabsTop = res.top;
|
this.tabsTop = res.top;
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
|
console.log(this.tabsTop);
|
||||||
})
|
})
|
||||||
}, 300)
|
}, 300)
|
||||||
})
|
})
|
||||||
@ -236,6 +254,11 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.topLoading {
|
||||||
|
position: sticky;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
.common-hd {
|
.common-hd {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -306,13 +329,19 @@
|
|||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 900;
|
z-index: 900;
|
||||||
background: #fff;
|
|
||||||
padding-bottom: 20rpx;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
margin: 0 -20rpx 10rpx;
|
margin: 0 -20rpx 10rpx;
|
||||||
padding-top: 20rpx;
|
|
||||||
|
.tabs-wrap {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
height: 110rpx;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs-loading {
|
||||||
|
height: 80rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.tabs-item {
|
.tabs-item {
|
||||||
width: 23%;
|
width: 23%;
|
||||||
@ -350,7 +379,6 @@
|
|||||||
|
|
||||||
.recommend .recommendList {
|
.recommend .recommendList {
|
||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
min-height: 100rpx;
|
|
||||||
min-height: calc(100vh - 82rpx - var(--status-bar-height));
|
min-height: calc(100vh - 82rpx - var(--status-bar-height));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -346,7 +346,7 @@
|
|||||||
</image>
|
</image>
|
||||||
</view>
|
</view>
|
||||||
<view class='text acea-row row-between'>
|
<view class='text acea-row row-between'>
|
||||||
<view class='name '>
|
<view class='name'>
|
||||||
<view class='name line2' style="margin-bottom:12rpx;">
|
<view class='name line2' style="margin-bottom:12rpx;">
|
||||||
<text v-if="goods.product_type != 0 && goods.product_type != 10"
|
<text v-if="goods.product_type != 0 && goods.product_type != 10"
|
||||||
:class="'font_bg-red type'+goods.product_type">{{goods.product_type == 1 ? "秒杀" : goods.product_type == 2 ? "预售" : goods.product_type == 3 ? "助力" : goods.product_type == 4 ? "拼团" : ""}}</text>
|
:class="'font_bg-red type'+goods.product_type">{{goods.product_type == 1 ? "秒杀" : goods.product_type == 2 ? "预售" : goods.product_type == 3 ? "助力" : goods.product_type == 4 ? "拼团" : ""}}</text>
|
||||||
@ -355,10 +355,15 @@
|
|||||||
<text
|
<text
|
||||||
style="font-size: 22rpx;background-color: #ecfaed;color: #40ae36;border-radius: 40rpx;padding: 5rpx 10rpx;">
|
style="font-size: 22rpx;background-color: #ecfaed;color: #40ae36;border-radius: 40rpx;padding: 5rpx 10rpx;">
|
||||||
{{(item.merchant && item.merchant.cloud_warehouse) || ''}}</text>
|
{{(item.merchant && item.merchant.cloud_warehouse) || ''}}</text>
|
||||||
|
|
||||||
<view style="margin-top: 10rpx;" class="t-color">
|
<view style="margin-top: 10rpx;" class="t-color">
|
||||||
{{goods.is_refund==1?'退款中':goods.is_refund==2?'部分退款':goods.is_refund==3?'全部退款':''}}
|
{{goods.is_refund==1?'退款中':goods.is_refund==2?'部分退款':goods.is_refund==3?'全部退款':''}}
|
||||||
</view>
|
</view>
|
||||||
|
<view>
|
||||||
|
{{goods.cart_info.productAttr.sku}}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class='money' v-if="item.activity_type == 3">
|
<view class='money' v-if="item.activity_type == 3">
|
||||||
<view v-if="goods.cart_info.productAssistAttr">
|
<view v-if="goods.cart_info.productAssistAttr">
|
||||||
¥{{goods.cart_info.productAssistAttr.assist_price}}</view>
|
¥{{goods.cart_info.productAssistAttr.assist_price}}</view>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user