Commit c6984ab501bbdaedd54ee606d3ab1ae1a548f1d0

Authored by yvan.ni
1 parent 95fce88f

礼包分享的优化

pages/giftpack/giftpacklist/giftpacklist.js
@@ -546,6 +546,23 @@ Page({ @@ -546,6 +546,23 @@ Page({
546 }) 546 })
547 } 547 }
548 548
  549 + //-- 如果只限定链接的时候,要取消分享按钮 --
  550 + if(res.data.data.is_share){
  551 + wx.hideShareMenu();
  552 + wx.offCopyUrl()
  553 + //替换掉复制链接
  554 + wx.onCopyUrl(() => {
  555 + setTimeout(()=>{
  556 + wx.setClipboardData({
  557 + data: '暂不支持分享',
  558 + success (res) { }
  559 + })
  560 + },500)
  561 + return { query: 'a=1&b=2' }
  562 + })
  563 + }
  564 +
  565 +
549 var isStart = 0; 566 var isStart = 0;
550 var now = ut.gettimestamp(); 567 var now = ut.gettimestamp();
551 568
@@ -565,7 +582,8 @@ Page({ @@ -565,7 +582,8 @@ Page({
565 actTitle: res.data.data.actTitle, 582 actTitle: res.data.data.actTitle,
566 wareCard: res.data.data.wareCard, 583 wareCard: res.data.data.wareCard,
567 isStart: isStart, 584 isStart: isStart,
568 - sele_g: res.data.data 585 + sele_g: res.data.data,
  586 + is_share:res.data.data.is_share
569 }) 587 })
570 588
571 589
pages/giftpack/giftpacklist/giftpacklist.wxml
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 <text class="data-v-3a5b7e36 ellipsis-2" style="width:90%;">{{giftTitle}}</text> 13 <text class="data-v-3a5b7e36 ellipsis-2" style="width:90%;">{{giftTitle}}</text>
14 14
15 <!-- 这个是分享按钮 --> 15 <!-- 这个是分享按钮 -->
16 - <view wx:if="{{c_state<2 && isLogin}}" class="xc-share-frame t-c" bindtap="clickShare"> 16 + <view wx:if="{{c_state<2 && isLogin && !is_share}}" class="xc-share-frame t-c" bindtap="clickShare">
17 <view class="iconfont icon-share fs40" ></view> 17 <view class="iconfont icon-share fs40" ></view>
18 <view class="fs22 c-7b">分享</view> 18 <view class="fs22 c-7b">分享</view>
19 </view> 19 </view>
@@ -59,9 +59,6 @@ @@ -59,9 +59,6 @@
59 <text class="data-v-3a5b7e36">{{actTitle}}</text> 59 <text class="data-v-3a5b7e36">{{actTitle}}</text>
60 </block> 60 </block>
61 61
62 -  
63 -  
64 -  
65 </view> 62 </view>
66 <view class="top_foot data-v-3a5b7e36"> 63 <view class="top_foot data-v-3a5b7e36">
67 <view class="top_foot_price data-v-3a5b7e36 no_line_x"> 64 <view class="top_foot_price data-v-3a5b7e36 no_line_x">