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
8535910a
Commit
8535910a
authored
Sep 23, 2021
by
beisir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:update share
parent
f67492df
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
10 deletions
+7
-10
index.vue
src/views/goodsList/index.vue
+4
-4
index.vue
src/views/orderList/index.vue
+3
-6
No files found.
src/views/goodsList/index.vue
View file @
8535910a
...
@@ -211,13 +211,13 @@ export default {
...
@@ -211,13 +211,13 @@ export default {
},
},
async
getShareData
()
{
async
getShareData
()
{
const
{
title
,
sharePosterTemplateUrl
,
img
}
=
this
.
goodsTemp
;
const
{
sharePosterTemplateUrl
,
shareTitle
,
shareSubTitle
,
shareIconUrl
}
=
this
.
goodsTemp
;
const
link
=
window
.
location
.
href
;
const
link
=
window
.
location
.
href
;
return
Promise
.
resolve
({
return
Promise
.
resolve
({
title
,
title
:
shareTitle
,
desc
:
'
我正在免费拿商品,请你帮帮我
'
,
desc
:
shareSubTitle
,
link
:
`pages/webview/webview?url=
${
link
}
/`
,
// 页面地址
link
:
`pages/webview/webview?url=
${
link
}
/`
,
// 页面地址
imgUrl
:
img
,
// 图片地
imgUrl
:
shareIconUrl
,
// 图片地
posterUrl
:
sharePosterTemplateUrl
posterUrl
:
sharePosterTemplateUrl
});
});
},
},
...
...
src/views/orderList/index.vue
View file @
8535910a
...
@@ -81,7 +81,6 @@ export default {
...
@@ -81,7 +81,6 @@ export default {
this
.
getstatusQuery
();
this
.
getstatusQuery
();
this
.
getList
();
this
.
getList
();
this
.
onShareEventChange
();
this
.
onShareEventChange
();
// this.$track.registeredEvents('H5_2B_MyOrderPageExposure');
},
},
methods
:
{
methods
:
{
async
getShareData
(
shareInfo
)
{
async
getShareData
(
shareInfo
)
{
...
@@ -96,7 +95,7 @@ export default {
...
@@ -96,7 +95,7 @@ export default {
});
});
return
Promise
.
resolve
({
return
Promise
.
resolve
({
title
:
shareInfo
.
skuName
,
title
:
shareInfo
.
skuName
,
link
:
`pages/webview/webview?url=
${
window
.
location
.
origin
}
?url=
${
encodeURIComponent
(
link
:
`pages/webview/webview?url=
${
window
.
location
.
origin
}
/
${
encodeURIComponent
(
JSON
.
stringify
(
linkPath
)
JSON
.
stringify
(
linkPath
)
)}
`
,
// 页面地址
)}
`
,
// 页面地址
imgUrl
:
shareInfo
.
skuImg
// 图片地
imgUrl
:
shareInfo
.
skuImg
// 图片地
...
@@ -106,7 +105,8 @@ export default {
...
@@ -106,7 +105,8 @@ export default {
const
vm
=
this
;
const
vm
=
this
;
console
.
log
(
'
update
'
);
console
.
log
(
'
update
'
);
EventBus
.
$on
(
'
shareClickItem
'
,
async
function
({
ev
,
nativeBridge
})
{
EventBus
.
$on
(
'
shareClickItem
'
,
async
function
({
ev
,
nativeBridge
})
{
console
.
log
(
ev
);
const
[
res
]
=
await
groupBuyApi
.
getGroupShareInfo
(
'
1440884214932389888
'
);
const
shareDic
=
await
vm
.
getShareData
(
res
);
if
(
ev
===
'
pic
'
)
{
if
(
ev
===
'
pic
'
)
{
// 分享海报跳转小程序海报分享页面
// 分享海报跳转小程序海报分享页面
// nativeBridge.openNewUrl({
// nativeBridge.openNewUrl({
...
@@ -116,10 +116,7 @@ export default {
...
@@ -116,10 +116,7 @@ export default {
// });
// });
}
}
if
(
ev
===
'
weixin
'
)
{
if
(
ev
===
'
weixin
'
)
{
console
.
log
(
'
监听事件
'
);
// const res = await groupBuyApi.getGroupShareInfo(this.shareInfo.order);
// const res = await groupBuyApi.getGroupShareInfo(this.shareInfo.order);
const
[
res
]
=
await
groupBuyApi
.
getGroupShareInfo
(
'
1440884214932389888
'
);
const
shareDic
=
await
vm
.
getShareData
(
res
);
// 分享朋友派发微信postMessage事件
// 分享朋友派发微信postMessage事件
nativeBridge
.
run
({
nativeBridge
.
run
({
event
:
'
showShareView
'
,
event
:
'
showShareView
'
,
...
...
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