Commit b8ffe9ca by chenwq

去掉埋点,bug修复

1 parent afc55ae2
...@@ -117,17 +117,16 @@ Page({ ...@@ -117,17 +117,16 @@ Page({
// this.shareQuery = `sceneCode=${sceneObj.sceneCode}&productCode=${proInfo?.productCode}&isShare=${true}&productDesc=${proInfo?.productName}&category=${proInfo?.category}&actNum=${actNum}&activeNavIdx=${activeNavIdx}&sharephone=${sharephone}` // this.shareQuery = `sceneCode=${sceneObj.sceneCode}&productCode=${proInfo?.productCode}&isShare=${true}&productDesc=${proInfo?.productName}&category=${proInfo?.category}&actNum=${actNum}&activeNavIdx=${activeNavIdx}&sharephone=${sharephone}`
this.shareQuery = `id=${id}&sceneCode=${sceneCode}&productCode=${proData?.productCode}&isShare=${true}&sharephone=${sharephone}` this.shareQuery = `id=${id}&sceneCode=${sceneCode}&productCode=${proData?.productCode}&isShare=${true}&sharephone=${sharephone}`
this.shareTrackData = { // this.shareTrackData = {
sceneCode: sceneObj.sceneCode, // sceneCode: sceneObj.sceneCode,
productCode: proInfo?.productCode, // productCode: proInfo?.productCode,
productName: proInfo?.productName, // productName: proInfo?.productName,
category: proInfo?.category, // category: proInfo?.category,
productDesc: proInfo?.productName, // productDesc: proInfo?.productName,
shareOpenId: shareOpenId // shareOpenId: shareOpenId
// actNum, // // actNum,
// activeNavIdx, // // activeNavIdx,
} // }
console.log(this.shareTrackData, 'onload----shareTrackData')
}, },
//接受跳转的路由参数(小程序页面跳转) //接受跳转的路由参数(小程序页面跳转)
...@@ -189,18 +188,17 @@ Page({ ...@@ -189,18 +188,17 @@ Page({
// // activeNavIdx, // // activeNavIdx,
// // apiData, // // apiData,
// } // }
this.shareTrackData = { // this.shareTrackData = {
sceneCode: sceneCode, // sceneCode: sceneCode,
productCode: proData?.productCode, // productCode: proData?.productCode,
productName: proData?.productName, // productName: proData?.productName,
category: proData?.category, // category: proData?.category,
productDesc: proData?.productName, // productDesc: proData?.productName,
shareOpenId:shareOpenId // shareOpenId:shareOpenId
// actNum, // // actNum,
// activeNavIdx, // // activeNavIdx,
// apiData, // // apiData,
} // }
console.log(this.shareTrackData, 'onrouter----shareTrackData')
}, },
//获取配置url //获取配置url
...@@ -375,5 +373,5 @@ Page({ ...@@ -375,5 +373,5 @@ Page({
* 浏览埋点 * 浏览埋点
*/ */
onShareTimeline() {}, onShareTimeline() {},
onViewTrack: true onViewTrack: false
}); });
...@@ -31,42 +31,7 @@ Page({ ...@@ -31,42 +31,7 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
async onLoad(options) { async onLoad(options) {
// wx.$router.getData(res => {
// this.setData({
// videoItem: res
// })
// })
// if (!utils.isEmptyObj(options)) {
// let { isShare, videoIndex, tabActive, sceneCode, leftMenuIndex = 0, tabsActive } = options;
// let item = this.data.productData[tabActive].find(item => item.sceneCode == sceneCode)
// let videoList = []
// let videoUrl = ''
// let videoObj = {}
// if (tabsActive === '3') {
// videoList = item?.operationVideoList
// videoUrl = item?.operationVideoList[videoIndex]?.videoUrl
// videoObj = item?.operationVideoList[videoIndex]
// } else {
// videoList = item?.videoList,
// videoUrl = item.videoList[videoIndex]?.videoUrl
// videoObj = item?.videoList[videoIndex]
// }
// let videoItem = {
// index: videoIndex,
// videoList: videoList,
// videoUrl: videoUrl,
// tabsActive: tabsActive
// }
// this.setData({
// videoItem: videoItem,
// isShare: isShare,
// videoObj: videoObj,
// leftMenuIndex: leftMenuIndex
// })
// this.setpagesTitle()
// this.shareDataFn(options)
if (utils.isEmptyObj(options)) return if (utils.isEmptyObj(options)) return
console.log(options);
const { id, isShare } = options; const { id, isShare } = options;
let videoData = await this.getDetailWithLike(id); let videoData = await this.getDetailWithLike(id);
if (!videoData) { if (!videoData) {
...@@ -80,21 +45,12 @@ Page({ ...@@ -80,21 +45,12 @@ Page({
videoId: id, videoId: id,
isShare isShare
}); });
this.setpagesTitle(videoData.title) this.setpagesTitle(videoData.proName)
this.changeShareData() this.changeShareData()
}, },
//接受跳转的路由参数(小程序页面跳转) //接受跳转的路由参数(小程序页面跳转)
async onRoute(options) { async onRoute(options) {
if (!options || utils.isEmptyObj(options)) return if (!options || utils.isEmptyObj(options)) return
// let { scenIndex, videoList, index, leftMenuIndex = 0 } = options
// options.videoIndex = index
// options.tabActive = scenIndex
// this.setData({
// videoObj: videoList[index],
// leftMenuIndex: leftMenuIndex
// })
// this.setpagesTitle()
// this.shareDataFn(options)
let { id, sceneCode } = options; let { id, sceneCode } = options;
let videoData = await this.getDetailWithLike(id); let videoData = await this.getDetailWithLike(id);
if (!videoData) { if (!videoData) {
...@@ -109,7 +65,7 @@ Page({ ...@@ -109,7 +65,7 @@ Page({
videoId: id, videoId: id,
sceneCode sceneCode
}); });
this.setpagesTitle(videoData.title) this.setpagesTitle(videoData.proName)
this.changeShareData() this.changeShareData()
}, },
// 获取视频详情 // 获取视频详情
...@@ -117,7 +73,6 @@ Page({ ...@@ -117,7 +73,6 @@ Page({
return new Promise((resolve) => { return new Promise((resolve) => {
let _data; let _data;
getDetailWithLike({id}).then((res) => { getDetailWithLike({id}).then((res) => {
console.log(res);
_data = res.data; _data = res.data;
resolve(_data); resolve(_data);
}); });
...@@ -142,16 +97,16 @@ Page({ ...@@ -142,16 +97,16 @@ Page({
// let userInfoObj = wx.$storage.get("userInfo"); // let userInfoObj = wx.$storage.get("userInfo");
// // #服务商账号#取该分享者商户的联系人字段,无则取商户简称,无则取商户全称 // // #服务商账号#取该分享者商户的联系人字段,无则取商户简称,无则取商户全称
// let name = userInfoObj.merchantName; // let name = userInfoObj.merchantName;
let { title } = this.data.videoData let { proName } = this.data.videoData
let { sceneCode, videoId } = this.data let { sceneCode, videoId } = this.data
this.shareTitle = `给您分享一个${title} 视频`; this.shareTitle = `给您分享一个${proName} 视频`;
//分享的数据 //分享的数据
// let senceItem = productData[tabActive][leftMenuIndex] // let senceItem = productData[tabActive][leftMenuIndex]
// this.shareQuery = `sceneCode=${senceItem?.sceneCode}&isShare=${true}&tabActive=${tabActive}&videoIndex=${videoIndex}&leftMenuIndex=${leftMenuIndex}&tabsActive=${tabsActive}` // this.shareQuery = `sceneCode=${senceItem?.sceneCode}&isShare=${true}&tabActive=${tabActive}&videoIndex=${videoIndex}&leftMenuIndex=${leftMenuIndex}&tabsActive=${tabsActive}`
this.shareQuery = `sceneCode=${sceneCode}&isShare=${true}&id=${videoId}` this.shareQuery = `sceneCode=${sceneCode}&isShare=${true}&id=${videoId}`
}, },
// 切换视频 // 切换视频
chooseVideo(e) { async chooseVideo(e) {
// let { detail } = e // let { detail } = e
// this.setData({ // this.setData({
// videoIndex: detail.index, // videoIndex: detail.index,
...@@ -159,11 +114,13 @@ Page({ ...@@ -159,11 +114,13 @@ Page({
// ['videoItem.videoUrl']: detail?.info?.videoUrl, // ['videoItem.videoUrl']: detail?.info?.videoUrl,
// videoObj: detail?.info // videoObj: detail?.info
// }) // })
const {title, id} = e.detail const {proName, id} = e.detail
let videoData = await this.getDetailWithLike(id)
this.setData({ this.setData({
videoId: id videoId: id,
videoData
}) })
this.setpagesTitle(title) this.setpagesTitle(proName)
this.changeShareData() this.changeShareData()
}, },
// 下载视频 // 下载视频
......
...@@ -300,17 +300,6 @@ Page({ ...@@ -300,17 +300,6 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
// 获取看产值数据
const app = getApp()
app.getBaseData().then(res => {
const productData = res[0].list
const systemData = res[1].list
this.setData({
systemData,
productData,
['navList[1]']: res[1].name || '客户数字化'
})
})
// console.log('options: ', options); // console.log('options: ', options);
let { sessionId } = wx.$storage.get(); let { sessionId } = wx.$storage.get();
// console.log("sessionId: ", sessionId); // console.log("sessionId: ", sessionId);
...@@ -481,6 +470,17 @@ Page({ ...@@ -481,6 +470,17 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: async function () { onShow: async function () {
// 获取看产值数据
const app = getApp()
app.getBaseData().then(res => {
const productData = res[0].list
const systemData = res[1].list
this.setData({
systemData,
productData,
['navList[1]']: res[1].name || '客户数字化'
})
})
let { userInfo } = wx.$storage.get(); let { userInfo } = wx.$storage.get();
!userInfo.isSuper && this.getSharePost(userInfo.subLoginUser.merchantId); !userInfo.isSuper && this.getSharePost(userInfo.subLoginUser.merchantId);
let { serviceMerchatList } = (await getMockData()) || { let { serviceMerchatList } = (await getMockData()) || {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!