Explorar el Código

弹框优化滑动点d点透

tags/河北版C.8.1.01
caserKing hace 5 años
padre
commit
7f4ac66328
Se han modificado 2 ficheros con 30 adiciones y 12 borrados
  1. +29
    -11
      pages/passCar/passCar.js
  2. +1
    -1
      pages/passCar/passCar.wxml

+ 29
- 11
pages/passCar/passCar.js Ver fichero

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


+ 1
- 1
pages/passCar/passCar.wxml Ver fichero

@@ -108,7 +108,7 @@
<text class="txt2">敬请期待</text> <text class="txt2">敬请期待</text>
</view> </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 class="ticket-modal" wx:if="{{showTicketModal}}">
<view style='padding-top:0;'> <view style='padding-top:0;'>
<view class="nocoupon" wx:if="{{ticketList.length==0}}" style="margin-top:100rpx;"> <view class="nocoupon" wx:if="{{ticketList.length==0}}" style="margin-top:100rpx;">


Cargando…
Cancelar
Guardar