|
|
@@ -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 |
|
|
|
}); |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 发起支付 |
|
|
|
*/ |
|
|
|