名片模板,海报列表滑动bug修复

This commit is contained in:
高健 2021-09-06 16:28:51 +08:00
parent 8ac5111337
commit 999412b220
5 changed files with 25 additions and 16 deletions

View File

@ -18,12 +18,17 @@ Page({
isRefresh: false,
isShowCodeInput: false, //测试true
code: '', //邀请码
conentHeight: 550, //滚动内容的高度
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// this.getPayState()
//屏幕高度-标题的高度
this.setData({
conentHeight: app.globalData.windowHeight
})
},
onShow() {
this.dorefreshList()
@ -56,8 +61,8 @@ Page({
if (res.data.length > 0) {
_self.setData({
optionsList: res.data,
curTypeId: res.data[0].dataId,
currentIndex: 0
curTypeId: res.data[_self.data.currentIndex].dataId,
currentIndex: _self.data.currentIndex
})
//根据第一条获取数据
_self.getList()

View File

@ -11,9 +11,9 @@
</block>
</van-tabs>
</view>
<scroll-view style="margin-top: 70rpx;" refresher-enabled="true" refresher-threshold="{{50}}"
refresher-background="#fff" enhanced="{{true}}" scroll-y bindrefresherrefresh="dorefreshList"
refresher-triggered="{{isRefreshing}}">
<scroll-view style="margin-top: 70rpx;height: {{conentHeight}}px;" refresher-enabled="true"
refresher-threshold="{{50}}" refresher-background="#fff" enhanced="{{true}}" scroll-y
bindrefresherrefresh="dorefreshList" refresher-triggered="{{isRefreshing}}">
<block wx:if="{{cardList.length>0}}">
<view class="page-box">
<block wx:for="{{cardList}}" wx:key="index">

View File

@ -27,7 +27,8 @@ Page({
curTypeId: '',
isShowOptions: false, //是否显示选项
curItemIndex: -1, //点击分享按钮弹出的
curTypeName: '全部'
curTypeName: '全部',
contentHeight: 550, //内容区域的高度
},
/**
@ -37,6 +38,9 @@ Page({
var _self = this
//获取类型
_self.getOptionsList()
this.setData({
contentHeight: app.globalData.windowHeight
})
},
//获取类型
getOptionsList() {
@ -95,7 +99,7 @@ Page({
_self.setData({
currentTypeIndex: idx,
curTypeId: id,
curTypeName:name ,
curTypeName: name,
posterHistoryList: [],
posterTempleteList: [],
isShowOptions: false

View File

@ -29,8 +29,8 @@
</view>
<!-- 模板 -->
<scroll-view style="margin-top: 70rpx;" refresher-enabled="true" refresher-threshold="{{50}}"
wx:if="{{currentIndex == 0}}" refresher-background="#fff" enhanced="{{true}}" scroll-y
<scroll-view style="margin-top: 70rpx;height: {{contentHeight}}px;" refresher-enabled="true"
refresher-threshold="{{50}}" wx:if="{{currentIndex == 0}}" refresher-background="#fff" enhanced="{{true}}" scroll-y
bindrefresherrefresh="dorefreshList" refresher-triggered="{{isRefreshing}}">
<block wx:if="{{posterTempleteList.length>0}}">
<view class="img-box">
@ -63,9 +63,9 @@
</view>
</scroll-view>
<!-- 发布历史 -->
<scroll-view style="margin-top: 70rpx;" refresher-enabled="true" refresher-threshold="{{50}}"
refresher-background="#fff" enhanced="{{true}}" scroll-y bindrefresherrefresh="dorefreshList"
refresher-triggered="{{isRefreshing}}" wx:else>
<scroll-view style="margin-top: 70rpx;height: {{contentHeight}}px;" refresher-enabled="true"
refresher-threshold="{{50}}" refresher-background="#fff" enhanced="{{true}}" scroll-y
bindrefresherrefresh="dorefreshList" refresher-triggered="{{isRefreshing}}" wx:else>
<block wx:if="{{posterHistoryList.length>0}}">
<view class="img-box">
<block wx:for="{{posterHistoryList}}" wx:key="index">

View File

@ -223,10 +223,10 @@ Page({
}
})
.catch(err => {
wx.showToast({
title: '获取订单失败',
icon: 'err'
})
// wx.showToast({
// title: '获取订单失败',
// icon: 'err'
// })
})
},
//用户协议