Browse Source

停车券重复领取的问题

tags/河北版C.8.1.01
caserKing 5 years ago
parent
commit
2fdb315941
2 changed files with 15 additions and 11 deletions
  1. +0
    -2
      components/hot/index.js
  2. +15
    -9
      pages/passCar/passCar.js

+ 0
- 2
components/hot/index.js View File

@@ -52,8 +52,6 @@ Component({
url: config.api.change, url: config.api.change,
data:param, data:param,
}).then(res => { }).then(res => {
console.log(res)
console.log(123)
if(res.data != undefined && res.data){ if(res.data != undefined && res.data){
if(val=='1'){ if(val=='1'){
that.setData({ that.setData({


+ 15
- 9
pages/passCar/passCar.js View File

@@ -76,10 +76,12 @@ Page({
quanid: quanid, quanid: quanid,
showTicketModal: false, showTicketModal: false,
}); });
wx.setStorage({
that.bindCoupon(that.data.quanid);
/* wx.setStorage({
key: 'chosed', key: 'chosed',
data: 'chosed', data: 'chosed',
})
}) */
}, },
/* /*
*/ */
@@ -93,7 +95,7 @@ Page({
url: config.api.couponOrderCarList, url: config.api.couponOrderCarList,
data: { data: {
pageNum: pageNum, pageNum: pageNum,
pageSize: 15,
pageSize: 4,
couponOrderStatus: key couponOrderStatus: key
} }
}).then(res => { }).then(res => {
@@ -242,14 +244,14 @@ Page({
* 只有用户选择了优惠券 * 只有用户选择了优惠券
* 才会进行券和车牌的绑定 * 才会进行券和车牌的绑定
*/ */
if (wx.getStorageSync("chosed") && that.data.quanid) {
/* if (wx.getStorageSync("chosed") && that.data.quanid) {
that.getStopFee(that.data.listCardNum); that.getStopFee(that.data.listCardNum);
that.bindCoupon(that.data.quanid); that.bindCoupon(that.data.quanid);
wx.setStorage({ wx.setStorage({
key: 'chosed', key: 'chosed',
data: '', data: '',
}) })
};
}; */
if (app.globalData.token) { if (app.globalData.token) {
// that.initUsrCarList(); // that.initUsrCarList();
that.initUsrCarList("flags"); that.initUsrCarList("flags");
@@ -446,6 +448,7 @@ Page({
data: postCouponData data: postCouponData
}) })
.then(res => { .then(res => {
that.getStopFee(that.data.listCardNum);
that.initUsrCarList(); that.initUsrCarList();
}) })
.catch(err => { .catch(err => {
@@ -488,11 +491,14 @@ Page({
this.setData({ this.setData({
showTicketModal: true, showTicketModal: true,
allow_load: true, allow_load: true,
ticketList: [],
curPageNum: 1,
}) })
if (!this.data.ticketList.length){
this.getTicketList(0, 1);
/* if (!this.data.ticketList.length){
this.getTicketList(0, 1); this.getTicketList(0, 1);
}
} */
}, },
@@ -503,7 +509,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: 15,
pageSize: 4,
couponOrderStatus: 0 couponOrderStatus: 0
} }
}).then(res => { }).then(res => {


Loading…
Cancel
Save