diff --git a/app.json b/app.json index 50a22c9..027c7c5 100644 --- a/app.json +++ b/app.json @@ -20,7 +20,7 @@ "pages/passCar/passCar", "pages/getphoneInfo/index", "pages/addPark/addPark", - "pages/youhuiquanma/index" + "pages/orderquanma/index" ], "tabBar": { "color": "#9F9F9F", diff --git a/pages/bannerdetail/index.wxss b/pages/bannerdetail/index.wxss index 85c865e..59b1183 100644 --- a/pages/bannerdetail/index.wxss +++ b/pages/bannerdetail/index.wxss @@ -149,7 +149,7 @@ padding: 0 4%; line-height: 87rpx; background: #fff; - border-top: 1rpx solid #f5f5f5; + /* border-top: 1rpx solid #f5f5f5; */ } .notes view:nth-child(1) text { diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js index f32d75f..c292d30 100644 --- a/pages/coupon/detail/index.js +++ b/pages/coupon/detail/index.js @@ -17,7 +17,7 @@ Page({ console.log(that.data); if (that.data.data.merchantLinkPhone) { wx.makePhoneCall({ - phoneNumber: that.data.data.merchantLinkPhone //仅为示例,并非真实的电话号码 + phoneNumber: that.data.data.merchantLinkPhone }); } }, @@ -55,11 +55,10 @@ Page({ console.log("details"); //当前时间与优惠券下架时间做计算 var endTime = util.fmtDate(res.data.endTime); - util.timechuo(endTime) - console.log(util.timechuo(endTime)); + util.timechuo(endTime); that.setData({ - endtime:util.timechuo(endTime) - }) + endtime: util.timechuo(endTime) + }); wx.hideLoading(); that.setData({ data: res.data @@ -133,6 +132,23 @@ Page({ console.log(that.data.couponChannelId); console.log(that.data.couponId); console.log("我即将要跳转到用户手机号授权的页面"); + if (err.code == "3002") { + wx.showToast({ + title: "领取达到上限", + image: "./../../../assets/img/fail.png", + duration: 2000, + mask: false + }); + } + if (err.code == "4003") { + wx.showToast({ + title: "卡券已作废", + image: "./../../../assets/img/fail.png", + duration: 2000, + mask: false + }); + } + if (err.code == 11005) { // 用户手机未授权 /** @@ -189,8 +205,6 @@ Page({ signType: "MD5", paySign: res.data.paySign, success: res => { - console.log(res); - console.log("姐在检查付款异常"); that.payOrderUpdate(that.data.orderId, payOrderId, 1); // 支付成功 console.log(res); if (res.errMsg == "requestPayment:ok") { @@ -198,9 +212,14 @@ Page({ title: "购买成功", image: "./../../../assets/img/success.png", duration: 2000, - mask: false + mask: false, + success:function(){ + wx.redirectTo({ + url: `/pages/order/detail/index?orderId=${that.data.orderId}`, + }) + } }); - + /** * 用户支付成功以后跳转到券包列表 */ @@ -240,7 +259,7 @@ Page({ wx.showToast({ title: "领取成功", duration: 3000, - image: "./../../../assets/img/success.png", + image: "./../../../assets/img/success.png" }); } } diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js index 33a3fe5..9608a6d 100644 --- a/pages/order/detail/index.js +++ b/pages/order/detail/index.js @@ -28,7 +28,7 @@ Page({ console.log(e); wx.navigateTo({ - url: `/pages/youhuiquanma/index?quancode=${e.currentTarget.dataset.quancode}&title=${e.currentTarget.dataset.title}&subtitle=${e.currentTarget.dataset.subtitle}&remark=${e.currentTarget.dataset.remark}&couponorderstatus=${e.currentTarget.dataset.couponorderstatus}`, + url: `/pages/orderquanma/index?quancode=${e.currentTarget.dataset.quancode}&title=${e.currentTarget.dataset.title}&subtitle=${e.currentTarget.dataset.subtitle}&remark=${e.currentTarget.dataset.remark}&couponorderstatus=${e.currentTarget.dataset.couponorderstatus}`, }) console.log(e.currentTarget.dataset.quancode); console.log(e.currentTarget.dataset.couponorderstatus); @@ -105,7 +105,12 @@ Page({ title: "购买成功", duration: 2000, image: "./../../../assets/img/success.png", - mask:false + mask:false, + success:function(){ + wx.redirectTo({ + url: `/pages/order/detail/index?orderId=${that.data.orderId}`, + }) + } }); } }, diff --git a/pages/youhuiquanma/index.js b/pages/orderquanma/index.js similarity index 100% rename from pages/youhuiquanma/index.js rename to pages/orderquanma/index.js diff --git a/pages/youhuiquanma/index.json b/pages/orderquanma/index.json similarity index 100% rename from pages/youhuiquanma/index.json rename to pages/orderquanma/index.json diff --git a/pages/youhuiquanma/index.wxml b/pages/orderquanma/index.wxml similarity index 100% rename from pages/youhuiquanma/index.wxml rename to pages/orderquanma/index.wxml diff --git a/pages/youhuiquanma/index.wxss b/pages/orderquanma/index.wxss similarity index 100% rename from pages/youhuiquanma/index.wxss rename to pages/orderquanma/index.wxss diff --git a/utils/HttpBasics.js b/utils/HttpBasics.js index 4883ab5..611de11 100644 --- a/utils/HttpBasics.js +++ b/utils/HttpBasics.js @@ -97,9 +97,9 @@ class HttpBasics { resolve(res.data); } else { wx.hideLoading(); - wx.showToast({ - title: res.data.message - }); + // wx.showToast({ + // title: res.data.message + // }); reject(res.data); } } else {