Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ca22e70d
authored
Oct 21, 2022
by
luyt
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:查看产品详情去掉分享按钮
1 parent
e0a1589a
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
10 deletions
pages/checkProduct/checkProduct.js
pages/checkProduct/checkProduct.json
pages/checkProduct/checkProduct.wxml
pages/tab/index/components/product/product.js
pages/tab/index/components/product/product.wxml
pages/tab/index/index.wxml
pages/checkProduct/checkProduct.js
View file @
ca22e70
...
@@ -110,13 +110,15 @@ Page({
...
@@ -110,13 +110,15 @@ Page({
let
{
let
{
actNum
,
actNum
,
activeNavIdx
,
activeNavIdx
,
apiData
apiData
,
// origin //跳转来源 home
}
=
options
;
}
=
options
;
// if(actNum&&activeNavIdx)return
// if(actNum&&activeNavIdx)return
this
.
setData
({
this
.
setData
({
actNum
,
actNum
,
activeNavIdx
,
activeNavIdx
,
apiData
,
apiData
,
// origin
// isShare
// isShare
});
});
let
apiDataJson
=
JSON
.
stringify
(
apiData
);
let
apiDataJson
=
JSON
.
stringify
(
apiData
);
...
@@ -287,6 +289,7 @@ Page({
...
@@ -287,6 +289,7 @@ Page({
wx.nextTick(() => {
wx.nextTick(() => {
this.setData({
this.setData({
// isShare: res.isShare,
// isShare: res.isShare,
phone: res.phone,
phone: res.phone,
});
});
});
});
...
...
pages/checkProduct/checkProduct.json
View file @
ca22e70
...
@@ -4,6 +4,5 @@
...
@@ -4,6 +4,5 @@
},
},
"navigationStyle"
:
"custom"
,
"navigationStyle"
:
"custom"
,
"onReachBottomDistance"
:
10
,
"onReachBottomDistance"
:
10
,
"backgroundColor"
:
"#FC5B32"
,
"enablePullDownRefresh"
:
true
"enablePullDownRefresh"
:
true
}
}
pages/checkProduct/checkProduct.wxml
View file @
ca22e70
...
@@ -35,4 +35,5 @@
...
@@ -35,4 +35,5 @@
</view>
</view>
</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>
pages/tab/index/components/product/product.js
View file @
ca22e70
...
@@ -20,6 +20,7 @@ Component({
...
@@ -20,6 +20,7 @@ Component({
type
:
Boolean
,
type
:
Boolean
,
value
:
false
,
value
:
false
,
},
},
origin
:
String
,
//来源
},
},
/**
/**
...
@@ -42,6 +43,7 @@ Component({
...
@@ -42,6 +43,7 @@ Component({
intoViewId
:
"to-0"
,
intoViewId
:
"to-0"
,
IMGURL
:
`
${
IMG_URL
}
index/`
,
IMGURL
:
`
${
IMG_URL
}
index/`
,
videoBaseUrl
,
videoBaseUrl
,
getMoreBtn
:
false
,
},
},
lifetimes
:
{
lifetimes
:
{
ready
:
function
()
{
ready
:
function
()
{
...
@@ -50,6 +52,12 @@ Component({
...
@@ -50,6 +52,12 @@ Component({
activeNavIdx
:
this
.
data
.
wrapactiveNavIdx
activeNavIdx
:
this
.
data
.
wrapactiveNavIdx
})
})
}
}
// if(this.data.origin){
// this.setData({
// getMoreBtn:true
// })
// }
this
.
init
();
this
.
init
();
this
.
getImgHeight
();
this
.
getImgHeight
();
//如果不是分享,初始化的时候调用函数
//如果不是分享,初始化的时候调用函数
...
@@ -186,9 +194,13 @@ Component({
...
@@ -186,9 +194,13 @@ Component({
// }
// }
this
.
triggerEvent
(
"authorized"
,
{
this
.
triggerEvent
(
"authorized"
,
{
phone
,
phone
,
isShare
:
false
,
//
isShare: false,
});
});
// this.
//隐藏更多按钮
this
.
setData
({
getMoreBtn
:
true
,
isShare
:
false
,
})
this
.
getMoreFn
()
this
.
getMoreFn
()
})
})
.
catch
(({
errMsg
})
=>
{
.
catch
(({
errMsg
})
=>
{
...
@@ -235,6 +247,7 @@ Component({
...
@@ -235,6 +247,7 @@ Component({
actNum
,
actNum
,
activeNavIdx
,
activeNavIdx
,
apiData
,
apiData
,
// origin:'home' //跟首页类似情况
// isShare: true
// isShare: true
});
});
},
},
...
...
pages/tab/index/components/product/product.wxml
View file @
ca22e70
<!-- pages/tab/discovery/components/product/product.wxml -->
<!-- pages/tab/discovery/components/product/product.wxml -->
<view class="prod-wrap">
<view class="prod-wrap">
<text class="big-title">特色产品</text>
<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">
<block wx:for="{{navList}}" wx:key="index">
<text class='nav {{activeNavIdx==index ? "active-nav": ""}}' bindtap="changeNav" data-index="{{index}}">{{item}}</text>
<text class='nav {{activeNavIdx==index ? "active-nav": ""}}' bindtap="changeNav" data-index="{{index}}">{{item}}</text>
</block>
</block>
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
<text class="earnings" decode="{{true}}">预估收益 <text class="earnings-num">{{senceData[actNum]['productList'][activeNavIdx].profit}}</text>
<text class="earnings" decode="{{true}}">预估收益 <text class="earnings-num">{{senceData[actNum]['productList'][activeNavIdx].profit}}</text>
</text>
</text>
</view>
</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" />
<image class="icon" src="{{IMGURL}}share.png" />
<text>分享</text>
<text>分享</text>
</view>
</view>
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
>
>
<block wx:for="{{tab}}" wx:key="index">
<block wx:for="{{tab}}" wx:key="index">
<view id="to-{{index}}" class="img-item img-item{{actNum+1}}{{index+1}}" >
<view id="to-{{index}}" class="img-item img-item{{actNum+1}}{{index+1}}" >
<!--
{{item}}
-->
<!--
index!=5
-->
<image class="img-item{{actNum+1}}{{index+1}}" src="{{IMGURL}}scene{{actNum+1}}{{index+1}}.png" wx:if="{{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-bg" wx:if="{{!isShare && index==5 && senceData[actNum].videoList.length}}">
<view class="video-list">
<view class="video-list">
...
@@ -62,8 +62,9 @@
...
@@ -62,8 +62,9 @@
</view>
</view>
<!-- wx:if="{{ actNum != 2 && index == 4}}" -->
<!-- wx:if="{{ actNum != 2 && index == 4}}" -->
<!-- wx:if="{{isShare && actNum != 2 && index == 4}}" -->
<!-- wx:if="{{isShare && actNum != 2 && index == 4}}" -->
<!-- wx:if="{{ isShare && actNum != 2 && index == 4}}" -->
<button
<button
wx:if="{{ isShare && actNum != 2 && index == 4}}"
wx:if="{{ isShare &&
!getMoreBtn &&
actNum != 2 && index == 4}}"
class="more-btn"
class="more-btn"
data-index="{{index}}"
data-index="{{index}}"
bindgetphonenumber="getUserInfo"
bindgetphonenumber="getUserInfo"
...
...
pages/tab/index/index.wxml
View file @
ca22e70
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
</view>
</view>
</view>
</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>
<!-- 看线索内容 -->
<!-- 看线索内容 -->
<view class="clue" wx:if="{{tabIndx == 0 }}" hover-class="none" hover-stop-propagation="false">
<view class="clue" wx:if="{{tabIndx == 0 }}" hover-class="none" hover-stop-propagation="false">
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment