Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
ai-card
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 6ffc3ea1
authored
Dec 21, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
代码合并冲突
2 parents
39c202e2
6af28b82
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
81 additions
and
12 deletions
components/proDetail/proDetail.js
components/proDetail/proDetail.wxml
packagesList/pages/productDetail/productDetail.js
packagesList/pages/productDetail/productDetail.wxml
components/proDetail/proDetail.js
View file @
6ffc3ea
...
@@ -21,9 +21,19 @@ Component({
...
@@ -21,9 +21,19 @@ Component({
type
:
Number
,
type
:
Number
,
value
:
0
value
:
0
},
},
// tab
tabList
:
{
type
:
Array
,
value
:
[{
title
:
'项目亮点'
},
{
title
:
'合作案例'
},
{
title
:
'合作方式'
},
{
title
:
'适配产品'
}]
},
cardInfo
:
{
cardInfo
:
{
type
:
Object
,
type
:
Object
,
value
:
{}
value
:
{}
},
// 配置url
activeUrl
:
{
type
:
String
,
value
:
''
}
}
},
},
...
@@ -66,7 +76,7 @@ Component({
...
@@ -66,7 +76,7 @@ Component({
tabList
:
spcList
.
includes
(
actNum
)
?
proInfo
.
tabList
:
norTabList
,
tabList
:
spcList
.
includes
(
actNum
)
?
proInfo
.
tabList
:
norTabList
,
prodItemVideo
:
item
.
videoList
.
length
?
item
.
videoList
[
activeNavIdx
]
:
item
.
noVideoPicture
[
0
]
prodItemVideo
:
item
.
videoList
.
length
?
item
.
videoList
[
activeNavIdx
]
:
item
.
noVideoPicture
[
0
]
})
})
//console.log(this.data.prodItemVideo, 'prodItemVideo--------')
//
console.log(this.data.prodItemVideo, 'prodItemVideo--------')
break
break
}
}
}
}
...
...
components/proDetail/proDetail.wxml
View file @
6ffc3ea
<!-- packagesList/pages/productDetail/components/proDetail/proDetail.wxml -->
<!-- packagesList/pages/productDetail/components/proDetail/proDetail.wxml -->
<view class="view-prod custom-class">
<view class="view-prod custom-class">
<view class="pro-head">
<view class="pro-head">
<view class="select-card" bindtap="selectCard">
<glsx-image custom-class="icon-card" src="home/icon-card.png" />
<view>{{showCard ? '视频' : '名片'}}</view>
</view>
<!-- 有视频 -->
<!-- 有视频 -->
<block wx:if="{{!showCard}}">
<video class="frame" wx:if="{{actNum != 2}}" src="{{prodItemVideo.videoUrl}}" />
<video class="frame" wx:if="{{actNum != 2}}" src="{{prodItemVideo.videoUrl}}" />
<image class="no-video" wx:if="{{actNum == 2}}" src="{{prodItemVideo.posterUrl}}?v={{img_version}}" />
<image class="no-video" wx:if="{{actNum == 2}}" src="{{prodItemVideo.posterUrl}}?v={{img_version}}" />
<view class="title-wrap">
<view class="title-wrap">
<view class="title">{{prodItemVideo.name}}</view>
<view class="title">{{prodItemVideo.name}}</view>
<!-- <glsx-image class="check" src="index/poster/check.png" /> -->
<image class="check" wx:if="{{actNum != 2}}" src="{{IMG_URL}}index/poster/check.png?v={{img_version}}" />
<image class="check" wx:if="{{actNum != 2}}" src="{{IMG_URL}}index/poster/check.png?v={{img_version}}" />
<view class="num" wx:if="{{actNum != 2}}">{{prodItemVideo.view}}</view>
<view class="num" wx:if="{{actNum != 2}}">{{prodItemVideo.view}}</view>
</view>
</view>
</block>
<!-- 无视频 -->
<user-info wx:if="{{showCard}}" class="card-info" cardInfo="{{cardInfo}}" />
</view>
</view>
<!-- <image class="no-video" wx:if="{{actNum == 2}}" src="{{IMG_URL}}index/poster/no-video.png?v={{img_version}}" /> -->
<view class="tab-wrap">
<view class="tab-wrap">
<van-tabs sticky bind:click="onClickTab" active="{{tabAct}}">
<van-tabs sticky bind:click="onClickTab" active="{{tabAct}}">
<van-tab wx:for="{{tabList}}" title="{{item}}" wx:key="idnex" />
<van-tab wx:for="{{tabList}}" title="{{item}}" wx:key="idnex" />
...
...
packagesList/pages/productDetail/productDetail.js
View file @
6ffc3ea
...
@@ -138,12 +138,81 @@ Page({
...
@@ -138,12 +138,81 @@ Page({
};
};
})(),
})(),
//获取配置url
async getActiveApiFn(){
let {code,data} = await getActiveApi()
if(code == 0){
this.setData({
activeUrl: data
})
}
},
// 是否已经查看详情
isgetAuthphone(){
let authphone = wx.$storage.get("authphone");
if(authphone){
// 显示后面的内容
setTimeout(() => {
this.getImgHeight()
},300)
this.setData({
showLeft: true
})
//触发浏览埋点
// this.onLoad(null)
}
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad(options) {
onLoad(options) {
this.getActiveApiFn()
// 是否已经查看详情
this.isgetAuthphone()
if (!options || utils.isEmptyObj(options)) return
let { actNum, activeNavIdx, isShare,sharephone } = options
if(isShare){
wx.hideHomeButton()
}
this.setData({
actNum,
activeNavIdx,
isShare,
sharephone
});
//分享数据
let senceItem = senceData[actNum]
let item = senceData[actNum]?.productList[activeNavIdx]
console.log('title',item.productName)
setTimeout(() => {
// wx.setNavigationBarTitle({
// title: " "+item.productName,
// });
utils.setNavigationBarTitle(item.productName)
},100)
let wx_user_info = wx.$storage.get('wx_user_info'),
shareOpenId = wx_user_info.openId || ''
// console.log('shareOpenId: ', shareOpenId);
// &shareOpenId=
${
shareOpenId
}
this.shareQuery = `
sceneCode
=
$
{
senceItem
?.
sceneCode
}
&
productCode
=
$
{
item
?.
productCode
}
&
isShare
=
$
{
true
}
&
productDesc
=
$
{
item
?.
productName
}
&
category
=
$
{
item
?.
category
}
&
actNum
=
$
{
actNum
}
&
activeNavIdx
=
$
{
activeNavIdx
}
&
sharephone
=
$
{
sharephone
}
`
this.shareTrackData = {
sceneCode: senceItem?.sceneCode,
productCode: item?.productCode,
productName: item?.productName,
category: item?.category,
productDesc: item?.productName,
shareOpenId:shareOpenId
// actNum,
// activeNavIdx,
}
},
},
/**
/**
...
...
packagesList/pages/productDetail/productDetail.wxml
View file @
6ffc3ea
<!--packagesList/pages/productDetail/productDetail.wxml-->
<!--packagesList/pages/productDetail/productDetail.wxml-->
<pro-detail id="pro-detail" custom-class="{{!hasPhoneNumber?'max_page_height':''}}" actNum="{{actNum}}" cardInfo="{{cardInfo}}" activeNavIdx="{{activeNavIdx}}"></pro-detail>
<pro-detail id="pro-detail" custom-class="{{!hasPhoneNumber?'max_page_height':''}}" act
iveUrl="{{activeUrl}}" act
Num="{{actNum}}" cardInfo="{{cardInfo}}" activeNavIdx="{{activeNavIdx}}"></pro-detail>
<pro-phone-number custom-class="pro_phone_number" type="product" hasPhoneNumber="{{hasPhoneNumber}}" bind:updatePhoneNumber="updatePhoneNumber"></pro-phone-number>
<pro-phone-number custom-class="pro_phone_number" type="product" hasPhoneNumber="{{hasPhoneNumber}}" bind:updatePhoneNumber="updatePhoneNumber"></pro-phone-number>
\ No newline at end of file
\ No newline at end of file
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