Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
group-buy-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
group-buy-ui
Commits
4cf6b028
Commit
4cf6b028
authored
Oct 08, 2021
by
beisir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:优化fitstShare
parent
be0602e7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
16 deletions
+10
-16
utils.service.js
src/service/utils.service.js
+10
-16
No files found.
src/service/utils.service.js
View file @
4cf6b028
...
@@ -376,9 +376,7 @@ export function paramsParentheses(pointer) {
...
@@ -376,9 +376,7 @@ export function paramsParentheses(pointer) {
}
}
export
function
firstGroupShare
(
shareInfo
,
type
)
{
export
function
firstGroupShare
(
shareInfo
,
type
)
{
if
(
!
isWxMp
)
{
if
(
!
isWxMp
)
return
;
return
;
}
const
nativeBridge
=
new
MpBridge
();
const
nativeBridge
=
new
MpBridge
();
if
(
!
shareInfo
)
{
if
(
!
shareInfo
)
{
nativeBridge
.
run
({
nativeBridge
.
run
({
...
@@ -394,6 +392,7 @@ export function firstGroupShare(shareInfo, type) {
...
@@ -394,6 +392,7 @@ export function firstGroupShare(shareInfo, type) {
return
;
return
;
}
}
// eslint-disable-next-line no-unused-vars
// eslint-disable-next-line no-unused-vars
const
vccTokenString
=
`vccToken=
${
encodeURIComponent
(
'
{token}
'
)}
`
;
let
linkPath
=
''
;
let
linkPath
=
''
;
let
detailData
=
{
let
detailData
=
{
skuNo
:
shareInfo
.
skuNo
,
skuNo
:
shareInfo
.
skuNo
,
...
@@ -405,18 +404,14 @@ export function firstGroupShare(shareInfo, type) {
...
@@ -405,18 +404,14 @@ export function firstGroupShare(shareInfo, type) {
};
};
switch
(
type
)
{
switch
(
type
)
{
case
0
:
case
0
:
linkPath
=
`
${
config
.
localHost
}
/groupBuy/list?activityId=
${
linkPath
=
`
${
config
.
localHost
}
/groupBuy/list?activityId=
${
shareInfo
.
activityId
}
&
${
vccTokenString
}
`
;
shareInfo
.
activityId
}
&vccToken=
${
encodeURIComponent
(
'
{token}
'
)}
`
;
break
;
break
;
case
1
:
case
1
:
linkPath
=
`
${
config
.
localHost
}
/orderList/0?
&vccToken=
${
encodeURIComponent
(
'
{token}
'
)
}
`
;
linkPath
=
`
${
config
.
localHost
}
/orderList/0?
${
vccTokenString
}
`
;
break
;
break
;
case
2
:
case
2
:
case
3
:
case
3
:
if
(
shareInfo
.
groupBuyGroupId
)
{
shareInfo
.
groupBuyGroupId
&&
(
detailData
.
groupBuyGroupId
=
shareInfo
.
groupBuyGroupId
);
detailData
.
groupBuyGroupId
=
shareInfo
.
groupBuyGroupId
;
}
linkPath
=
qs
.
stringify
(
detailData
);
linkPath
=
qs
.
stringify
(
detailData
);
linkPath
=
`
${
config
.
localHost
}
/groupBuy/skuInfo?
${
linkPath
}
`
;
linkPath
=
`
${
config
.
localHost
}
/groupBuy/skuInfo?
${
linkPath
}
`
;
break
;
break
;
...
@@ -425,15 +420,14 @@ export function firstGroupShare(shareInfo, type) {
...
@@ -425,15 +420,14 @@ export function firstGroupShare(shareInfo, type) {
JSON
.
stringify
(
linkPath
)
JSON
.
stringify
(
linkPath
)
)}
`
;
)}
`
;
const
tagName
=
type
?
'
[0元购]
'
:
''
;
const
tagName
=
type
?
'
[0元购]
'
:
''
;
let
shareDic
=
{
title
:
`
${
tagName
}${
shareInfo
.
skuName
}
`
,
link
:
shareInfo
.
linkPath
,
// 页面地址
imgUrl
:
shareInfo
.
skuImg
// 图片地
};
nativeBridge
.
run
({
nativeBridge
.
run
({
event
:
'
showShareView
'
,
event
:
'
showShareView
'
,
data
:
{
data
:
{
shareDic
shareDic
:
{
title
:
`
${
tagName
}${
shareInfo
.
skuName
}
`
,
link
:
shareInfo
.
linkPath
,
// 页面地址
imgUrl
:
shareInfo
.
skuImg
// 图片地
}
}
}
});
});
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment