Commit ca22e70d by luyt

feat:查看产品详情去掉分享按钮

1 parent e0a1589a
......@@ -110,13 +110,15 @@ Page({
let {
actNum,
activeNavIdx,
apiData
apiData,
// origin //跳转来源 home
} = options;
// if(actNum&&activeNavIdx)return
this.setData({
actNum,
activeNavIdx,
apiData,
// origin
// isShare
});
let apiDataJson = JSON.stringify(apiData);
......@@ -287,6 +289,7 @@ Page({
wx.nextTick(() => {
this.setData({
// isShare: res.isShare,
phone: res.phone,
});
});
......
......@@ -4,6 +4,5 @@
},
"navigationStyle": "custom",
"onReachBottomDistance": 10,
"backgroundColor": "#FC5B32",
"enablePullDownRefresh": true
}
......@@ -4,7 +4,7 @@
</view>
<product stickyTop="{{headerHeight}}" actNum="{{actNum}}" wrapactiveNavIdx="{{activeNavIdx}}" senceData="{{senceData}}" isShare="{{isShare}}" bindauthorized="authorizedFn" />
<product stickyTop="{{headerHeight}}" actNum="{{actNum}}" wrapactiveNavIdx="{{activeNavIdx}}" senceData="{{senceData}}" isShare="{{isShare}}" bindauthorized="authorizedFn" />
<!-- 分享弹框 -->
<!-- <shareModel actNum="{{actNum}}" isShow="{{isShow}}" bindmodelclose="modelcloseFn" /> -->
<view class="share-wrap" wx:if="{{isShow}}">
......@@ -35,4 +35,5 @@
</view>
</view>
<!-- 授权昵称 -->
<view wx:if="{{!hasUserInfo && !isShow}}" class="user-profile" bindtap="getUserProfile"></view>
<!-- !hasUserInfo && !isShow -->
<view wx:if="{{!hasUserInfo && isShare}}" class="user-profile" bindtap="getUserProfile"></view>
......@@ -20,6 +20,7 @@ Component({
type: Boolean,
value: false,
},
origin:String, //来源
},
/**
......@@ -42,6 +43,7 @@ Component({
intoViewId: "to-0",
IMGURL: `${IMG_URL}index/`,
videoBaseUrl,
getMoreBtn:false,
},
lifetimes: {
ready: function () {
......@@ -50,6 +52,12 @@ Component({
activeNavIdx:this.data.wrapactiveNavIdx
})
}
// if(this.data.origin){
// this.setData({
// getMoreBtn:true
// })
// }
this.init();
this.getImgHeight();
//如果不是分享,初始化的时候调用函数
......@@ -186,9 +194,13 @@ Component({
// }
this.triggerEvent("authorized", {
phone,
isShare: false,
// isShare: false,
});
// this.
//隐藏更多按钮
this.setData({
getMoreBtn:true,
isShare: false,
})
this.getMoreFn()
})
.catch(({ errMsg }) => {
......@@ -235,6 +247,7 @@ Component({
actNum,
activeNavIdx,
apiData,
// origin:'home' //跟首页类似情况
// isShare: true
});
},
......
<!-- pages/tab/discovery/components/product/product.wxml -->
<view class="prod-wrap">
<text class="big-title">特色产品</text>
<scroll-view class="nav-wrap" scroll-x="{{true}}" wx:if="{{!isShare}}">
<scroll-view class="nav-wrap" scroll-x="{{true}}" wx:if="{{!isShare && origin =='home'}}">
<block wx:for="{{navList}}" wx:key="index">
<text class='nav {{activeNavIdx==index ? "active-nav": ""}}' bindtap="changeNav" data-index="{{index}}">{{item}}</text>
</block>
......@@ -20,7 +20,7 @@
<text class="earnings" decode="{{true}}">预估收益&nbsp;<text class="earnings-num">{{senceData[actNum]['productList'][activeNavIdx].profit}}</text>
</text>
</view>
<view class="share-btn" wx:if="{{!isShare}}" bindtap="onShareFn">
<view class="share-btn" wx:if="{{!isShare && origin =='home'}}" bindtap="onShareFn">
<image class="icon" src="{{IMGURL}}share.png" />
<text>分享</text>
</view>
......@@ -46,8 +46,8 @@
scroll-y="{{true}}"
>
<block wx:for="{{tab}}" wx:key="index">
<view id="to-{{index}}" class="img-item img-item{{actNum+1}}{{index+1}}" >
<!-- {{item}} -->
<view id="to-{{index}}" class="img-item img-item{{actNum+1}}{{index+1}}" >
<!-- index!=5 -->
<image class="img-item{{actNum+1}}{{index+1}}" src="{{IMGURL}}scene{{actNum+1}}{{index+1}}.png" wx:if="{{index!=5}}" />
<view class="video-bg" wx:if="{{!isShare && index==5 && senceData[actNum].videoList.length}}">
<view class="video-list">
......@@ -62,8 +62,9 @@
</view>
<!-- wx:if="{{ actNum != 2 && index == 4}}" -->
<!-- wx:if="{{isShare && actNum != 2 && index == 4}}" -->
<!-- wx:if="{{ isShare && actNum != 2 && index == 4}}" -->
<button
wx:if="{{ isShare && actNum != 2 && index == 4}}"
wx:if="{{ isShare && !getMoreBtn && actNum != 2 && index == 4}}"
class="more-btn"
data-index="{{index}}"
bindgetphonenumber="getUserInfo"
......
......@@ -23,7 +23,7 @@
</view>
</view>
</view>
<product stickyTop="{{headerHeight}}" actNum="{{actNum}}" senceData="{{senceData}}" apiData="{{apiData}}" bindsharehandle="sharehandle" />
<product stickyTop="{{headerHeight}}" actNum="{{actNum}}" senceData="{{senceData}}" origin="home" apiData="{{apiData}}" bindsharehandle="sharehandle" />
</view>
<!-- 看线索内容 -->
<view class="clue" wx:if="{{tabIndx == 0 }}" hover-class="none" hover-stop-propagation="false">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!