diff --git a/pages/ConsumeDetail/ConsumeDetail.js b/pages/ConsumeDetail/ConsumeDetail.js index fccec60..31ce6af 100644 --- a/pages/ConsumeDetail/ConsumeDetail.js +++ b/pages/ConsumeDetail/ConsumeDetail.js @@ -70,6 +70,9 @@ Page({ * 跳转到门店列表的详情页面 */ gotoDetail(e) { + if (e.currentTarget.dataset.id == undefined) { + return + } wx.navigateTo({ url: `/pages/index/searchbar/detail/index?id=${e.currentTarget.dataset.id}` }) @@ -128,9 +131,13 @@ Page({ }, onLoad(options) { let that = this; - console.log(options.cardId) - that.cardpayList(options.cardId); - that.cardDetail(options.cardId); + let cardId = options.cardId + console.log(cardId) + if (cardId == undefined) { + cardId = 0; + } + that.cardpayList(cardId); + that.cardDetail(cardId); if (options.from){ this.setData({ showIndexReuturn:true diff --git a/pages/cardorder/index/index.js b/pages/cardorder/index/index.js index de2e053..33cbecd 100644 --- a/pages/cardorder/index/index.js +++ b/pages/cardorder/index/index.js @@ -117,6 +117,9 @@ Page({ }, // 跳转到详情 gotoConsumeDetail: function(e) { + if (e.currentTarget.dataset.id == undefined) { + return; + } wx.navigateTo({ url: `/pages/ConsumeDetail/ConsumeDetail?cardId=${e.currentTarget.dataset.id}`, }) @@ -128,6 +131,9 @@ Page({ } else { var mystatus = this.data.mystatus; } + if (e.currentTarget.dataset.quancode == undefined) { + return; + } wx.navigateTo({ url: `/pages/couponorder/detail/index?quancode=${ e.currentTarget.dataset.quancode}&couponorderstatus=${mystatus}` diff --git a/pages/index/searchbar/detail/index.js b/pages/index/searchbar/detail/index.js index 2076456..2b0f006 100644 --- a/pages/index/searchbar/detail/index.js +++ b/pages/index/searchbar/detail/index.js @@ -181,11 +181,6 @@ Page({ /** * 获取多商铺列表 */ - // shopList: function(e) { - // wx.navigateTo({ - // url: `/pages/index/merchantList/index?id=${e.currentTarget.dataset.id}` - // }) - // }, onShareAppMessage: function(res) { let that = this; let shareObj = { diff --git a/pages/order/index/index.js b/pages/order/index/index.js index 39eb742..37ca9ea 100644 --- a/pages/order/index/index.js +++ b/pages/order/index/index.js @@ -75,6 +75,9 @@ Page({ // }, getList(key, pageNum) { let that = this; + if (key == undefined) { + key = 'all' + } /** * key==0 * 不发送该字段