Commit 33f943dd by chenwq

系统订阅-产品跳转详情页,数据对应不上。

1 parent 013237c3
......@@ -84,8 +84,6 @@ Component({
},
getInfo() {
let { activeNavIdx, actNum } = this.data
// console.log(actNum, 'actNum---')
// console.log(activeNavIdx, 'activeNavIdx---')
const spcList = [99] // 订阅模块需要特殊处理
const senceList = this.data.productData[actNum].filter(item => item.name != '全部')
for (let i = 0; i < senceList.length; i++) {
......@@ -123,7 +121,6 @@ Component({
_this.setData({
imgTopArr
})
console.log(imgTopArr, 'imgTopArr---')
})
.exec()
// setTimeout(() => {
......
......@@ -17,7 +17,8 @@ Page({
IMG_URL,
proInfo: {},
isShare:false, //是否是分享出去的
actNum: 0,
actNum: -1,
activeNavIdx: 0,
tabAct: 0,
showLeft:false, //更多按钮显示的内容
scrollTop:0,
......@@ -71,7 +72,7 @@ Page({
} else {
sceneObj = productData[99].find(item => item.sceneCode == sceneCode)
}
let proInfo = sceneObj?.productList[activeNavIdx]
let proInfo = sceneObj?.productList.find(item => item.id == activeNavIdx)
this.setData({
actNum, //选中的场景下标/sceneid
......@@ -110,7 +111,7 @@ Page({
let data = actNum != 99 ? scenceList : productData[actNum]
let value = actNum != 99 ? actNum : sceneid99
let sceneObj = data.find(item => item.sceneid == value)
let proInfo = sceneObj?.productList[activeNavIdx]
let proInfo = sceneObj?.productList.find(item => item.id == activeNavIdx)
this.setData({
actNum, //选中的场景下标
......
......@@ -136,6 +136,7 @@ const scenario_1 = [
sceneImgs: sceneImgs1,
productImgs: productImgs1,
"sceneCode":"SC002",
sceneid: 1,
productList: [
{
id: 0,
......@@ -188,6 +189,7 @@ const scenario_2 = [
sceneImgs: sceneImgs2,
productImgs: productImgs2,
"sceneCode":"SC003",
sceneid: 2,
productList: [
{
id: 0,
......@@ -305,6 +307,7 @@ const scenario_3 = [
{
name: '美容类',
"sceneCode":"SC004",
sceneid: 3,
productList: [
{
id: 0,
......@@ -332,6 +335,7 @@ const scenario_3 = [
{
name: '轻改类',
"sceneCode":"SC004",
sceneid: 0,
productList: [
{
id: 1,
......
......@@ -138,7 +138,7 @@ const subscriptionSystemData = [
productImgs: productImgs0,
productList: [
{
id: 0,
id: 2,
sceneid: 1,
currentIndex: 0,
img: 'product-img1',
......@@ -185,7 +185,7 @@ const subscriptionSystemData = [
productImgs: productImgs4,
productList: [
{
id: 0,
id: 3,
sceneid: 2,
currentIndex: 0,
proName: '膨胀金',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!