feat[litemall-wx]: 部分页面支持下拉刷新

This commit is contained in:
Junling Bu
2019-11-24 17:03:23 +08:00
parent e211b61ded
commit dd41f392b8
9 changed files with 26 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
{
"backgroundColor": "#f4f4f4",
"enablePullDownRefresh": true,
"navigationBarTitleText": "购物车"
}

View File

@@ -66,6 +66,13 @@ Page({
this.getCommentCount();
this.getCommentList();
},
onPullDownRefresh() {
wx.showNavigationBarLoading() //在标题栏中显示加载
this.getCommentCount();
this.getCommentList();
wx.hideNavigationBarLoading() //完成停止加载
wx.stopPullDownRefresh() //停止下拉刷新
},
onReady: function() {
// 页面渲染完成

View File

@@ -1,3 +1,4 @@
{
"enablePullDownRefresh": true,
"navigationBarTitleText": "评价"
}

View File

@@ -1,5 +1,6 @@
{
"navigationBarTitleText": "首页",
"enablePullDownRefresh": true,
"usingComponents": {
"zan-capsule": "../../lib/zanui-weapp/capsule/index"
}

View File

@@ -68,6 +68,13 @@ Page({
this.getCommentCount();
this.getCommentList();
},
onPullDownRefresh() {
wx.showNavigationBarLoading() //在标题栏中显示加载
this.getCommentCount();
this.getCommentList();
wx.hideNavigationBarLoading() //完成停止加载
wx.stopPullDownRefresh() //停止下拉刷新
},
onReady: function() {
// 页面渲染完成

View File

@@ -1,3 +1,4 @@
{
"enablePullDownRefresh": true,
"navigationBarTitleText": "评论"
}

View File

@@ -54,8 +54,11 @@ Page({
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
onPullDownRefresh() {
wx.showNavigationBarLoading() //在标题栏中显示加载
this.getCouponList();
wx.hideNavigationBarLoading() //完成停止加载
wx.stopPullDownRefresh() //停止下拉刷新
},
/**
@@ -89,7 +92,7 @@ Page({
that.setData({
scrollTop: 0,
couponList: res.data.list,
showPage: true,
showPage: res.data.total > that.data.limit,
count: res.data.total
});
}

View File

@@ -1,3 +1,4 @@
{
"enablePullDownRefresh": true,
"navigationBarTitleText": "我的优惠券"
}

View File

@@ -129,7 +129,7 @@ page {
.container .b .item {
position: relative;
height: 290rpx;
background: gray;
background: #ccc7c7;
margin-bottom: 30rpx;
margin-left: 30rpx;
margin-right: 30rpx;