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 d0b067e9
authored
Oct 27, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
小程序码增加参数
1 parent
c5341aae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
pages/checkProduct/checkProduct.js
utils/share.js
pages/checkProduct/checkProduct.js
View file @
d0b067e
...
@@ -257,18 +257,27 @@ Page({
...
@@ -257,18 +257,27 @@ Page({
async download() {
async download() {
let { actNum, activeNavIdx, imgHeightArr ,imgPath} = this.data;
let { actNum, activeNavIdx, imgHeightArr ,imgPath} = this.data;
const { appId } = wx.getAccountInfoSync().miniProgram
const { appId } = wx.getAccountInfoSync().miniProgram
let { userInfo } = wx.$storage.get()
let { userInfo } = wx.$storage.get(),
wx_user_info = wx.$storage.get('wx_user_info'),
senceItem = senceData[actNum], item = senceData[actNum]?.productList[activeNavIdx];
// let wx_user_info = wx.$storage.get("wx_user_info");
// let wx_user_info = wx.$storage.get("wx_user_info");
// console.log('wx_user_info: ', wx_user_info.appId);
// console.log('wx_user_info: ', wx_user_info.appId);
wx.showLoading({
wx.showLoading({
title: "海报生成中...",
title: "海报生成中...",
});
});
console.log(wx_user_info)
let params = {
let params = {
actNum,
actNum,
activeNavIdx,
activeNavIdx,
isShare: true,
isShare: true,
merchantId:userInfo.merchantId || '',
shareOpenId: wx_user_info.openId || '',
sharePhone: userInfo.phone || '',
sceneCode: senceItem?.sceneCode || '',
productCode: item?.productCode || '',
productDesc: item?.productName || '',
category: item?.category || ''
};
};
// console.log(' wx_user_info.appId', wx_user_info)
// console.log(' wx_user_info.appId', wx_user_info)
let res = await createQrCodeApi({
let res = await createQrCodeApi({
appId: appId,
appId: appId,
...
@@ -419,7 +428,9 @@ Page({
...
@@ -419,7 +428,9 @@ Page({
});
});
let ercodeParams = await this.analysisQRcode(options.scene);
let ercodeParams = await this.analysisQRcode(options.scene);
options = JSON.parse(ercodeParams.scene)
options = JSON.parse(ercodeParams.scene)
this.options = options
console.log('====================',this.options)
this.onLoad(null)
}
}
let {senceData} = this.data
let {senceData} = this.data
// 扫码进来
// 扫码进来
...
...
utils/share.js
View file @
d0b067e
...
@@ -116,7 +116,7 @@ class Share {
...
@@ -116,7 +116,7 @@ class Share {
USERINFO
USERINFO
}
=
this
.
getCommonData
(),
}
=
this
.
getCommonData
(),
thisPage
=
wx
.
$router
.
getPageInstance
().
options
thisPage
=
wx
.
$router
.
getPageInstance
().
options
query
=
`
${
query
?
`?
${
query
}
&`
:
'?'
}
merchantId=
${
thisPage
.
merchantId
||
USERINFO
.
merchantId
||
''
}
&shareOpenId=
${
thisPage
.
shareOpenId
||
WXUSERINFO
.
openId
||
''
}
&sharePhone=
${
thisPage
.
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