Commit 270d68956a090fd9fa9e46cac1b2c1932e0eb3ce

Authored by pengye
1 parent 9be44ef8

用户分享给好友后,不拥有此券

... ... @@ -11,6 +11,7 @@ Page({
dataStr: Date.now() * 1 / 1000,
detail: {},
exp_date: {},
isShow:'1',
resultCoupon: '', //0未领取 1已领取
},
/**
... ... @@ -167,6 +168,23 @@ Page({
firstTitle
};
},
// 点转发后核销
writeOff(){
console.log('点转发后',{...this.data.detail});
if(this.data.detail.arule.is_share_have == '0' && this.data.detail.activity_id){
App.Activity.SetActivityStatus({
id: this.data.detail.activity_id,
}).then(res => {
if (res.ret == '200') {
console.log('转发核销');
this.setData({
isShow:'0'
})
wx.hideShareMenu()
}
})
}
},
sharesetting() {
let data = this.data.opt;
let detail = this.data.detail;
... ... @@ -183,6 +201,8 @@ Page({
sellerid:this.data.opt.sid
}).then(res => {
if (res.ret === 200) {
let detail = this.data.detail;
detail.activity_id = res.data.length > 0 ? res.data[0].activity_id : '';
this.setData({
resultCoupon: res.data.length > 0 ? '1' : '0',
})
... ... @@ -237,6 +257,7 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage() {
this.writeOff()
return this.sharesetting();
}
})
\ No newline at end of file
... ...
... ... @@ -84,7 +84,7 @@
</view>
</view>
<view class="sharewidth" wx:if="{{resultCoupon == '0' || detail.arule.is_share_lose == '1'}}">
<button wx:if="{{detail.arule.is_share_lose == '1'}}" class="shareBtn" open-type="share">
<button wx:if="{{detail.arule.is_share_lose == '1' && isShow=='1'}}" class="shareBtn" open-type="share">
<image src="https://qn.colorcun.com/voucherIcon2.png" mode="" />
<text class="font24r">分享</text>
</button>
... ...
... ... @@ -140,7 +140,7 @@ module.exports = data => {
if (data.type1 == '2' && data.type2) {
views.push({
"type": "image",
"url": 'https://qn.colorcun.com/rectangleBj.png',
"url": 'https://qn.colorcun.com/rectangleBj3.png',
"css": {
"width": "210px",
"height": "168px",
... ... @@ -207,7 +207,7 @@ module.exports = data => {
if (data.type1 == '3' && data.type2) {
views.push({
"type": "image",
"url": 'https://qn.colorcun.com/rectangleBj.png',
"url": 'https://qn.colorcun.com/rectangleBj3.png',
"css": {
"width": "210px",
"height": "168px",
... ...