Commit 49d6c6d58d8e81cbd0e52eb8cafddcf767895280
1 parent
c66bcbcd
oa优惠券限定链接优惠券优化
Showing
1 changed file
with
13 additions
and
0 deletions
packageA/pages/quan_pro/quan_pro.js
| @@ -52,6 +52,8 @@ Page({ | @@ -52,6 +52,8 @@ Page({ | ||
| 52 | th.setData({getcurday:ut.gettimestamp()}); | 52 | th.setData({getcurday:ut.gettimestamp()}); |
| 53 | 53 | ||
| 54 | var rs=await getApp().request.promiseGet("/api/weshop/prom/coupon/get/"+th.data.id, {}) | 54 | var rs=await getApp().request.promiseGet("/api/weshop/prom/coupon/get/"+th.data.id, {}) |
| 55 | + // console.error('分享请求数据'); | ||
| 56 | + // console.error(rs); | ||
| 55 | if(!rs){ | 57 | if(!rs){ |
| 56 | th.setData({is_get:1}); | 58 | th.setData({is_get:1}); |
| 57 | return false; | 59 | return false; |
| @@ -64,6 +66,17 @@ Page({ | @@ -64,6 +66,17 @@ Page({ | ||
| 64 | //如果只限定链接的时候,要取消分享按钮 | 66 | //如果只限定链接的时候,要取消分享按钮 |
| 65 | if(r_data.is_share){ | 67 | if(r_data.is_share){ |
| 66 | wx.hideShareMenu(); | 68 | wx.hideShareMenu(); |
| 69 | + wx.offCopyUrl() | ||
| 70 | + //替换掉复制链接 | ||
| 71 | + wx.onCopyUrl(() => { | ||
| 72 | + setTimeout(()=>{ | ||
| 73 | + wx.setClipboardData({ | ||
| 74 | + data: '暂不支持分享', | ||
| 75 | + success (res) { } | ||
| 76 | + }) | ||
| 77 | + },500) | ||
| 78 | + return { query: 'a=1&b=2' } | ||
| 79 | + }) | ||
| 67 | } | 80 | } |
| 68 | 81 | ||
| 69 | if(r_data.store_id!=os.stoid){ | 82 | if(r_data.store_id!=os.stoid){ |