diff --git a/assets/images/fail.png b/assets/images/fail.png new file mode 100644 index 0000000..698614a Binary files /dev/null and b/assets/images/fail.png differ diff --git a/pages/ConsumeDetail/ConsumeDetail.js b/pages/ConsumeDetail/ConsumeDetail.js index 54c6822..e679219 100644 --- a/pages/ConsumeDetail/ConsumeDetail.js +++ b/pages/ConsumeDetail/ConsumeDetail.js @@ -82,13 +82,6 @@ Page({ showPage: true }) } else { - wx.showModal({ - title: '抱歉', - content: '暂无消费记录', - showCancel: false, - success: function (res) { - } - }) } wx.hideLoading(); res.data.list.map(file => { diff --git a/pages/cardorder/index/index.js b/pages/cardorder/index/index.js index 9c33704..eca2e96 100644 --- a/pages/cardorder/index/index.js +++ b/pages/cardorder/index/index.js @@ -33,8 +33,8 @@ Page({ onShow: function() { let that = this; wx.setStorage({ - key: 'couponNum', - data: "couponNum1", + key: 'couponNum2', + data: "couponNum3", }) wx.hideTabBarRedDot({ index: 2 diff --git a/pages/cardorder/index/index.wxml b/pages/cardorder/index/index.wxml index 1b4f23b..c6c692e 100644 --- a/pages/cardorder/index/index.wxml +++ b/pages/cardorder/index/index.wxml @@ -1,5 +1,5 @@ - + diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js index d43db10..13d599d 100644 --- a/pages/coupon/detail/index.js +++ b/pages/coupon/detail/index.js @@ -223,6 +223,11 @@ Page({ couponId: options.couponId, title: that.data.data.title ? that.data.data.title : '', }); + if(options.cardType){ + that.setData({ + cardType: options.cardType + }) + } var parmer = { url: config.api.couponDetail, data: { @@ -354,56 +359,56 @@ Page({ if (err.code == "2011") { wx.showToast({ title: "商户信息没找到", - image:imgurl.fail.url, + image:'./../../../assets/images/fail.png', duration: 2000, mask: false }); } else if (err.code == "2013") { wx.showToast({ title: "商户信息禁用", - image:imgurl.fail.url, + image:'./../../../assets/images/fail.png', duration: 2000, mask: false }); } else if (err.code == "3000") { wx.showToast({ title: "库存不足", - image:imgurl.fail.url, + image:'./../../../assets/images/fail.png', duration: 2000, mask: false }); } else if (err.code == "3001") { wx.showToast({ title: "领取达到上限", - image:imgurl.fail.url, + image:'./../../../assets/images/fail.png', duration: 2000, mask: false }); } else if (err.code == "3002") { wx.showToast({ title: "订单失败", - image:imgurl.fail.url, + image:'./../../../assets/images/fail.png', duration: 2000, mask: false }); } else if (err.code == "3003") { wx.showToast({ title: "订单不存在", - image:imgurl.fail.url, + image:'./../../../assets/images/fail.png', duration: 2000, mask: false }); } else if (err.code == "3004") { wx.showToast({ title: "订单不存在", - image:imgurl.fail.url, + image:'./../../../assets/images/fail.png', duration: 2000, mask: false }); } else if (err.code == "4003") { wx.showToast({ title: "卡券已作废", - image:imgurl.fail.url, + image:'./../../../assets/images/fail.png', duration: 2000, mask: false }); @@ -475,10 +480,17 @@ Page({ /** * 用户支付成功以后跳转到券包列表 */ - wx.setStorage({ - key: 'couponNum', - data: "couponNum", - }) + if(that.data.cardType == 7){ + wx.setStorage({ + key: 'couponNum2', + data: "couponNum2" + }) + }else{ + wx.setStorage({ + key: 'couponNum', + data: "couponNum" + }) + } } }, fail: res => { @@ -506,10 +518,17 @@ Page({ } else { // 免费券 that.payOrderUpdate(orderId, "0", 1, '', 'free'); - wx.setStorage({ - key: 'couponNum', - data: "couponNum" - }) + if(that.data.cardType == 7){ + wx.setStorage({ + key: 'couponNum2', + data: "couponNum2" + }) + }else{ + wx.setStorage({ + key: 'couponNum', + data: "couponNum" + }) + } } } }) diff --git a/pages/discountCardList/discountCardList.js b/pages/discountCardList/discountCardList.js index 1cf3a75..f9368fa 100644 --- a/pages/discountCardList/discountCardList.js +++ b/pages/discountCardList/discountCardList.js @@ -23,13 +23,6 @@ Page({ }, onShow: function () { let that = this; - wx.setStorage({ - key: 'couponNum', - data: "couponNum1", - }) - wx.hideTabBarRedDot({ - index: 2 - }) Http.get({ url: config.api.businessList, data: { @@ -58,7 +51,7 @@ Page({ gotouse: function (e) { console.log(e.currentTarget.dataset.couponid) wx.navigateTo({ - url: `/pages/coupon/detail/index?couponChannelId=${e.currentTarget.dataset.quancode}&couponId=${e.currentTarget.dataset.couponid}` + url: `/pages/coupon/detail/index?couponChannelId=${e.currentTarget.dataset.quancode}&couponId=${e.currentTarget.dataset.couponid}&cardType=${e.currentTarget.dataset.type}` }); }, getList(key, pageNum) { diff --git a/pages/discountCardList/discountCardList.json b/pages/discountCardList/discountCardList.json index 3e3cbf1..c36e07f 100644 --- a/pages/discountCardList/discountCardList.json +++ b/pages/discountCardList/discountCardList.json @@ -3,5 +3,5 @@ "i-tab": "../../../dist/tab/index", "i-tabs": "../../../dist/tabs/index" }, - "navigationBarTitleText": "优惠卡" + "navigationBarTitleText": "消费卡" } \ No newline at end of file diff --git a/pages/discountCardList/discountCardList.wxml b/pages/discountCardList/discountCardList.wxml index dd054ff..923066b 100644 --- a/pages/discountCardList/discountCardList.wxml +++ b/pages/discountCardList/discountCardList.wxml @@ -13,7 +13,7 @@ - + diff --git a/pages/discountCardList/discountCardList.wxss b/pages/discountCardList/discountCardList.wxss index c4aef49..7c485f1 100644 --- a/pages/discountCardList/discountCardList.wxss +++ b/pages/discountCardList/discountCardList.wxss @@ -140,6 +140,7 @@ color:#FF3535!important; background: none; border-top:1px solid #eee; + border-radius: 0!important; } button::after{ border: none; } .buycardbtn button text{ diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 5acfd5a..3d278bd 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -9,7 +9,7 @@ - 优惠卡 + 消费卡 diff --git a/pages/order/detail/index.wxml b/pages/order/detail/index.wxml index a28e1fb..dc6b280 100644 --- a/pages/order/detail/index.wxml +++ b/pages/order/detail/index.wxml @@ -20,11 +20,6 @@ 下单时间:{{createDate}} -