Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
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 f4410bf1
authored
Oct 20, 2022
by
luyt
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:参数
1 parent
6a2962d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
pages/checkProduct/checkProduct.js
pages/checkProduct/checkProduct.js
View file @
f4410bf
...
@@ -91,7 +91,7 @@ Page({
...
@@ -91,7 +91,7 @@ Page({
onRoute
(
options
)
{
onRoute
(
options
)
{
// console.log("options: ", options);
// console.log("options: ", options);
//选中场景的index,和产品的index
//选中场景的index,和产品的index
let
{
actNum
,
activeNavIdx
,
apiData
}
=
options
;
let
{
actNum
,
activeNavIdx
,
apiData
}
=
options
;
this
.
setData
({
this
.
setData
({
actNum
,
actNum
,
activeNavIdx
,
activeNavIdx
,
...
@@ -100,7 +100,7 @@ Page({
...
@@ -100,7 +100,7 @@ Page({
});
});
let
apiDataJson
=
JSON
.
stringify
(
apiData
)
let
apiDataJson
=
JSON
.
stringify
(
apiData
)
let
item
=
apiData
[
actNum
]?.
productList
[
activeNavIdx
];
let
item
=
apiData
[
actNum
]?.
productList
[
activeNavIdx
];
this
.
shareQuery
=
`sceneCode=
${
apiData
[
actNum
].
sceneCode
}
&productCode=
${
item
?.
productCode
}
&
productDesc
=
$
{
item
?.
productName
}
&
category
=
$
{
item
?.
category
}
&
actNum
=
$
{
actNum
}
&
activeNavIdx
=
$
{
activeNavIdx
}
&
apiData
=
$
{
apiDataJson
}
`;
this
.
shareQuery
=
`sceneCode=
${
apiData
[
actNum
].
sceneCode
}
&productCode=
${
item
?.
productCode
}
&
isShare
=
$
{
true
}
&
productDesc
=
$
{
item
?.
productName
}
&
category
=
$
{
item
?.
category
}
&
actNum
=
$
{
actNum
}
&
activeNavIdx
=
$
{
activeNavIdx
}
&
apiData
=
$
{
apiDataJson
}
`;
this.shareTrackData = {
this.shareTrackData = {
sceneCode: apiData[actNum]?.sceneCode,
sceneCode: apiData[actNum]?.sceneCode,
productCode: item?.productCode,
productCode: item?.productCode,
...
@@ -256,9 +256,11 @@ Page({
...
@@ -256,9 +256,11 @@ Page({
* 生命周期函数--监听页面加载 ()
* 生命周期函数--监听页面加载 ()
*/
*/
onLoad(options) {
onLoad(options) {
console.log('options: ', options);
// actNum,activeNavIdx isShare
// actNum,activeNavIdx isShare
// 扫码进来
// 扫码进来
let { actNum, activeNavIdx, isShare, merchantId } = options;
let { actNum, activeNavIdx, isShare, merchantId } = options;
console.log('isShare: ', isShare);
if (merchantId) {
if (merchantId) {
this.setData({
this.setData({
isShow: false,
isShow: false,
...
@@ -276,7 +278,7 @@ Page({
...
@@ -276,7 +278,7 @@ Page({
// 发请求
// 发请求
let senceItem = senceData[actNum];
let senceItem = senceData[actNum];
let item = senceData[actNum]?.productList[activeNavIdx];
let item = senceData[actNum]?.productList[activeNavIdx];
this.shareQuery = `
sceneCode
=
$
{
senceItem
?.
sceneCode
}
&
productCode
=
$
{
item
?.
productCode
}
&
productDesc
=
$
{
item
?.
productName
}
&
category
=
$
{
item
?.
category
}
&
actNum
=
$
{
actNum
}
&
activeNavIdx
=
$
{
activeNavIdx
}
`;
this.shareQuery = `
sceneCode
=
$
{
senceItem
?.
sceneCode
}
&
productCode
=
$
{
item
?.
productCode
}
&
isShare
=
$
{
isShare
}
&
productDesc
=
$
{
item
?.
productName
}
&
category
=
$
{
item
?.
category
}
&
actNum
=
$
{
actNum
}
&
activeNavIdx
=
$
{
activeNavIdx
}
`;
this.shareTrackData = {
this.shareTrackData = {
sceneCode: senceItem?.sceneCode,
sceneCode: senceItem?.sceneCode,
productCode: item?.productCode,
productCode: item?.productCode,
...
...
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