Commit 2658684e authored by 刘用法's avatar 刘用法

首页推荐订单翻页

parent 481248dc
......@@ -32,10 +32,10 @@
<style lang="scss" scoped>
.content {
height: 100vh;
// height: 100vh;
background-color: #f4f5f7;
padding: 0rpx 30rpx 0 30rpx;
overflow-y: auto;
// overflow-y: auto;
&.fixed {
height: 100vh;
display: flex;
......
<template>
<TabBarPage title="充电桩自营平台">
<scroll-view scroll-y style="margin-bottom: 20rpx;height: 100vh;" @scrolltolower="reachBottom"
scroll-anchoring scroll-y="true" refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100"
refresher-background="#F4F5F7" @refresherpulling="triggered = true" @refresherrefresh="onRefresh"
@refresherrestore="onRestore" @refresherabort="onAbort">
<TabBarPage title="充电桩自营平台">
<image class="banner-image" :src="bannerImage"></image>
<view class="msg-view">
......@@ -62,7 +66,8 @@
<view class="bottom-text">我也是有底线哒</view>
<view class="bottom-line-view"></view>
</view>
</TabBarPage>
</TabBarPage>
</scroll-view>
</template>
<script>
......@@ -95,7 +100,9 @@
token: "",
pageNumber: 0,
pageSize: 100,
},
},
triggered: false,
_freshing: false,
};
},
watch: {
......@@ -131,7 +138,8 @@
return process.uniEnv.qn_base_url + 'weiruzhu.png'
},
},
onLoad() {
onLoad() {
this._freshing = false;
this.getOrderCount()
},
onShow() {
......@@ -140,17 +148,17 @@
this.initSettleInfo();
}
},
onPullDownRefresh() {
console.log('------下拉刷新------')
// 下拉刷洗
this.initSettleInfo()
},
onReachBottom() {
console.log('----------底部-------------', this.currentLoadStatus)
if (this.currentLoadStatus != 'loadmore') return
this.currentLoadStatus == 'loading'
this.loadOrderList()
},
// onPullDownRefresh() {
// console.log('------下拉刷新------')
// // 下拉刷洗
// this.initSettleInfo()
// },
// onReachBottom() {
// console.log('----------底部-------------', this.currentLoadStatus)
// if (this.currentLoadStatus != 'loadmore') return
// this.currentLoadStatus == 'loading'
// this.loadOrderList()
// },
// onPageScroll(obj) {
// console.log('---------scroll---------', obj)
// },
......@@ -212,6 +220,8 @@
self.$u.api.listByRecommendOrder(self.search).then((res) => {
uni.stopPullDownRefresh() // 结束下拉刷新
self.loadedOrder = true
self.triggered = false;
self._freshing = false;
/*↓↓↓↓↓↓↓↓↓↓测试数据↓↓↓↓↓↓↓↓↓↓*/
// if (res.data.list) {
// if (res.data.list.length == 0 && res.data.total > 0) {
......@@ -262,12 +272,27 @@
onRestore() {
this.triggered = "restore";
},
// reachBottom() {
// console.log(this.currentLoadStatus)
// if (this.currentLoadStatus != 'loadmore') return
// this.currentLoadStatus == 'loading'
// this.loadOrderList()
// },
reachBottom() {
console.log(this.currentLoadStatus)
if (this.currentLoadStatus != 'loadmore') return
this.currentLoadStatus == 'loading'
this.loadOrderList()
},
onPulling(e) {
console.log("onpulling", e);
},
onRefresh() {
if (this._freshing) return;
this._freshing = true;
this.initSettleInfo()
},
onRestore() {
this.triggered = 'restore'; // 需要重置
console.log("onRestore");
},
onAbort() {
console.log("onAbort");
},
// clickSwiper(index) {},
handleScroll() {
console.log("-----scroll-------");
......@@ -342,7 +367,7 @@
.banner-image {
width: 730rpx;
height: 280rpx;
margin-left: -14rpx;
margin-left: -16rpx;
}
.msg-view {
......@@ -468,7 +493,6 @@
.order-item-view {
background-color: #F4F5F7;
border-radius: 12rpx;
margin-bottom: 20rpx;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment