Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
高淑倩
7-Eleven
Commits
8fa00362
Commit
8fa00362
authored
Jun 27, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: h5转发分享
parent
5428a8e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletions
+22
-1
h5page.js
src/subPackage/page/pages/h5/h5page.js
+22
-1
No files found.
src/subPackage/page/pages/h5/h5page.js
View file @
8fa00362
...
@@ -88,6 +88,27 @@ wxService.page({
...
@@ -88,6 +88,27 @@ wxService.page({
* 用户点击右上角分享
* 用户点击右上角分享
*/
*/
onShareAppMessage
:
function
()
{
onShareAppMessage
:
function
()
{
// 需要 encodeURIComponent path
const
{
path
}
=
this
.
data
const
enCodeUrl
=
encodeURIComponent
(
path
)
let
sharePath
=
`/subPackage/page/pages/h5/h5page?url=
${
enCodeUrl
}
`
return
{
// title: '分享给好友',
path
:
sharePath
,
success
(){
wx
.
showToast
({
title
:
"转发成功"
,
icon
:
'success'
,
duration
:
2000
})
},
fail
()
{
wx
.
showToast
({
title
:
"转发失败"
,
icon
:
'none'
,
duration
:
2000
})
}
}
}
}
})
})
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