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
cc244d52
Commit
cc244d52
authored
Sep 24, 2021
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 增加详情页分享
parent
2bae2a86
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
4 deletions
+30
-4
groupDescInfo.vue
src/views/goodsDetail/components/groupDescInfo.vue
+6
-4
smallPic.vue
src/views/goodsDetail/smallPic.vue
+24
-0
No files found.
src/views/goodsDetail/components/groupDescInfo.vue
View file @
cc244d52
...
@@ -73,10 +73,12 @@ export default {
...
@@ -73,10 +73,12 @@ export default {
if
(
this
.
$refs
.
buttonArea
)
{
if
(
this
.
$refs
.
buttonArea
)
{
this
.
observer
=
new
IntersectionObserver
(
entries
=>
{
this
.
observer
=
new
IntersectionObserver
(
entries
=>
{
entries
.
forEach
(
item
=>
{
entries
.
forEach
(
item
=>
{
if
(
item
.
intersectionRatio
==
0
)
{
if
(
this
.
groupInfo
.
groupBuyStatus
==
1
)
{
this
.
$emit
(
'
changeButtonVisible
'
,
true
);
if
(
item
.
intersectionRatio
==
0
)
{
}
else
{
this
.
$emit
(
'
changeButtonVisible
'
,
true
);
this
.
$emit
(
'
changeButtonVisible
'
,
false
);
}
else
{
this
.
$emit
(
'
changeButtonVisible
'
,
false
);
}
}
}
});
});
});
});
...
...
src/views/goodsDetail/smallPic.vue
View file @
cc244d52
...
@@ -125,6 +125,7 @@ export default {
...
@@ -125,6 +125,7 @@ export default {
countDownText
:
''
,
countDownText
:
''
,
stockPercentage
:
0
,
stockPercentage
:
0
,
sharePicData
:
{},
sharePicData
:
{},
picUrl
:
''
,
// 海报url
// 以下是原有的data
// 以下是原有的data
detailParam
:
{
detailParam
:
{
skuNo
:
''
,
skuNo
:
''
,
...
@@ -138,6 +139,19 @@ export default {
...
@@ -138,6 +139,19 @@ export default {
showButtonNav
:
false
// 是否显示底部按钮
showButtonNav
:
false
// 是否显示底部按钮
};
};
},
},
computed
:
{
goodsShareInfo
()
{
return
this
.
$store
.
state
.
pay
.
goodsShareInfo
;
}
},
watch
:
{
goodsShareInfo
:
{
immediate
:
false
,
handler
(
val
)
{
this
.
onShareEventChange
(
val
);
}
}
},
created
()
{
created
()
{
this
.
detailParam
=
{
...
this
.
$route
.
query
};
this
.
detailParam
=
{
...
this
.
$route
.
query
};
localStorage
.
set
(
'
activityId
'
,
this
.
detailParam
.
templateId
);
// 设置活动模板id,用于下单
localStorage
.
set
(
'
activityId
'
,
this
.
detailParam
.
templateId
);
// 设置活动模板id,用于下单
...
@@ -162,7 +176,17 @@ export default {
...
@@ -162,7 +176,17 @@ export default {
},
5000
);
},
5000
);
},
},
methods
:
{
methods
:
{
async
onShareEventChange
({
ev
,
nativeBridge
})
{
if
(
ev
===
'
pic
'
)
{
// 处理图片url
nativeBridge
.
openNewUrl
({
newUrl
:
`/pages/goodshare/index?url=
${
encodeURIComponent
(
JSON
.
stringify
(
this
.
picUrl
))}
`
});
this
.
$store
.
dispatch
(
'
goods_share_close
'
);
}
},
outputPicUrl
(
res
)
{
outputPicUrl
(
res
)
{
this
.
picUrl
=
res
||
''
;
const
shareInfo
=
{
const
shareInfo
=
{
title
:
this
.
detailInfo
.
goodsName
,
title
:
this
.
detailInfo
.
goodsName
,
desc
:
''
,
desc
:
''
,
...
...
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