| @@ -78,7 +78,7 @@ Page({ | |||
| let _this = this; | |||
| return { | |||
| title: '领取卡', | |||
| path: '/pages/index/index?couponChannelId=' + this.data.cardDetail.couponChannelId + '&cuserId=' + this.data.cardDetail.ownerId + '&couponId=' + this.data.cardDetail.couponId + '&coverImg=' + this.data.cardDetail.coverImg + '&userName=' + this.data.userName + '&avatarUrl=' + this.data.avatarUrl + '&couponOrderId=' + this.data.cardDetail.id, | |||
| path: '/pages/index/index?couponChannelId=' + this.data.cardDetail.couponChannelId + '&cuserId=' + this.data.cardDetail.ownerId + '&couponId=' + this.data.cardDetail.couponId + '&coverImg=' + this.data.cardDetail.coverImg + '&userName=' + this.data.userName + '&avatarUrl=' + this.data.avatarUrl + '&couponOrderId=' + this.data.cardDetail.id + '&updateDate=' + this.data.cardDetail.updateDate, | |||
| imageUrl: this.data.cardDetail.coverImg, | |||
| success: function (res) { | |||
| // 转发成功 | |||
| @@ -83,10 +83,11 @@ Page({ | |||
| //获取卡转赠状态 | |||
| getQueryCardStatus(){ | |||
| let that = this; | |||
| // console.log(util.formatTime(Number(that.data.cardData.updateDate), "yyyy-MM-dd hh:mm:ss"),44444444444) | |||
| let param={ | |||
| id: this.data.cardData.couponOrderId, | |||
| couponId: this.data.cardData.couponChannelId, | |||
| cUserId: this.data.cardData.cuserId | |||
| cUserId: this.data.cardData.cuserId, | |||
| updateDate: util.formatTime(Number(that.data.cardData.updateDate), "yyyy-MM-dd hh:mm:ss") | |||
| } | |||
| Http.get({ | |||
| url: config.api.queryCardStatus, | |||
| @@ -107,7 +108,8 @@ Page({ | |||
| let that=this; | |||
| let param = { | |||
| id: this.data.cardData.couponOrderId, | |||
| cUserId: this.data.cardData.cuserId | |||
| cUserId: this.data.cardData.cuserId, | |||
| updateDate: util.formatTime(Number(this.data.cardData.updateDate), "yyyy-MM-dd hh:mm:ss") | |||
| } | |||
| this.setData({ | |||
| receivedDisabled:true | |||
| @@ -468,12 +470,12 @@ Page({ | |||
| * | |||
| */ | |||
| wx.redirectTo({ | |||
| url: "/pages/getphoneInfo/index?path=index&cuserId=" + that.data.cardData.cuserId + "&couponChannelId=" + that.data.cardData.couponChannelId + "&couponId=" + that.data.cardData.couponId + "&userName=" + that.data.cardData.userName + "&coverImg=" + that.data.cardData.coverImg + "&avatarUrl=" + that.data.cardData.avatarUrl + "&couponOrderId=" + that.data.cardData.couponOrderId, | |||
| url: "/pages/getphoneInfo/index?path=index&cuserId=" + that.data.cardData.cuserId + "&couponChannelId=" + that.data.cardData.couponChannelId + "&couponId=" + that.data.cardData.couponId + "&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 + "&couponId=" + that.data.cardData.couponId + "&userName=" + that.data.cardData.userName + "&coverImg=" + that.data.cardData.coverImg + "&avatarUrl=" + that.data.cardData.avatarUrl + "&couponOrderId=" + that.data.cardData.couponOrderId, | |||
| url: "/pages/phoneinput/phoneinput?path=index&cuserId=" + that.data.cardData.cuserId + "&couponChannelId=" + that.data.cardData.couponChannelId + "&couponId=" + that.data.cardData.couponId + "&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({ | |||
| @@ -129,7 +129,7 @@ | |||
| </view> | |||
| </view> | |||
| <!-- 卡转赠领取弹出框 --> | |||
| <view class='shaddow' bindtap='closeAlert' wx:if='{{showCardOffer}}'></view> | |||
| <view class='shaddow' wx:if='{{showCardOffer}}'></view> | |||
| <view class='alert-box' wx:if='{{showCardOffer}}'> | |||
| <view class='user-img'><image src='{{cardData.avatarUrl}}'></image></view> | |||
| <view class='close' bindtap='closeAlert'><image src='{{close02}}'></image></view> | |||
| @@ -70,7 +70,7 @@ Page({ | |||
| }) | |||
| } else if (that.path == 'index' && that.data.paramData.cuserId){ | |||
| wx.reLaunch({ | |||
| url: "/pages/coupon/detail/index?cuserId=" + that.data.paramData.cuserId + '&couponChannelId=' + that.data.paramData.couponChannelId + '&couponId=' + that.data.paramData.couponId + '&coverImg=' + that.data.paramData.coverImg + '&avatarUrl=' + that.data.paramData.avatarUrl + '&userName=' + that.data.paramData.userName + '&couponOrderId=' + that.data.paramData.couponOrderId | |||
| url: "/pages/coupon/detail/index?cuserId=" + that.data.paramData.cuserId + '&couponChannelId=' + that.data.paramData.couponChannelId + '&couponId=' + that.data.paramData.couponId + '&coverImg=' + that.data.paramData.coverImg + '&avatarUrl=' + that.data.paramData.avatarUrl + '&userName=' + that.data.paramData.userName + '&couponOrderId=' + that.data.paramData.couponOrderId + "&updateDate=" + that.data.paramData.updateDate | |||
| }) | |||
| } else { | |||
| wx.showToast({ | |||
| @@ -90,7 +90,7 @@ Page({ | |||
| * 来自转赠 | |||
| */ | |||
| wx.reLaunch({ | |||
| url: `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}&couponId=${that.data.couponId}&cuserId=${that.data.cuserId}&coverImg=${that.data.coverImg}&userName=${that.data.userName}&avatarUrl=${that.data.avatarUrl}&couponOrderId=${that.data.couponOrderId}` | |||
| url: `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}&couponId=${that.data.couponId}&cuserId=${that.data.cuserId}&coverImg=${that.data.coverImg}&userName=${that.data.userName}&avatarUrl=${that.data.avatarUrl}&couponOrderId=${that.data.couponOrderId}&updateDate=${that.data.updateDate}` | |||
| }); | |||
| } else if (that.data.orderId) { | |||
| wx.navigateTo({ | |||
| @@ -37,7 +37,7 @@ Page({ | |||
| /** | |||
| * 转赠判断 | |||
| */ | |||
| that.userLogin(options.couponChannelId, options.couponId, null, options.cuserId, options.coverImg, options.userName, options.avatarUrl, options.couponOrderId); | |||
| that.userLogin(options.couponChannelId, options.couponId, null, options.cuserId, options.coverImg, options.userName, options.avatarUrl, options.couponOrderId, options.updateDate); | |||
| }else{ | |||
| that.userLogin(options.couponChannelId, options.couponId, options.orderId); | |||
| } | |||
| @@ -45,7 +45,7 @@ Page({ | |||
| that.userLogin() | |||
| } | |||
| }, | |||
| checkuerstatus(couponChannelId, couponId, orderId, cuserId, coverImg, userName, avatarUrl, couponOrderId) { | |||
| checkuerstatus(couponChannelId, couponId, orderId, cuserId, coverImg, userName, avatarUrl, couponOrderId, updateDate) { | |||
| let that = this; | |||
| Http.post({ | |||
| url: config.api.checkUserStatus, | |||
| @@ -61,7 +61,7 @@ Page({ | |||
| * 转赠判断 | |||
| */ | |||
| wx.redirectTo({ | |||
| url: `/pages/coupon/detail/index?couponChannelId=${couponChannelId}&couponId=${couponId}&cuserId=${cuserId}&coverImg=${coverImg}&userName=${userName}&avatarUrl=${avatarUrl}&couponOrderId=${couponOrderId}`, | |||
| url: `/pages/coupon/detail/index?couponChannelId=${couponChannelId}&couponId=${couponId}&cuserId=${cuserId}&coverImg=${coverImg}&userName=${userName}&avatarUrl=${avatarUrl}&couponOrderId=${couponOrderId}&updateDate=${updateDate}`, | |||
| }) | |||
| } else if (orderId) { | |||
| wx.redirectTo({ | |||
| @@ -85,7 +85,7 @@ Page({ | |||
| * 转赠判断 | |||
| */ | |||
| wx.redirectTo({ | |||
| url: `/pages/getuserinfo/index?couponChannelId=${couponChannelId}&couponId=${couponId}&cuserId=${cuserId}&coverImg=${coverImg}&userName=${userName}&avatarUrl=${avatarUrl}&couponOrderId=${couponOrderId}` | |||
| url: `/pages/getuserinfo/index?couponChannelId=${couponChannelId}&couponId=${couponId}&cuserId=${cuserId}&coverImg=${coverImg}&userName=${userName}&avatarUrl=${avatarUrl}&couponOrderId=${couponOrderId}&updateDate=${updateDate}` | |||
| }); | |||
| } else if (orderId) { | |||
| wx.redirectTo({ | |||
| @@ -102,7 +102,7 @@ Page({ | |||
| /** | |||
| * 用户登录 | |||
| */ | |||
| userLogin: function (couponChannelId, couponId, orderId, cuserId, coverImg, userName, avatarUrl, couponOrderId) { | |||
| userLogin: function (couponChannelId, couponId, orderId, cuserId, coverImg, userName, avatarUrl, couponOrderId, updateDate) { | |||
| var that = this; | |||
| // 登录 | |||
| wx.login({ | |||
| @@ -145,7 +145,7 @@ Page({ | |||
| app.globalData.token = res.data.token; | |||
| Http.setToken(res.data.token); | |||
| if (couponChannelId&&couponId || orderId){ | |||
| that.checkuerstatus(couponChannelId, couponId, orderId, cuserId, coverImg, userName, avatarUrl, couponOrderId); | |||
| that.checkuerstatus(couponChannelId, couponId, orderId, cuserId, coverImg, userName, avatarUrl, couponOrderId, updateDate); | |||
| }else{ | |||
| that.checkuerstatus(); | |||
| } | |||
| @@ -57,7 +57,7 @@ Page({ | |||
| let _this = this; | |||
| return { | |||
| title: '领取卡', | |||
| path: '/pages/index/index?couponChannelId=' + this.data.order.couponChannelId + '&cuserId=' + this.data.order.cuserId + '&couponId=' + '111' + '&coverImg=' + this.data.order.coverImg + '&userName=' + this.data.userName + '&avatarUrl=' + this.data.avatarUrl + '&couponOrderId=' + this.data.order.couponOrderId, | |||
| path: '/pages/index/index?couponChannelId=' + this.data.order.couponChannelId + '&cuserId=' + this.data.order.cuserId + '&couponId=' + '111' + '&coverImg=' + this.data.order.coverImg + '&userName=' + this.data.userName + '&avatarUrl=' + this.data.avatarUrl + '&couponOrderId=' + this.data.order.couponOrderId + '&updateDate=' + this.data.order.updateDate, | |||
| imageUrl: this.data.order.coverImg, | |||
| success: function (res) { | |||
| // 转发成功 | |||
| @@ -55,7 +55,7 @@ Page({ | |||
| */ | |||
| if (this.data.paramData.cuserId){ | |||
| wx.reLaunch({ | |||
| url: "/pages/coupon/detail/index?cuserId=" + that.data.paramData.cuserId + '&couponChannelId=' + that.data.paramData.couponChannelId + '&couponId=' + that.data.paramData.couponId + '&coverImg=' + that.data.paramData.coverImg + '&avatarUrl=' + that.data.paramData.avatarUrl + '&userName=' + that.data.paramData.userName + '&couponOrderId=' + that.data.paramData.couponOrderId | |||
| url: "/pages/coupon/detail/index?cuserId=" + that.data.paramData.cuserId + '&couponChannelId=' + that.data.paramData.couponChannelId + '&couponId=' + that.data.paramData.couponId + '&coverImg=' + that.data.paramData.coverImg + '&avatarUrl=' + that.data.paramData.avatarUrl + '&userName=' + that.data.paramData.userName + '&couponOrderId=' + that.data.paramData.couponOrderId + "&updateDate=" + that.data.paramData.updateDate | |||
| }) | |||
| }else{ | |||
| wx.redirectTo({ | |||