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 24ac8405
authored
Oct 20, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'develop' of 192.168.3.233:saas_plus/business-assistant into develop
2 parents
b796e92a
f4410bf1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
pages/checkProduct/checkProduct.js
utils/share.js
pages/checkProduct/checkProduct.js
View file @
24ac840
...
@@ -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,
...
...
utils/share.js
View file @
24ac840
...
@@ -114,9 +114,9 @@ class Share {
...
@@ -114,9 +114,9 @@ class Share {
const
{
const
{
WXUSERINFO
,
WXUSERINFO
,
USERINFO
USERINFO
}
=
this
.
getCommonData
()
}
=
this
.
getCommonData
()
,
query
=
`
${
query
?
`?
${
query
}
&`
:
'?'
}
merchantId=
${
USERINFO
.
merchantId
}
&shareOpenId=
${
WXUSERINFO
.
openId
}
`
thisPage
=
wx
.
$router
.
getPageInstance
()
if
(
USERINFO
.
phone
)
query
+=
`&sharePhone=
${
USERINFO
.
phone
}
`
query
=
`
${
query
?
`?
${
query
}
&`
:
'?'
}
merchantId=
${
thisPage
.
merchantId
||
USERINFO
.
merchantId
}
&shareOpenId=
${
thisPage
.
shareOpenId
||
WXUSERINFO
.
openId
}
&sharePhone=
${
thisPage
.
sharePhone
||
USERINFO
.
phone
}
`
return
query
return
query
}
}
reportShareData
(
shareTrackData
)
{
reportShareData
(
shareTrackData
)
{
...
...
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