Showing
3 changed files
with
24 additions
and
3 deletions
| @@ -11,6 +11,7 @@ Page({ | @@ -11,6 +11,7 @@ Page({ | ||
| 11 | dataStr: Date.now() * 1 / 1000, | 11 | dataStr: Date.now() * 1 / 1000, |
| 12 | detail: {}, | 12 | detail: {}, |
| 13 | exp_date: {}, | 13 | exp_date: {}, |
| 14 | + isShow:'1', | ||
| 14 | resultCoupon: '', //0未领取 1已领取 | 15 | resultCoupon: '', //0未领取 1已领取 |
| 15 | }, | 16 | }, |
| 16 | /** | 17 | /** |
| @@ -167,6 +168,23 @@ Page({ | @@ -167,6 +168,23 @@ Page({ | ||
| 167 | firstTitle | 168 | firstTitle |
| 168 | }; | 169 | }; |
| 169 | }, | 170 | }, |
| 171 | + // 点转发后核销 | ||
| 172 | + writeOff(){ | ||
| 173 | + console.log('点转发后',{...this.data.detail}); | ||
| 174 | + if(this.data.detail.arule.is_share_have == '0' && this.data.detail.activity_id){ | ||
| 175 | + App.Activity.SetActivityStatus({ | ||
| 176 | + id: this.data.detail.activity_id, | ||
| 177 | + }).then(res => { | ||
| 178 | + if (res.ret == '200') { | ||
| 179 | + console.log('转发核销'); | ||
| 180 | + this.setData({ | ||
| 181 | + isShow:'0' | ||
| 182 | + }) | ||
| 183 | + wx.hideShareMenu() | ||
| 184 | + } | ||
| 185 | + }) | ||
| 186 | + } | ||
| 187 | + }, | ||
| 170 | sharesetting() { | 188 | sharesetting() { |
| 171 | let data = this.data.opt; | 189 | let data = this.data.opt; |
| 172 | let detail = this.data.detail; | 190 | let detail = this.data.detail; |
| @@ -183,6 +201,8 @@ Page({ | @@ -183,6 +201,8 @@ Page({ | ||
| 183 | sellerid:this.data.opt.sid | 201 | sellerid:this.data.opt.sid |
| 184 | }).then(res => { | 202 | }).then(res => { |
| 185 | if (res.ret === 200) { | 203 | if (res.ret === 200) { |
| 204 | + let detail = this.data.detail; | ||
| 205 | + detail.activity_id = res.data.length > 0 ? res.data[0].activity_id : ''; | ||
| 186 | this.setData({ | 206 | this.setData({ |
| 187 | resultCoupon: res.data.length > 0 ? '1' : '0', | 207 | resultCoupon: res.data.length > 0 ? '1' : '0', |
| 188 | }) | 208 | }) |
| @@ -237,6 +257,7 @@ Page({ | @@ -237,6 +257,7 @@ Page({ | ||
| 237 | * 用户点击右上角分享 | 257 | * 用户点击右上角分享 |
| 238 | */ | 258 | */ |
| 239 | onShareAppMessage() { | 259 | onShareAppMessage() { |
| 260 | + this.writeOff() | ||
| 240 | return this.sharesetting(); | 261 | return this.sharesetting(); |
| 241 | } | 262 | } |
| 242 | }) | 263 | }) |
| @@ -84,7 +84,7 @@ | @@ -84,7 +84,7 @@ | ||
| 84 | </view> | 84 | </view> |
| 85 | </view> | 85 | </view> |
| 86 | <view class="sharewidth" wx:if="{{resultCoupon == '0' || detail.arule.is_share_lose == '1'}}"> | 86 | <view class="sharewidth" wx:if="{{resultCoupon == '0' || detail.arule.is_share_lose == '1'}}"> |
| 87 | - <button wx:if="{{detail.arule.is_share_lose == '1'}}" class="shareBtn" open-type="share"> | 87 | + <button wx:if="{{detail.arule.is_share_lose == '1' && isShow=='1'}}" class="shareBtn" open-type="share"> |
| 88 | <image src="https://qn.colorcun.com/voucherIcon2.png" mode="" /> | 88 | <image src="https://qn.colorcun.com/voucherIcon2.png" mode="" /> |
| 89 | <text class="font24r">分享</text> | 89 | <text class="font24r">分享</text> |
| 90 | </button> | 90 | </button> |
| @@ -140,7 +140,7 @@ module.exports = data => { | @@ -140,7 +140,7 @@ module.exports = data => { | ||
| 140 | if (data.type1 == '2' && data.type2) { | 140 | if (data.type1 == '2' && data.type2) { |
| 141 | views.push({ | 141 | views.push({ |
| 142 | "type": "image", | 142 | "type": "image", |
| 143 | - "url": 'https://qn.colorcun.com/rectangleBj.png', | 143 | + "url": 'https://qn.colorcun.com/rectangleBj3.png', |
| 144 | "css": { | 144 | "css": { |
| 145 | "width": "210px", | 145 | "width": "210px", |
| 146 | "height": "168px", | 146 | "height": "168px", |
| @@ -207,7 +207,7 @@ module.exports = data => { | @@ -207,7 +207,7 @@ module.exports = data => { | ||
| 207 | if (data.type1 == '3' && data.type2) { | 207 | if (data.type1 == '3' && data.type2) { |
| 208 | views.push({ | 208 | views.push({ |
| 209 | "type": "image", | 209 | "type": "image", |
| 210 | - "url": 'https://qn.colorcun.com/rectangleBj.png', | 210 | + "url": 'https://qn.colorcun.com/rectangleBj3.png', |
| 211 | "css": { | 211 | "css": { |
| 212 | "width": "210px", | 212 | "width": "210px", |
| 213 | "height": "168px", | 213 | "height": "168px", |
-
Please register or login to post a comment