Commit 6ffc3ea1 by 张立顺

代码合并冲突

2 parents 39c202e2 6af28b82
...@@ -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
} }
} }
......
<!-- 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" />
......
...@@ -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--> <!--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':''}}" activeUrl="{{activeUrl}}" actNum="{{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
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!