瀏覽代碼

弹框优化滑动点d点透

tags/河北版C.8.1.01
caserKing 5 年之前
父節點
當前提交
7f4ac66328
共有 2 個檔案被更改,包括 30 行新增12 行删除
  1. +29
    -11
      pages/passCar/passCar.js
  2. +1
    -1
      pages/passCar/passCar.wxml

+ 29
- 11
pages/passCar/passCar.js 查看文件

@@ -43,7 +43,7 @@ Page({
loadingUrl: imgurl.loading.url,
allow_load: true,
curPageNum: 1,
curPageSize: 4,
curPageSize: 15,
curTotalpageNum: 0,
quantitle: '',
quanid: '',
@@ -93,7 +93,7 @@ Page({
url: config.api.couponOrderCarList,
data: {
pageNum: pageNum,
pageSize: 20,
pageSize: 15,
couponOrderStatus: key
}
}).then(res => {
@@ -121,10 +121,18 @@ Page({
* concat 不会改变原数组值
* push 会改变原数组值,但不会一条一条插入,而是整个数组插入
*/
that.data.ticketList = that.data.ticketList.concat(res.data.list);
that.setData({
ticketList: that.data.ticketList
});
if (pageNum == 1) {
that.setData({
ticketList: res.data.list,
curPageNum: pageNum
});
} else {
that.setData({
ticketList: that.data.ticketList.concat(res.data.list)
});
}
// that.data.ticketList = that.data.ticketList.concat(res.data.list);
this.hideLoading();
})
.catch(err => {
@@ -216,6 +224,7 @@ Page({
})
},
onShow: function (options) {
console.log(123)
var that = this;
that.setData({
etcpAppId: extConfig.attr.etcpAppId,
@@ -260,14 +269,23 @@ Page({
addCar: null
});
}
this.setData({
ticketList: [],
curPageNum: 1
})
this.getTicketList(0, 1);
},
cancelMove: function() {
console.log(111)
return false;
},
onHide: function () {
this.setData({
allow_load: true,
showTicketModal: false,
curPageNum: 1,
ticketList: []
})
},
onLoad: function (options) {
var that = this;
@@ -485,7 +503,7 @@ Page({
url: config.api.couponOrderCarList + "?type=5&couponOrderStatus=0",
data: {
pageNum: 1,
pageSize: 20,
pageSize: 15,
couponOrderStatus: 0
}
}).then(res => {


+ 1
- 1
pages/passCar/passCar.wxml 查看文件

@@ -108,7 +108,7 @@
<text class="txt2">敬请期待</text>
</view>
<!-- -->
<view bindtap="closeTicketModal" class="gray-bg" wx:if="{{showTicketModal}}"></view>
<view bindtap="closeTicketModal" class="gray-bg" catchtouchmove="cancelMove" wx:if="{{showTicketModal}}"></view>
<view class="ticket-modal" wx:if="{{showTicketModal}}">
<view style='padding-top:0;'>
<view class="nocoupon" wx:if="{{ticketList.length==0}}" style="margin-top:100rpx;">


Loading…
取消
儲存