Commit ed837e63 by zhangxw

分享参数

1 parent 49a80735
...@@ -20,6 +20,7 @@ Page({ ...@@ -20,6 +20,7 @@ Page({
}, },
onRoute() { onRoute() {
wx.nextTick(() => {
let missionId = this.options.missionId let missionId = this.options.missionId
// 获取分享内容 // 获取分享内容
ActivityApi.getTaskShareDetail({missionId: missionId}).then(res => { ActivityApi.getTaskShareDetail({missionId: missionId}).then(res => {
...@@ -45,6 +46,7 @@ Page({ ...@@ -45,6 +46,7 @@ Page({
materialTypeArr: typeArr materialTypeArr: typeArr
}) })
}) })
})
}, },
// 预览图片/视频 // 预览图片/视频
......
...@@ -16,6 +16,7 @@ Page({ ...@@ -16,6 +16,7 @@ Page({
shareTitle: '', shareTitle: '',
shareImage: '', shareImage: '',
sharePath: '', sharePath: '',
noPageAuth: true,
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
...@@ -24,12 +25,14 @@ Page({ ...@@ -24,12 +25,14 @@ Page({
onRoute(options) { onRoute(options) {
const userStorage = wx.$storage.get('userInfo') const userStorage = wx.$storage.get('userInfo')
wx.nextTick(() => {
this.setData({ this.setData({
userStorage userStorage
}) })
let id = this.options.missionId let id = this.options.missionId
this.getActiveTaskDetail(id) this.getActiveTaskDetail(id)
this.sharePath = `packageActivity/pages/shareTaskDetail/shareTaskDetail?missionId=${id}` this.sharePath = `packageActivity/pages/shareTaskDetail/shareTaskDetail?missionId=${id}`
})
}, },
// 获取任务详情 // 获取任务详情
......
...@@ -52,10 +52,11 @@ class Share { ...@@ -52,10 +52,11 @@ class Share {
if (sharePath) path = `/${sharePath}` if (sharePath) path = `/${sharePath}`
// path += that.setCommonShareQuery() // path += that.setCommonShareQuery()
if (shareQuery) path += `?${shareQuery}` if (shareQuery) path += `?${shareQuery}`
console.log('::', path)
if (!noPageAuth) path = `/login/loading/loading?url=${encodeURIComponent(path)}` if (!noPageAuth) path = `/login/loading/loading?url=${encodeURIComponent(path)}`
if (shareFun) shareFun() if (shareFun) shareFun()
// if (shareTrackData) that.reportShareData(shareTrackData) // if (shareTrackData) that.reportShareData(shareTrackData)
console.log('::', path)
return { return {
path, path,
title: shareTitle, title: shareTitle,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!