Commit 2c35405d by 匡雅琴

处理产品详情分享数据不显示问题

1 parent 44452f99
......@@ -82,6 +82,7 @@ Page({
let {
actNum = 0, activeNavIdx = 0, phone, hasPhoneNumber, name, proName, productData
} = options
console.log(productData, 'productData');
this.setData({
actNum, //选中的场景下标
activeNavIdx, //选中的产品
......@@ -146,12 +147,20 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log(options, 'options');
this.getActiveApiFn()
if (options && options.cardId) {
wx.$trackData = options
// wx.$trackData.cardId = options.cardId
wx.$storage.set('scene', options)
const {name, actNum, activeNavIdx, proName} = options
const app = getApp()
app.getBaseData().then(res => {
const { productData } = res
this.setData({
productData: productData
})
})
this.setData({
actNum: options.actNum,
activeNavIdx: options.activeNavIdx,
......
......@@ -198,6 +198,7 @@ Page({
senceClick(e) {
const { hasPhoneNumber } = this.data
const { scenIndex } = e.detail
const productData = this.data.productData
wx.$router.go('/packagesList/pages/scenarioDetail/scenarioDetail', { hasPhoneNumber, actNum: scenIndex })
},
// 获取全部活动列表
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!