Commit 06f5891f by 张晓玮

Merge branch 'zhangxw_dev_3.0' into 'v3.0'

Zhangxw dev 3.0

See merge request !48
2 parents 39d4ccbc 041ca3fe
......@@ -20,29 +20,31 @@ Page({
},
onRoute() {
let missionId = this.options.missionId
// 获取分享内容
ActivityApi.getTaskShareDetail({missionId: missionId}).then(res => {
res.imgUrlList = []
let typeArr = []
res.platformMerchantMissionMaterialResponseList && res.platformMerchantMissionMaterialResponseList.forEach(val => {
typeArr.push(val.materialType)
if (val.materialType == 1) { // 文案
res.textContent = val.materialContent
}
if (val.materialType == 2 || val.materialType == 3) { // 图片视频
res.imgUrlList.push({
url: val.materialContent,
type: val.materialType == 2 ? 'image' : 'video'
})
}
if (val.materialType == 4) { // 链接
res.linkUrl = val.materialContent
}
})
this.setData({
detailInfo: res,
materialTypeArr: typeArr
wx.nextTick(() => {
let missionId = this.options.missionId
// 获取分享内容
ActivityApi.getTaskShareDetail({missionId: missionId}).then(res => {
res.imgUrlList = []
let typeArr = []
res.platformMerchantMissionMaterialResponseList && res.platformMerchantMissionMaterialResponseList.forEach(val => {
typeArr.push(val.materialType)
if (val.materialType == 1) { // 文案
res.textContent = val.materialContent
}
if (val.materialType == 2 || val.materialType == 3) { // 图片视频
res.imgUrlList.push({
url: val.materialContent,
type: val.materialType == 2 ? 'image' : 'video'
})
}
if (val.materialType == 4) { // 链接
res.linkUrl = val.materialContent
}
})
this.setData({
detailInfo: res,
materialTypeArr: typeArr
})
})
})
},
......
......@@ -16,6 +16,7 @@ Page({
shareTitle: '',
shareImage: '',
sharePath: '',
noPageAuth: true,
/**
* 生命周期函数--监听页面加载
*/
......@@ -24,12 +25,14 @@ Page({
onRoute(options) {
const userStorage = wx.$storage.get('userInfo')
this.setData({
userStorage
wx.nextTick(() => {
this.setData({
userStorage
})
let id = this.options.missionId.split('&')[0]
this.getActiveTaskDetail(id)
this.sharePath = `packageActivity/pages/shareTaskDetail/shareTaskDetail?missionId=${id}`
})
let id = this.options.missionId
this.getActiveTaskDetail(id)
this.sharePath = `packageActivity/pages/shareTaskDetail/shareTaskDetail?missionId=${id}`
},
// 获取任务详情
......
{
"setting": {
"compileHotReLoad": false,
"urlCheck": false,
"lazyloadPlaceholderEnable": true
},
"condition": {
"miniprogram": {
"list": [
{
"name": "个人中心",
"pathName": "pages/tab/mine/mine",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "编辑",
"pathName": "packageMine/pages/editBasicInfo/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/authentication/login/login",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/authentication/register/register",
"query": "data=%7B%22staffName%22%3A%22%E6%81%92%E6%B2%B3%E7%8C%B4%22%2C%22merchantId%22%3A44184606%2C%22fileUrl%22%3A%22https%3A%2F%2Fimg1.baidu.com%2Fit%2Fu%3D1755961019%2C1690032781%26fm%3D253%26app%3D138%26size%3Dw931%26n%3D0%26f%3DJPEG%26fmt%3Dauto%3Fsec%3D1665766800%26t%3D0b9617eab6fe013e35dc2e491e2e2100%22%7D",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/authentication/registerSuccess/registerSuccess",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/authentication/registerInfo/registerInfo",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/authentication/customerService/customerService",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "packageActivity/pages/visitor/visitor",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "packageActivity/pages/visitor/visitor",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "packageActivity/pages/visitor/visitor",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "packageActivity/pages/order/order",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "packageActivity/pages/taskDetail/taskDetail",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "packageActivity/pages/taskDetail/taskDetail",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "packageActivity/pages/applyActivity/applyActivity",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "packageActivity/pages/taskDetail/taskDetail",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "packageActivity/pages/taskDetail/taskDetail",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "packageActivity/pages/applySuccess/applySuccess",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "packageActivity/pages/taskDetail/taskDetail",
"query": "",
"launchMode": "default",
"scene": null
}
]
}
},
"projectname": "store-assistant",
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"libVersion": "2.26.1"
}
\ No newline at end of file
......@@ -52,10 +52,11 @@ class Share {
if (sharePath) path = `/${sharePath}`
// path += that.setCommonShareQuery()
if (shareQuery) path += `?${shareQuery}`
console.log('::', path)
if (!noPageAuth) path = `/login/loading/loading?url=${encodeURIComponent(path)}`
if (shareFun) shareFun()
// if (shareTrackData) that.reportShareData(shareTrackData)
console.log('::', path)
return {
path,
title: shareTitle,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!