@@ -75,17 +75,23 @@ Page({ | |||||
// }) | // }) | ||||
}, | }, | ||||
onShareAppMessage: function (res) { | onShareAppMessage: function (res) { | ||||
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 + '&updateDate=' + this.data.cardDetail.updateDate, | |||||
imageUrl: this.data.cardDetail.coverImg, | |||||
success: function (res) { | |||||
// 转发成功 | |||||
}, | |||||
fail: function (res) { | |||||
// 转发失败 | |||||
if (res.from === 'button') { | |||||
console.log(res,3333333333333333333333) | |||||
// 来自页面内转发按钮 | |||||
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 + '&updateDate=' + this.data.cardDetail.updateDate, | |||||
imageUrl: this.data.cardDetail.coverImg, | |||||
success: function (res) { | |||||
// 转发成功 | |||||
}, | |||||
fail: function (res) { | |||||
// 转发失败 | |||||
} | |||||
} | } | ||||
}else{ | |||||
console.log(res, 444444444444444444) | |||||
} | } | ||||
}, | }, | ||||
// 点击查看更多 | // 点击查看更多 | ||||
@@ -118,6 +124,7 @@ Page({ | |||||
showIndexReuturn:true | showIndexReuturn:true | ||||
}) | }) | ||||
} | } | ||||
wx.hideShareMenu() | |||||
}, | }, | ||||
cardpayList: function(cardId) { | cardpayList: function(cardId) { | ||||
let that = this; | let that = this; | ||||
@@ -15,10 +15,10 @@ | |||||
<view class='section' wx:for='{{list}}' wx:key='{{index}}'> | <view class='section' wx:for='{{list}}' wx:key='{{index}}'> | ||||
<view class='mms' style='background:{{item.background}}'> | <view class='mms' style='background:{{item.background}}'> | ||||
<image src="{{canTransferred}}" wx-if='{{item.supportTransfer==1}}' class='cantransferred' mode="aspectFill"/> | |||||
<image src="{{canTransferred}}" wx-if='{{item.supportTransfer==1&&!item.showImg}}' class='cantransferred' mode="aspectFill"/> | |||||
<view class='detail_msg'> | <view class='detail_msg'> | ||||
<view class='info'> | <view class='info'> | ||||
<view class='clearfix' data-id='{{item.id}}' bindtap='gotoConsumeDetail' data-id='{{item.id}}'> | |||||
<view class='clearfix' data-id='{{item.id}}' bindtap='{{!item.showImg?"gotoConsumeDetail":""}}' data-id='{{item.id}}'> | |||||
<view class='title fl'> | <view class='title fl'> | ||||
<text class='yue'><text class='yu'>余</text>{{item.remainingAmount/100}}<text class='yu'>元</text></text> | <text class='yue'><text class='yu'>余</text>{{item.remainingAmount/100}}<text class='yu'>元</text></text> | ||||
<text class="txt2" style='margin-top:9rpx!important;' wx:if="{{item.couponOrderStatus == 5 || item.couponOrderStatus == 6 || item.couponOrderStatus == 7|| item.couponOrderStatus == 8}}">{{item.expiredTime}}到期</text> | <text class="txt2" style='margin-top:9rpx!important;' wx:if="{{item.couponOrderStatus == 5 || item.couponOrderStatus == 6 || item.couponOrderStatus == 7|| item.couponOrderStatus == 8}}">{{item.expiredTime}}到期</text> | ||||
@@ -126,7 +126,7 @@ Page({ | |||||
duration: 2000, | duration: 2000, | ||||
mask: false | mask: false | ||||
}); | }); | ||||
wx.navigateTo({ | |||||
wx.reLaunch({ | |||||
url: '/pages/complete/index?couponOrderId=' + this.data.cardData.couponOrderId, | url: '/pages/complete/index?couponOrderId=' + this.data.cardData.couponOrderId, | ||||
}) | }) | ||||
}) | }) | ||||
@@ -7,6 +7,7 @@ Page({ | |||||
data: { | data: { | ||||
couponUrl: imgurl.coupon.url, | couponUrl: imgurl.coupon.url, | ||||
loadingUrl: imgurl.loading.url, | loadingUrl: imgurl.loading.url, | ||||
canTransferred: imgurl.canTransferred.url, | |||||
tabs: [], | tabs: [], | ||||
list: [], | list: [], | ||||
current: "0", | current: "0", | ||||
@@ -15,6 +15,7 @@ | |||||
</view> | </view> | ||||
<view class='section' wx:for='{{list}}' wx:key='{{index}}' bindtap="gotouse" data-couponId='{{item.couponId}}' data-type="{{item.type}}" data-quancode="{{item.id}}"> | <view class='section' wx:for='{{list}}' wx:key='{{index}}' bindtap="gotouse" data-couponId='{{item.couponId}}' data-type="{{item.type}}" data-quancode="{{item.id}}"> | ||||
<view class='mms'> | <view class='mms'> | ||||
<image src="{{canTransferred}}" wx-if='{{item.supportTransfer==1}}' class='cantransferred' mode="aspectFill"/> | |||||
<view class='detail_msg'> | <view class='detail_msg'> | ||||
<image mode="aspectFill" src='{{item.coverImg}}' mode='widthFix'></image> | <image mode="aspectFill" src='{{item.coverImg}}' mode='widthFix'></image> | ||||
<text>{{item.title}}</text> | <text>{{item.title}}</text> | ||||
@@ -230,3 +230,10 @@ button::after{ border: none; } | |||||
margin-top: 30rpx; | margin-top: 30rpx; | ||||
padding: 0 40rpx; | padding: 0 40rpx; | ||||
} | } | ||||
.cantransferred{ | |||||
position: absolute; | |||||
right: 0; | |||||
top: 0; | |||||
width: 60rpx; | |||||
height: 60rpx; | |||||
} |
@@ -24,7 +24,8 @@ Page({ | |||||
showIf: false, | showIf: false, | ||||
showPage:false, | showPage:false, | ||||
showButton:false, | showButton:false, | ||||
cardDetail:null | |||||
cardDetail:null, | |||||
supportTransfer:'' | |||||
}, | }, | ||||
phone: function (e) { | phone: function (e) { | ||||
@@ -53,20 +54,20 @@ Page({ | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
onShareAppMessage: function (res) { | |||||
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 + '&updateDate=' + this.data.order.updateDate, | |||||
imageUrl: this.data.order.coverImg, | |||||
success: function (res) { | |||||
// 转发成功 | |||||
}, | |||||
fail: function (res) { | |||||
// 转发失败 | |||||
} | |||||
} | |||||
}, | |||||
// onShareAppMessage: function (res) { | |||||
// let _this = this; | |||||
// return { | |||||
// title: '领取卡', | |||||
// path: '/pages/index/index?couponChannelId=' + this.data.order.couponChannelId + '&cuserId=' + this.data.order.cuserId + '&couponId=' + this.data.order.productId + '&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) { | |||||
// // 转发成功 | |||||
// }, | |||||
// fail: function (res) { | |||||
// // 转发失败 | |||||
// } | |||||
// } | |||||
// }, | |||||
powerDrawer: function (e) { | powerDrawer: function (e) { | ||||
let that = this; | let that = this; | ||||
console.log(e) | console.log(e) | ||||
@@ -159,7 +160,8 @@ Page({ | |||||
}) | }) | ||||
} | } | ||||
that.setData({ | that.setData({ | ||||
order: res.data | |||||
order: res.data, | |||||
supportTransfer: res.data.supportTransfer | |||||
}); | }); | ||||
that.getStaticGame() | that.getStaticGame() | ||||
//createDate 创建时间 | //createDate 创建时间 | ||||
@@ -79,5 +79,5 @@ | |||||
<image src="{{newUrl}}" class='gameimg' mode='widthFix'></image> | <image src="{{newUrl}}" class='gameimg' mode='widthFix'></image> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<button type="primary" open-type="share" wx:if="{{order.type == 100}}" class='support-tansfer'><image src="{{weixinTitle}}" class='share' mode="widthFix"></image>转赠给微信好友</button> | |||||
<!-- <button type="primary" open-type="share" wx:if="{{order.type == 100 && supportTransfer==1}}" class='support-tansfer'><image src="{{weixinTitle}}" class='share' mode="widthFix"></image>转赠给微信好友</button> --> | |||||
</view> | </view> |