From b4899983ec4f5e646d372fcfcc138c96e33a35f6 Mon Sep 17 00:00:00 2001 From: meo <18801474720@163.com> Date: Wed, 18 Sep 2019 13:07:39 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8D=A1=E8=BD=AC=E5=A2=9E][=E4=BF=AE?= =?UTF-8?q?=E6=94=B9]:[=E6=AC=A2=E4=B9=90=E5=9F=8E=20=20=E6=8E=88=E6=9D=83?= =?UTF-8?q?=E6=89=8B=E6=9C=BA=E5=8F=B7=E7=9A=84=E9=97=AE=E9=A2=98]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/coupon/detail/index.js | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js index 12a095b..31b577f 100644 --- a/pages/coupon/detail/index.js +++ b/pages/coupon/detail/index.js @@ -589,6 +589,40 @@ Page({ } }) }, + checkPhoneStatus: function () { + let that = this; + Http.get({ + url: config.api.checkPhoneStatus, + data: {} + }) + .then(res => { + console.log(666, '授权成功!') + that.receiveCard() + }) + .catch(err => { + if (err.code == 11005) { + /** + * 手机号没有授权,将值传到用户手机号授权的页面 + * + */ + wx.redirectTo({ + url: "/pages/getphoneInfo/index?path=index&cuserId=" + that.data.cardData.cuserId + "&couponChannelId=" + that.data.cardData.couponChannelId + "&userName=" + that.data.cardData.userName + "&coverImg=" + that.data.cardData.coverImg + "&avatarUrl=" + that.data.cardData.avatarUrl + "&couponOrderId=" + that.data.cardData.couponOrderId + "&updateDate=" + that.data.cardData.updateDate, + }); + } else if (err.code == 11006) { + // 用户手机已加密 + wx.redirectTo({ + url: "/pages/phoneinput/phoneinput?path=index&cuserId=" + that.data.cardData.cuserId + "&couponChannelId=" + that.data.cardData.couponChannelId + "&userName=" + that.data.cardData.userName + "&coverImg=" + that.data.cardData.coverImg + "&avatarUrl=" + that.data.cardData.avatarUrl + "&couponOrderId=" + that.data.cardData.couponOrderId + "&updateDate=" + that.data.cardData.updateDate, + }); + } else { + wx.showToast({ + title: err.message, + icon: 'none', + duration: 2000, + mask: false + }); + } + }) + }, /** * 发起支付 */