From 508e2fcddb16fd08c944f9e334147262f9536cff Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Sat, 10 Aug 2019 21:17:03 +0800 Subject: [PATCH] =?UTF-8?q?[undefined][=E4=BF=AE=E6=94=B9]:=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=BC=82=E5=B8=B8=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/ConsumeDetail/ConsumeDetail.js | 13 ++++++++++--- pages/cardorder/index/index.js | 6 ++++++ pages/index/searchbar/detail/index.js | 5 ----- pages/order/index/index.js | 3 +++ 4 files changed, 19 insertions(+), 8 deletions(-) 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 * 不发送该字段