Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
ai-card
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2c35405d
authored
Apr 06, 2023
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
处理产品详情分享数据不显示问题
1 parent
44452f99
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
packagesList/pages/productDetail/productDetail.js
pages/tab/index/index.js
packagesList/pages/productDetail/productDetail.js
View file @
2c35405
...
@@ -82,6 +82,7 @@ Page({
...
@@ -82,6 +82,7 @@ Page({
let
{
let
{
actNum
=
0
,
activeNavIdx
=
0
,
phone
,
hasPhoneNumber
,
name
,
proName
,
productData
actNum
=
0
,
activeNavIdx
=
0
,
phone
,
hasPhoneNumber
,
name
,
proName
,
productData
}
=
options
}
=
options
console
.
log
(
productData
,
'productData'
);
this
.
setData
({
this
.
setData
({
actNum
,
//选中的场景下标
actNum
,
//选中的场景下标
activeNavIdx
,
//选中的产品
activeNavIdx
,
//选中的产品
...
@@ -146,12 +147,20 @@ Page({
...
@@ -146,12 +147,20 @@ Page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
(
options
)
{
onLoad
(
options
)
{
console
.
log
(
options
,
'options'
);
this
.
getActiveApiFn
()
this
.
getActiveApiFn
()
if
(
options
&&
options
.
cardId
)
{
if
(
options
&&
options
.
cardId
)
{
wx
.
$trackData
=
options
wx
.
$trackData
=
options
// wx.$trackData.cardId = options.cardId
// wx.$trackData.cardId = options.cardId
wx
.
$storage
.
set
(
'scene'
,
options
)
wx
.
$storage
.
set
(
'scene'
,
options
)
const
{
name
,
actNum
,
activeNavIdx
,
proName
}
=
options
const
{
name
,
actNum
,
activeNavIdx
,
proName
}
=
options
const
app
=
getApp
()
app
.
getBaseData
().
then
(
res
=>
{
const
{
productData
}
=
res
this
.
setData
({
productData
:
productData
})
})
this
.
setData
({
this
.
setData
({
actNum
:
options
.
actNum
,
actNum
:
options
.
actNum
,
activeNavIdx
:
options
.
activeNavIdx
,
activeNavIdx
:
options
.
activeNavIdx
,
...
...
pages/tab/index/index.js
View file @
2c35405
...
@@ -198,6 +198,7 @@ Page({
...
@@ -198,6 +198,7 @@ Page({
senceClick
(
e
)
{
senceClick
(
e
)
{
const
{
hasPhoneNumber
}
=
this
.
data
const
{
hasPhoneNumber
}
=
this
.
data
const
{
scenIndex
}
=
e
.
detail
const
{
scenIndex
}
=
e
.
detail
const
productData
=
this
.
data
.
productData
wx
.
$router
.
go
(
'/packagesList/pages/scenarioDetail/scenarioDetail'
,
{
hasPhoneNumber
,
actNum
:
scenIndex
})
wx
.
$router
.
go
(
'/packagesList/pages/scenarioDetail/scenarioDetail'
,
{
hasPhoneNumber
,
actNum
:
scenIndex
})
},
},
// 获取全部活动列表
// 获取全部活动列表
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment