Commit a52aa1db by 胡悦

添加产品分享

1 parent 2d34ac88
...@@ -44,13 +44,19 @@ module.exports = { ...@@ -44,13 +44,19 @@ module.exports = {
//获取活动配置 //获取活动配置
getActiveApi(data) { getActiveApi(data) {
return api.post( return api.post({
{
method: 'scrm.api.busassistant.activity.getActivityUrl', method: 'scrm.api.busassistant.activity.getActivityUrl',
...data ...data
}, },
true true
) )
} },
// 是否显示门店助手、生意助手按钮
checkCooperate(data) {
return api.post({
method: 'entmicro.api.business.activityRecord.checkCooperate',
...data
})
}
} }
...@@ -210,6 +210,6 @@ App({ ...@@ -210,6 +210,6 @@ App({
globalData: {}, globalData: {},
onPageNotFound(res) { onPageNotFound(res) {
console.log(res, '不存在的页面') console.log(res, '不存在的页面')
wx.$router.go('/pages/tab/index/index')
}, },
}) })
...@@ -134,10 +134,14 @@ Page({ ...@@ -134,10 +134,14 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
console.log(options)
if (options && options.cardId) { if (options && options.cardId) {
// const options = wx.getEnterOptionsSync()
wx.$trackData = options.query wx.$trackData = options.query
wx.$storage.set('scene', options) wx.$storage.set('scene', options)
this.setData({
actNum: options.actNum,
activeNavIdx: options.activeNavIdx
})
this.getCardDetail() this.getCardDetail()
} else { } else {
this.getCardDetail() this.getCardDetail()
...@@ -193,12 +197,13 @@ Page({ ...@@ -193,12 +197,13 @@ Page({
const cardId = wx.$storage.get('scene').cardId const cardId = wx.$storage.get('scene').cardId
// merchantId 兼容旧链接 // merchantId 兼容旧链接
const merchant = wx.$storage.get('scene').merchant || wx.$storage.get('scene').merchantId const merchant = wx.$storage.get('scene').merchant || wx.$storage.get('scene').merchantId
const shareType = 'SHARE_SCEN' const shareType = 'SHARE_PRO'
console.log('cardId', cardId, 'merchant', merchant) console.log('cardId', cardId, 'merchant', merchant)
const {actNum, activeNavIdx} = this.data
return { return {
title: `您好,我向你推荐了广联数科${this.data.cardInfo.staffName}的智能名片~`, title: `您好,我向你推荐了广联数科${this.data.cardInfo.staffName}的智能名片~`,
imageUrl: this.data.shareImg, imageUrl: this.data.shareImg,
path: `packagesList/pages/scenarioDetail/scenarioDetail?cardId=${cardId}&merchant=${merchant}&shareType=${shareType}` path: `packagesList/pages/productDetail/productDetail?cardId=${cardId}&merchant=${merchant}&shareType=${shareType}&actNum=${actNum}&activeNavIdx=${activeNavIdx}`
} }
}, },
......
// packagesList/pages/videoDetal/videoDetal.js // packagesList/pages/videoDetal/videoDetal.js
import {trackData} from '../../../utils/data'
import {productData} from '../../../pages/tab/index/constant/senceData'
Page({ Page({
/** /**
...@@ -10,7 +12,13 @@ Page({ ...@@ -10,7 +12,13 @@ Page({
videoList: [], videoList: [],
videoUrl: '', videoUrl: '',
hasPhoneNumber: false hasPhoneNumber: false
} },
trackList: [
[trackData.EQUITYVIDEO0, trackData.EQUITYVIDEO1, trackData.EQUITYVIDEO2, trackData.EQUITYVIDEO3],
[trackData.SOLARFILMVIDEO],
[],
[trackData.CROWDVIDEO0, trackData.CROWDVIDEO1, trackData.CROWDVIDEO2, trackData.CROWDVIDEO3, trackData.CROWDVIDEO4, trackData.CROWDVIDEO5]
]
}, },
...@@ -19,12 +27,31 @@ Page({ ...@@ -19,12 +27,31 @@ Page({
*/ */
onLoad(options) { onLoad(options) {
console.log(options) console.log(options)
if (options && options.cardId) {
wx.$trackData = options
wx.$storage.set('scene', options)
console.log(productData[+options.scenIndex])
const res = {
index: options.videoIndex,
scenIndex: options.scenIndex,
videoList: productData[+options.scenIndex][0].videoList,
videoUrl: productData[+options.scenIndex][0].videoList[+options.videoIndex].videoUrl
}
console.log(res)
this.setData({
videoItem: res
})
wx.$Track.sendTrack(this.data.trackList[res.scenIndex][res.index])
} else {
wx.$router.getData(res => { wx.$router.getData(res => {
console.log(res) console.log(res)
this.setData({ this.setData({
videoItem: res videoItem: res
}) })
wx.$Track.sendTrack(this.data.trackList[res.scenIndex][res.index])
}) })
}
}, },
// 下载视频 // 下载视频
downVideo() { downVideo() {
...@@ -78,6 +105,16 @@ Page({ ...@@ -78,6 +105,16 @@ Page({
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {
const cardId = wx.$storage.get('scene').cardId
// merchantId 兼容旧链接
const merchant = wx.$storage.get('scene').merchant || wx.$storage.get('scene').merchantId
const shareType = 'SHARE_VIDEO'
console.log('cardId', cardId, 'merchant', merchant)
const {index, scenIndex, videoUrl} = this.data.videoItem
console.log(this.data.videoItem)
return {
title: `您好,我向你分享了一个视频`,
path: `packagesList/pages/videoDetal/videoDetal?cardId=${cardId}&merchant=${merchant}&shareType=${shareType}&scenIndex=${scenIndex}&videoIndex=${index}`
}
} }
}) })
\ No newline at end of file \ No newline at end of file
...@@ -460,7 +460,7 @@ const productData = { ...@@ -460,7 +460,7 @@ const productData = {
1: scenario_1, 1: scenario_1,
2: scenario_2, 2: scenario_2,
3: scenario_3, 3: scenario_3,
99: subscriptionSystemData // 99: subscriptionSystemData
} }
module.exports = { module.exports = {
......
...@@ -63,6 +63,7 @@ Page({ ...@@ -63,6 +63,7 @@ Page({
activityList: [], activityList: [],
subscriptionBannerUrl: Object.freeze(subscriptionBannerUrl), subscriptionBannerUrl: Object.freeze(subscriptionBannerUrl),
subscriptionSystemData: Object.freeze(subscriptionSystemData), subscriptionSystemData: Object.freeze(subscriptionSystemData),
showCooperate: false
// bannerUrl:'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/banner/banner0.png' // bannerUrl:'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/banner/banner0.png'
}, },
...@@ -107,6 +108,11 @@ Page({ ...@@ -107,6 +108,11 @@ Page({
this.setData({ this.setData({
hasPhoneNumber: true hasPhoneNumber: true
}) })
// entmicroApi.checkCooperate({
// phone: wx.$storage.get('aicard_user_info').phone
// }).then(res => {
// })
} }
}, },
// 合作申请 // 合作申请
...@@ -138,24 +144,20 @@ Page({ ...@@ -138,24 +144,20 @@ Page({
}, },
// 跳转视频详情 // 跳转视频详情
videoClick(e) { videoClick(e) {
console.log(e.detail) console.log(e)
const { const {
index, index,
info: { videoUrl }, info: { videoUrl },
scenIndex, scenIndex,
list list
} = e.detail } = e.detail
// if(scenIndex && scenIndex != 0){
// const videoList = productData[0].
// }
// console.log(productData[0])
//const videoList = productData[scenIndex][0].videoList
const videoList = list const videoList = list
wx.$router.go('/packagesList/pages/videoDetal/videoDetal', { wx.$router.go('/packagesList/pages/videoDetal/videoDetal', {
index, index,
videoList, videoList,
videoUrl: videoUrl, videoUrl: videoUrl,
hasPhoneNumber: this.data.hasPhoneNumber hasPhoneNumber: this.data.hasPhoneNumber,
scenIndex
}) })
}, },
...@@ -215,6 +217,7 @@ Page({ ...@@ -215,6 +217,7 @@ Page({
}, },
addAll(data) { addAll(data) {
console.log(data)
for (let i in data) { for (let i in data) {
console.log(data[i]) console.log(data[i])
let arr = [], let arr = [],
......
...@@ -34,16 +34,16 @@ ...@@ -34,16 +34,16 @@
</view> </view>
</view> </view>
<!-- 服务咨询 --> <!-- 服务咨询 -->
<view class="floating-box"> <!-- <view class="floating-box">
<image class="floating-icon" style="margin-bottom: 10rpx;" webp bindtap="toStoreMiniProgram" src="{{IMGURL}}home/icon-store.png?v={{img_version}}" /> <image class="floating-icon" style="margin-bottom: 10rpx;" webp bindtap="toStoreMiniProgram" src="{{IMGURL}}home/icon-store.png?v={{img_version}}" />
<image class="floating-icon" bindtap="toBusinessMiniProgram" webp src="{{IMGURL}}home/icon-business.png?v={{img_version}}" /> <image class="floating-icon" bindtap="toBusinessMiniProgram" webp src="{{IMGURL}}home/icon-business.png?v={{img_version}}" />
<image class="floating-icon" bindtap="handleOpen" webp src="{{IMGURL}}home/custom.png?v={{img_version}}" /> <image class="floating-icon" bindtap="handleOpen" webp src="{{IMGURL}}home/custom.png?v={{img_version}}" />
</view> </view> -->
</view> </view>
<!-- 服务咨询 --> <!-- 服务咨询 -->
<view class="floating-box"> <view class="floating-box">
<image class="floating-icon" style="margin-bottom: 10rpx;" webp bindtap="toStoreMiniProgram" src="{{IMGURL}}home/icon-store.png?v={{img_version}}" /> <image wx:if="{{showCooperate}}" class="floating-icon" style="margin-bottom: 10rpx;" webp bindtap="toStoreMiniProgram" src="{{IMGURL}}home/icon-store.png?v={{img_version}}" />
<image class="floating-icon" bindtap="toBusinessMiniProgram" webp src="{{IMGURL}}home/icon-business.png?v={{img_version}}" /> <image wx:if="{{showCooperate}}" class="floating-icon" bindtap="toBusinessMiniProgram" webp src="{{IMGURL}}home/icon-business.png?v={{img_version}}" />
<image class="floating-icon" bindtap="handleOpen" webp src="{{IMGURL}}home/custom.png?v={{img_version}}" /> <image class="floating-icon" bindtap="handleOpen" webp src="{{IMGURL}}home/custom.png?v={{img_version}}" />
</view> </view>
<phone-number type="{{'home'}}" bindtoApplication="toApplication" hasPhoneNumber="{{hasPhoneNumber}}" /> <phone-number type="{{'home'}}" bindtoApplication="toApplication" hasPhoneNumber="{{hasPhoneNumber}}" />
......
...@@ -118,7 +118,52 @@ const trackData = { ...@@ -118,7 +118,52 @@ const trackData = {
EXPANDETAIL: { EXPANDETAIL: {
pageKey: 29, pageKey: 29,
pageName: "膨胀金活动场景详情页" pageName: "膨胀金活动场景详情页"
},
EQUITYVIDEO0: {
pageKey: 30,
pageName: "数字无忧卡服务30秒"
},
EQUITYVIDEO1: {
pageKey: 31,
pageName: "数字无忧卡3道线"
},
EQUITYVIDEO2: {
pageKey: 32,
pageName: "数字无忧卡服务"
},
EQUITYVIDEO3: {
pageKey: 33,
pageName: "数字无忧卡6大理由"
},
SOLARFILMVIDEO: {
pageKey: 35,
pageName: "太阳膜转化售中案例-门店新增产值12w每月"
},
CROWDVIDEO0: {
pageKey: 36,
pageName: "数字化美容-新增产值20w+"
},
CROWDVIDEO1: {
pageKey: 37,
pageName: "座椅通风系统-新增产值20w"
},
CROWDVIDEO2: {
pageKey: 38,
pageName: "单品AR导航-新增产值20w+"
},
CROWDVIDEO3: {
pageKey: 39,
pageName: "单品类氛围灯-新增产值27w"
},
CROWDVIDEO4: {
pageKey: 40,
pageName: "360全景导航-新增产值57w+"
},
CROWDVIDEO5: {
pageKey: 41,
pageName: "智能香氛系统-新增产值57w+"
} }
}; };
const productTrack = [ const productTrack = [
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!