Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李俊赕
self-support
Commits
2658684e
Commit
2658684e
authored
Apr 29, 2021
by
刘用法
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页推荐订单翻页
parent
481248dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
25 deletions
+49
-25
index.vue
src/components/tabBarList/index.vue
+2
-2
index.vue
src/pages/index/index.vue
+47
-23
No files found.
src/components/tabBarList/index.vue
View file @
2658684e
...
...
@@ -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
;
...
...
src/pages/index/index.vue
View file @
2658684e
<
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
:
-1
4
rpx
;
margin-left
:
-1
6
rpx
;
}
.msg-view
{
...
...
@@ -468,7 +493,6 @@
.order-item-view
{
background-color
:
#F4F5F7
;
border-radius
:
12rpx
;
margin-bottom
:
20rpx
;
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment