Commit 26319630a6204652d8ebd281162ce9c64a924d8d

Authored by vking
1 parent c7b4f969

周到安排

... ... @@ -16,6 +16,7 @@ Page({
data: {
list:[],
hasMore:true,
activeType:1,
},
/**
... ... @@ -67,6 +68,11 @@ Page({
rdate:'1234567890-9999999999',
sort:1,
}
if(this.data.activeType==1){
params.status='0,0'
}else{
params.status='1,2,3,4,5,6'
}
App.Reserve.GetReserveList(params).then((res)=>{
let list = res.data
if(list.length>0){
... ... @@ -91,4 +97,27 @@ Page({
url:url
})
},
switchTab(e){
let activeType=util.attr(e,'type')
this.setData({
activeType:activeType,
hasMore:true,
})
this.list=[]
this.offset= 1
this.limit= 10
this.hasMore=true
this.pageScrollToTop()
setTimeout(()=>{
this.getMembers()
},300)
},
pageScrollToTop: function () {
wx.createSelectorQuery().select('.pages').boundingClientRect(function (rect) {
// 使页面滚动到底部
wx.pageScrollTo({
scrollTop: rect.top
})
}).exec()
},
})
\ No newline at end of file
... ...
<!--pack-book/pages/book/b_reserve.wxml-->
<wxs src="../../../utils/util.wxs" module="util" />
<nav id="nav" backgroundColor="#199095" color="#fefefe">在线预定</nav>
<view class="tabs flex-lr">
<view class="item {{activeType==1?'active':''}}" bindtap="switchTab" data-type="1">待处理</view>
<view class="item {{activeType==2?'active':''}}" bindtap="switchTab" data-type="2">已处理</view>
</view>
<view class="pages">
<block wx:if="{{list.length>0}}">
<view class="row" wx:for="{{list}}" wx:key="list.key" data-id="{{item.id}}" bindtap="gotoDetail">
... ...
/* pack-book/pages/book/b_reserve.wxss */
.pages{
width: 90%;
margin: 0 auto 50rpx;
margin: 80rpx auto 50rpx;
color: #353535;
overflow-y: auto;
}
... ... @@ -11,7 +11,6 @@
padding-top: 34rpx;
padding-bottom: 34rpx;
}
.history-is-empty{
margin: 200rpx auto;
font-size: 34rpx;
... ... @@ -27,4 +26,31 @@
color: #fefefe;
border-radius: 10rpx;
padding: 2rpx 10rpx;
}
.tabs{
background-color: #199095;
margin-top: -2rpx;
position: fixed;
width: 100%;
}
.tabs .item{
height: 80rpx;
line-height: 80rpx;
text-align: center;
width: 50%;
box-sizing: border-box;
font-weight: bold;
font-size: 34rpx;
color: #fefefe;
}
.tabs .item:first-child{
border-radius: 0 8rpx 0 0 ;
}
.tabs .item:last-child{
border-radius: 8rpx 0 0 0 ;
}
.tabs .item.active{
background-color: #fefefe;
color: #199095;
width: 75%;
}
\ No newline at end of file
... ...